Re: [PATCH] acpi: trigger wakeup key event from power button

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Fri, Sep 08, 2023 at 05:57:49PM +0800, Ken Xue wrote:
> Andorid can wakeup from various wakeup sources,
> but only several wakeup sources can wake up screen
> with right events(POWER, WAKEUP) from input device.
> 
> Regarding pressing acpi power button, it can resume system and
> ACPI_BITMASK_WAKE_STATUS and ACPI_BITMASK_POWER_BUTTON_STATUS
> are set in pm1a_sts, but kernel does not report any key
> event to user space during resume by default.
> 
> So, trigger wakeup key event to user space during resume
> from power button.

> Reported-by: kernel test robot <lkp@xxxxxxxxx>

Are you sure?

> Closes: https://lore.kernel.org/oe-kbuild-all/202309080315.txQUEyHQ-lkp@xxxxxxxxx/
> Closes: https://lore.kernel.org/oe-kbuild-all/202309080239.IiC7uLpW-lkp@xxxxxxxxx/
> Closes: https://lore.kernel.org/oe-kbuild-all/202309080351.xHt2qhP2-lkp@xxxxxxxxx/

Are you sure?

> 
> 

Blank lines are not allowed in the tag block.

> Signed-off-by: Ken Xue <Ken.Xue@xxxxxxx>
> ---

How this change is different to the previous patch you sent?
Do you forgot versioning?
Do you forgot changelog?

Please, read Submitting Patches documentation before trying again.
It will help to make your contribution nice and understandable.

...

> +	if (button->type == ACPI_BUTTON_TYPE_POWER) {

	if (... != )
		return;

?

> +		input = button->input;
> +		input_report_key(input, KEY_WAKEUP, 1);
> +		input_sync(input);
> +		input_report_key(input, KEY_WAKEUP, 0);
> +		input_sync(input);
> +	}

...

> +#include <linux/acpi.h>

There is no users of this header.

Check how forward declaration can be used (as it's done in many other headers).


> +extern void acpi_power_button_wakeup(struct acpi_device *device);

...

> +static inline void acpi_power_button_wakeup(struct acpi_device *device)
> +{
> +}

This can be done on a single line.

-- 
With Best Regards,
Andy Shevchenko





[Index of Archives]     [Linux IBM ACPI]     [Linux Power Management]     [Linux Kernel]     [Linux Laptop]     [Kernel Newbies]     [Share Photos]     [Security]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Samba]     [Video 4 Linux]     [Device Mapper]     [Linux Resources]
  Powered by Linux