* [PATCH] power: max8925 - Enable power change notifications
@ 2011-08-29 16:32 Philip Rakity
2011-10-30 9:51 ` [PATCH] power: max8925 - Enable power change notifications -- RESEND Philip Rakity
0 siblings, 1 reply; 2+ messages in thread
From: Philip Rakity @ 2011-08-29 16:32 UTC (permalink / raw)
To: linux-kernel; +Cc: cbou, David Woodhouse, Anton Vorontsov
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>
---
drivers/power/max8925_power.c | 5 +++++
include/linux/mfd/max8925.h | 2 ++
2 files changed, 7 insertions(+), 0 deletions(-)
diff --git a/drivers/power/max8925_power.c b/drivers/power/max8925_power.c
index fd32c08..29b5d2c 100644
--- a/drivers/power/max8925_power.c
+++ b/drivers/power/max8925_power.c
@@ -455,6 +455,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;
@@ -465,6 +467,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;
diff --git a/include/linux/mfd/max8925.h b/include/linux/mfd/max8925.h
index e742e04..008f807 100644
--- a/include/linux/mfd/max8925.h
+++ b/include/linux/mfd/max8925.h
@@ -225,6 +225,8 @@ struct max8925_power_pdata {
unsigned fast_charge:3; /* charge current */
unsigned no_temp_support:1; /* set if no temperature detect */
unsigned no_insert_detect:1; /* set if no ac insert detect */
+ char **supplied_to;
+ int num_supplicants;
};
/*
--
1.7.6
^ permalink raw reply related [flat|nested] 2+ messages in thread
* [PATCH] power: max8925 - Enable power change notifications -- RESEND
2011-08-29 16:32 [PATCH] power: max8925 - Enable power change notifications Philip Rakity
@ 2011-10-30 9:51 ` Philip Rakity
0 siblings, 0 replies; 2+ messages in thread
From: Philip Rakity @ 2011-10-30 9:51 UTC (permalink / raw)
To: linux-kernel@vger.kernel.org Mailing List
Cc: cbou, David Woodhouse, Anton Vorontsov, Eric Miao, Mark Brown
Resend
On Aug 29, 2011, at 9:32 AM, Philip Rakity wrote:
>
> 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>
> ---
> drivers/power/max8925_power.c | 5 +++++
> include/linux/mfd/max8925.h | 2 ++
> 2 files changed, 7 insertions(+), 0 deletions(-)
>
> diff --git a/drivers/power/max8925_power.c b/drivers/power/max8925_power.c
> index fd32c08..29b5d2c 100644
> --- a/drivers/power/max8925_power.c
> +++ b/drivers/power/max8925_power.c
> @@ -455,6 +455,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;
> @@ -465,6 +467,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;
> diff --git a/include/linux/mfd/max8925.h b/include/linux/mfd/max8925.h
> index e742e04..008f807 100644
> --- a/include/linux/mfd/max8925.h
> +++ b/include/linux/mfd/max8925.h
> @@ -225,6 +225,8 @@ struct max8925_power_pdata {
> unsigned fast_charge:3; /* charge current */
> unsigned no_temp_support:1; /* set if no temperature detect */
> unsigned no_insert_detect:1; /* set if no ac insert detect */
> + char **supplied_to;
> + int num_supplicants;
> };
>
> /*
> --
> 1.7.6
>
>
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2011-10-30 9:52 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2011-08-29 16:32 [PATCH] power: max8925 - Enable power change notifications Philip Rakity
2011-10-30 9:51 ` [PATCH] power: max8925 - Enable power change notifications -- RESEND Philip Rakity
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.