From: Grant Likely <grant.likely@secretlab.ca>
To: Kevin Hilman <khilman@deeprootsystems.com>
Cc: linux-omap@vger.kernel.org, linux-arm-kernel@lists.infradead.org,
Eric Miao <eric.miao@canonical.com>,
Nicolas Pitre <nico@fluxnic.net>
Subject: Re: [PATCH v2 1/3] OMAP: PM: initial runtime PM core support
Date: Fri, 25 Jun 2010 16:30:56 -0600 [thread overview]
Message-ID: <AANLkTimcN6APawXLTzGIBUJ6DeGv8B0MEhbeJFkO59R-@mail.gmail.com> (raw)
In-Reply-To: <87wrtmepum.fsf@deeprootsystems.com>
On Fri, Jun 25, 2010 at 3:58 PM, Kevin Hilman
<khilman@deeprootsystems.com> wrote:
> Grant Likely <grant.likely@secretlab.ca> writes:
>> Yes, I've got patches which merge of_platform_bus_type with the
>> platform bus. This was an easy decision to make because the
>> of-specific bits (specifically, matching an of_device_id table with a
>> device tree node) are applicable to all bus types; i2c, spi, mdio,
>> platform, etc). The needed OF data structures have been moved into
>> struct device and struct device_driver so that of_platform_bus_type no
>> longer has anything different.
>>
>> The drivers still need to care about OF when extra platform data needs
>> to be extracted from the DT node, but for IRQs and register ranges it
>> is automatic.
>
> Does that mean the drivers are still doing platform_get_resource() for
> either platform devices or OF devices, or are does the driver have to
> know which bus it was on and call accordingly. It's the latter that I
> want to stay away from.
platform_get_resource() works for OF and non-OF platform devices with
no extra code needed in the OF case.
It's the other data that requires special code because it is provided
in the device tree instead of in a platform_data structure. A driver
that normally uses platform_data will need extra code early in the
probe hook to go and parse the device tree and populate the private
data structures accordingly. This behaviour has to be handled in the
driver because every driver uses a different platform_data structure.
It cannot be generic code. The rest of the driver can remain
untouched.
In the old (bad) way, the bus type was entirely different, and drivers
used by both platform_bus_type and of_platform_bus_type needed to have
entirely separate device_driver structures and probe() hooks for each
bus type.
[...]
>> So, instead of having all the platform_bus_type devices as children of
>> the "platform" device (/sys/devices/platform/*), you could set the
>> omap devices to be children of an omap bus device
>> (/sys/devices/omap/*). Different busses can also implement different
>> behaviour by using a different parent device. For example:
>>
>> /sys/devices/platform
>> /sys/devices/omap-bus-a
>> /sys/devices/omap-bus-a/omap-bus-b
>>
>> Thoughts?
>
> Hmm, I like this idea. This is certainly worth exploring as a first
> pass.
>
> Thanks for the idea,
:-)
g.
--
To unsubscribe from this list: send the line "unsubscribe linux-omap" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
next prev parent reply other threads:[~2010-06-25 22:31 UTC|newest]
Thread overview: 22+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-06-24 23:43 [PATCH v2 0/3] OMAP: add runtime PM support at bus-level Kevin Hilman
2010-06-24 23:43 ` [PATCH v2 1/3] OMAP: PM: initial runtime PM core support Kevin Hilman
2010-06-25 15:26 ` Grant Likely
2010-06-25 18:04 ` Kevin Hilman
2010-06-25 20:08 ` Grant Likely
2010-06-25 21:58 ` Kevin Hilman
2010-06-25 22:30 ` Grant Likely [this message]
2010-06-25 22:46 ` Kevin Hilman
2010-06-25 23:04 ` Grant Likely
2010-06-28 21:49 ` Kevin Hilman
2010-06-28 22:14 ` Grant Likely
2010-06-28 23:27 ` Kevin Hilman
2010-06-28 23:47 ` Grant Likely
2010-06-25 20:06 ` Russell King - ARM Linux
2010-06-25 20:13 ` Grant Likely
2010-06-25 20:20 ` Russell King - ARM Linux
2010-06-25 23:46 ` Nicolas Pitre
2010-06-26 10:51 ` Uwe Kleine-König
2010-06-26 11:07 ` Russell King - ARM Linux
2010-08-04 22:55 ` Grant Likely
2010-06-24 23:43 ` [PATCH v2 2/3] OMAP: bus-level PM: enable use of runtime PM API for suspend/resume Kevin Hilman
2010-06-24 23:43 ` [PATCH v2 3/3] OMAP1: PM: add simple runtime PM layer to manage clocks 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=AANLkTimcN6APawXLTzGIBUJ6DeGv8B0MEhbeJFkO59R-@mail.gmail.com \
--to=grant.likely@secretlab.ca \
--cc=eric.miao@canonical.com \
--cc=khilman@deeprootsystems.com \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-omap@vger.kernel.org \
--cc=nico@fluxnic.net \
/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).