modules/batt_health/sys.c
static bool sys_eoc_param_read(bhd_eoc_params_t *eoc)
{
	int i;
	int value;
	char *eoc_val = (char *) eoc;
	int array_size = sizeof(eoc_param_table)/sizeof(eoc_param_table[0]);
	bool is_success = true;

	for (i = 0; i < array_size; i++)
	{
		value = BHD_SYS_sys_param_int_get(eoc_param_table[i].path, BHD_INVALID_VALUE);
		*((int*)(eoc_val + eoc_param_table[i].offset)) = value;
		if (value == BHD_INVALID_VALUE)
			is_success = false;
	}

	return is_success;
}
/* Read all of the end of charge sysfs entries */
Read all of the end of charge sysfs entries
Read all of the end of charge sysfs entries
static bool sys_eoc_param_read(bhd_eoc_params_t *eoc)
{
	int i;
	int value;
	char *eoc_val = (char *) eoc;
	int array_size = sizeof(eoc_param_table)/sizeof(eoc_param_table[0]);
	bool is_success = true;
	for (i = 0; i < array_size; i++)
	{
		value = BHD_SYS_sys_param_int_get(eoc_param_table[i].path, BHD_INVALID_VALUE);
		*((int*)(eoc_val + eoc_param_table[i].offset)) = value;
		if (value == BHD_INVALID_VALUE)
			is_success = false;
	}
	return is_success;
}
static bool sys_eoc_param_read ( bhd_eoc_params_t * eoc ) { int i ; int value ; char * eoc_val = ( char * ) eoc ; int array_size = sizeof ( eoc_param_table ) / sizeof ( eoc_param_table [ 0 ] ) ; bool is_success = true ; for ( i = 0 ; i < array_size ; i ++ ) { value = BHD_SYS_sys_param_int_get ( eoc_param_table [ i ] . path , BHD_INVALID_VALUE ) ; * ( ( int * ) ( eoc_val + eoc_param_table [ i ] . offset ) ) = value ; if ( value == BHD_INVALID_VALUE ) is_success = false ; } return is_success ; }
Read all of the end of charge sysfs entries
Read all of the end of charge sysfs entries