diff options
author | Philip Rakity <prakity@marvell.com> | 2011-08-29 09:32:04 -0700 |
---|---|---|
committer | Anton Vorontsov <cbouatmailru@gmail.com> | 2011-11-25 23:30:58 +0400 |
commit | e7a5f6d55991fb3b3214f435681ee2db96320395 (patch) | |
tree | 770037bf6a2d86190b976bfcea3eb67584991d4c /drivers/power/max8925_power.c | |
parent | 72af5a4b9cc9c4527f2967e0283bee632237c26e (diff) |
max8925_power: Enable power change notifications
The power core infrastructure allow external power change
events to be passed to drivers what are listed in the
supplied_to call back field. Enable this feature by
allowing the supplied_to field to be passed to the driver.
This feature will enable drivers named in the supplied_to
field that have a external_power_changed callback to be
notified when power was been turned on or off.
Signed-off-by: Philip Rakity <prakity@marvell.com>
Signed-off-by: Anton Vorontsov <cbouatmailru@gmail.com>
Diffstat (limited to 'drivers/power/max8925_power.c')
-rw-r--r-- | drivers/power/max8925_power.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/drivers/power/max8925_power.c b/drivers/power/max8925_power.c index cbc7a0b6da5..377d1e633b4 100644 --- a/drivers/power/max8925_power.c +++ b/drivers/power/max8925_power.c @@ -441,6 +441,8 @@ static __devinit int max8925_power_probe(struct platform_device *pdev) info->ac.properties = max8925_ac_props; info->ac.num_properties = ARRAY_SIZE(max8925_ac_props); info->ac.get_property = max8925_ac_get_prop; + info->ac.supplied_to = pdata->supplied_to; + info->ac.num_supplicants = pdata->num_supplicants; ret = power_supply_register(&pdev->dev, &info->ac); if (ret) goto out; @@ -451,6 +453,9 @@ static __devinit int max8925_power_probe(struct platform_device *pdev) info->usb.properties = max8925_usb_props; info->usb.num_properties = ARRAY_SIZE(max8925_usb_props); info->usb.get_property = max8925_usb_get_prop; + info->usb.supplied_to = pdata->supplied_to; + info->usb.num_supplicants = pdata->num_supplicants; + ret = power_supply_register(&pdev->dev, &info->usb); if (ret) goto out_usb; |