From: Arnd Bergmann <arnd-r2nGTMty4D4@public.gmane.org>
To: Roland Stigge <stigge-uj/7R2tJ6VmzQB+pC5nmwQ@public.gmane.org>
Cc: arm-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org,
linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r@public.gmane.org,
linux-i2c-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
w.sang-bIcnvbaLZ9MEGnE8C9+IrQ@public.gmane.org,
srinivas.bakki-3arQi8VN3Tc@public.gmane.org,
kevin.wells-3arQi8VN3Tc@public.gmane.org,
gregkh-hQyY1W1yCW8ekmWlsbkhG0B+6BGkLq7r@public.gmane.org,
netdev-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
rtc-linux-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org,
a.zummo-BfzFCNDTiLLj+vYz1yj4TQ@public.gmane.org,
linux-watchdog-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
wim-IQzOog9fTRqzQB+pC5nmwQ@public.gmane.org
Subject: Re: [PATCH 5/7] i2c: Add device tree support to i2c-pnx.c
Date: Mon, 2 Apr 2012 13:17:23 +0000 [thread overview]
Message-ID: <201204021317.23393.arnd@arndb.de> (raw)
In-Reply-To: <1333371364-21347-6-git-send-email-stigge-uj/7R2tJ6VmzQB+pC5nmwQ@public.gmane.org>
On Monday 02 April 2012, Roland Stigge wrote:
> --- /dev/null
> +++ linux-2.6/Documentation/devicetree/bindings/i2c/pnx.txt
> @@ -0,0 +1,36 @@
> +* NXP PNX I2C Controller
> +
> +Required properties:
> +
> + - reg: Offset and length of the register set for the device
> + - compatible: should be "nxp,pnx-i2c"
> + - interrupts: <a b> where a is the interrupt number and b is a
> + field that represents an encoding of the sense and level
> + information for the interrupt
The encoding of the interrupt is specific to the controller and does
not belong here. Just write that there is one interrupt line to be
configure.
> + - interrupt-parent: the phandle for the interrupt controller that
> + services interrupts for this device.
interrupt-parent should be optional, it can be set in the (grand-)parent
device on systems where all devices use the same controller.
You should also require
#address-cells = <1>;
#size-cells = <0>;
To create an address space for i2c slave device numbers.
> +Examples:
> +
> + i2c1: i2c@400A0000 {
> + compatible = "nxp,pnx-i2c";
> + reg = <0x400A0000 0x100>;
> + interrupt-parent = <&mic>;
> + interrupts = <51 0>;
> + };
> +
> + i2c2: i2c@400A8000 {
> + compatible = "nxp,pnx-i2c";
> + reg = <0x400A8000 0x100>;
Best use all lowercase letters in the addresses.
> + interrupt-parent = <&mic>;
> + interrupts = <50 0>;
> + clock-frequency = <0x186a0>;
> + pnx,timeout = <0x64>;
> + slave-addr = <0x11>;
> + };
> static struct platform_driver i2c_pnx_driver = {
> .driver = {
> .name = "pnx-i2c",
> .owner = THIS_MODULE,
> +#ifdef CONFIG_OF
> + .of_match_table = i2c_pnx_of_match,
> +#endif
> },
> .probe = i2c_pnx_probe,
> .remove = __devexit_p(i2c_pnx_remove),
of_match_ptr() instead of this #ifdef, please.
Arnd
WARNING: multiple messages have this Message-ID (diff)
From: Arnd Bergmann <arnd@arndb.de>
To: Roland Stigge <stigge@antcom.de>
Cc: arm@kernel.org, linux-arm-kernel@lists.infradead.org,
linux-i2c@vger.kernel.org, linux-kernel@vger.kernel.org,
w.sang@pengutronix.de, srinivas.bakki@nxp.com,
kevin.wells@nxp.com, gregkh@linuxfoundation.org,
netdev@vger.kernel.org, rtc-linux@googlegroups.com,
a.zummo@towertech.it, linux-watchdog@vger.kernel.org,
wim@iguana.be
Subject: Re: [PATCH 5/7] i2c: Add device tree support to i2c-pnx.c
Date: Mon, 2 Apr 2012 13:17:23 +0000 [thread overview]
Message-ID: <201204021317.23393.arnd@arndb.de> (raw)
In-Reply-To: <1333371364-21347-6-git-send-email-stigge@antcom.de>
On Monday 02 April 2012, Roland Stigge wrote:
> --- /dev/null
> +++ linux-2.6/Documentation/devicetree/bindings/i2c/pnx.txt
> @@ -0,0 +1,36 @@
> +* NXP PNX I2C Controller
> +
> +Required properties:
> +
> + - reg: Offset and length of the register set for the device
> + - compatible: should be "nxp,pnx-i2c"
> + - interrupts: <a b> where a is the interrupt number and b is a
> + field that represents an encoding of the sense and level
> + information for the interrupt
The encoding of the interrupt is specific to the controller and does
not belong here. Just write that there is one interrupt line to be
configure.
> + - interrupt-parent: the phandle for the interrupt controller that
> + services interrupts for this device.
interrupt-parent should be optional, it can be set in the (grand-)parent
device on systems where all devices use the same controller.
You should also require
#address-cells = <1>;
#size-cells = <0>;
To create an address space for i2c slave device numbers.
> +Examples:
> +
> + i2c1: i2c@400A0000 {
> + compatible = "nxp,pnx-i2c";
> + reg = <0x400A0000 0x100>;
> + interrupt-parent = <&mic>;
> + interrupts = <51 0>;
> + };
> +
> + i2c2: i2c@400A8000 {
> + compatible = "nxp,pnx-i2c";
> + reg = <0x400A8000 0x100>;
Best use all lowercase letters in the addresses.
> + interrupt-parent = <&mic>;
> + interrupts = <50 0>;
> + clock-frequency = <0x186a0>;
> + pnx,timeout = <0x64>;
> + slave-addr = <0x11>;
> + };
> static struct platform_driver i2c_pnx_driver = {
> .driver = {
> .name = "pnx-i2c",
> .owner = THIS_MODULE,
> +#ifdef CONFIG_OF
> + .of_match_table = i2c_pnx_of_match,
> +#endif
> },
> .probe = i2c_pnx_probe,
> .remove = __devexit_p(i2c_pnx_remove),
of_match_ptr() instead of this #ifdef, please.
Arnd
WARNING: multiple messages have this Message-ID (diff)
From: arnd@arndb.de (Arnd Bergmann)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH 5/7] i2c: Add device tree support to i2c-pnx.c
Date: Mon, 2 Apr 2012 13:17:23 +0000 [thread overview]
Message-ID: <201204021317.23393.arnd@arndb.de> (raw)
In-Reply-To: <1333371364-21347-6-git-send-email-stigge@antcom.de>
On Monday 02 April 2012, Roland Stigge wrote:
> --- /dev/null
> +++ linux-2.6/Documentation/devicetree/bindings/i2c/pnx.txt
> @@ -0,0 +1,36 @@
> +* NXP PNX I2C Controller
> +
> +Required properties:
> +
> + - reg: Offset and length of the register set for the device
> + - compatible: should be "nxp,pnx-i2c"
> + - interrupts: <a b> where a is the interrupt number and b is a
> + field that represents an encoding of the sense and level
> + information for the interrupt
The encoding of the interrupt is specific to the controller and does
not belong here. Just write that there is one interrupt line to be
configure.
> + - interrupt-parent: the phandle for the interrupt controller that
> + services interrupts for this device.
interrupt-parent should be optional, it can be set in the (grand-)parent
device on systems where all devices use the same controller.
You should also require
#address-cells = <1>;
#size-cells = <0>;
To create an address space for i2c slave device numbers.
> +Examples:
> +
> + i2c1: i2c at 400A0000 {
> + compatible = "nxp,pnx-i2c";
> + reg = <0x400A0000 0x100>;
> + interrupt-parent = <&mic>;
> + interrupts = <51 0>;
> + };
> +
> + i2c2: i2c at 400A8000 {
> + compatible = "nxp,pnx-i2c";
> + reg = <0x400A8000 0x100>;
Best use all lowercase letters in the addresses.
> + interrupt-parent = <&mic>;
> + interrupts = <50 0>;
> + clock-frequency = <0x186a0>;
> + pnx,timeout = <0x64>;
> + slave-addr = <0x11>;
> + };
> static struct platform_driver i2c_pnx_driver = {
> .driver = {
> .name = "pnx-i2c",
> .owner = THIS_MODULE,
> +#ifdef CONFIG_OF
> + .of_match_table = i2c_pnx_of_match,
> +#endif
> },
> .probe = i2c_pnx_probe,
> .remove = __devexit_p(i2c_pnx_remove),
of_match_ptr() instead of this #ifdef, please.
Arnd
next prev parent reply other threads:[~2012-04-02 13:17 UTC|newest]
Thread overview: 28+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-04-02 12:55 [PATCH 0/7]: arm: lpc32xx: Device tree support Roland Stigge
2012-04-02 12:55 ` Roland Stigge
2012-04-02 12:55 ` [PATCH 1/7] iio: Add device tree support to LPC32xx ADC Roland Stigge
2012-04-02 12:55 ` Roland Stigge
2012-04-02 12:55 ` [PATCH 2/7] rtc: Add device tree support for LPC32xx Roland Stigge
2012-04-02 12:55 ` Roland Stigge
2012-04-02 12:56 ` [PATCH 3/7] net: Add device tree support to LPC32xx Roland Stigge
2012-04-02 12:56 ` Roland Stigge
2012-04-02 12:56 ` [PATCH 4/7] arm: mach-pnx4008: Adjust i2c.c to updated i2c-pnx.c Roland Stigge
2012-04-02 12:56 ` Roland Stigge
[not found] ` <1333371364-21347-5-git-send-email-stigge-uj/7R2tJ6VmzQB+pC5nmwQ@public.gmane.org>
2012-04-02 13:07 ` Arnd Bergmann
2012-04-02 13:07 ` Arnd Bergmann
2012-04-02 13:07 ` Arnd Bergmann
2012-04-02 12:56 ` [PATCH 5/7] i2c: Add device tree support to i2c-pnx.c Roland Stigge
2012-04-02 12:56 ` Roland Stigge
[not found] ` <1333371364-21347-6-git-send-email-stigge-uj/7R2tJ6VmzQB+pC5nmwQ@public.gmane.org>
2012-04-02 13:17 ` Arnd Bergmann [this message]
2012-04-02 13:17 ` Arnd Bergmann
2012-04-02 13:17 ` Arnd Bergmann
2012-04-02 12:56 ` [PATCH 6/7] i2c-pnx.c: Fix suspend Roland Stigge
2012-04-02 12:56 ` Roland Stigge
2012-04-02 12:56 ` [PATCH 7/7] wdt: Device tree support for pnx4008-wdt Roland Stigge
2012-04-02 12:56 ` Roland Stigge
[not found] ` <1333371364-21347-1-git-send-email-stigge-uj/7R2tJ6VmzQB+pC5nmwQ@public.gmane.org>
2012-04-02 13:45 ` [PATCH 0/7]: arm: lpc32xx: Device tree support Arnd Bergmann
2012-04-02 13:45 ` Arnd Bergmann
2012-04-02 13:45 ` Arnd Bergmann
[not found] ` <201204021345.04512.arnd-r2nGTMty4D4@public.gmane.org>
2012-04-02 14:02 ` Roland Stigge
2012-04-02 14:02 ` Roland Stigge
2012-04-02 14:02 ` Roland Stigge
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=201204021317.23393.arnd@arndb.de \
--to=arnd-r2ngtmty4d4@public.gmane.org \
--cc=a.zummo-BfzFCNDTiLLj+vYz1yj4TQ@public.gmane.org \
--cc=arm-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org \
--cc=gregkh-hQyY1W1yCW8ekmWlsbkhG0B+6BGkLq7r@public.gmane.org \
--cc=kevin.wells-3arQi8VN3Tc@public.gmane.org \
--cc=linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r@public.gmane.org \
--cc=linux-i2c-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
--cc=linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
--cc=linux-watchdog-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
--cc=netdev-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
--cc=rtc-linux-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org \
--cc=srinivas.bakki-3arQi8VN3Tc@public.gmane.org \
--cc=stigge-uj/7R2tJ6VmzQB+pC5nmwQ@public.gmane.org \
--cc=w.sang-bIcnvbaLZ9MEGnE8C9+IrQ@public.gmane.org \
--cc=wim-IQzOog9fTRqzQB+pC5nmwQ@public.gmane.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 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.