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: <20170401171237.GH17130@dtor-ws>
Date:   Sat, 1 Apr 2017 10:12:37 -0700
From:   Dmitry Torokhov <dmitry.torokhov@...il.com>
To:     Jeffy Chen <jeffy.chen@...k-chips.com>
Cc:     linux-kernel@...r.kernel.org, briannorris@...omium.org,
        dbasehore@...gle.com, dianders@...omium.org,
        Gwendal Grignou <gwendal@...omium.org>,
        Vic Yang <victoryang@...gle.com>, linux-input@...r.kernel.org,
        Enric Balletbo Serra <enric.balletbo@...labora.com>,
        Lee Jones <lee.jones@...aro.org>
Subject: Re: [PATCH 1/2] input: cros_ec_keyb: Report wakeup events

Hi Jeffy,

On Thu, Mar 30, 2017 at 05:50:49PM +0800, Jeffy Chen wrote:
> Report wakeup events when process events.
> 
> Signed-off-by: Jeffy Chen <jeffy.chen@...k-chips.com>
> ---
> 
>  drivers/input/keyboard/cros_ec_keyb.c | 9 +++++++++
>  1 file changed, 9 insertions(+)
> 
> diff --git a/drivers/input/keyboard/cros_ec_keyb.c b/drivers/input/keyboard/cros_ec_keyb.c
> index 6a250d6..a93d55f 100644
> --- a/drivers/input/keyboard/cros_ec_keyb.c
> +++ b/drivers/input/keyboard/cros_ec_keyb.c
> @@ -286,6 +286,9 @@ static int cros_ec_keyb_work(struct notifier_block *nb,
>  		return NOTIFY_DONE;
>  	}
>  
> +	if (device_may_wakeup(ckdev->dev))
> +		pm_wakeup_event(ckdev->dev, 0);
> +
>  	return NOTIFY_OK;
>  }
>  
> @@ -632,6 +635,12 @@ static int cros_ec_keyb_probe(struct platform_device *pdev)
>  		return err;
>  	}
>  
> +	err = device_init_wakeup(dev, 1);

In the other patch you are adding "wakeup-source" to the DT binding, but
here you mark all EC deices as wakeup sources. You need to use
device_property_read_bool(dev, "wakeup-source") and use the result in
call to device_init_wakeup().

> +	if (err) {
> +		dev_err(dev, "cannot init wakeup: %d\n", err);
> +		return err;
> +	}
> +
>  	return 0;
>  }
>  

Thanks.

-- 
Dmitry

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ