Linux Input Archive on lore.kernel.org
 help / color / Atom feed
* [PATCH 0/2] Add SW_MACHINE_COVER key
@ 2020-06-12 12:53 Merlijn Wajer
  2020-06-12 12:53 ` [PATCH 1/2] Input: add `SW_MACHINE_COVER` Merlijn Wajer
                   ` (3 more replies)
  0 siblings, 4 replies; 12+ messages in thread
From: Merlijn Wajer @ 2020-06-12 12:53 UTC (permalink / raw)
  Cc: pavel, Merlijn Wajer, Benoît Cousson, Tony Lindgren,
	Rob Herring, Dmitry Torokhov, Greg Kroah-Hartman, Jeffrey Hugo,
	Thomas Gleixner, Borislav Petkov, Manivannan Sadhasivam,
	Mattias Jacobsson, Russell King, Mark Gross,
	open list:OMAP DEVICE TREE SUPPORT,
	open list:OMAP DEVICE TREE SUPPORT, open list,
	open list:INPUT (KEYBOARD, MOUSE, JOYSTICK , TOUCHSCREEN)...

this series adds the sw_machine_cover key, and changes the nokia n900 dts to
expose the key via gpio-keys.

before, this gpio was used as card detect gpio, causing the card not to show up
if the phone was booted without cover, see this thread on linux-omap:

    n900: remove mmc1 "safety feature"? (was: re: mmc0 on nokia n900 on linux 5.4.18)

since there is no realistic use for using this gpio as card detect, instead
expose it to userspace via gpio-keys. there are no event type for machine covers
yet, so add that first.

the key should be 1 when the cover is closed, and 0 when the cover is open.

starting the nokia n900 with the cover removed, putting the cover in place:

    event: time 1581684523.415296, type 5 (ev_sw), code 16 (?), value 1

removing the cover again, exposing mmc1 and the battery:

    event: time 1581684529.413706, type 5 (ev_sw), code 16 (?), value 0

Merlijn Wajer (2):
  Input: add `SW_MACHINE_COVER`
  ARM: dts: n900: remove mmc1 card detect gpio

 arch/arm/boot/dts/omap3-n900.dts       | 12 ++++++++----
 include/linux/mod_devicetable.h        |  2 +-
 include/uapi/linux/input-event-codes.h |  3 ++-
 3 files changed, 11 insertions(+), 6 deletions(-)

-- 
2.24.1


^ permalink raw reply	[flat|nested] 12+ messages in thread
* [PATCH 0/2] Add SW_MACHINE_COVER key
@ 2020-02-15 17:02 Merlijn Wajer
  2020-02-15 17:02 ` [PATCH 1/2] Input: add `SW_MACHINE_COVER` Merlijn Wajer
  0 siblings, 1 reply; 12+ messages in thread
From: Merlijn Wajer @ 2020-02-15 17:02 UTC (permalink / raw)
  Cc: Merlijn Wajer, Benoît Cousson, Tony Lindgren, Rob Herring,
	Mark Rutland, Dmitry Torokhov, Darren Hart (VMware),
	Mattias Jacobsson, Sebastian Reichel, linux-omap, devicetree,
	linux-kernel, linux-input

this series adds the sw_machine_cover key, and changes the nokia n900 dts to
expose the key via gpio-keys.

before, this gpio was used as card detect gpio, causing the card not to show up
if the phone was booted without cover, see this thread on linux-omap:

    n900: remove mmc1 "safety feature"? (was: re: mmc0 on nokia n900 on linux 5.4.18)

since there is no realistic use for using this gpio as card detect, instead
expose it to userspace via gpio-keys. there are no event type for machine covers
yet, so add that first.

the key should be 1 when the cover is closed, and 0 when the cover is open.

starting the nokia n900 with the cover removed, putting the cover in place:

    event: time 1581684523.415296, type 5 (ev_sw), code 16 (?), value 1

removing the cover again, exposing mmc1 and the battery:

    event: time 1581684529.413706, type 5 (ev_sw), code 16 (?), value 0

Merlijn Wajer (2):
  Input: add `SW_MACHINE_COVER`
  ARM: dts: n900: remove mmc1 card detect gpio

 arch/arm/boot/dts/omap3-n900.dts       | 12 ++++++++----
 include/linux/mod_devicetable.h        |  2 +-
 include/uapi/linux/input-event-codes.h |  3 ++-
 3 files changed, 11 insertions(+), 6 deletions(-)

-- 
2.23.0


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

end of thread, back to index

Thread overview: 12+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-06-12 12:53 [PATCH 0/2] Add SW_MACHINE_COVER key Merlijn Wajer
2020-06-12 12:53 ` [PATCH 1/2] Input: add `SW_MACHINE_COVER` Merlijn Wajer
2020-06-16 10:50   ` Pavel Machek
2020-06-29 11:27     ` Merlijn Wajer
2020-06-29 13:36       ` input maintainer -- are you there? was " Pavel Machek
2020-06-30  5:22         ` Dmitry Torokhov
2020-06-30 17:58           ` Pavel Machek
2020-06-30 18:04             ` Tony Lindgren
2020-06-12 12:53 ` [PATCH 2/2] ARM: dts: n900: remove mmc1 card detect gpio Merlijn Wajer
2020-06-16 10:50 ` [PATCH 0/2] Add SW_MACHINE_COVER key Pavel Machek
2020-06-30 19:29 ` Dmitry Torokhov
  -- strict thread matches above, loose matches on Subject: below --
2020-02-15 17:02 Merlijn Wajer
2020-02-15 17:02 ` [PATCH 1/2] Input: add `SW_MACHINE_COVER` Merlijn Wajer

Linux Input Archive on lore.kernel.org

Archives are clonable:
	git clone --mirror https://lore.kernel.org/linux-input/0 linux-input/git/0.git

	# If you have public-inbox 1.1+ installed, you may
	# initialize and index your mirror using the following commands:
	public-inbox-init -V2 linux-input linux-input/ https://lore.kernel.org/linux-input \
		linux-input@vger.kernel.org
	public-inbox-index linux-input

Example config snippet for mirrors

Newsgroup available over NNTP:
	nntp://nntp.lore.kernel.org/org.kernel.vger.linux-input


AGPL code for this site: git clone https://public-inbox.org/public-inbox.git