提交 89a22b1a 编写于 作者: R Rhyland Klein 提交者: Anton Vorontsov

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: NRhyland Klein <rklein@nvidia.com>
Signed-off-by: NAnton Vorontsov <anton@enomsg.org>
上级 2054d6e9
...@@ -704,6 +704,7 @@ static int sbs_probe(struct i2c_client *client, ...@@ -704,6 +704,7 @@ static int sbs_probe(struct i2c_client *client,
chip->power_supply.properties = sbs_properties; chip->power_supply.properties = sbs_properties;
chip->power_supply.num_properties = ARRAY_SIZE(sbs_properties); chip->power_supply.num_properties = ARRAY_SIZE(sbs_properties);
chip->power_supply.get_property = sbs_get_property; 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 /* ignore first notification of external change, it is generated
* from the power_supply_register call back * from the power_supply_register call back
*/ */
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册