[linux-sunxi] Re: [PATCH 1/3] mfd: axp20x: Add mfd driver for axp20x PMIC
Carlo Caione
carlo at caione.org
Tue Feb 11 01:58:01 EST 2014
On Mon, Feb 10, 2014 at 11:34 PM, Carlo Caione <carlo at caione.org> wrote:
>>> +static struct axp20x_dev *axp20x_pm_power_off;
>>
>> This looks pretty unconventional. What's the point of it?
>
> On a single board we can have multiple AXPs so I track which one is in
> charge of powering off the board (and to get the correct device in the
> axp20x_power_off())
<snip>
>>> +
>>> + if (!pm_power_off) {
>>> + axp20x_pm_power_off = axp20x;
>>> + pm_power_off = axp20x_power_off;
>>> + }
>>
>> Can you describe to me what you're using the pm_power_off call-back
>> for please?
>
> It's meant to poweroff the board
Actually what is missing here is also a way to determine which device
is in charge of powering off when multiple AXPs are registered.
I'll fix it in v2.
Thanks,
--
Carlo Caione
More information about the linux-arm-kernel
mailing list