From patchwork Sat Mar 12 22:32:12 2011 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Andy Green X-Patchwork-Id: 526 Return-Path: Delivered-To: unknown Received: from imap.gmail.com (74.125.159.109) by localhost6.localdomain6 with IMAP4-SSL; 08 Jun 2011 14:43:21 -0000 Delivered-To: patches@linaro.org Received: by 10.224.45.75 with SMTP id d11cs13462qaf; Sat, 12 Mar 2011 14:32:17 -0800 (PST) Received: by 10.216.6.27 with SMTP id 27mr9145497wem.69.1299969135987; Sat, 12 Mar 2011 14:32:15 -0800 (PST) Received: from mail-wy0-f178.google.com (mail-wy0-f178.google.com [74.125.82.178]) by mx.google.com with ESMTPS id 39si6864146wet.99.2011.03.12.14.32.14 (version=TLSv1/SSLv3 cipher=OTHER); Sat, 12 Mar 2011 14:32:15 -0800 (PST) Received-SPF: pass (google.com: domain of andy.warmcat.com@googlemail.com designates 74.125.82.178 as permitted sender) client-ip=74.125.82.178; Authentication-Results: mx.google.com; spf=pass (google.com: domain of andy.warmcat.com@googlemail.com designates 74.125.82.178 as permitted sender) smtp.mail=andy.warmcat.com@googlemail.com; dkim=pass (test mode) header.i=@googlemail.com Received: by mail-wy0-f178.google.com with SMTP id 26so4056169wyj.37 for ; Sat, 12 Mar 2011 14:32:14 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=googlemail.com; s=gamma; h=domainkey-signature:sender:from:subject:to:cc:date:message-id :in-reply-to:references:user-agent:mime-version:content-type :content-transfer-encoding; bh=aRCKDsaiznT6/7QepS5S47vbiPIc4mqvRH3tBPJW7H8=; b=qfC/3JzZZRCk6o5rzxFcsILr4Vn2azTLlmRn3h2MVF0NgZhD7yeT0nI6fba4jvxDIQ vcNS/KI9tN1WeqCF5MRZQVKgMLio6SryXnf9hMI3uRsrUC6gcFyONshV+VAW2Lj2DZpj BCPO0YTyru3by9KDWz+/pDmLsDiZnsAbZEfsY= DomainKey-Signature: a=rsa-sha1; c=nofws; d=googlemail.com; s=gamma; h=sender:from:subject:to:cc:date:message-id:in-reply-to:references :user-agent:mime-version:content-type:content-transfer-encoding; b=gtfZF18QjlNHxS6e/BxRPaf2r45OBCHGNsrOSKQWdecsOPwjHttMn6AV9uOWSYCBk+ 28sFBc/zBegB/QfYMPy1JfBv4DncuUMBAEbqBek6U0d7BrV0A9TMPlhLfnmEzKNgGdjd nnOfKGqLKj9W9rVLg7tZCRKCxsCDY2B9onovI= Received: by 10.216.62.144 with SMTP id y16mr5099076wec.101.1299969134397; Sat, 12 Mar 2011 14:32:14 -0800 (PST) Received: from otae.warmcat.com (s15404224.onlinehome-server.info [87.106.134.80]) by mx.google.com with ESMTPS id r80sm2971245wei.39.2011.03.12.14.32.13 (version=TLSv1/SSLv3 cipher=OTHER); Sat, 12 Mar 2011 14:32:14 -0800 (PST) Sender: Andy Green From: Andy Green Subject: [RFC PATCH 1/4] PLATFORM: introduce structure to bind async platform data to a dev path name To: linux-kernel@vger.kernel.org, linux-usb@vger.kernel.org Cc: patches@linaro.org, Andy Green Date: Sat, 12 Mar 2011 22:32:12 +0000 Message-ID: <20110312223212.27020.9839.stgit@otae.warmcat.com> In-Reply-To: <20110312222633.27020.19543.stgit@otae.warmcat.com> References: <20110312222633.27020.19543.stgit@otae.warmcat.com> User-Agent: StGIT/0.14.3 MIME-Version: 1.0 This structure allows tagging arbitrary platform_data that can't be attached to a device until after it is probed, with the device path name that it is to be attached to. Signed-off-by: Andy Green --- include/linux/platform_device.h | 17 +++++++++++++++++ 1 files changed, 17 insertions(+), 0 deletions(-) diff --git a/include/linux/platform_device.h b/include/linux/platform_device.h index 2e700ec..d8c0ba9 100644 --- a/include/linux/platform_device.h +++ b/include/linux/platform_device.h @@ -193,4 +193,21 @@ static inline char *early_platform_driver_setup_func(void) \ } #endif /* MODULE */ +/** + * platform_async_platform_data - maps a known bus + device name on to + * platform_data to be attached to that device + * when it is eventually instantiated. For use + * with onboard devices on buses that probe + * asynchronously. Device path fields must + * be separated with '/'. + * @device_path: bus / device path, eg, "usb1/1-1/1-1.1" + * @platform_data: platform_data to attach to device matching the + * device_path + */ + +struct platform_async_platform_data { + const char *device_path; + void *platform_data; +}; + #endif /* _PLATFORM_DEVICE_H_ */