From: Tomasz Figa <tomasz.figa@gmail.com>
To: Hans de Goede <hdegoede@redhat.com>,
Ulf Hansson <ulf.hansson@linaro.org>
Cc: Mark Brown <broonie@kernel.org>, Chen-Yu Tsai <wens@csie.org>,
Arend van Spriel <arend@broadcom.com>,
Sascha Hauer <s.hauer@pengutronix.de>,
Chris Ball <chris@printf.net>,
Maxime Ripard <maxime.ripard@free-electrons.com>,
linux-mmc <linux-mmc@vger.kernel.org>,
linux-arm-kernel <linux-arm-kernel@lists.infradead.org>,
devicetree <devicetree@vger.kernel.org>,
Olof Johansson <olof@lixom.net>,
Russell King - ARM Linux <linux@arm.linux.org.uk>,
Fabio Estevam <festevam@gmail.com>, Arnd Bergmann <arnd@arndb.de>,
Jyri Sarha <jsarha@ti.com>,
Linus Walleij <linus.walleij@linaro.org>
Subject: Re: RFC: representing sdio devices oob interrupt, clks, etc. in device tree
Date: Wed, 28 May 2014 13:47:50 +0200 [thread overview]
Message-ID: <5385CCE6.9070204@gmail.com> (raw)
In-Reply-To: <5385AF94.90004@redhat.com>
I'm following this discussion continuously, but (un)fortunately I'm on
vacation right now and don't have much time to work on this, so sorry
for a very selective reply.
On 28.05.2014 11:42, Hans de Goede wrote:
> Hi,
>
> On 05/27/2014 03:50 PM, Ulf Hansson wrote:
>> [snip]
>>
>> Powerup driver's ->probe():
>> Typically the "powerup driver" will need to register a few callback
>> functions towards the mmc core. Typically at mmc_of_parse(), those
>> callbacks will have to be connected to a particular mmc host.
>>
>> I would like to see three different callbacks, mirroring each of the
>> mmc_ios power_mode states MMC_POWER_OFF|UP|ON.
>
> Hmm, can't we do something with runtime pm here instead? I would be
> nice if we could use the platform bus for this instead of inventing
> a new bus for this. Both from not needing to add extra count pov, but
> also from the pov of having a solution which other subsystems can
> later easily copy. I can even envision the parts of mmc_of_parse
> dealing with this being a separate function taking a child node as
> argument from day one, which can then hopefully later be moved out
> of the mmc subsys and be used elsewhere too (*).
This is actually a real use case, because we already have HSIC (USB with
heavily stripped down physical layer) modems on certain Samsung boards
and similarly to the kind of SDIO devices being discussed here they
can't be discovered until a certain power up sequence is done.
Analogically, the modem chip uses OOB interrupts and certain GPIO lines
for various purposes and they need to be provided by DT.
Moreover, there are already WLAN chips available that can use HSIC as
their host interface and I'm not talking here about some exotic
products, but rather widely recognized products of Broadcom (BCM4335),
Marvell (88W8797) or Qualcomm Atheros (AR6004).
My conclusion is that I see the discussion here being too much focused
on MMC, especially considering the fact that the whole problem doesn't
have anything to do with MMC, which is just used as (one of possible)
host interface.
IMHO, all we need here is a way to tell the MMC (or HSIC) core when to
look for a new device and when not (e.g. power down the host controller
completely). Anything else, including proper power sequencing is up to
the platform driver of such non-discoverable device - it's only its host
interface that is discoverable when enabled. I believe this simplistic
approach would lead to much less new code added, better reusability of
code (power sequencing independent of host interface) and no need to
create overly generic code, which usually turns out to be not generic
enough.
Best regards,
Tomasz
next prev parent reply other threads:[~2014-05-28 11:47 UTC|newest]
Thread overview: 51+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-05-22 9:49 RFC: representing sdio devices oob interrupt, clks, etc. in device tree Hans de Goede
2014-05-22 10:23 ` Chen-Yu Tsai
2014-05-22 11:38 ` Hans de Goede
2014-05-22 17:20 ` Tomasz Figa
2014-05-23 9:13 ` Hans de Goede
2014-05-23 11:22 ` Mark Brown
2014-05-23 11:50 ` Hans de Goede
2014-05-23 13:21 ` Arend van Spriel
2014-05-23 13:28 ` Hans de Goede
2014-05-23 14:54 ` Arend van Spriel
2014-05-24 10:10 ` Hans de Goede
2014-05-23 16:27 ` Mark Brown
2014-05-24 10:06 ` Hans de Goede
2014-05-25 12:34 ` Mark Brown
2014-05-25 19:20 ` Hans de Goede
2014-05-26 7:51 ` Arend van Spriel
2014-05-26 7:59 ` Chen-Yu Tsai
2014-05-26 8:07 ` Hans de Goede
2014-05-26 9:08 ` Arend van Spriel
2014-05-26 10:38 ` Mark Brown
2014-05-26 11:12 ` Hans de Goede
2014-05-26 14:22 ` Mark Brown
2014-05-26 14:59 ` Hans de Goede
2014-05-26 16:07 ` Ulf Hansson
2014-05-26 16:14 ` Mark Brown
2014-05-26 17:55 ` Hans de Goede
2014-05-27 13:50 ` Ulf Hansson
2014-05-27 17:53 ` Mark Brown
2014-05-27 18:55 ` Olof Johansson
2014-05-27 20:27 ` Arend van Spriel
2014-05-28 8:43 ` Ulf Hansson
2014-05-28 8:19 ` Ulf Hansson
2014-05-28 11:03 ` Mark Brown
2014-06-03 10:57 ` Ulf Hansson
2014-06-04 15:55 ` Mark Brown
2014-06-09 14:07 ` Ulf Hansson
2014-05-28 9:42 ` Hans de Goede
2014-05-28 10:12 ` Arend van Spriel
2014-05-28 10:27 ` Hans de Goede
2014-05-28 11:47 ` Tomasz Figa [this message]
[not found] ` <5385CCE6.9070204-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
2014-05-28 16:43 ` Mark Brown
2014-05-30 8:17 ` Hans de Goede
2014-06-03 10:14 ` Ulf Hansson
2014-06-03 11:07 ` Hans de Goede
2014-06-03 12:58 ` Ulf Hansson
2014-06-03 13:06 ` Hans de Goede
2014-06-03 13:28 ` Ulf Hansson
2014-05-27 15:47 ` Mark Brown
2014-05-23 13:34 ` Ulf Hansson
2014-05-23 16:47 ` Olof Johansson
2014-05-24 10:09 ` Hans de Goede
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=5385CCE6.9070204@gmail.com \
--to=tomasz.figa@gmail.com \
--cc=arend@broadcom.com \
--cc=arnd@arndb.de \
--cc=broonie@kernel.org \
--cc=chris@printf.net \
--cc=devicetree@vger.kernel.org \
--cc=festevam@gmail.com \
--cc=hdegoede@redhat.com \
--cc=jsarha@ti.com \
--cc=linus.walleij@linaro.org \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-mmc@vger.kernel.org \
--cc=linux@arm.linux.org.uk \
--cc=maxime.ripard@free-electrons.com \
--cc=olof@lixom.net \
--cc=s.hauer@pengutronix.de \
--cc=ulf.hansson@linaro.org \
--cc=wens@csie.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).