linux-input.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] input: Add new button type
@ 2011-01-10 14:01 Alan Cox
  2011-01-10 19:19 ` Dmitry Torokhov
  0 siblings, 1 reply; 3+ messages in thread
From: Alan Cox @ 2011-01-10 14:01 UTC (permalink / raw)
  To: x86, linux-input, jekyll_lai

From: Jekyll Lai <jekyll.lai@gmail.com>

This patch added a new switch event, SW_ROTATE_LOCK, which is used on one
of the Moorestown platforms.

Signed-off-by: Jekyll Lai <jekyll_lai@wistron.com>
Signed-off-by: Alan Cox <alan@linux.intel.com>
---

 arch/x86/platform/mrst/mrst.c |    2 ++
 include/linux/input.h         |    1 +
 2 files changed, 3 insertions(+), 0 deletions(-)


diff --git a/arch/x86/platform/mrst/mrst.c b/arch/x86/platform/mrst/mrst.c
index a9686c3..cc749dc 100644
--- a/arch/x86/platform/mrst/mrst.c
+++ b/arch/x86/platform/mrst/mrst.c
@@ -822,6 +822,8 @@ static struct gpio_keys_button gpio_button[] = {
 	{KEY_CAMERA_FOCUS,	-1, 1, "camera_half",	EV_KEY, 0, 20},
 	{SW_KEYPAD_SLIDE,	-1, 1, "MagSw1",	EV_SW,  0, 20},
 	{SW_KEYPAD_SLIDE,	-1, 1, "MagSw2",	EV_SW,  0, 20},
+	{KEY_HOMEPAGE,		-1, 1, "home_btn",	EV_KEY, 0, 20},
+	{SW_ROTATE_LOCK,	-1, 1, "rot_lock",	EV_SW, 0, 20},
 };
 
 static struct gpio_keys_platform_data mrst_gpio_keys = {
diff --git a/include/linux/input.h b/include/linux/input.h
index c4e9d91..79fc30e 100644
--- a/include/linux/input.h
+++ b/include/linux/input.h
@@ -802,6 +802,7 @@ struct input_keymap_entry {
 #define SW_CAMERA_LENS_COVER	0x09  /* set = lens covered */
 #define SW_KEYPAD_SLIDE		0x0a  /* set = keypad slide out */
 #define SW_FRONT_PROXIMITY	0x0b  /* set = front proximity sensor active */
+#define SW_ROTATE_LOCK		0x0c  /* set = rotate lock */
 #define SW_MAX			0x0f
 #define SW_CNT			(SW_MAX+1)
 


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

* Re: [PATCH] input: Add new button type
  2011-01-10 14:01 [PATCH] input: Add new button type Alan Cox
@ 2011-01-10 19:19 ` Dmitry Torokhov
  2011-01-11  2:17   ` Jekyll_Lai
  0 siblings, 1 reply; 3+ messages in thread
From: Dmitry Torokhov @ 2011-01-10 19:19 UTC (permalink / raw)
  To: Alan Cox; +Cc: x86, linux-input, jekyll_lai

On Mon, Jan 10, 2011 at 02:01:32PM +0000, Alan Cox wrote:
> From: Jekyll Lai <jekyll.lai@gmail.com>
> 
> This patch added a new switch event, SW_ROTATE_LOCK, which is used on one
> of the Moorestown platforms.

Could we get a bit more explanation (preferably right in input.h) as to
what exactly this switch conveys to userspace? I guess it disables
portrait->landscape screen transition on the phone?

Thanks.

> 
> Signed-off-by: Jekyll Lai <jekyll_lai@wistron.com>
> Signed-off-by: Alan Cox <alan@linux.intel.com>
> ---
> 
>  arch/x86/platform/mrst/mrst.c |    2 ++
>  include/linux/input.h         |    1 +
>  2 files changed, 3 insertions(+), 0 deletions(-)
> 
> 
> diff --git a/arch/x86/platform/mrst/mrst.c b/arch/x86/platform/mrst/mrst.c
> index a9686c3..cc749dc 100644
> --- a/arch/x86/platform/mrst/mrst.c
> +++ b/arch/x86/platform/mrst/mrst.c
> @@ -822,6 +822,8 @@ static struct gpio_keys_button gpio_button[] = {
>  	{KEY_CAMERA_FOCUS,	-1, 1, "camera_half",	EV_KEY, 0, 20},
>  	{SW_KEYPAD_SLIDE,	-1, 1, "MagSw1",	EV_SW,  0, 20},
>  	{SW_KEYPAD_SLIDE,	-1, 1, "MagSw2",	EV_SW,  0, 20},
> +	{KEY_HOMEPAGE,		-1, 1, "home_btn",	EV_KEY, 0, 20},
> +	{SW_ROTATE_LOCK,	-1, 1, "rot_lock",	EV_SW, 0, 20},
>  };
>  
>  static struct gpio_keys_platform_data mrst_gpio_keys = {
> diff --git a/include/linux/input.h b/include/linux/input.h
> index c4e9d91..79fc30e 100644
> --- a/include/linux/input.h
> +++ b/include/linux/input.h
> @@ -802,6 +802,7 @@ struct input_keymap_entry {
>  #define SW_CAMERA_LENS_COVER	0x09  /* set = lens covered */
>  #define SW_KEYPAD_SLIDE		0x0a  /* set = keypad slide out */
>  #define SW_FRONT_PROXIMITY	0x0b  /* set = front proximity sensor active */
> +#define SW_ROTATE_LOCK		0x0c  /* set = rotate lock */
>  #define SW_MAX			0x0f
>  #define SW_CNT			(SW_MAX+1)
>  
> 

-- 
Dmitry

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

* RE: [PATCH] input: Add new button type
  2011-01-10 19:19 ` Dmitry Torokhov
@ 2011-01-11  2:17   ` Jekyll_Lai
  0 siblings, 0 replies; 3+ messages in thread
From: Jekyll_Lai @ 2011-01-11  2:17 UTC (permalink / raw)
  To: dmitry.torokhov, alan; +Cc: x86, linux-input

> From: Dmitry Torokhov [mailto:dmitry.torokhov@gmail.com]
> On Mon, Jan 10, 2011 at 02:01:32PM +0000, Alan Cox wrote:
> > From: Jekyll Lai <jekyll.lai@gmail.com>
> >
> > This patch added a new switch event, SW_ROTATE_LOCK, which is used
on one
> > of the Moorestown platforms.
> 
> Could we get a bit more explanation (preferably right in input.h) as
to
> what exactly this switch conveys to userspace? I guess it disables
> portrait->landscape screen transition on the phone?
> 
> Thanks.
> 
Your guess is exactly right; this event would be a flag to disable
rotate function, like portrait->landscape.

Jekyll

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

end of thread, other threads:[~2011-01-11  2:28 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-01-10 14:01 [PATCH] input: Add new button type Alan Cox
2011-01-10 19:19 ` Dmitry Torokhov
2011-01-11  2:17   ` Jekyll_Lai

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