Hi, On Fri, Mar 06, 2015 at 04:03:27PM +0530, Jenny TC wrote: > At present charger manager support only regulator based charging > control. But most of the charger drivers are registered with power > supply subsystem. This patch adds support for power supply based > charging control along with the regulator based control. With the > patch, charging control can be done either using power supply > interface or with regulator interface. The charging is setup > based on battery parameters received through the battery info > handlers.
[...] (so far I only skipped over the patch) [...] > @@ -1704,6 +1968,10 @@ static int charger_manager_probe(struct > platform_device *pdev) > strncpy(cm->psy_name_buf, desc->psy_name, PSY_NAME_MAX); > cm->charger_psy.name = cm->psy_name_buf; > > + if (!power_supply_get_property(fuel_gauge, POWER_SUPPLY_PROP_MODEL_NAME, > + &val)) > + cm->battery_info = psy_get_battery_info(val.strval); > + > /* Allocate for psy properties because they may vary */ > cm->charger_psy.properties = devm_kzalloc(&pdev->dev, > sizeof(enum power_supply_property) We are currently splitting battery data from fuel gauge data, so acquiring the battery using the fuel gauge's MODEL_NAME is not very nice. -- Sebastian
signature.asc
Description: Digital signature