Re: [PATCH v5 4/4] gpio: add support for the Diolan DLN-2 USB GPIO driver

2014-09-24 Thread Johan Hovold
On Fri, Sep 19, 2014 at 11:22:45PM +0300, Octavian Purdila wrote: > +struct dln2_gpio { > + struct platform_device *pdev; > + struct gpio_chip gpio; > + > + /* > + * Cache pin direction to save us one transfer, since the > + * hardware has separate commands to read the in and

Re: [PATCH v5 4/4] gpio: add support for the Diolan DLN-2 USB GPIO driver

2014-09-19 Thread Octavian Purdila
On Sat, Sep 20, 2014 at 5:48 AM, Arnd Bergmann wrote: > On Friday 19 September 2014, Octavian Purdila wrote: >> +struct dln2_gpio_pin { >> + __le16 pin; >> +} __packed; > > This does not need to be marked packed, since it is never embedded in another > structure. > Will do. >> +struct dln2_g

Re: [PATCH v5 4/4] gpio: add support for the Diolan DLN-2 USB GPIO driver

2014-09-19 Thread Arnd Bergmann
On Friday 19 September 2014, Octavian Purdila wrote: > +struct dln2_gpio_pin { > + __le16 pin; > +} __packed; This does not need to be marked packed, since it is never embedded in another structure. > +struct dln2_gpio_pin_val { > + __le16 pin; > + u8 value; > +} __packed; It's enoug

[PATCH v5 4/4] gpio: add support for the Diolan DLN-2 USB GPIO driver

2014-09-19 Thread Octavian Purdila
From: Daniel Baluta This patch adds GPIO and IRQ support for the Diolan DLN-2 GPIO module. Information about the USB protocol interface can be found in the Programmer's Reference Manual [1], see section 2.9 for the GPIO module commands and responses. [1] https://www.diolan.com/downloads/dln-api