RE: [rtc-linux] [PATCH 8/8] ARM: vt8500: gpio: Devicetree support for arch-vt8500

2012-08-08 Thread Tony Prisk
>This needs to be named something intuitive like "vt8500_gpio_bank_regoffsets" >Some kerneldoc intsead of the opaque comment above will also improve >readability a lot: >/** > * struct vt8500_gpio_bank_regoffsets > * @en: offset to enable register in the bank > * ... Changes made as requested

Re: [PATCH 8/8] ARM: vt8500: gpio: Devicetree support for arch-vt8500

2012-08-08 Thread Arnd Bergmann
On Wednesday 08 August 2012, Stephen Warren wrote: > I think that's all just: > > module_platform_driver(vt8500_gpio_driver); > > (except that _init uses platform_driver_probe() rather than > platform_driver_register(), which seems unusual. I guess that explains > the of_find_matching_node() abov

Re: [PATCH 8/8] ARM: vt8500: gpio: Devicetree support for arch-vt8500

2012-08-08 Thread Stephen Warren
On 08/07/2012 07:39 PM, Tony Prisk wrote: > Converted the existing arch-vt8500 gpio to a platform_device. > Added support for WM8505 and WM8650 GPIO controllers. > diff --git a/drivers/gpio/gpio-vt8500.c b/drivers/gpio/gpio-vt8500.c > +static struct of_device_id vt8500_gpio_dt_ids[] = { > + {

Re: [rtc-linux] [PATCH 8/8] ARM: vt8500: gpio: Devicetree support for arch-vt8500

2012-08-08 Thread Linus Walleij
On Wed, Aug 8, 2012 at 11:19 AM, Arnd Bergmann wrote: >> What on earth are all those magic numbers? >> >> I *guess* they're enabling some default GPIO settings etc. > > No, they are the register offsets you quoted above, per bank. Aha I was fooled by this: +struct vt8500_gpio_bank_regs { +

Re: [rtc-linux] [PATCH 8/8] ARM: vt8500: gpio: Devicetree support for arch-vt8500

2012-08-08 Thread Arnd Bergmann
On Wednesday 08 August 2012, Linus Walleij wrote: > On Wed, Aug 8, 2012 at 3:39 AM, Tony Prisk wrote: > > > Converted the existing arch-vt8500 gpio to a platform_device. > > Added support for WM8505 and WM8650 GPIO controllers. > (...) > > +++ b/drivers/gpio/gpio-vt8500.c > > This driver looks v

Re: [rtc-linux] [PATCH 8/8] ARM: vt8500: gpio: Devicetree support for arch-vt8500

2012-08-08 Thread Linus Walleij
On Wed, Aug 8, 2012 at 3:39 AM, Tony Prisk wrote: > Converted the existing arch-vt8500 gpio to a platform_device. > Added support for WM8505 and WM8650 GPIO controllers. (...) > +++ b/drivers/gpio/gpio-vt8500.c This driver looks very one-bit-per-gpio typed. Are you sure you cannot just reuse dri

[PATCH 8/8] ARM: vt8500: gpio: Devicetree support for arch-vt8500

2012-08-07 Thread Tony Prisk
Converted the existing arch-vt8500 gpio to a platform_device. Added support for WM8505 and WM8650 GPIO controllers. Signed-off-by: Tony Prisk --- drivers/gpio/Kconfig |6 + drivers/gpio/Makefile |1 + drivers/gpio/gpio-vt8500.c | 318 ++