lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Date:   Sat, 7 Sep 2019 20:45:07 +0300
From:   Andy Shevchenko <andy.shevchenko@...il.com>
To:     Hans de Goede <hdegoede@...hat.com>
Cc:     Darren Hart <dvhart@...radead.org>,
        Andy Shevchenko <andy@...radead.org>,
        Platform Driver <platform-driver-x86@...r.kernel.org>,
        Linux Kernel Mailing List <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH 2/2] platform/x86: intel_int0002_vgpio: Use device_init_wakeup

On Fri, Aug 23, 2019 at 8:48 PM Hans de Goede <hdegoede@...hat.com> wrote:
>
> Use device_init_wakeup and pm_wakeup_hard_event instead of directly
> calling pm_system_wakeup(). This is the preferred way to do this and
> this will allow the user to disable wakeup through INT0002 events
> through sysfs.
>

Pushed to my review and testing queue, thanks!

> Signed-off-by: Hans de Goede <hdegoede@...hat.com>
> ---
>  drivers/platform/x86/intel_int0002_vgpio.c | 10 +++++++++-
>  1 file changed, 9 insertions(+), 1 deletion(-)
>
> diff --git a/drivers/platform/x86/intel_int0002_vgpio.c b/drivers/platform/x86/intel_int0002_vgpio.c
> index 9ea1a2a19f86..f9fee682a8a2 100644
> --- a/drivers/platform/x86/intel_int0002_vgpio.c
> +++ b/drivers/platform/x86/intel_int0002_vgpio.c
> @@ -122,7 +122,7 @@ static irqreturn_t int0002_irq(int irq, void *data)
>         generic_handle_irq(irq_find_mapping(chip->irq.domain,
>                                             GPE0A_PME_B0_VIRT_GPIO_PIN));
>
> -       pm_system_wakeup();
> +       pm_wakeup_hard_event(chip->parent);
>
>         return IRQ_HANDLED;
>  }
> @@ -217,6 +217,13 @@ static int int0002_probe(struct platform_device *pdev)
>
>         gpiochip_set_chained_irqchip(chip, irq_chip, irq, NULL);
>
> +       device_init_wakeup(dev, true);
> +       return 0;
> +}
> +
> +static int int0002_remove(struct platform_device *pdev)
> +{
> +       device_init_wakeup(&pdev->dev, false);
>         return 0;
>  }
>
> @@ -232,6 +239,7 @@ static struct platform_driver int0002_driver = {
>                 .acpi_match_table       = int0002_acpi_ids,
>         },
>         .probe  = int0002_probe,
> +       .remove = int0002_remove,
>  };
>
>  module_platform_driver(int0002_driver);
> --
> 2.22.0
>


--
With Best Regards,
Andy Shevchenko

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ