linux-omap.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Merlijn Wajer <merlijn@wizzup.org>
To: unlisted-recipients:; (no To-header on input)
Cc: pavel@ucw.cz, "Merlijn Wajer" <merlijn@wizzup.org>,
	"Sebastian Reichel" <sebastian.reichel@collabora.com>,
	"Tony Lindgren" <tony@atomide.com>,
	"Benoît Cousson" <bcousson@baylibre.com>,
	"Rob Herring" <robh+dt@kernel.org>,
	"Dmitry Torokhov" <dmitry.torokhov@gmail.com>,
	"Greg Kroah-Hartman" <gregkh@linuxfoundation.org>,
	"Jeffrey Hugo" <jhugo@codeaurora.org>,
	"Mattias Jacobsson" <2pi@mok.nu>,
	"Andy Shevchenko" <andriy.shevchenko@linux.intel.com>,
	"Thomas Gleixner" <tglx@linutronix.de>,
	"Manivannan Sadhasivam" <manivannan.sadhasivam@linaro.org>,
	"Russell King" <rmk+kernel@armlinux.org.uk>,
	"Mark Gross" <mgross@linux.intel.com>,
	linux-omap@vger.kernel.org (open list:OMAP DEVICE TREE SUPPORT),
	devicetree@vger.kernel.org (open list:OMAP DEVICE TREE SUPPORT),
	linux-kernel@vger.kernel.org (open list),
	linux-input@vger.kernel.org (open list:INPUT (KEYBOARD, MOUSE,
	JOYSTICK , TOUCHSCREEN)...)
Subject: [PATCH 2/2] ARM: dts: n900: remove mmc1 card detect gpio
Date: Fri, 12 Jun 2020 14:53:59 +0200	[thread overview]
Message-ID: <20200612125402.18393-3-merlijn@wizzup.org> (raw)
In-Reply-To: <20200612125402.18393-1-merlijn@wizzup.org>

Instead, expose the key via the input framework, as SW_MACHINE_COVER

The chip-detect GPIO is actually detecting if the cover is closed.
Technically it's possible to use the SD card with open cover. The
only downside is risk of battery falling out and user being able
to physically remove the card.

The behaviour of SD card not being available when the device is
open is unexpected and creates more problems than it solves. There
is a high chance, that more people accidently break their rootfs
by opening the case without physically removing the card.

Reviewed-by: Sebastian Reichel <sebastian.reichel@collabora.com>
Acked-by: Tony Lindgren <tony@atomide.com>
Signed-off-by: Merlijn Wajer <merlijn@wizzup.org>
---
 arch/arm/boot/dts/omap3-n900.dts | 12 ++++++++----
 1 file changed, 8 insertions(+), 4 deletions(-)

diff --git a/arch/arm/boot/dts/omap3-n900.dts b/arch/arm/boot/dts/omap3-n900.dts
index 4089d97405c9..3dbcae3d60d2 100644
--- a/arch/arm/boot/dts/omap3-n900.dts
+++ b/arch/arm/boot/dts/omap3-n900.dts
@@ -105,6 +105,14 @@ proximity_sensor {
 			linux,code = <SW_FRONT_PROXIMITY>;
 			linux,can-disable;
 		};
+
+		machine_cover {
+			label = "Machine Cover";
+			gpios = <&gpio6 0 GPIO_ACTIVE_LOW>; /* 160 */
+			linux,input-type = <EV_SW>;
+			linux,code = <SW_MACHINE_COVER>;
+			linux,can-disable;
+		};
 	};
 
 	isp1707: isp1707 {
@@ -819,10 +827,6 @@ &mmc1 {
 	pinctrl-0 = <&mmc1_pins>;
 	vmmc-supply = <&vmmc1>;
 	bus-width = <4>;
-	/* For debugging, it is often good idea to remove this GPIO.
-	   It means you can remove back cover (to reboot by removing
-	   battery) and still use the MMC card. */
-	cd-gpios = <&gpio6 0 GPIO_ACTIVE_LOW>; /* 160 */
 };
 
 /* most boards use vaux3, only some old versions use vmmc2 instead */
-- 
2.24.1


  parent reply	other threads:[~2020-06-12 12:53 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
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 ` Merlijn Wajer [this message]
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 2/2] ARM: dts: n900: remove mmc1 card detect gpio 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=20200612125402.18393-3-merlijn@wizzup.org \
    --to=merlijn@wizzup.org \
    --cc=2pi@mok.nu \
    --cc=andriy.shevchenko@linux.intel.com \
    --cc=bcousson@baylibre.com \
    --cc=devicetree@vger.kernel.org \
    --cc=dmitry.torokhov@gmail.com \
    --cc=gregkh@linuxfoundation.org \
    --cc=jhugo@codeaurora.org \
    --cc=linux-input@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-omap@vger.kernel.org \
    --cc=manivannan.sadhasivam@linaro.org \
    --cc=mgross@linux.intel.com \
    --cc=pavel@ucw.cz \
    --cc=rmk+kernel@armlinux.org.uk \
    --cc=robh+dt@kernel.org \
    --cc=sebastian.reichel@collabora.com \
    --cc=tglx@linutronix.de \
    --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).