if (ret)
return ret;
-
val = LP8727_ID200_EN | LP8727_ADC_EN | LP8727_CP_EN;
ret = lp8727_write_byte(pchg, LP8727_CTRL1, val);
if (ret)
static int lp8727_is_dedicated_charger(struct lp8727_chg *pchg)
{
u8 val;
+
lp8727_read_byte(pchg, LP8727_STATUS1, &val);
return val & LP8727_DCPORT;
}
static int lp8727_is_usb_charger(struct lp8727_chg *pchg)
{
u8 val;
+
lp8727_read_byte(pchg, LP8727_STATUS1, &val);
return val & LP8727_CHPORT;
}
/**
* struct lp8727_chg_param
* @eoc_level : end of charge level setting
- * @ichg : charging current
+ * @ichg : charging current
*/
struct lp8727_chg_param {
enum lp8727_eoc_level eoc_level;
/**
* struct lp8727_platform_data
- * @get_batt_present : check battery status - exists or not
- * @get_batt_level : get battery voltage (mV)
+ * @get_batt_present : check battery status - exists or not
+ * @get_batt_level : get battery voltage (mV)
* @get_batt_capacity : get battery capacity (%)
- * @get_batt_temp : get battery temperature
+ * @get_batt_temp : get battery temperature
* @ac : charging parameters for AC type charger
* @usb : charging parameters for USB type charger
* @debounce_msec : interrupt debounce time