Re: [PATCH 3/3] Input: axp20x-pek - Enable wakeup for all AXP variants

From: Samuel Holland
Date: Tue Jan 14 2020 - 23:45:32 EST


Hi,

On 1/14/20 3:07 AM, Hans de Goede wrote:
> Hi,
>
> On 13-01-2020 22:26, Dmitry Torokhov wrote:
>> Hi Samuel,
>>
>> On Sun, Jan 12, 2020 at 09:20:32PM -0600, Samuel Holland wrote:
>>> There are many devices, including several mobile battery-powered
>>> devices, using other AXP variants as their PMIC. Enable them to use
>>> the power key as a wakeup source.
>>
>> Are these X86 or ARM devices? If anything, I'd prefer individual drivers
>> not declare themselves as wakeup sources unconditionally. With devic
>> etree we have standard "wakeup-source" property, but I am not quite sure
>> what's the latest on X86...

Currently wakeup is unconditional. After patch 2, even though it's enabled by
default, the wakeup source can be disabled by userspace:

- enable_irq_wake(axp20x_pek->irq_dbr);
+ device_init_wakeup(&pdev->dev, true);

This is a platform driver for an MFD cell. It does not have its own device tree
node.

(I see a lot of drivers in drivers/input/misc that generate KEY_POWER, and zero
of them reference "wakeup-source". It's a driver for a power button. Being a
wakeup source is half the purpose of its existence.)

> The AXP288 variant is X86, the other PMIC models are for ARM
> (to the best of my knowledge).

That's also my understanding.

> Regards,
>
> Hans

Regards,
Samuel