diff mbox series

[1/2] Input: add `SW_MACHINE_COVER`

Message ID 20200612125402.18393-2-merlijn@wizzup.org (mailing list archive)
State New, archived
Headers show
Series Add SW_MACHINE_COVER key | expand

Commit Message

Merlijn Wajer June 12, 2020, 12:53 p.m. UTC
This event code represents the state of a removable cover of a device.
Value 0 means that the cover is open or removed, value 1 means that the
cover is closed.

Reviewed-by: Sebastian Reichel <sebastian.reichel@collabora.com>
Acked-by: Tony Lindgren <tony@atomide.com>
Signed-off-by: Merlijn Wajer <merlijn@wizzup.org>
---
 include/linux/mod_devicetable.h        | 2 +-
 include/uapi/linux/input-event-codes.h | 3 ++-
 2 files changed, 3 insertions(+), 2 deletions(-)

Comments

Pavel Machek June 16, 2020, 10:50 a.m. UTC | #1
On Fri 2020-06-12 14:53:58, Merlijn Wajer wrote:
> This event code represents the state of a removable cover of a device.
> Value 0 means that the cover is open or removed, value 1 means that the
> cover is closed.
> 
> Reviewed-by: Sebastian Reichel <sebastian.reichel@collabora.com> Acked-by: Tony Lindgren 
> <tony@atomide.com> Signed-off-by: Merlijn Wajer <merlijn@wizzup.org> ---

Dmitry, can we get some kind of comment here, or better yet can we get you to apply this?

Thanks,
										Pavel
> +++ b/include/linux/mod_devicetable.h
> @@ -318,7 +318,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		0x0f
> +#define INPUT_DEVICE_ID_SW_MAX		0x10
>  #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 b6a835d37826..0c2e27d28e0a 100644
> --- a/include/uapi/linux/input-event-codes.h
> +++ b/include/uapi/linux/input-event-codes.h
> @@ -888,7 +888,8 @@
>  #define SW_LINEIN_INSERT	0x0d  /* set = inserted */
>  #define SW_MUTE_DEVICE		0x0e  /* set = device disabled */
>  #define SW_PEN_INSERTED		0x0f  /* set = pen inserted */
> -#define SW_MAX			0x0f
> +#define SW_MACHINE_COVER	0x10  /* set = cover closed */
> +#define SW_MAX			0x10
>  #define SW_CNT			(SW_MAX+1)
>  
>  /*
> -- 
> 2.24.1
Merlijn Wajer June 29, 2020, 11:27 a.m. UTC | #2
Hi,

Looks like we're blocking on this input patch.

On 16/06/2020 12:50, Pavel Machek wrote:
> On Fri 2020-06-12 14:53:58, Merlijn Wajer wrote:
>> This event code represents the state of a removable cover of a device.
>> Value 0 means that the cover is open or removed, value 1 means that the
>> cover is closed.
>>
>> Reviewed-by: Sebastian Reichel <sebastian.reichel@collabora.com> Acked-by: Tony Lindgren 
>> <tony@atomide.com> Signed-off-by: Merlijn Wajer <merlijn@wizzup.org> ---
> 
> Dmitry, can we get some kind of comment here, or better yet can we get you to apply this?

This is part of a patch series to resolve problems with the Nokia N900
not booting when the cover is removed (making the cover be the card
detect was also just weird IMHO). Just removing the card-detect from the
DTS is fine, but it was suggested that we expose the data instead as
input event. And that's gotten no response for about four months.

Should we just drop the feature and only remove the cd-gpios line from
the DTS, assuming upstream doesn't want this SW_MACHINE_COVER code?

Merlijn
Pavel Machek June 29, 2020, 1:36 p.m. UTC | #3
Hi!

> Looks like we're blocking on this input patch.
> 
> On 16/06/2020 12:50, Pavel Machek wrote:
> > On Fri 2020-06-12 14:53:58, Merlijn Wajer wrote:
> >> This event code represents the state of a removable cover of a device.
> >> Value 0 means that the cover is open or removed, value 1 means that the
> >> cover is closed.
> >>
> >> Reviewed-by: Sebastian Reichel <sebastian.reichel@collabora.com> Acked-by: Tony Lindgren 
> >> <tony@atomide.com> Signed-off-by: Merlijn Wajer <merlijn@wizzup.org> ---
> > 
> > Dmitry, can we get some kind of comment here, or better yet can we get you to apply this?
> 
> This is part of a patch series to resolve problems with the Nokia N900
> not booting when the cover is removed (making the cover be the card
> detect was also just weird IMHO). Just removing the card-detect from the
> DTS is fine, but it was suggested that we expose the data instead as
> input event. And that's gotten no response for about four months.
> 
> Should we just drop the feature and only remove the cd-gpios line from
> the DTS, assuming upstream doesn't want this SW_MACHINE_COVER code?

I believe series is good, lets keep it. Changing now will only delay
it a bit more. Let me try to get Dmitry's attention...

If that does not work, we can get Linus' attention :-).

If that does not work, umm, there are some other options.

Best regards,
									Pavel
Dmitry Torokhov June 30, 2020, 5:22 a.m. UTC | #4
On Mon, Jun 29, 2020 at 03:36:44PM +0200, Pavel Machek wrote:
> Hi!
> 
> > Looks like we're blocking on this input patch.
> > 
> > On 16/06/2020 12:50, Pavel Machek wrote:
> > > On Fri 2020-06-12 14:53:58, Merlijn Wajer wrote:
> > >> This event code represents the state of a removable cover of a device.
> > >> Value 0 means that the cover is open or removed, value 1 means that the
> > >> cover is closed.
> > >>
> > >> Reviewed-by: Sebastian Reichel <sebastian.reichel@collabora.com> Acked-by: Tony Lindgren 
> > >> <tony@atomide.com> Signed-off-by: Merlijn Wajer <merlijn@wizzup.org> ---
> > > 
> > > Dmitry, can we get some kind of comment here, or better yet can we get you to apply this?
> > 
> > This is part of a patch series to resolve problems with the Nokia N900
> > not booting when the cover is removed (making the cover be the card
> > detect was also just weird IMHO). Just removing the card-detect from the
> > DTS is fine, but it was suggested that we expose the data instead as
> > input event. And that's gotten no response for about four months.
> > 
> > Should we just drop the feature and only remove the cd-gpios line from
> > the DTS, assuming upstream doesn't want this SW_MACHINE_COVER code?
> 
> I believe series is good, lets keep it. Changing now will only delay
> it a bit more. Let me try to get Dmitry's attention...
> 
> If that does not work, we can get Linus' attention :-).
> 
> If that does not work, umm, there are some other options.

Sorry, am really swamped the last couple months. I can pick up the input
code, do you want me to pick up DTS as well?

Thanks.
Pavel Machek June 30, 2020, 5:58 p.m. UTC | #5
Hi!

> > > Looks like we're blocking on this input patch.
> > > 
> > > On 16/06/2020 12:50, Pavel Machek wrote:
> > > > On Fri 2020-06-12 14:53:58, Merlijn Wajer wrote:
> > > >> This event code represents the state of a removable cover of a device.
> > > >> Value 0 means that the cover is open or removed, value 1 means that the
> > > >> cover is closed.
> > > >>
> > > >> Reviewed-by: Sebastian Reichel <sebastian.reichel@collabora.com> Acked-by: Tony Lindgren 
> > > >> <tony@atomide.com> Signed-off-by: Merlijn Wajer <merlijn@wizzup.org> ---
> > > > 
> > > > Dmitry, can we get some kind of comment here, or better yet can we get you to apply this?
> > > 
> > > This is part of a patch series to resolve problems with the Nokia N900
> > > not booting when the cover is removed (making the cover be the card
> > > detect was also just weird IMHO). Just removing the card-detect from the
> > > DTS is fine, but it was suggested that we expose the data instead as
> > > input event. And that's gotten no response for about four months.
> > > 
> > > Should we just drop the feature and only remove the cd-gpios line from
> > > the DTS, assuming upstream doesn't want this SW_MACHINE_COVER code?
> > 
> > I believe series is good, lets keep it. Changing now will only delay
> > it a bit more. Let me try to get Dmitry's attention...
> > 
> > If that does not work, we can get Linus' attention :-).
> > 
> > If that does not work, umm, there are some other options.
> 
> Sorry, am really swamped the last couple months. I can pick up the input
> code, do you want me to pick up DTS as well?

No problem, sorry for being pushy.

If you could pick up just the input one-liner, that would be best. It
is not risky.

OMAP people will take care of the DTS, I believe, and we can iterate
if it does not work at the first try.

Best regards,
								Pavel
Tony Lindgren June 30, 2020, 6:04 p.m. UTC | #6
* Pavel Machek <pavel@ucw.cz> [200630 17:59]:
> Hi!
> 
> > > > Looks like we're blocking on this input patch.
> > > > 
> > > > On 16/06/2020 12:50, Pavel Machek wrote:
> > > > > On Fri 2020-06-12 14:53:58, Merlijn Wajer wrote:
> > > > >> This event code represents the state of a removable cover of a device.
> > > > >> Value 0 means that the cover is open or removed, value 1 means that the
> > > > >> cover is closed.
> > > > >>
> > > > >> Reviewed-by: Sebastian Reichel <sebastian.reichel@collabora.com> Acked-by: Tony Lindgren 
> > > > >> <tony@atomide.com> Signed-off-by: Merlijn Wajer <merlijn@wizzup.org> ---
> > > > > 
> > > > > Dmitry, can we get some kind of comment here, or better yet can we get you to apply this?
> > > > 
> > > > This is part of a patch series to resolve problems with the Nokia N900
> > > > not booting when the cover is removed (making the cover be the card
> > > > detect was also just weird IMHO). Just removing the card-detect from the
> > > > DTS is fine, but it was suggested that we expose the data instead as
> > > > input event. And that's gotten no response for about four months.
> > > > 
> > > > Should we just drop the feature and only remove the cd-gpios line from
> > > > the DTS, assuming upstream doesn't want this SW_MACHINE_COVER code?
> > > 
> > > I believe series is good, lets keep it. Changing now will only delay
> > > it a bit more. Let me try to get Dmitry's attention...
> > > 
> > > If that does not work, we can get Linus' attention :-).
> > > 
> > > If that does not work, umm, there are some other options.
> > 
> > Sorry, am really swamped the last couple months. I can pick up the input
> > code, do you want me to pick up DTS as well?
> 
> No problem, sorry for being pushy.
> 
> If you could pick up just the input one-liner, that would be best. It
> is not risky.
> 
> OMAP people will take care of the DTS, I believe, and we can iterate
> if it does not work at the first try.

I already acked the dts change a while back, please just queue them
together. Or if you want me to pick it up, please set up an immutable
branch for me against v5.8-rc1 to also merge in :)

Regards,

Tony
diff mbox series

Patch

diff --git a/include/linux/mod_devicetable.h b/include/linux/mod_devicetable.h
index 0754b8d71262..8a84f11bf124 100644
--- a/include/linux/mod_devicetable.h
+++ b/include/linux/mod_devicetable.h
@@ -318,7 +318,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		0x0f
+#define INPUT_DEVICE_ID_SW_MAX		0x10
 #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 b6a835d37826..0c2e27d28e0a 100644
--- a/include/uapi/linux/input-event-codes.h
+++ b/include/uapi/linux/input-event-codes.h
@@ -888,7 +888,8 @@ 
 #define SW_LINEIN_INSERT	0x0d  /* set = inserted */
 #define SW_MUTE_DEVICE		0x0e  /* set = device disabled */
 #define SW_PEN_INSERTED		0x0f  /* set = pen inserted */
-#define SW_MAX			0x0f
+#define SW_MACHINE_COVER	0x10  /* set = cover closed */
+#define SW_MAX			0x10
 #define SW_CNT			(SW_MAX+1)
 
 /*