From: Hans de Goede <hdegoede@redhat.com>
To: Mark Brown <broonie@kernel.org>
Cc: Tomasz Figa <tomasz.figa@gmail.com>, Chen-Yu Tsai <wens@csie.org>,
Arend van Spriel <arend@broadcom.com>,
Sascha Hauer <s.hauer@pengutronix.de>,
Chris Ball <chris@printf.net>,
Ulf Hansson <ulf.hansson@linaro.org>,
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>
Subject: Re: RFC: representing sdio devices oob interrupt, clks, etc. in device tree
Date: Sun, 25 May 2014 21:20:52 +0200 [thread overview]
Message-ID: <53824294.1090609@redhat.com> (raw)
In-Reply-To: <20140525123452.GS22111@sirena.org.uk>
Hi,
On 05/25/2014 02:34 PM, Mark Brown wrote:
> On Sat, May 24, 2014 at 12:06:30PM +0200, Hans de Goede wrote:
>> On 05/23/2014 06:27 PM, Mark Brown wrote:
>>> On Fri, May 23, 2014 at 01:50:40PM +0200, Hans de Goede wrote:
>>>> On 05/23/2014 01:22 PM, Mark Brown wrote:
>
>>>> The compatible is not a Linux specific thing, it is a marking saying
>>>> that something needs to take care of enabling the clks (and whatever
>>>> else we will make part of the binding for this compatible), before
>>>> scanning the mmc bus.
>
>>> We could just say that the mere presence of a child node with the right
>>> properties is sufficient to trigger the bus to do the startup?
>
>> Yes, except that most involved property names are standardized, ie clocks,
>> and we want to be able to opt out of the KISS mmc core code for
>> (future) complex power on sequences.
>
> This is why I'm suggesting keying off the specific compatible strings
> for drivers that want to opt out of the helpers rather than having a
> compatible string to enable the helpers (which may depend on the
> particular Linux version if the feature sets of drivers change for
> example).
>
>>> If the device is sufficiently complicated to need a special power up
>>> sequence I'd expect we'd be able to have a compatible string which would
>>> provide enough information for us to figure things out.
>
>> Hmm, so what you're suggesting is indeed more of an opt out then my initial
>> opt-in to KISS powerup idea. So to be clear what you're suggesting is:
>
>> mmc core walks host mmc-child nodes. Loads drivers based on compatibles
>> there. The checks a flag field in the driver to see if the driver wants to
>> opt-out of the KISS powerup code. The problem with this is that it won't
>
> Yes.
>
>> work reliable with modules, think the mmc probe being done from the ramdisk,
>> and the driver in question only being available from the rootfs. I really
>
> Why is that a problem - if we have no driver for the device there is no
> point in powering it up in the first place is there?
Well the driver may show up later, so if we only do the power-up once we have
a driver, this means we need to re-check if we need to do the powerup later.
Also the mmc people are very much against specifying a driver, as that is
something which should be probed not specified. I agree with them I've
already seen boards were more or less standardized sdio modules from different
vendors are used, they have various standard sdio powerup related things, like
an enable signal in standard places, but different editions of the boards
have different sdio modules soldered on, using different drivers.
I expect that with some care we can make all variants of these boards work with
a single dts file, by using a simple sdio wifi powerup mechanism, and after
that letting the mmc core figure out which module is actually soldered on.
>> believe that using opt-in with a compatible such as simple-sdio-powerup
>> is by far the safest thing to do, and as an added advantage we don't need
>> to worry about how to deal with the future complex power on cases at all,
>> we leave all the room in the world for various future scenarios. since as
>> soon as the simple-sdio-powerup compatible is not there the mmc core will
>> behave as it does today.
>
> Please remember that the DT is *supposed* to be an ABI - systems are
> supposed to be able to ship with a fixed DT and have it work with random
> operating systems they have no knowledge of (and may not even exist at
> the time the DT is being created). This means we can't rely on removing
> a compatible string later on.
I know that the DT is an ABI, and I'm not arguing for removing support for
the simple-sdio-powerup compatible from the kernel when a more complex
case arrives, nor am I arguing to remove it from the DT for existing working
boards. The idea behind the simple-sdio-powerup compatible is that it makes
the simple powerup behavior opt-in. So if a new board comes along which
requires something more complex, the people working on this can do what ever
they want / need without the simple powerup code getting in the way, as
long as they don't *add* the simple-sdio-powerup compatible to their *new*
DT file.
Basically the idea behind the simple-sdio-powerup compatible is to make
the worst case scenario for more complex boards to be the scenario which
we have today, i.e. no support for sdio powerup at all, rather then having
something in place which actually may get in the way, making things worse
then they are today.
Regards,
Hans
next prev parent reply other threads:[~2014-05-25 19:20 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 [this message]
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
[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=53824294.1090609@redhat.com \
--to=hdegoede@redhat.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=jsarha@ti.com \
--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=tomasz.figa@gmail.com \
--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).