From: Andy Green <andy-/Zus8d0mwwtBDgjK7y7TUQ@public.gmane.org>
To: Arnd Bergmann <arnd-r2nGTMty4D4@public.gmane.org>
Cc: Greg KH <greg-U8xfFu+wG4EAvxtiuMwx3w@public.gmane.org>,
Grant Likely
<grant.likely-s3s/WqlpOiPyB63q8FvJNQ@public.gmane.org>,
devicetree-discuss-uLR06cmDAlY/bJ5BZ2RsiQ@public.gmane.org,
Mark Brown
<broonie-yzvPICuk2AATkU/dhu1WVueM+bqZidxxQQ4Iyu8u01E@public.gmane.org>,
Nicolas Pitre
<nicolas.pitre-QSEj5FYQhm4dnm+yROfE0A@public.gmane.org>,
Linux USB list
<linux-usb-u79uwXL29TY76Z2rM5mHXA@public.gmane.org>,
lkml <linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org>
Subject: Re: RFC: Platform data for onboard USB assets
Date: Fri, 18 Mar 2011 17:52:13 +0000 [thread overview]
Message-ID: <4D839BCD.6030202@linaro.org> (raw)
In-Reply-To: <201103181600.09877.arnd-r2nGTMty4D4@public.gmane.org>
On 03/18/2011 03:00 PM, Somebody in the thread at some point said:
Hi -
>> You changed your first opinion about tagging "dynamically probed
>> devices" with what is effectively platform_data, cool.
>
> I still don't like the idea of attaching platform_data to more
> devices, when we try to move people away from that in other
> parts of the kernel, because of the known deficiencies.
Whatever way you look at it, data delivered into the driver by Device
Tree is fundamentally the same action as delivering data into the driver
by platform_data. Yes, you query by named element with device context,
but you end up with the same answer as if you dereference a
platform_data member. There are no "known deficiencies" to
platform_data for this action either, at least, not known to me, I don't
think lack of typechecking on the pointer itself is an issue given the
accuracy it can be targeted to a soldered-on-the-board device.
> Passing a MAC address in a device tree property is a
> well-established method that is used on many drivers, and
> is portable across operating systems and architectures.
If you're talking about Device Tree, that itself is not at all "well
established" let alone servicing drivers from it. Like I say I don't
want to seem like I am down on it, but it is very new indeed let's face
it and few drivers are using it for functional configuration information
compared to vast numbers using platform_data.
=====> If Device Tree APIs is mandated to implement functionality fixes
to drivers and platform_data is blocked for this, then we end up with
different, rotting functionality for platform_data basis and drivers
that remain broken on the many, many, platforms that don't have and will
never have Device Tree. That does NOT sound like the right approach.
I guess the grand plan is to eliminate platform_data by overwhelming it
with Device Tree refactoring. But each driver has to be tested and each
board definition file changed... that is a huge, huge undertaking that
will not happen in any kind of medium and perhaps not long term either.
So they will have to coexist for a very long while. A policy of denying
fixes to platform_data users by enforcing introduction of Device Tree
APIs and making platform_data users out as troglodytes does not sound
workable.
> We don't need to implement the entire binding. My point was that
> if we implement a way to attach a device_node to a usb_device, we
> should do it in a way that is compatible with that binding, rather
> than coming up with a new way.
That document is of no interest outside open firmware / Device Tree
implementation since it is specific to it, and there is no value to
reference it for a platform_data based solution.
> My impression so far is that attaching a struct device_node to
> static USB devices can be useful in general, but I wouldn't
> go so far to suggest using this for dynamically probed devices.
At least we agree there's no point to target pluggable devices with
either solution, in which case platform_data and Device Tree provide the
same end result, plus or minus extra query API.
By the way I intend shortly to extend my patchset to cover Panda WLAN
case via probed MMC / SDIO device in the same way as USB. So there will
then be a second use case for my async platform_data patchset via a
different subsystem. Of course, maybe it just doubles the number of
beatings ^^
-Andy
--
To unsubscribe from this list: send the line "unsubscribe linux-usb" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
next prev parent reply other threads:[~2011-03-18 17:52 UTC|newest]
Thread overview: 32+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <20110311165642.GA9996@kroah.com>
[not found] ` <20110317214042.GQ31411@opensource.wolfsonmicro.com>
[not found] ` <20110317214736.GA29014@kroah.com>
[not found] ` <20110317214736.GA29014-U8xfFu+wG4EAvxtiuMwx3w@public.gmane.org>
2011-03-17 22:33 ` RFC: Platform data for onboard USB assets Arnd Bergmann
[not found] ` <201103172333.01474.arnd-r2nGTMty4D4@public.gmane.org>
2011-03-17 22:53 ` Greg KH
[not found] ` <20110317225328.GB31581-U8xfFu+wG4EAvxtiuMwx3w@public.gmane.org>
2011-03-17 23:18 ` Andy Green
2011-03-17 23:25 ` Greg KH
[not found] ` <20110317232503.GA14561-U8xfFu+wG4EAvxtiuMwx3w@public.gmane.org>
2011-03-18 7:42 ` Andy Green
[not found] ` <4D830CEC.4040608-QSEj5FYQhm4dnm+yROfE0A@public.gmane.org>
2011-03-18 22:54 ` Benjamin Herrenschmidt
2011-03-18 22:57 ` Andy Green
[not found] ` <4D8296D1.9060106-QSEj5FYQhm4dnm+yROfE0A@public.gmane.org>
2011-03-18 4:54 ` Grant Likely
[not found] ` <20110318045401.GA18545-MrY2KI0G/OVr83L8+7iqerDks+cytr/Z@public.gmane.org>
2011-03-18 8:19 ` Arnd Bergmann
2011-03-17 23:27 ` Grant Likely
2011-03-18 7:49 ` Andy Green
[not found] ` <4D830E97.4010403-QSEj5FYQhm4dnm+yROfE0A@public.gmane.org>
2011-03-18 8:25 ` Arnd Bergmann
[not found] ` <201103180925.30074.arnd-r2nGTMty4D4@public.gmane.org>
2011-03-18 8:38 ` Andy Green
2011-03-17 23:22 ` Andy Green
[not found] ` <4D82979B.2050003-QSEj5FYQhm4dnm+yROfE0A@public.gmane.org>
2011-03-18 15:00 ` Arnd Bergmann
[not found] ` <201103181600.09877.arnd-r2nGTMty4D4@public.gmane.org>
2011-03-18 15:15 ` Mark Brown
2011-03-18 17:52 ` Andy Green [this message]
[not found] ` <4D839BCD.6030202-QSEj5FYQhm4dnm+yROfE0A@public.gmane.org>
2011-03-18 18:20 ` David Anders
[not found] ` <4D83A25C.804-l0cyMroinI0@public.gmane.org>
2011-03-18 18:25 ` Mark Brown
[not found] ` <20110318182518.GA2271-yzvPICuk2AATkU/dhu1WVueM+bqZidxxQQ4Iyu8u01E@public.gmane.org>
2011-03-18 20:02 ` Andy Green
2011-03-18 21:11 ` Arnd Bergmann
[not found] ` <201103182211.36869.arnd-r2nGTMty4D4@public.gmane.org>
2011-03-18 21:17 ` Andy Green
2011-03-18 20:06 ` Arnd Bergmann
2011-03-18 21:33 ` Andy Green
[not found] ` <4D83CF8C.3020605-QSEj5FYQhm4dnm+yROfE0A@public.gmane.org>
2011-03-18 23:25 ` Mark Brown
[not found] ` <20110318232553.GA11422-yzvPICuk2AATkU/dhu1WVueM+bqZidxxQQ4Iyu8u01E@public.gmane.org>
2011-03-18 23:33 ` Andy Green
[not found] ` <201103182106.13888.arnd-r2nGTMty4D4@public.gmane.org>
2011-03-18 21:36 ` Grant Likely
2011-03-18 22:47 ` Benjamin Herrenschmidt
2011-03-18 21:28 ` Grant Likely
[not found] ` <AANLkTi=Vy4Cu9rf7SpOFL1umN37bJgXhq9jEQpUrqjgw-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2011-03-18 23:04 ` Andy Green
2011-03-18 22:37 ` Benjamin Herrenschmidt
2011-03-18 22:39 ` Andy Green
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=4D839BCD.6030202@linaro.org \
--to=andy-/zus8d0mwwtbdgjk7y7tuq@public.gmane.org \
--cc=andy.green-QSEj5FYQhm4dnm+yROfE0A@public.gmane.org \
--cc=arnd-r2nGTMty4D4@public.gmane.org \
--cc=broonie-yzvPICuk2AATkU/dhu1WVueM+bqZidxxQQ4Iyu8u01E@public.gmane.org \
--cc=devicetree-discuss-uLR06cmDAlY/bJ5BZ2RsiQ@public.gmane.org \
--cc=grant.likely-s3s/WqlpOiPyB63q8FvJNQ@public.gmane.org \
--cc=greg-U8xfFu+wG4EAvxtiuMwx3w@public.gmane.org \
--cc=linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
--cc=linux-usb-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
--cc=nicolas.pitre-QSEj5FYQhm4dnm+yROfE0A@public.gmane.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).