mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Andy Green <andy@warmcat.com>
To: linux-kernel@vger.kernel.org, linux-usb@vger.kernel.org
Cc: patches@linaro.org, Andy Green <andy.green@linaro.org>
Subject: [RFC PATCH 4/4] PLATFORM: Add some documentation to platform docs about async platform_data
Date: Sat, 12 Mar 2011 22:32:35 +0000	[thread overview]
Message-ID: <20110312223234.27020.3911.stgit@otae.warmcat.com> (raw)
In-Reply-To: <20110312222633.27020.19543.stgit@otae.warmcat.com>

Signed-off-by: Andy Green <andy.green@linaro.org>
---

 Documentation/driver-model/platform.txt |   25 +++++++++++++++++++++++++
 1 files changed, 25 insertions(+), 0 deletions(-)

diff --git a/Documentation/driver-model/platform.txt b/Documentation/driver-model/platform.txt
index 41f4163..0c34156 100644
--- a/Documentation/driver-model/platform.txt
+++ b/Documentation/driver-model/platform.txt
@@ -96,6 +96,31 @@ System setup also associates those clocks with the device, so that that
 calls to clk_get(&pdev->dev, clock_name) return them as needed.
 
 
+Providing platform_data to onboard devices on asynchronously probed buses
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+Some boards have fixed onboard assets that would normally be dealt with
+by using plaform_data set in the usual way in the board definition file,
+but cannot directly do so because they are on a bus that is probed
+asynchronously.  For emebedded devices, often the broard definition
+file is adding platform devices for the buses involved, like USB host
+and gadget, in a fixed order using platform_add_devices(), so the device
+path of these fixed soldered-on-the-board assets is deterministic.
+
+For buses and devices that are named deterministically at boot-time,
+you can define platform_data that binds to these devices when they are
+probed by declaring a map of device paths to platform_data in your
+board definition file before adding the bus platform devices, using
+
+	void platform_register_async_platform_data(
+		struct platform_async_platform_data *map, int count);
+
+Buses that participate in this scheme will then check this mapping list
+for corresponding platform_data as they are probed and apply it
+automatically.  An example device path mapping is
+
+	"usb1/1-1/1-1.1"
+
+
 Legacy Drivers:  Device Probing
 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
 Some drivers are not fully converted to the driver model, because they take


      parent reply	other threads:[~2011-03-12 22:32 UTC|newest]

Thread overview: 32+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-03-12 22:32 [RFC PATCH 0/4] PLATFORM: Support for " Andy Green
2011-03-12 22:32 ` [RFC PATCH 1/4] PLATFORM: introduce structure to bind async platform data to a dev path name Andy Green
2011-03-12 23:29   ` Rafael J. Wysocki
2011-03-12 23:39     ` Andy Green
2011-03-13  1:03       ` Greg KH
2011-03-13 11:22         ` Andy Green
2011-03-13 12:51           ` Rafael J. Wysocki
2011-03-13 13:53             ` Andy Green
2011-03-13 16:58               ` Rafael J. Wysocki
2011-03-13 17:21                 ` Andy Green
2011-03-13 20:45                   ` Rafael J. Wysocki
2011-03-13 16:14           ` Greg KH
2011-03-13 17:26             ` Andy Green
2011-03-12 22:32 ` [RFC PATCH 2/4] PLATFORM: Introduce registration function for async platform data maps Andy Green
2011-03-12 22:32 ` [RFC PATCH 3/4] PLATFORM: Introduce async platform_data attach api Andy Green
2011-03-13  1:01   ` Greg KH
2011-03-13 10:41     ` Rafael J. Wysocki
2011-03-13 11:58       ` Andy Green
2011-03-13 12:53         ` Rafael J. Wysocki
2011-03-13 13:21           ` Andy Green
2011-03-13 16:15             ` Greg KH
2011-03-13 17:13               ` Andy Green
2011-03-13 17:48                 ` Greg KH
2011-03-13 18:13                   ` Andy Green
2011-03-13 23:26                     ` Greg KH
2011-03-14  8:38                       ` Andy Green
2011-03-14 20:54                         ` Greg KH
2011-03-14 21:03                           ` Alan Stern
2011-03-14 21:13                             ` Greg KH
2011-03-14 21:10                           ` Mark Brown
2011-03-14 21:59                           ` Andy Green
2011-03-12 22:32 ` Andy Green [this message]

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=20110312223234.27020.3911.stgit@otae.warmcat.com \
    --to=andy@warmcat.com \
    --cc=andy.green@linaro.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-usb@vger.kernel.org \
    --cc=patches@linaro.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

Powered by JetHome