public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Rodolfo Giometti <giometti@enneenne.com>
To: linux-pcmcia@lists.infradead.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] PCMCIA: prevent auto insert during resume.
Date: Fri, 26 Oct 2007 18:54:00 +0200	[thread overview]
Message-ID: <20071026165400.GA19019@enneenne.com> (raw)
In-Reply-To: <20071026163651.GD4321@flint.arm.linux.org.uk>

On Fri, Oct 26, 2007 at 05:36:51PM +0100, Russell King wrote:
> On Fri, Oct 26, 2007 at 06:27:06PM +0200, Rodolfo Giometti wrote:
> > On Fri, Oct 26, 2007 at 05:02:06PM +0100, Russell King wrote:
> > > When you bring the battery device out of resume, and you've inserted a
> > > card, you want it to be detected.  Your change means you have to wait
> > > until the system has finished resuming before you plug the card in,
> > > which practically is a pain in the butt and actually leads to user
> > > errors.  IOW:
> > > 
> > > "I plugged my wireless card in after I pressed the power button, why
> > > wasn't it detected?"
> > 
> > My patch doesn't affect the power on sequence, just the resume
> > one.
> 
> On a lot of devices, the "power button" is the resume button.  When you
> "turn it off" it suspends, and when you "turn it on" it resumes.

I see. My device has two buttons.

However even in this case, if you never eject the device, then switch
off (sleep), change the device into the slot and then power on (wake
up), with my patch everything continues to work as before.

The differences come up only if you eject the device before power off.

> > Also if you didn't eject the socket, at resume the device will be
> > powered up again, my patch just prevents that a pre-powered off device
> > to be turned on at resume time.
> > 
> > However you should consider that some embedded systems have fixed
> > PCMCIA devices that can't be removed so there are no reasons to detect
> > them after resume, nobody can change them. :)
> > 
> > Also battery powered devices can go very frequently to sleep and the
> > current behavior force the user to switch off the unused device each
> > time the system resumes from sleep.
> 
> I realise that.  I do work on embedded devices, and this behaviour is
> explicitly there to support embedded devices.
> 
> I've suggested a workable solution to you which allows both of us to
> have the behaviour we both desire from the system.  That sounds like
> a negotiated solution to me...

Do you mean to switch off the socket from userland? It could be a
solution but in this case the device is powered on each time even if
for a short delay...

Maybe we can add an entry into sysfs? Or just a module parameter? So
developers can choose their preferred behaviour. :)

Thanks for your time,

Rodolfo

-- 

GNU/Linux Solutions                  e-mail:    giometti@enneenne.com
Linux Device Driver                             giometti@gnudd.com
Embedded Systems                     		giometti@linux.it
UNIX programming                     phone:     +39 349 2432127

  reply	other threads:[~2007-10-26 16:51 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-10-26 10:51 [PATCH] PCMCIA: prevent auto insert during resume Rodolfo Giometti
2007-10-26 15:11 ` Russell King
2007-10-26 15:47   ` Rodolfo Giometti
2007-10-26 16:02     ` Russell King
2007-10-26 16:27       ` Rodolfo Giometti
2007-10-26 16:36         ` Russell King
2007-10-26 16:54           ` Rodolfo Giometti [this message]
2007-10-26 17:00             ` Russell King
2007-10-26 17:18               ` Rodolfo Giometti
2007-10-26 18:37                 ` Russell King
2007-10-26 20:52                   ` Rodolfo Giometti
2007-10-29 19:24                 ` Pavel Machek
2007-11-01 14:53                   ` Rodolfo Giometti
2007-11-01 18:37                     ` Russell King
2007-11-01 18:56                       ` Russell King
2007-11-01 22:43                         ` Rafael J. Wysocki
2007-11-06  9:09                         ` Rodolfo Giometti
2007-11-06  8:58                       ` Rodolfo Giometti

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=20071026165400.GA19019@enneenne.com \
    --to=giometti@enneenne.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-pcmcia@lists.infradead.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