[PATCH 02/14] at91: regroup gpio and pinctrl under a simple-bus

Arnd Bergmann arnd at arndb.de
Sat Aug 18 17:14:34 EDT 2012


On Friday 10 August 2012, Jean-Christophe PLAGNIOL-VILLARD wrote:
> -                       pioA: gpio at fffff400 {
> -                               compatible = "atmel,at91rm9200-gpio";
> -                               reg = <0xfffff400 0x100>;
> -                               interrupts = <2 4 1>;
> -                               #gpio-cells = <2>;
> -                               gpio-controller;
> -                               interrupt-controller;
> -                       };
> +                       pinctrl at fffff400 {
> +                               #address-cells = <1>;
> +                               #size-cells = <1>;
> +                               ranges;
> +                               compatible = "atmel,at91rm9200-pinctrl", "simple-bus";
> +                               reg = <0xfffff400 0x600>;
> +
> +                               pioA: gpio at fffff400 {
> +                                       compatible = "atmel,at91rm9200-gpio";
> +                                       reg = <0xfffff400 0x200>;
> +                                       interrupts = <2 4 1>;
> +                                       #gpio-cells = <2>;
> +                                       gpio-controller;
> +                                       interrupt-controller;
> +                               };

Hmm, If the node declares itself to be an interrupt-controller, it should
normally have an #interrupt-cells property as well.

Also, I think you should not list the same registers in both the parent
and the children. It's probably better to remove the registers in the
parent node and just refer to the children from the pinctrl driver.
Since the pinctrl device is not really a bus in the sense that devices
connected to it see the same address space, you could have the
registers translated like 

	ranges = <0xfffff400 0 0x600>;


	Arnd



More information about the linux-arm-kernel mailing list