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: <5f36a68518ca44aa9566a5df801bccaa@msi.com>
Date:   Fri, 16 Dec 2022 01:36:24 +0000
From:   joewu(吳仲振) <joewu@....com>
To:     Dmitry Torokhov <dmitry.torokhov@...il.com>,
        Joe Wu <joewu@....corp-partner.google.com>
CC:     LKML <linux-kernel@...r.kernel.org>,
        Stephen Boyd <swboyd@...omium.org>,
        Xiang wangx <wangxiang@...rlc.com>,
        "linux-input@...r.kernel.org" <linux-input@...r.kernel.org>,
        Derek Huang <derekhuang@...gle.com>,
        "Greg Kroah-Hartman" <gregkh@...uxfoundation.org>,
        Benson Leung <bleung@...omium.org>,
        Daisuke Nojiri <dnojiri@...omium.org>,
        Prashant Malani <pmalani@...omium.org>,
        Furquan Shaikh <furquan@...omium.org>,
        Tzung-Bi Shih <tzungbi@...nel.org>,
        "chrome-platform@...ts.linux.dev" <chrome-platform@...ts.linux.dev>,
        Douglas Anderson <dianders@...omium.org>,
        "Dustin L . Howett" <dustin@...ett.net>,
        Guenter Roeck <groeck@...omium.org>,
        "Gustavo A . R . Silva" <gustavoars@...nel.org>,
        Sebastian Reichel <sebastian.reichel@...labora.com>
Subject: RE: [PATCH] cros_ec_keyb: Add 3 buttons for monitor function

Hi Dmitry,

Thank you for comments. I will try to give a clear description and sent the patch again.
Actually, the function of "leave PC(cros) mode" button is to implement 'lock the screen' in chromeOS.
Google suggests us to sent 'F13' key to lock the screen, could we do it or do you have any suggestion? 

BRs,
Joe

-----Original Message-----
From: Dmitry Torokhov <dmitry.torokhov@...il.com> 
Sent: Friday, December 16, 2022 6:01 AM
To: Joe Wu <joewu@....corp-partner.google.com>
Cc: LKML <linux-kernel@...r.kernel.org>; Stephen Boyd <swboyd@...omium.org>; Xiang wangx <wangxiang@...rlc.com>; linux-input@...r.kernel.org; Derek Huang <derekhuang@...gle.com>; Greg Kroah-Hartman <gregkh@...uxfoundation.org>; Benson Leung <bleung@...omium.org>; Daisuke Nojiri <dnojiri@...omium.org>; Prashant Malani <pmalani@...omium.org>; Furquan Shaikh <furquan@...omium.org>; Tzung-Bi Shih <tzungbi@...nel.org>; chrome-platform@...ts.linux.dev; Douglas Anderson <dianders@...omium.org>; Dustin L . Howett <dustin@...ett.net>; Guenter Roeck <groeck@...omium.org>; Gustavo A . R . Silva <gustavoars@...nel.org>; Sebastian Reichel <sebastian.reichel@...labora.com>
Subject: Re: [PATCH] cros_ec_keyb: Add 3 buttons for monitor function

Hi Joe,

On Thu, Dec 15, 2022 at 02:15:50PM +0800, Joe Wu wrote:
> This patch is to add extra 3 buttons: 'brightness up', 'brightness 
> down' and 'leave PC(cros) mode' to support monitor navigation 
> function.

I understand "brightness up" and "brightness down" but I have no idea what "leave PC(cros) mode" means. I also do not think we should be abusing F13 for this.

Thanks.

> 
> Signed-off-by: Joe Wu <joewu@....corp-partner.google.com>
> 
> ---
> 
>  drivers/input/keyboard/cros_ec_keyb.c          | 15 +++++++++++++++
>  include/linux/platform_data/cros_ec_commands.h |  3 +++
>  2 files changed, 18 insertions(+)
> 
> diff --git a/drivers/input/keyboard/cros_ec_keyb.c 
> b/drivers/input/keyboard/cros_ec_keyb.c
> index c14136b733a9..bf1cf0b782d2 100644
> --- a/drivers/input/keyboard/cros_ec_keyb.c
> +++ b/drivers/input/keyboard/cros_ec_keyb.c
> @@ -100,6 +100,21 @@ static const struct cros_ec_bs_map cros_ec_keyb_bs[] = {
>  		.code		= KEY_VOLUMEDOWN,
>  		.bit		= EC_MKBP_VOL_DOWN,
>  	},
> +	{
> +		.ev_type        = EV_KEY,
> +		.code           = KEY_BRIGHTNESSUP,
> +		.bit            = EC_MKBP_BRI_UP,
> +	},
> +	{
> +		.ev_type        = EV_KEY,
> +		.code           = KEY_BRIGHTNESSDOWN,
> +		.bit            = EC_MKBP_BRI_DOWN,
> +	},
> +	{
> +		.ev_type        = EV_KEY,
> +		.code           = KEY_F13,
> +		.bit            = EC_MKBP_CROS_LEAVE,
> +	},
>  
>  	/* Switches */
>  	{
> diff --git a/include/linux/platform_data/cros_ec_commands.h 
> b/include/linux/platform_data/cros_ec_commands.h
> index 5744a2d746aa..79218da8a8cb 100644
> --- a/include/linux/platform_data/cros_ec_commands.h
> +++ b/include/linux/platform_data/cros_ec_commands.h
> @@ -3471,6 +3471,9 @@ struct ec_response_get_next_event_v1 {
>  #define EC_MKBP_VOL_UP		1
>  #define EC_MKBP_VOL_DOWN	2
>  #define EC_MKBP_RECOVERY	3
> +#define EC_MKBP_BRI_UP          4
> +#define EC_MKBP_BRI_DOWN        5
> +#define EC_MKBP_CROS_LEAVE      6
>  
>  /* Switches */
>  #define EC_MKBP_LID_OPEN	0
> --
> 2.17.1
> 

-- 
Dmitry

*****CONFIDENTIAL INFORMATION*****

This email is intended only for the use of the person or entity to whom it is
addressed and contains information that may be subject to and/or may be
restricted from disclosure by contract or applicable law. If you are not the 
intended recipient of this email, be advised that any disclosure, copy, 
distribution or use of the contents of this message is strictly prohibited. 
If you are not the intended recipient of this email, please notify the sender 
that you have received this in error by replying to this message. Then, 
please delete it from your system. Our Privacy Policy is available here 
https://www.msi.com/page/privacy-policy. Thank you.

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ