linux-input.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] FROMLIST: input: add 2 kind of switch
       [not found] <CGME20201021030255epcms1p21924b35616dc666b7b6c04c2c5d8a1a2@epcms1p6>
@ 2020-10-21  3:08 ` HyungJae Im
  0 siblings, 0 replies; 5+ messages in thread
From: HyungJae Im @ 2020-10-21  3:08 UTC (permalink / raw)
  To: dmitry.torokhov, rydberg, linux-input, linux-kernel, gregkh,
	manivannan.sadhasivam
  Cc: HyungJae Im

From ec9859ee01b7bc0e04255971e0fe97348847dab7 Mon Sep 17 00:00:00 2001
From: "hj2.im" <hj2.im@samsung.com>
Date: Tue, 20 Oct 2020 16:57:04 +0900
Subject: [PATCH] FROMLIST: input: add 2 kind of switch
 
We need support to various accessories on the device,
some switch does not exist in switch list.
So added switch for the following purpose.
 
SW_COVER_ATTACHED is for the checking the cover
attached or not on the device. SW_EXT_PEN_ATTACHED is for the
checking the external pen attached or not on the device
 
Signed-off-by: hj2.im <hj2.im@samsung.com>
---
 include/linux/mod_devicetable.h        | 2 +-
 include/uapi/linux/input-event-codes.h | 4 +++-
 2 files changed, 4 insertions(+), 2 deletions(-)
 
diff --git a/include/linux/mod_devicetable.h b/include/linux/mod_devicetable.h
index 5b08a473cdba..897f5a3e7721 100644
--- a/include/linux/mod_devicetable.h
+++ b/include/linux/mod_devicetable.h
@@ -320,7 +320,7 @@ struct pcmcia_device_id {
 #define INPUT_DEVICE_ID_LED_MAX                0x0f
 #define INPUT_DEVICE_ID_SND_MAX                0x07
 #define INPUT_DEVICE_ID_FF_MAX                0x7f
-#define INPUT_DEVICE_ID_SW_MAX                0x10
+#define INPUT_DEVICE_ID_SW_MAX                0x12
 #define INPUT_DEVICE_ID_PROP_MAX        0x1f
 
 #define INPUT_DEVICE_ID_MATCH_BUS        1
diff --git a/include/uapi/linux/input-event-codes.h b/include/uapi/linux/input-event-codes.h
index 0c2e27d28e0a..8ca2acee1f92 100644
--- a/include/uapi/linux/input-event-codes.h
+++ b/include/uapi/linux/input-event-codes.h
@@ -889,7 +889,9 @@
 #define SW_MUTE_DEVICE                0x0e  /* set = device disabled */
 #define SW_PEN_INSERTED                0x0f  /* set = pen inserted */
 #define SW_MACHINE_COVER        0x10  /* set = cover closed */
-#define SW_MAX                        0x10
+#define SW_COVER_ATTACHED        0x11  /* set = cover attached */
+#define SW_EXT_PEN_ATTACHED        0x12  /* set = external pen attached */
+#define SW_MAX                        0x12
 #define SW_CNT                        (SW_MAX+1)
 
 /*
-- 
2.11.0
 

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

* Re: [PATCH] FROMLIST: input: add 2 kind of switch
  2020-10-21  5:10   ` gregkh
@ 2020-10-21 18:30     ` dmitry.torokhov
  0 siblings, 0 replies; 5+ messages in thread
From: dmitry.torokhov @ 2020-10-21 18:30 UTC (permalink / raw)
  To: gregkh
  Cc: HyungJae Im, manivannan.sadhasivam, linux-kernel, linux-input, rydberg

On Wed, Oct 21, 2020 at 07:10:35AM +0200, gregkh@linuxfoundation.org wrote:
> On Wed, Oct 21, 2020 at 12:12:16PM +0900, HyungJae Im wrote:
> > >From ec9859ee01b7bc0e04255971e0fe97348847dab7 Mon Sep 17 00:00:00 2001
> 
> You sent this 3 times, why?
> 
> And why is this in the body of the email, have you read the "how to send
> your first kernel patch" document at kernelnewbies.org?
> 
> > From: "hj2.im" <hj2.im@samsung.com>
> > Date: Tue, 20 Oct 2020 16:57:04 +0900
> > Subject: [PATCH] FROMLIST: input: add 2 kind of switch
> 
> What does "FROMLIST:" mean?
> 
> > 
> > We need support to various accessories on the device,
> > some switch does not exist in switch list.
> > So added switch for the following purpose.
> > 
> > SW_COVER_ATTACHED is for the checking the cover
> > attached or not on the device. SW_EXT_PEN_ATTACHED is for the
> > checking the external pen attached or not on the device
> > 
> > Signed-off-by: hj2.im <hj2.im@samsung.com>
> 
> As per the kernel documentation, you need to use your real name here,
> please do so.
> 
> > ---
> >  include/linux/mod_devicetable.h        | 2 +-
> >  include/uapi/linux/input-event-codes.h | 4 +++-
> >  2 files changed, 4 insertions(+), 2 deletions(-)
> > 
> > diff --git a/include/linux/mod_devicetable.h b/include/linux/mod_devicetable.h
> > index 5b08a473cdba..897f5a3e7721 100644
> > --- a/include/linux/mod_devicetable.h
> > +++ b/include/linux/mod_devicetable.h
> > @@ -320,7 +320,7 @@ struct pcmcia_device_id {
> >  #define INPUT_DEVICE_ID_LED_MAX		0x0f
> >  #define INPUT_DEVICE_ID_SND_MAX		0x07
> >  #define INPUT_DEVICE_ID_FF_MAX		0x7f
> > -#define INPUT_DEVICE_ID_SW_MAX		0x10
> > +#define INPUT_DEVICE_ID_SW_MAX		0x12
> >  #define INPUT_DEVICE_ID_PROP_MAX	0x1f
> >  
> >  #define INPUT_DEVICE_ID_MATCH_BUS	1
> > diff --git a/include/uapi/linux/input-event-codes.h b/include/uapi/linux/input-event-codes.h
> > index 0c2e27d28e0a..8ca2acee1f92 100644
> > --- a/include/uapi/linux/input-event-codes.h
> > +++ b/include/uapi/linux/input-event-codes.h
> > @@ -889,7 +889,9 @@
> >  #define SW_MUTE_DEVICE		0x0e  /* set = device disabled */
> >  #define SW_PEN_INSERTED		0x0f  /* set = pen inserted */
> >  #define SW_MACHINE_COVER	0x10  /* set = cover closed */
> > -#define SW_MAX			0x10
> > +#define SW_COVER_ATTACHED	0x11  /* set = cover attached */
> > +#define SW_EXT_PEN_ATTACHED	0x12  /* set = external pen attached */
> 
> Is there an in-kernel user for these values anywhere?  Please submit
> this patch along with the users at the same time, otherwise this change
> makes no sense at all.

It kind of does, as nowadays most uses come from DT, not from
hard-coding in drivers. However I need to better understand the intended
use of this. How SW_COVER_ATTACHED differs from SW_MACHINE_COVER and the
same for SW_PEN_INSERTED SW_EXT_PEN_ATTACHED.

Thanks.

-- 
Dmitry

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

* Re: [PATCH] FROMLIST: input: add 2 kind of switch
  2020-10-21  3:12 ` HyungJae Im
@ 2020-10-21  5:10   ` gregkh
  2020-10-21 18:30     ` dmitry.torokhov
  0 siblings, 1 reply; 5+ messages in thread
From: gregkh @ 2020-10-21  5:10 UTC (permalink / raw)
  To: HyungJae Im
  Cc: manivannan.sadhasivam, linux-kernel, linux-input, rydberg,
	dmitry.torokhov

On Wed, Oct 21, 2020 at 12:12:16PM +0900, HyungJae Im wrote:
> >From ec9859ee01b7bc0e04255971e0fe97348847dab7 Mon Sep 17 00:00:00 2001

You sent this 3 times, why?

And why is this in the body of the email, have you read the "how to send
your first kernel patch" document at kernelnewbies.org?

> From: "hj2.im" <hj2.im@samsung.com>
> Date: Tue, 20 Oct 2020 16:57:04 +0900
> Subject: [PATCH] FROMLIST: input: add 2 kind of switch

What does "FROMLIST:" mean?

> 
> We need support to various accessories on the device,
> some switch does not exist in switch list.
> So added switch for the following purpose.
> 
> SW_COVER_ATTACHED is for the checking the cover
> attached or not on the device. SW_EXT_PEN_ATTACHED is for the
> checking the external pen attached or not on the device
> 
> Signed-off-by: hj2.im <hj2.im@samsung.com>

As per the kernel documentation, you need to use your real name here,
please do so.

> ---
>  include/linux/mod_devicetable.h        | 2 +-
>  include/uapi/linux/input-event-codes.h | 4 +++-
>  2 files changed, 4 insertions(+), 2 deletions(-)
> 
> diff --git a/include/linux/mod_devicetable.h b/include/linux/mod_devicetable.h
> index 5b08a473cdba..897f5a3e7721 100644
> --- a/include/linux/mod_devicetable.h
> +++ b/include/linux/mod_devicetable.h
> @@ -320,7 +320,7 @@ struct pcmcia_device_id {
>  #define INPUT_DEVICE_ID_LED_MAX		0x0f
>  #define INPUT_DEVICE_ID_SND_MAX		0x07
>  #define INPUT_DEVICE_ID_FF_MAX		0x7f
> -#define INPUT_DEVICE_ID_SW_MAX		0x10
> +#define INPUT_DEVICE_ID_SW_MAX		0x12
>  #define INPUT_DEVICE_ID_PROP_MAX	0x1f
>  
>  #define INPUT_DEVICE_ID_MATCH_BUS	1
> diff --git a/include/uapi/linux/input-event-codes.h b/include/uapi/linux/input-event-codes.h
> index 0c2e27d28e0a..8ca2acee1f92 100644
> --- a/include/uapi/linux/input-event-codes.h
> +++ b/include/uapi/linux/input-event-codes.h
> @@ -889,7 +889,9 @@
>  #define SW_MUTE_DEVICE		0x0e  /* set = device disabled */
>  #define SW_PEN_INSERTED		0x0f  /* set = pen inserted */
>  #define SW_MACHINE_COVER	0x10  /* set = cover closed */
> -#define SW_MAX			0x10
> +#define SW_COVER_ATTACHED	0x11  /* set = cover attached */
> +#define SW_EXT_PEN_ATTACHED	0x12  /* set = external pen attached */

Is there an in-kernel user for these values anywhere?  Please submit
this patch along with the users at the same time, otherwise this change
makes no sense at all.

thanks,

greg k-h

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

* [PATCH] FROMLIST: input: add 2 kind of switch
       [not found] <CGME20201021031216epcms1p556d8d7d5d763ec47f67cd8cbe3972935@epcms1p5>
@ 2020-10-21  3:12 ` HyungJae Im
  2020-10-21  5:10   ` gregkh
  0 siblings, 1 reply; 5+ messages in thread
From: HyungJae Im @ 2020-10-21  3:12 UTC (permalink / raw)
  To: manivannan.sadhasivam, gregkh, linux-kernel, linux-input,
	rydberg, dmitry.torokhov
  Cc: HyungJae Im

From ec9859ee01b7bc0e04255971e0fe97348847dab7 Mon Sep 17 00:00:00 2001
From: "hj2.im" <hj2.im@samsung.com>
Date: Tue, 20 Oct 2020 16:57:04 +0900
Subject: [PATCH] FROMLIST: input: add 2 kind of switch

We need support to various accessories on the device,
some switch does not exist in switch list.
So added switch for the following purpose.

SW_COVER_ATTACHED is for the checking the cover
attached or not on the device. SW_EXT_PEN_ATTACHED is for the
checking the external pen attached or not on the device

Signed-off-by: hj2.im <hj2.im@samsung.com>
---
 include/linux/mod_devicetable.h        | 2 +-
 include/uapi/linux/input-event-codes.h | 4 +++-
 2 files changed, 4 insertions(+), 2 deletions(-)

diff --git a/include/linux/mod_devicetable.h b/include/linux/mod_devicetable.h
index 5b08a473cdba..897f5a3e7721 100644
--- a/include/linux/mod_devicetable.h
+++ b/include/linux/mod_devicetable.h
@@ -320,7 +320,7 @@ struct pcmcia_device_id {
 #define INPUT_DEVICE_ID_LED_MAX		0x0f
 #define INPUT_DEVICE_ID_SND_MAX		0x07
 #define INPUT_DEVICE_ID_FF_MAX		0x7f
-#define INPUT_DEVICE_ID_SW_MAX		0x10
+#define INPUT_DEVICE_ID_SW_MAX		0x12
 #define INPUT_DEVICE_ID_PROP_MAX	0x1f
 
 #define INPUT_DEVICE_ID_MATCH_BUS	1
diff --git a/include/uapi/linux/input-event-codes.h b/include/uapi/linux/input-event-codes.h
index 0c2e27d28e0a..8ca2acee1f92 100644
--- a/include/uapi/linux/input-event-codes.h
+++ b/include/uapi/linux/input-event-codes.h
@@ -889,7 +889,9 @@
 #define SW_MUTE_DEVICE		0x0e  /* set = device disabled */
 #define SW_PEN_INSERTED		0x0f  /* set = pen inserted */
 #define SW_MACHINE_COVER	0x10  /* set = cover closed */
-#define SW_MAX			0x10
+#define SW_COVER_ATTACHED	0x11  /* set = cover attached */
+#define SW_EXT_PEN_ATTACHED	0x12  /* set = external pen attached */
+#define SW_MAX			0x12
 #define SW_CNT			(SW_MAX+1)
 
 /*
-- 
2.11.0

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

* [PATCH] FROMLIST: input: add 2 kind of switch
       [not found] <CGME20201021030255epcms1p21924b35616dc666b7b6c04c2c5d8a1a2@epcms1p2>
@ 2020-10-21  3:02 ` 임형제
  0 siblings, 0 replies; 5+ messages in thread
From: 임형제 @ 2020-10-21  3:02 UTC (permalink / raw)
  To: dmitry.torokhov, rydberg, linux-input, linux-kernel, gregkh,
	manivannan.sadhasivam
  Cc: 임형제

From ec9859ee01b7bc0e04255971e0fe97348847dab7 Mon Sep 17 00:00:00 2001
From: "hj2.im" <hj2.im@samsung.com>
Date: Tue, 20 Oct 2020 16:57:04 +0900
Subject: [PATCH] FROMLIST: input: add 2 kind of switch

We need support to various accessories on the device,
some switch does not exist in switch list.
So added switch for the following purpose.

SW_COVER_ATTACHED is for the checking the cover
attached or not on the device. SW_EXT_PEN_ATTACHED is for the
checking the external pen attached or not on the device

Signed-off-by: hj2.im <hj2.im@samsung.com>
---
 include/linux/mod_devicetable.h        | 2 +-
 include/uapi/linux/input-event-codes.h | 4 +++-
 2 files changed, 4 insertions(+), 2 deletions(-)

diff --git a/include/linux/mod_devicetable.h b/include/linux/mod_devicetable.h
index 5b08a473cdba..897f5a3e7721 100644
--- a/include/linux/mod_devicetable.h
+++ b/include/linux/mod_devicetable.h
@@ -320,7 +320,7 @@ struct pcmcia_device_id {
 #define INPUT_DEVICE_ID_LED_MAX		0x0f
 #define INPUT_DEVICE_ID_SND_MAX		0x07
 #define INPUT_DEVICE_ID_FF_MAX		0x7f
-#define INPUT_DEVICE_ID_SW_MAX		0x10
+#define INPUT_DEVICE_ID_SW_MAX		0x12
 #define INPUT_DEVICE_ID_PROP_MAX	0x1f
 
 #define INPUT_DEVICE_ID_MATCH_BUS	1
diff --git a/include/uapi/linux/input-event-codes.h b/include/uapi/linux/input-event-codes.h
index 0c2e27d28e0a..8ca2acee1f92 100644
--- a/include/uapi/linux/input-event-codes.h
+++ b/include/uapi/linux/input-event-codes.h
@@ -889,7 +889,9 @@
 #define SW_MUTE_DEVICE		0x0e  /* set = device disabled */
 #define SW_PEN_INSERTED		0x0f  /* set = pen inserted */
 #define SW_MACHINE_COVER	0x10  /* set = cover closed */
-#define SW_MAX			0x10
+#define SW_COVER_ATTACHED	0x11  /* set = cover attached */
+#define SW_EXT_PEN_ATTACHED	0x12  /* set = external pen attached */
+#define SW_MAX			0x12
 #define SW_CNT			(SW_MAX+1)
 
 /*
-- 
2.11.0

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

end of thread, other threads:[~2020-10-21 18:30 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
     [not found] <CGME20201021030255epcms1p21924b35616dc666b7b6c04c2c5d8a1a2@epcms1p6>
2020-10-21  3:08 ` [PATCH] FROMLIST: input: add 2 kind of switch HyungJae Im
     [not found] <CGME20201021031216epcms1p556d8d7d5d763ec47f67cd8cbe3972935@epcms1p5>
2020-10-21  3:12 ` HyungJae Im
2020-10-21  5:10   ` gregkh
2020-10-21 18:30     ` dmitry.torokhov
     [not found] <CGME20201021030255epcms1p21924b35616dc666b7b6c04c2c5d8a1a2@epcms1p2>
2020-10-21  3:02 ` 임형제

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