From: Tony Lindgren <tony@atomide.com>
To: Ivaylo Dimitrov <ivo.g.dimitrov.75@gmail.com>
Cc: Merlijn Wajer <merlijn@wizzup.org>,
Sebastian Reichel <sre@kernel.org>,
Aaro Koskinen <aaro.koskinen@iki.fi>, Pavel Machek <pavel@ucw.cz>,
linux-omap <linux-omap@vger.kernel.org>,
"Arthur D." <spinal.by@gmail.com>
Subject: Re: N900: Remove mmc1 "safety feature"?
Date: Fri, 14 Feb 2020 06:19:24 -0800 [thread overview]
Message-ID: <20200214141924.GY64767@atomide.com> (raw)
In-Reply-To: <8774c76c-e5df-6126-657e-3ac55f241951@gmail.com>
* Ivaylo Dimitrov <ivo.g.dimitrov.75@gmail.com> [200214 05:52]:
> Hi,
>
> On 14.02.20 г. 3:39 ч., Sebastian Reichel wrote:
> > Hi,
> >
> > On Wed, Feb 12, 2020 at 02:02:53PM +0100, Merlijn Wajer wrote:
> > > On 10/02/2020 20:27, Aaro Koskinen wrote:
> > > > > So how does this currently happen, the unmounting? Does the mmc1 card
> > > > > just disappear from /dev/ without any safe unmount? I don't understand
> > > > > how the current setup can work from a userspace point of view.
> > > > >
> > > > > Userspace could react on kernel events that tell it the cover is open,
> > > > > but I assume the kernel doesn't just decide to nuke the node from /dev/,
> > > > > so in that case the current DTS setup still doesn't make sense, right?
> > > > >
> > > > > What am I missing? Could you describe how this would work in a 'real
> > > > > life' scenario?
> > > >
> > > > I don't think it can work with the current mainline kernel.
> > > >
> > > > I recall the original Nokia kernel used the GPIO for "cover switch"
> > > > instead of card detect, and it was visible in sysfs, and this allowed
> > > > userspace to react on cover removal.. In the mainline kernel we have
> > > > this for older Nokia devices (770, N8x0), but not for N900. Still it
> > > > wouldn't help much for "safe unmount" as the unmount can take quite a
> > > > while, and user may remove the card too early.
> > >
> > > Shall I send in a patch removing this check from the device tree, then?
> >
> > I agree it's mostly annoying and suggest to convert the GPIO
> > into a gpio-key using a newly defined
> >
> > SW_MACHINE_COVER /* set = cover closed */
> >
> > Similar to the camera lens cover. It means userspace has a chance to
> > show a warning, but system works generally. I think it's ok to
> > assume that people running mainline on their N900 nowadays know what
> > could happen when they hot-remove SD cards.
> >
>
> That sounds way better to me than just removing the check.
Sounds good to me too. The MMC card is there and usable when cover is
off, so the cover GPIO is not the same as MMC detect GPIO.
Regards,
Tony
next prev parent reply other threads:[~2020-02-14 14:19 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-02-07 17:41 mmc0 on Nokia N900 on Linux 5.4.18 Merlijn Wajer
2020-02-08 19:04 ` Pavel Machek
2020-02-08 19:18 ` Merlijn Wajer
2020-02-08 21:44 ` N900: Remove mmc1 "safety feature"? (was: Re: mmc0 on Nokia N900 on Linux 5.4.18) Merlijn Wajer
2020-02-08 22:06 ` Pavel Machek
2020-02-08 22:19 ` Merlijn Wajer
2020-02-09 3:48 ` Arthur D.
2020-02-09 8:11 ` Merlijn Wajer
2020-02-10 19:45 ` Aaro Koskinen
2020-02-10 19:27 ` Aaro Koskinen
2020-02-12 13:02 ` Merlijn Wajer
2020-02-14 1:39 ` Sebastian Reichel
2020-02-14 5:51 ` N900: Remove mmc1 "safety feature"? Ivaylo Dimitrov
2020-02-14 14:19 ` Tony Lindgren [this message]
2020-02-14 10:31 ` N900: Remove mmc1 "safety feature"? (was: Re: mmc0 on Nokia N900 on Linux 5.4.18) 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=20200214141924.GY64767@atomide.com \
--to=tony@atomide.com \
--cc=aaro.koskinen@iki.fi \
--cc=ivo.g.dimitrov.75@gmail.com \
--cc=linux-omap@vger.kernel.org \
--cc=merlijn@wizzup.org \
--cc=pavel@ucw.cz \
--cc=spinal.by@gmail.com \
--cc=sre@kernel.org \
/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).