RE: [RFC 4/4] charger-manager: Enable psy based charge control
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) Appreciate if you could review entire patch. I will submit next patch set addressing all your comments. > [...] > > > @@ -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, > > + )) > > + cm->battery_info = psy_get_battery_info(val.strval); > > + > > /* Allocate for psy properties because they may vary */ > > cm->charger_psy.properties = devm_kzalloc(>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. Will enhance struct charger_desc{ ..} to support list of battery model name supported. This can be used to query battery_info using psy_get_battery_info() -Jenny -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
RE: [RFC 4/4] charger-manager: Enable psy based charge control
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) Appreciate if you could review entire patch. I will submit next patch set addressing all your comments. [...] @@ -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. Will enhance struct charger_desc{ ..} to support list of battery model name supported. This can be used to query battery_info using psy_get_battery_info() -Jenny -- To unsubscribe from this list: send the line unsubscribe linux-kernel in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
Re: [RFC 4/4] charger-manager: Enable psy based charge control
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, > + )) > + cm->battery_info = psy_get_battery_info(val.strval); > + > /* Allocate for psy properties because they may vary */ > cm->charger_psy.properties = devm_kzalloc(>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
Re: [RFC 4/4] charger-manager: Enable psy based charge control
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