linux-input.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Sebastian Reichel <sre@kernel.org>
To: Merlijn Wajer <merlijn@wizzup.org>
Cc: "Benoît Cousson" <bcousson@baylibre.com>,
	"Tony Lindgren" <tony@atomide.com>,
	"Rob Herring" <robh+dt@kernel.org>,
	"Mark Rutland" <mark.rutland@arm.com>,
	"Dmitry Torokhov" <dmitry.torokhov@gmail.com>,
	"Mattias Jacobsson" <2pi@mok.nu>,
	"Darren Hart (VMware)" <dvhart@infradead.org>,
	linux-omap@vger.kernel.org, devicetree@vger.kernel.org,
	linux-kernel@vger.kernel.org, linux-input@vger.kernel.org
Subject: Re: [RFC PATCH 1/2] Input: add `SW_MACHINE_COVER`
Date: Fri, 14 Feb 2020 15:38:57 +0100	[thread overview]
Message-ID: <20200214143857.msrkzzsss5hbb43l@earth.universe> (raw)
In-Reply-To: <20200214130249.6845-2-merlijn@wizzup.org>

[-- Attachment #1: Type: text/plain, Size: 2193 bytes --]

Hi,

On Fri, Feb 14, 2020 at 02:02:47PM +0100, Merlijn Wajer wrote:
> This event code represents the state of a removable cover of a device.
> Value 1 means that the cover is open or removed, value 0 means that the
> cover is closed.

This is the opposit of what is being stated everywhere else. It does
not really matter, but it must be used consistently :)

> This can be used to preempt users removing a removable mmc card or even
> the battery, allowing userspace to attempt to safely unmount a card.

I would drop this sentence, since its very specific to the N900. The
name is generic enough to e.g. also apply for desktop machines, which
sometimes have a cover switch for doing a shutdown (because of poor
airflow when open).

> ---

Missing Signed-off-by. 

Reviewed-by: Sebastian Reichel <sebastian.reichel@collabora.com>

-- Sebastian

>  include/linux/mod_devicetable.h        | 2 +-
>  include/uapi/linux/input-event-codes.h | 3 ++-
>  2 files changed, 3 insertions(+), 2 deletions(-)
> 
> diff --git a/include/linux/mod_devicetable.h b/include/linux/mod_devicetable.h
> index 448621c32e4d..4c692cb3cc1d 100644
> --- a/include/linux/mod_devicetable.h
> +++ b/include/linux/mod_devicetable.h
> @@ -299,7 +299,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 64cee116928e..318a6387cdfb 100644
> --- a/include/uapi/linux/input-event-codes.h
> +++ b/include/uapi/linux/input-event-codes.h
> @@ -807,7 +807,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.23.0
> 

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 833 bytes --]

  reply	other threads:[~2020-02-14 14:39 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-02-14 13:02 [RFC PATCH 0/2] Add SW_MACHINE_COVER key Merlijn Wajer
2020-02-14 13:02 ` [RFC PATCH 1/2] Input: add `SW_MACHINE_COVER` Merlijn Wajer
2020-02-14 14:38   ` Sebastian Reichel [this message]
2020-02-15  9:09     ` Merlijn Wajer
2020-02-14 19:16   ` Ladislav Michl
2020-02-15  9:03     ` Merlijn Wajer
2020-02-14 13:02 ` [RFC PATCH 2/2] ARM: dts: n900: remove mmc1 card detect gpio Merlijn Wajer
2020-02-14 14:49   ` Sebastian Reichel
2020-02-15  9:13     ` Merlijn Wajer

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20200214143857.msrkzzsss5hbb43l@earth.universe \
    --to=sre@kernel.org \
    --cc=2pi@mok.nu \
    --cc=bcousson@baylibre.com \
    --cc=devicetree@vger.kernel.org \
    --cc=dmitry.torokhov@gmail.com \
    --cc=dvhart@infradead.org \
    --cc=linux-input@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-omap@vger.kernel.org \
    --cc=mark.rutland@arm.com \
    --cc=merlijn@wizzup.org \
    --cc=robh+dt@kernel.org \
    --cc=tony@atomide.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).