From: Pavel Machek <pavel@ucw.cz>
To: Vitaly Wool <vwool@ru.mvista.com>
Cc: David Brownell <david-b@pacbell.net>,
linux-kernel@vger.kernel.org,
spi-devel-general@lists.sourceforge.net, basicmark@yahoo.com,
stephen@streetfiresound.com, dpervushin@gmail.com
Subject: Re: [PATCH/RFC 1/2] simple SPI framework
Date: Wed, 5 Oct 2005 13:10:44 +0200 [thread overview]
Message-ID: <20051005111044.GA22374@elf.ucw.cz> (raw)
In-Reply-To: <4343898D.1060904@ru.mvista.com>
Hi!
> >+#ifdef CONFIG_PM
> >+
> >+/* Suspend/resume in "struct device_driver" don't really need that
> >+ * strange third parameter, so we just make it a constant and expect
> >+ * SPI drivers to ignore it just like most platform drivers do.
> >+ *
> >
> So you just ignored my letter on that subject :(
> The fact that you don't need it doesn't mean that other people won't.
> The fact that there's no clean way to suspend USB doesn't mean that
> there shouldn't be one for SPI.
The third parameter really must die. Just because you *can* use it
does not mean you should.
> >+ * NOTE: the suspend() method for an spi_master controller driver
> >+ * should verify that all its child devices are marked as suspended;
> >+ * suspend requests delivered through sysfs power/state files don't
> >+ * enforce such constraints.
> >+ */
> >+static int spi_suspend(struct device *dev, pm_message_t message)
> >+{
> >+ int value;
> >+
> >+ if (!dev->driver || !dev->driver->suspend)
> >+ return 0;
> >+
> >+ /* suspend will stop irqs and dma; no more i/o */
> >+ value = dev->driver->suspend(dev, message, SUSPEND_POWER_DOWN);
> >
> >
> So driver->suspend is going to be called 3 timer with SUSPEND_POWER_DOWN
> parameter, right?
> I'm afraid that won't work :(
No, it is going to be called once. You perhaps should not pass it
"SUSPEND_POWER_DOWN" but something else; but drivers should really
ignore it. [You are calling it for normal suspend, right? Not just
before power down.]
> Especially in our case, where we *do need* preparation steps that are
> taken in *normal* suspend sequence - i. e. we need to set up the wakeup
> credentials for the *SPI* since the wakeup's gonna happen from a call
> incoming through the network module residing on the SPI bus!
You should not need more than one phase.
Pavel
--
if you have sharp zaurus hardware you don't need... you know my address
prev parent reply other threads:[~2005-10-05 11:43 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2005-10-04 18:02 [PATCH/RFC 1/2] simple SPI framework David Brownell
2005-10-05 8:06 ` Vitaly Wool
2005-10-05 9:01 ` Russell King
2005-10-05 9:13 ` Vitaly Wool
2005-10-05 14:39 ` David Brownell
2005-10-06 18:23 ` Mark Underwood
2005-10-06 18:29 ` Russell King
2005-10-06 19:02 ` [PATCH] Get rid of the obsolete tri-level suspend/resume callbacks (was: Re: [PATCH/RFC 1/2] simple SPI framework) Russell King
2005-10-06 19:09 ` Greg KH
2005-10-06 21:14 ` Pavel Machek
2005-10-06 21:19 ` Russell King
2005-10-05 9:30 ` [PATCH/RFC 1/2] simple SPI framework Adam Belay
2005-10-05 14:45 ` David Brownell
2005-10-05 11:10 ` Pavel Machek [this message]
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=20051005111044.GA22374@elf.ucw.cz \
--to=pavel@ucw.cz \
--cc=basicmark@yahoo.com \
--cc=david-b@pacbell.net \
--cc=dpervushin@gmail.com \
--cc=linux-kernel@vger.kernel.org \
--cc=spi-devel-general@lists.sourceforge.net \
--cc=stephen@streetfiresound.com \
--cc=vwool@ru.mvista.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.