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] [thread-next>] [day] [month] [year] [list]
Message-ID: <CAHCN7xLMGhuGq8WFn8B2W_dwAgDgjo1YczDnf0uJJw3kvJWhjw@mail.gmail.com>
Date:   Wed, 4 Nov 2020 10:15:47 -0600
From:   Adam Ford <aford173@...il.com>
To:     linux-input@...r.kernel.org
Cc:     Adam Ford-BE <aford@...conembedded.com>,
        Dmitry Torokhov <dmitry.torokhov@...il.com>,
        Linux Kernel Mailing List <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH] Input: ili210x: Enable suspend/resume functions

On Fri, Sep 18, 2020 at 9:34 AM Adam Ford <aford173@...il.com> wrote:
>
> Some people may wish to wake their system from sleep, so this
> patch enables a suspend and resume function which enables
> and disables IRQ wake functions.
>
> Signed-off-by: Adam Ford <aford173@...il.com>

Gentle ping.  Any feedback on this?

>
> diff --git a/drivers/input/touchscreen/ili210x.c b/drivers/input/touchscreen/ili210x.c
> index 199cf3daec10..9b1a61447054 100644
> --- a/drivers/input/touchscreen/ili210x.c
> +++ b/drivers/input/touchscreen/ili210x.c
> @@ -474,6 +474,28 @@ static int ili210x_i2c_probe(struct i2c_client *client,
>         return 0;
>  }
>
> +static int __maybe_unused ili210x_i2c_suspend(struct device *dev)
> +{
> +       struct i2c_client *client = to_i2c_client(dev);
> +
> +       if (device_may_wakeup(&client->dev))
> +               enable_irq_wake(client->irq);
> +
> +       return 0;
> +}
> +
> +static int __maybe_unused ili210x_i2c_resume(struct device *dev)
> +{
> +       struct i2c_client *client = to_i2c_client(dev);
> +
> +       if (device_may_wakeup(&client->dev))
> +               disable_irq_wake(client->irq);
> +
> +       return 0;
> +}
> +
> +static SIMPLE_DEV_PM_OPS(ili210x_i2c_pm, ili210x_i2c_suspend, ili210x_i2c_resume);
> +
>  static const struct i2c_device_id ili210x_i2c_id[] = {
>         { "ili210x", (long)&ili210x_chip },
>         { "ili2117", (long)&ili211x_chip },
> @@ -495,6 +517,7 @@ MODULE_DEVICE_TABLE(of, ili210x_dt_ids);
>  static struct i2c_driver ili210x_ts_driver = {
>         .driver = {
>                 .name = "ili210x_i2c",
> +               .pm = &ili210x_i2c_pm,
>                 .of_match_table = ili210x_dt_ids,
>         },
>         .id_table = ili210x_i2c_id,
> --
> 2.25.1
>

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ