summaryrefslogtreecommitdiffstats
path: root/drivers/power
diff options
context:
space:
mode:
authorRhyland Klein <rklein@nvidia.com>2013-06-10 23:26:40 +0200
committerAnton Vorontsov <anton@enomsg.org>2013-06-29 03:20:56 +0200
commit89a22b1a9850028bd216457397321db5a5ee18f5 (patch)
tree9be0dd2a98f46b27ebdf028ae5a313c63d8c4ac9 /drivers/power
parentpower_supply: Add of_node_put to fix refcount (diff)
downloadlinux-89a22b1a9850028bd216457397321db5a5ee18f5.tar.xz
linux-89a22b1a9850028bd216457397321db5a5ee18f5.zip
sbs-battery: Add dt to power_supply struct
By passing in the dt node of this device, we enable the logic for linking power_supplies together from dt. This is specified by adding a "power-supplies" property with a phandle to the charger for a given supply. Enable this logic now for the sbs-battery driver. Signed-off-by: Rhyland Klein <rklein@nvidia.com> Signed-off-by: Anton Vorontsov <anton@enomsg.org>
Diffstat (limited to 'drivers/power')
-rw-r--r--drivers/power/sbs-battery.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/drivers/power/sbs-battery.c b/drivers/power/sbs-battery.c
index c8c78a74e75a..b5f2a76b6cdf 100644
--- a/drivers/power/sbs-battery.c
+++ b/drivers/power/sbs-battery.c
@@ -704,6 +704,7 @@ static int sbs_probe(struct i2c_client *client,
chip->power_supply.properties = sbs_properties;
chip->power_supply.num_properties = ARRAY_SIZE(sbs_properties);
chip->power_supply.get_property = sbs_get_property;
+ chip->power_supply.of_node = client->dev.of_node;
/* ignore first notification of external change, it is generated
* from the power_supply_register call back
*/