linux-input.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH v2] cros_ec_keyb: Add 3 buttons for monitor function
@ 2022-12-23  7:18 joewu(吳仲振)
  2022-12-23  7:40 ` Greg Kroah-Hartman
  2023-01-20 17:34 ` Dmitry Torokhov
  0 siblings, 2 replies; 3+ messages in thread
From: joewu(吳仲振) @ 2022-12-23  7:18 UTC (permalink / raw)
  To: LKML
  Cc: Greg Kroah-Hartman, Xiang wangx, Stephen Boyd, Prashant Malani,
	linux-input, Dmitry Torokhov, chrome-platform, Benson Leung,
	Gustavo A . R . Silva, Guenter Roeck, Douglas Anderson,
	Daisuke Nojiri, Derek Huang, Dustin L . Howett, Furquan Shaikh,
	Jonathan Cameron, Lee Jones, Tzung-Bi Shih,
	joewu(吳仲振)

Add 3 extra buttons: 'brightness up', 'brightness down'
and 'screen lock' to support monitor manipulating function.

Signed-off-by: Joe Wu <joewu@msi.com>
---
v2:
- use tabs
- use real email to send patch
---
 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 6f435125ec03..e7ecfca838df 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_SCREENLOCK,
+		.bit            = EC_MKBP_SCREEN_LOCK,
+	},
 
 	/* Switches */
 	{
diff --git a/include/linux/platform_data/cros_ec_commands.h b/include/linux/platform_data/cros_ec_commands.h
index 5744a2d746aa..a2073ed43972 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_SCREEN_LOCK	6
 
 /* Switches */
 #define EC_MKBP_LID_OPEN	0
-- 
2.17.1


*****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.

^ permalink raw reply related	[flat|nested] 3+ messages in thread

* Re: [PATCH v2] cros_ec_keyb: Add 3 buttons for monitor function
  2022-12-23  7:18 [PATCH v2] cros_ec_keyb: Add 3 buttons for monitor function joewu(吳仲振)
@ 2022-12-23  7:40 ` Greg Kroah-Hartman
  2023-01-20 17:34 ` Dmitry Torokhov
  1 sibling, 0 replies; 3+ messages in thread
From: Greg Kroah-Hartman @ 2022-12-23  7:40 UTC (permalink / raw)
  To: joewu(吳仲振)
  Cc: LKML, Xiang wangx, Stephen Boyd, Prashant Malani, linux-input,
	Dmitry Torokhov, chrome-platform, Benson Leung,
	Gustavo A . R . Silva, Guenter Roeck, Douglas Anderson,
	Daisuke Nojiri, Derek Huang, Dustin L . Howett, Furquan Shaikh,
	Jonathan Cameron, Lee Jones, Tzung-Bi Shih

On Fri, Dec 23, 2022 at 07:18:06AM +0000, joewu(吳仲振) wrote:
> *****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.

Now deleted.

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH v2] cros_ec_keyb: Add 3 buttons for monitor function
  2022-12-23  7:18 [PATCH v2] cros_ec_keyb: Add 3 buttons for monitor function joewu(吳仲振)
  2022-12-23  7:40 ` Greg Kroah-Hartman
@ 2023-01-20 17:34 ` Dmitry Torokhov
  1 sibling, 0 replies; 3+ messages in thread
From: Dmitry Torokhov @ 2023-01-20 17:34 UTC (permalink / raw)
  To: joewu(吳仲振)
  Cc: LKML, Greg Kroah-Hartman, Xiang wangx, Stephen Boyd,
	Prashant Malani, linux-input, chrome-platform, Benson Leung,
	Gustavo A . R . Silva, Guenter Roeck, Douglas Anderson,
	Daisuke Nojiri, Derek Huang, Dustin L . Howett, Furquan Shaikh,
	Jonathan Cameron, Lee Jones, Tzung-Bi Shih

On Fri, Dec 23, 2022 at 07:18:06AM +0000, joewu(吳仲振) wrote:
> Add 3 extra buttons: 'brightness up', 'brightness down'
> and 'screen lock' to support monitor manipulating function.
> 
> Signed-off-by: Joe Wu <joewu@msi.com>

Applied, thank you.

-- 
Dmitry

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2023-01-20 17:34 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-12-23  7:18 [PATCH v2] cros_ec_keyb: Add 3 buttons for monitor function joewu(吳仲振)
2022-12-23  7:40 ` Greg Kroah-Hartman
2023-01-20 17:34 ` Dmitry Torokhov

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).