lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-Id: <20200214130249.6845-1-merlijn@wizzup.org>
Date:   Fri, 14 Feb 2020 14:02:46 +0100
From:   Merlijn Wajer <merlijn@...zup.org>
To:     merlijn@...zup.org
Cc:     BenoƮt Cousson <bcousson@...libre.com>,
        Tony Lindgren <tony@...mide.com>,
        Rob Herring <robh+dt@...nel.org>,
        Mark Rutland <mark.rutland@....com>,
        Dmitry Torokhov <dmitry.torokhov@...il.com>,
        Mattias Jacobsson <2pi@....nu>,
        "Darren Hart (VMware)" <dvhart@...radead.org>,
        linux-omap@...r.kernel.org, devicetree@...r.kernel.org,
        linux-kernel@...r.kernel.org, linux-input@...r.kernel.org
Subject: [RFC PATCH 0/2] Add SW_MACHINE_COVER key

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

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ