From: Kevin Hilman <khilman@deeprootsystems.com>
To: Grant Likely <grant.likely@secretlab.ca>
Cc: "Moffett, Kyle D" <Kyle.D.Moffett@boeing.com>,
Patrick Pannuto <ppannuto@codeaurora.org>,
"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
"linux-arm-msm@vger.kernel.org" <linux-arm-msm@vger.kernel.org>,
"magnus.damm@gmail.com" <magnus.damm@gmail.com>,
"gregkh@suse.de" <gregkh@suse.de>,
Paul Mundt <lethal@linux-sh.org>,
Magnus Damm <damm@opensource.se>,
"Rafael J. Wysocki" <rjw@sisk.pl>,
Eric Miao <eric.y.miao@gmail.com>, Dmitry Torokhov <dtor@mail.ru>,
"netdev@vger.kernel.org" <netdev@vger.kernel.org>,
Kyle D Moffett <kyle@moffetthome.net>
Subject: Re: [PATCH 2/2] platform: Facilitate the creation of pseudo-platform buses
Date: Fri, 20 Aug 2010 11:51:38 -0700 [thread overview]
Message-ID: <87hbip9kxx.fsf@deeprootsystems.com> (raw)
In-Reply-To: <AANLkTinaddiPAcokH3fRVYAFf3N-Gz--U5Jd1iyNsi+m@mail.gmail.com> (Grant Likely's message of "Thu, 19 Aug 2010 16:22:41 -0600")
Grant Likely <grant.likely@secretlab.ca> writes:
[...]
>> One of the primary goals of this (at least for me and it seems Magnus also)
>> is to keep drivers ignorant of their bus type, and any bus-type-specific
>> code should be done in the bus_type implementation.
>
> Heh; which just screams to me that bus_type is the wrong level to be
> abstracting the behaviour
Heh, now I feel like we're going around in circles. Remember, I never
wanted to create add a new bus_type. Someone else [ahem] suggested
doing the abstraction at the bus_type level. ;)
> (but I also understand your need for the
> "omap_device" wrapper around platform_device which also requires some
> method to sort out when a platform_device really is an omap_device
> without an unsafe dereference).
Yes, I'm working on the devres approach to that now, as is Magnus for
the sh-mobile version (proposed for .36-rc1[1])
>> Both for SH and OMAP, we've been using the (admiteddly broken)
>> weak-symbol-override approach to getting a custom bus-type based on the
>> platform_bus. We've been using that in OMAP for a while now and have
>> not seen any need to for the drivers to know if they are on the vanilla
>> platform_bus or the customized one.
>>
>> I'm very curious to hear what type of impact you expect to the drivers.
>
> My fears on this point may very well be unfounded. This isn't the
> hill I'm going to die on either. Show me an implementation of driver
> sharing that is clean and prove me wrong! :-)
IMHO, simply overriding the few dev_pm_ops methods was the cleanest and
simplest.
Since we seem to be in agreement now that the a new bus may not the
right abstraction for this (since we want it to be completely
transparent to the drivers), I'll go back to the original design. No new
bus types, keep the platform_bus as is, but simply override the few
dev_pm_ops methods I care about. This is what is done on SH,
SH-Mobile[1] and my original version for OMAP that started this
conversation.
Yes, the weak-symbol method of overriding is not scalable, but that's a
separate issue from whether or not to create a new bus. I have a
proposed fix for the weak which I'll post shortly.
Kevin
[1] http://lists.infradead.org/pipermail/linux-arm-kernel/2010-August/022411.html
WARNING: multiple messages have this Message-ID (diff)
From: Kevin Hilman <khilman@deeprootsystems.com>
To: Grant Likely <grant.likely@secretlab.ca>
Cc: "Moffett\, Kyle D" <Kyle.D.Moffett@boeing.com>,
Patrick Pannuto <ppannuto@codeaurora.org>,
"linux-kernel\@vger.kernel.org" <linux-kernel@vger.kernel.org>,
"linux-arm-msm\@vger.kernel.org" <linux-arm-msm@vger.kernel.org>,
"magnus.damm\@gmail.com" <magnus.damm@gmail.com>,
"gregkh\@suse.de" <gregkh@suse.de>,
Paul Mundt <lethal@linux-sh.org>,
Magnus Damm <damm@opensource.se>,
"Rafael J. Wysocki" <rjw@sisk.pl>,
Eric Miao <eric.y.miao@gmail.com>, Dmitry Torokhov <dtor@mail.ru>,
"netdev\@vger.kernel.org" <netdev@vger.kernel.org>,
Kyle D Moffett <kyle@moffetthome.net>
Subject: Re: [PATCH 2/2] platform: Facilitate the creation of pseudo-platform buses
Date: Fri, 20 Aug 2010 11:51:38 -0700 [thread overview]
Message-ID: <87hbip9kxx.fsf@deeprootsystems.com> (raw)
In-Reply-To: <AANLkTinaddiPAcokH3fRVYAFf3N-Gz--U5Jd1iyNsi+m@mail.gmail.com> (Grant Likely's message of "Thu, 19 Aug 2010 16:22:41 -0600")
Grant Likely <grant.likely@secretlab.ca> writes:
[...]
>> One of the primary goals of this (at least for me and it seems Magnus also)
>> is to keep drivers ignorant of their bus type, and any bus-type-specific
>> code should be done in the bus_type implementation.
>
> Heh; which just screams to me that bus_type is the wrong level to be
> abstracting the behaviour
Heh, now I feel like we're going around in circles. Remember, I never
wanted to create add a new bus_type. Someone else [ahem] suggested
doing the abstraction at the bus_type level. ;)
> (but I also understand your need for the
> "omap_device" wrapper around platform_device which also requires some
> method to sort out when a platform_device really is an omap_device
> without an unsafe dereference).
Yes, I'm working on the devres approach to that now, as is Magnus for
the sh-mobile version (proposed for .36-rc1[1])
>> Both for SH and OMAP, we've been using the (admiteddly broken)
>> weak-symbol-override approach to getting a custom bus-type based on the
>> platform_bus. We've been using that in OMAP for a while now and have
>> not seen any need to for the drivers to know if they are on the vanilla
>> platform_bus or the customized one.
>>
>> I'm very curious to hear what type of impact you expect to the drivers.
>
> My fears on this point may very well be unfounded. This isn't the
> hill I'm going to die on either. Show me an implementation of driver
> sharing that is clean and prove me wrong! :-)
IMHO, simply overriding the few dev_pm_ops methods was the cleanest and
simplest.
Since we seem to be in agreement now that the a new bus may not the
right abstraction for this (since we want it to be completely
transparent to the drivers), I'll go back to the original design. No new
bus types, keep the platform_bus as is, but simply override the few
dev_pm_ops methods I care about. This is what is done on SH,
SH-Mobile[1] and my original version for OMAP that started this
conversation.
Yes, the weak-symbol method of overriding is not scalable, but that's a
separate issue from whether or not to create a new bus. I have a
proposed fix for the weak which I'll post shortly.
Kevin
[1] http://lists.infradead.org/pipermail/linux-arm-kernel/2010-August/022411.html
next prev parent reply other threads:[~2010-08-20 18:51 UTC|newest]
Thread overview: 22+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-08-10 23:49 [PATCHv2 0/2] platform: Facilitate the creation of pseudo-platform buses Patrick Pannuto
2010-08-10 23:49 ` [PATCH 1/2] platform: Use drv->driver.bus instead of assuming platform_bus_type Patrick Pannuto
2010-08-10 23:49 ` [PATCH 2/2] platform: Facilitate the creation of pseudo-platform buses Patrick Pannuto
2010-08-13 1:13 ` Patrick Pannuto
2010-08-14 21:04 ` Greg KH
2010-08-13 22:05 ` Grant Likely
2010-08-16 18:47 ` Patrick Pannuto
2010-08-16 20:25 ` Grant Likely
2010-08-16 23:58 ` Michał Mirosław
2010-08-16 1:38 ` Moffett, Kyle D
2010-08-16 6:43 ` Grant Likely
2010-08-19 19:20 ` Kevin Hilman
2010-08-19 19:20 ` Kevin Hilman
2010-08-19 22:22 ` Grant Likely
2010-08-20 18:51 ` Kevin Hilman [this message]
2010-08-20 18:51 ` Kevin Hilman
2010-08-20 20:08 ` Grant Likely
2010-08-21 0:10 ` Kevin Hilman
2010-08-21 0:10 ` Kevin Hilman
2010-08-21 7:10 ` Grant Likely
2010-08-23 14:53 ` Kevin Hilman
2010-08-23 14:53 ` Kevin Hilman
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=87hbip9kxx.fsf@deeprootsystems.com \
--to=khilman@deeprootsystems.com \
--cc=Kyle.D.Moffett@boeing.com \
--cc=damm@opensource.se \
--cc=dtor@mail.ru \
--cc=eric.y.miao@gmail.com \
--cc=grant.likely@secretlab.ca \
--cc=gregkh@suse.de \
--cc=kyle@moffetthome.net \
--cc=lethal@linux-sh.org \
--cc=linux-arm-msm@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=magnus.damm@gmail.com \
--cc=netdev@vger.kernel.org \
--cc=ppannuto@codeaurora.org \
--cc=rjw@sisk.pl \
/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.