* [PATCH 01/17] Documentation: i2c: describe devicetree method for instantiating devices
[not found] ` <1392026654-5343-1-git-send-email-wsa-z923LK4zBo2bacvFa/9K2g@public.gmane.org>
@ 2014-02-10 10:03 ` Wolfram Sang
2014-02-10 18:21 ` linux
2014-02-15 14:48 ` Wolfram Sang
0 siblings, 2 replies; 4+ messages in thread
From: Wolfram Sang @ 2014-02-10 10:03 UTC (permalink / raw)
To: linux-i2c-u79uwXL29TY76Z2rM5mHXA
Cc: Wolfram Sang, devicetree-u79uwXL29TY76Z2rM5mHXA,
linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r, Rob Landley,
linux-doc-u79uwXL29TY76Z2rM5mHXA,
linux-kernel-u79uwXL29TY76Z2rM5mHXA
Signed-off-by: Wolfram Sang <wsa-z923LK4zBo2bacvFa/9K2g@public.gmane.org>
Cc: devicetree-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
Cc: linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r@public.gmane.org
---
Documentation/i2c/instantiating-devices | 34 +++++++++++++++++++++++++++++++--
1 file changed, 32 insertions(+), 2 deletions(-)
diff --git a/Documentation/i2c/instantiating-devices b/Documentation/i2c/instantiating-devices
index c70e7a7..6df095a 100644
--- a/Documentation/i2c/instantiating-devices
+++ b/Documentation/i2c/instantiating-devices
@@ -8,8 +8,8 @@ reason, the kernel code must instantiate I2C devices explicitly. There are
several ways to achieve this, depending on the context and requirements.
-Method 1: Declare the I2C devices by bus number
------------------------------------------------
+Method 1a: Declare the I2C devices by bus number
+------------------------------------------------
This method is appropriate when the I2C bus is a system bus as is the case
for many embedded systems. On such systems, each I2C bus has a number
@@ -51,6 +51,36 @@ The devices will be automatically unbound and destroyed when the I2C bus
they sit on goes away (if ever.)
+Method 1b: Declare the I2C devices via devicetree
+-------------------------------------------------
+
+This method has the same implications as method 1a. The declaration of I2C
+devices is here done via devicetree as subnodes of the master controller.
+
+Example:
+
+ i2c1: i2c@400a0000 {
+ /* ... master properties skipped ... */
+ clock-frequency = <100000>;
+
+ flash@50 {
+ compatible = "atmel,24c256";
+ reg = <0x50>;
+ };
+
+ pca9532: gpio@60 {
+ compatible = "nxp,pca9532";
+ gpio-controller;
+ #gpio-cells = <2>;
+ reg = <0x60>;
+ };
+ };
+
+Here, two devices are attached to the bus using a speed of 100kHz. For
+additional properties which might be needed to set up the device, please refer
+to its devicetree documentation in Documentation/devicetree/bindings/.
+
+
Method 2: Instantiate the devices explicitly
--------------------------------------------
--
1.8.5.1
^ permalink raw reply related [flat|nested] 4+ messages in thread
* Re: [PATCH 01/17] Documentation: i2c: describe devicetree method for instantiating devices
2014-02-10 10:03 ` [PATCH 01/17] Documentation: i2c: describe devicetree method for instantiating devices Wolfram Sang
@ 2014-02-10 18:21 ` linux
[not found] ` <20140210122119.115858a7ntu4lr40-S15kz1ZIOvSoVoj5zvVkGw@public.gmane.org>
2014-02-15 14:48 ` Wolfram Sang
1 sibling, 1 reply; 4+ messages in thread
From: linux @ 2014-02-10 18:21 UTC (permalink / raw)
To: Wolfram Sang
Cc: linux-i2c, devicetree, linux-arm-kernel, Rob Landley, linux-doc,
linux-kernel
Quoting Wolfram Sang <wsa@the-dreams.de>:
> Signed-off-by: Wolfram Sang <wsa@the-dreams.de>
> Cc: devicetree@vger.kernel.org
> Cc: linux-arm-kernel@lists.infradead.org
> ---
>
> Documentation/i2c/instantiating-devices | 34
> +++++++++++++++++++++++++++++++--
> 1 file changed, 32 insertions(+), 2 deletions(-)
>
> diff --git a/Documentation/i2c/instantiating-devices
> b/Documentation/i2c/instantiating-devices
> index c70e7a7..6df095a 100644
> --- a/Documentation/i2c/instantiating-devices
> +++ b/Documentation/i2c/instantiating-devices
> @@ -8,8 +8,8 @@ reason, the kernel code must instantiate I2C devices
> explicitly. There are
> several ways to achieve this, depending on the context and requirements.
>
>
> -Method 1: Declare the I2C devices by bus number
> ------------------------------------------------
> +Method 1a: Declare the I2C devices by bus number
> +------------------------------------------------
>
> This method is appropriate when the I2C bus is a system bus as is the case
> for many embedded systems. On such systems, each I2C bus has a number
> @@ -51,6 +51,36 @@ The devices will be automatically unbound and
> destroyed when the I2C bus
> they sit on goes away (if ever.)
>
>
> +Method 1b: Declare the I2C devices via devicetree
> +-------------------------------------------------
> +
Hi Wolfram,
There is now also a means to instantiate I2C devices through
ACPI. This is documented in Documentation/acpi/enumeration.txt.
Might be worthwhile to reference it from instantiating-devices.
I guess that would be a separate patch though.
Thanks,
Guenter
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH 01/17] Documentation: i2c: describe devicetree method for instantiating devices
[not found] ` <20140210122119.115858a7ntu4lr40-S15kz1ZIOvSoVoj5zvVkGw@public.gmane.org>
@ 2014-02-12 15:15 ` Wolfram Sang
0 siblings, 0 replies; 4+ messages in thread
From: Wolfram Sang @ 2014-02-12 15:15 UTC (permalink / raw)
To: linux-0h96xk9xTtrk1uMJSBkQmQ
Cc: linux-i2c-u79uwXL29TY76Z2rM5mHXA,
devicetree-u79uwXL29TY76Z2rM5mHXA,
linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r, Rob Landley,
linux-doc-u79uwXL29TY76Z2rM5mHXA,
linux-kernel-u79uwXL29TY76Z2rM5mHXA
[-- Attachment #1: Type: text/plain, Size: 298 bytes --]
> There is now also a means to instantiate I2C devices through
> ACPI. This is documented in Documentation/acpi/enumeration.txt.
>
> Might be worthwhile to reference it from instantiating-devices.
> I guess that would be a separate patch though.
Yes, it would. Thanks for the pointer!
[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 836 bytes --]
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH 01/17] Documentation: i2c: describe devicetree method for instantiating devices
2014-02-10 10:03 ` [PATCH 01/17] Documentation: i2c: describe devicetree method for instantiating devices Wolfram Sang
2014-02-10 18:21 ` linux
@ 2014-02-15 14:48 ` Wolfram Sang
1 sibling, 0 replies; 4+ messages in thread
From: Wolfram Sang @ 2014-02-15 14:48 UTC (permalink / raw)
To: linux-i2c
Cc: devicetree, linux-arm-kernel, Rob Landley, linux-doc,
linux-kernel
[-- Attachment #1: Type: text/plain, Size: 222 bytes --]
On Mon, Feb 10, 2014 at 11:03:55AM +0100, Wolfram Sang wrote:
> Signed-off-by: Wolfram Sang <wsa@the-dreams.de>
> Cc: devicetree@vger.kernel.org
> Cc: linux-arm-kernel@lists.infradead.org
Applied to for-current, thanks!
[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 836 bytes --]
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2014-02-15 14:48 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
[not found] <1392026654-5343-1-git-send-email-wsa@the-dreams.de>
[not found] ` <1392026654-5343-1-git-send-email-wsa-z923LK4zBo2bacvFa/9K2g@public.gmane.org>
2014-02-10 10:03 ` [PATCH 01/17] Documentation: i2c: describe devicetree method for instantiating devices Wolfram Sang
2014-02-10 18:21 ` linux
[not found] ` <20140210122119.115858a7ntu4lr40-S15kz1ZIOvSoVoj5zvVkGw@public.gmane.org>
2014-02-12 15:15 ` Wolfram Sang
2014-02-15 14:48 ` Wolfram Sang
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).