OSDN Git Service

of_batterydata: Pass battery id directly to find battery profile
authorSubbaraman Narayanamurthy <subbaram@codeaurora.org>
Mon, 18 Jul 2016 23:09:08 +0000 (16:09 -0700)
committerSubbaraman Narayanamurthy <subbaram@codeaurora.org>
Thu, 21 Jul 2016 19:23:07 +0000 (12:23 -0700)
commitf56fc4b5afcdd11e0a53596b9768b728ed495e82
tree178878059e1a3981bdec91bd59c2ecf915f878df
parentaa958278d16faccd0cc79650b94ea6aa18d4131d
of_batterydata: Pass battery id directly to find battery profile

Currently power supply name is passed to get the battery profile
in of_batterydata_get_best_profile(). This creates a dependency
of waiting for the driver that has the power supply class device.

Improve this by passing the battery id directly to the API. This
way, getting battery id will be the responsibility of caller.

CRs-Fixed: 1043798
Change-Id: I7a8c2b2fcc9b43e2e858114f7312fccf96dc3f78
Signed-off-by: Subbaraman Narayanamurthy <subbaram@codeaurora.org>
drivers/of/of_batterydata.c
drivers/power/qcom-charger/qpnp-fg.c
drivers/power/qcom-charger/qpnp-smbcharger.c
include/linux/of_batterydata.h