예제 #1
0
static int twl4030_madc_bat_get_temp(void)
{
	return madc_read(TWL4030_MADC_BTEMP) * 10;
}
예제 #2
0
static int twl4030_madc_bat_get_voltage(void)
{
	return madc_read(TWL4030_MADC_VBAT);
}
예제 #3
0
static int twl4030_madc_bat_get_current(void)
{
	return madc_read(TWL4030_MADC_ICHG) * 1000;
}
예제 #4
0
static int twl4030_madc_bat_get_charging_status(void)
{
	return (madc_read(TWL4030_MADC_ICHG) > 0) ? 1 : 0;
}
예제 #5
0
static int twl4030_madc_bat_get_temp(struct twl4030_madc_battery *bt)
{
	return madc_read(bt->channel_temp) * 10;
}
예제 #6
0
static int twl4030_madc_bat_get_current(struct twl4030_madc_battery *bt)
{
	return madc_read(bt->channel_ichg) * 1000;
}
예제 #7
0
static int twl4030_madc_bat_get_voltage(struct twl4030_madc_battery *bt)
{
	return madc_read(bt->channel_vbat);
}
예제 #8
0
static int twl4030_madc_bat_get_charging_status(struct twl4030_madc_battery *bt)
{
	return (madc_read(bt->channel_ichg) > 0) ? 1 : 0;
}