Re: [PATCH v5 1/4] mfd: add support for Diolan DLN-2 devices

2014-09-25 Thread Johan Hovold
On Thu, Sep 25, 2014 at 01:41:16PM +0300, Octavian Purdila wrote: > On Thu, Sep 25, 2014 at 1:30 PM, Johan Hovold wrote: > > On Thu, Sep 25, 2014 at 01:25:24PM +0300, Octavian Purdila wrote: > > > >> Johan, I think we don't really need the spinlock, the disconnect flag > >> and an atomic counter s

Re: [PATCH v5 1/4] mfd: add support for Diolan DLN-2 devices

2014-09-25 Thread Octavian Purdila
On Thu, Sep 25, 2014 at 1:30 PM, Johan Hovold wrote: > On Thu, Sep 25, 2014 at 01:25:24PM +0300, Octavian Purdila wrote: > >> Johan, I think we don't really need the spinlock, the disconnect flag >> and an atomic counter should work. Do you see any issues with that? > > No, you need to test and in

Re: [PATCH v5 1/4] mfd: add support for Diolan DLN-2 devices

2014-09-25 Thread Johan Hovold
On Thu, Sep 25, 2014 at 01:25:24PM +0300, Octavian Purdila wrote: > Johan, I think we don't really need the spinlock, the disconnect flag > and an atomic counter should work. Do you see any issues with that? No, you need to test and increment atomically so the lock is needed. Consider what could

Re: [PATCH v5 1/4] mfd: add support for Diolan DLN-2 devices

2014-09-25 Thread Octavian Purdila
On Wed, Sep 24, 2014 at 6:22 PM, Octavian Purdila wrote: > On Wed, Sep 24, 2014 at 6:07 PM, Johan Hovold wrote: >> On Wed, Sep 24, 2014 at 05:54:15PM +0300, Octavian Purdila wrote: >>> On Wed, Sep 24, 2014 at 4:54 PM, Johan Hovold wrote: >>> > On Wed, Sep 24, 2014 at 04:36:22PM +0300, Octavian P

Re: [PATCH v5 1/4] mfd: add support for Diolan DLN-2 devices

2014-09-24 Thread Octavian Purdila
On Wed, Sep 24, 2014 at 6:07 PM, Johan Hovold wrote: > On Wed, Sep 24, 2014 at 05:54:15PM +0300, Octavian Purdila wrote: >> On Wed, Sep 24, 2014 at 4:54 PM, Johan Hovold wrote: >> > On Wed, Sep 24, 2014 at 04:36:22PM +0300, Octavian Purdila wrote: >> >> On Wed, Sep 24, 2014 at 1:48 PM, Johan Hovo

Re: [PATCH v5 1/4] mfd: add support for Diolan DLN-2 devices

2014-09-24 Thread Octavian Purdila
On Wed, Sep 24, 2014 at 4:54 PM, Johan Hovold wrote: > On Wed, Sep 24, 2014 at 04:36:22PM +0300, Octavian Purdila wrote: >> On Wed, Sep 24, 2014 at 1:48 PM, Johan Hovold wrote: >> > On Fri, Sep 19, 2014 at 11:22:42PM +0300, Octavian Purdila wrote: >> >> >> >> >> + * dln2_dev.mod_rx_slots and the

Re: [PATCH v5 1/4] mfd: add support for Diolan DLN-2 devices

2014-09-24 Thread Johan Hovold
On Wed, Sep 24, 2014 at 05:54:15PM +0300, Octavian Purdila wrote: > On Wed, Sep 24, 2014 at 4:54 PM, Johan Hovold wrote: > > On Wed, Sep 24, 2014 at 04:36:22PM +0300, Octavian Purdila wrote: > >> On Wed, Sep 24, 2014 at 1:48 PM, Johan Hovold wrote: > >> > On Fri, Sep 19, 2014 at 11:22:42PM +0300,

Re: [PATCH v5 1/4] mfd: add support for Diolan DLN-2 devices

2014-09-24 Thread Johan Hovold
On Wed, Sep 24, 2014 at 04:36:22PM +0300, Octavian Purdila wrote: > On Wed, Sep 24, 2014 at 1:48 PM, Johan Hovold wrote: > > On Fri, Sep 19, 2014 at 11:22:42PM +0300, Octavian Purdila wrote: > > > > >> + * dln2_dev.mod_rx_slots and then the echo header field to index the > >> + * slots field an

Re: [PATCH v5 1/4] mfd: add support for Diolan DLN-2 devices

2014-09-24 Thread Octavian Purdila
On Wed, Sep 24, 2014 at 1:48 PM, Johan Hovold wrote: > On Fri, Sep 19, 2014 at 11:22:42PM +0300, Octavian Purdila wrote: >> + * dln2_dev.mod_rx_slots and then the echo header field to index the >> + * slots field and find the receive context for a particular >> + * request. >> + */ >> +struct d

Re: [PATCH v5 1/4] mfd: add support for Diolan DLN-2 devices

2014-09-24 Thread Johan Hovold
On Fri, Sep 19, 2014 at 11:22:42PM +0300, Octavian Purdila wrote: > This patch implements the USB part of the Diolan USB-I2C/SPI/GPIO > Master Adapter DLN-2. Details about the device can be found here: > > https://www.diolan.com/i2c/i2c_interface.html. > > Information about the USB protocol can b

[PATCH v5 1/4] mfd: add support for Diolan DLN-2 devices

2014-09-19 Thread Octavian Purdila
This patch implements the USB part of the Diolan USB-I2C/SPI/GPIO Master Adapter DLN-2. Details about the device can be found here: https://www.diolan.com/i2c/i2c_interface.html. Information about the USB protocol can be found in the Programmer's Reference Manual [1], see section 1.7. Because th