Hi, On Sat, Feb 08, 2020 at 11:19:21PM +0100, Merlijn Wajer wrote: > On 08/02/2020 23:06, Pavel Machek wrote: > > It is very bad for debugging, agreed. > > > > It makes sense for regular usage: when user removes back cover, system > > unmounts the u-SD card, so that it is ready for user to remove > > it. Note that we do _not_ have "remove the card safely" button in the > > UI; back cover serves that purpose. > > > > That said... for Leste just keep the patch. And maybe apply that one > > to shutdown system when battery is low :-). > > 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. A.