Re: [PATCH 4/6] bus: add driver for the Technologic Systems NBUS

2017-02-03 Thread Sebastien Bourdelin
Hi Linus, On 02/03/2017 08:51 AM, Linus Walleij wrote: > Your child nodes I guess will be instatiated as devices as well. > > These devices will have the NBUS driver as .parent in their > struct device I guess. Else the design of this bus is tilted. > > If the NBUS driver use

Re: [PATCH 4/6] bus: add driver for the Technologic Systems NBUS

2017-02-03 Thread Sebastien Bourdelin
Hi Linus, On 02/03/2017 08:51 AM, Linus Walleij wrote: > Your child nodes I guess will be instatiated as devices as well. > > These devices will have the NBUS driver as .parent in their > struct device I guess. Else the design of this bus is tilted. > > If the NBUS driver use

Re: [PATCH 4/6] bus: add driver for the Technologic Systems NBUS

2017-02-03 Thread Linus Walleij
On Wed, Feb 1, 2017 at 8:56 PM, Sebastien Bourdelin wrote: > On 12/30/2016 02:58 AM, Linus Walleij wrote: >>> +static struct ts_nbus *ts_nbus; >> >> Nopes. No singletons please. >> >> Use the state container pattern: >>

Re: [PATCH 4/6] bus: add driver for the Technologic Systems NBUS

2017-02-03 Thread Linus Walleij
On Wed, Feb 1, 2017 at 8:56 PM, Sebastien Bourdelin wrote: > On 12/30/2016 02:58 AM, Linus Walleij wrote: >>> +static struct ts_nbus *ts_nbus; >> >> Nopes. No singletons please. >> >> Use the state container pattern: >> Documentation/driver-model/design-patterns.txt > > I understand the idea but

Re: [PATCH 4/6] bus: add driver for the Technologic Systems NBUS

2017-02-01 Thread Sebastien Bourdelin
Hi Linus, Thanks for your feedback. I have a question regarding your recommendation, see below. On 12/30/2016 02:58 AM, Linus Walleij wrote: >> + >> +static DEFINE_MUTEX(ts_nbus_lock); >> +static bool ts_nbus_ready; > > Why not move this to the struct ts_nbus state container? > > It seems to

Re: [PATCH 4/6] bus: add driver for the Technologic Systems NBUS

2017-02-01 Thread Sebastien Bourdelin
Hi Linus, Thanks for your feedback. I have a question regarding your recommendation, see below. On 12/30/2016 02:58 AM, Linus Walleij wrote: >> + >> +static DEFINE_MUTEX(ts_nbus_lock); >> +static bool ts_nbus_ready; > > Why not move this to the struct ts_nbus state container? > > It seems to

Re: [PATCH 4/6] bus: add driver for the Technologic Systems NBUS

2016-12-29 Thread Linus Walleij
On Thu, Dec 15, 2016 at 12:12 AM, Sebastien Bourdelin wrote: > This driver implements a GPIOs bit-banged bus, called the NBUS by > Technologic Systems. It is used to communicate with the peripherals in > the FPGA on the TS-4600 SoM. > > Signed-off-by:

Re: [PATCH 4/6] bus: add driver for the Technologic Systems NBUS

2016-12-29 Thread Linus Walleij
On Thu, Dec 15, 2016 at 12:12 AM, Sebastien Bourdelin wrote: > This driver implements a GPIOs bit-banged bus, called the NBUS by > Technologic Systems. It is used to communicate with the peripherals in > the FPGA on the TS-4600 SoM. > > Signed-off-by: Sebastien Bourdelin (...) > +#include

[PATCH 4/6] bus: add driver for the Technologic Systems NBUS

2016-12-14 Thread Sebastien Bourdelin
This driver implements a GPIOs bit-banged bus, called the NBUS by Technologic Systems. It is used to communicate with the peripherals in the FPGA on the TS-4600 SoM. Signed-off-by: Sebastien Bourdelin --- drivers/bus/Kconfig | 9 +

[PATCH 4/6] bus: add driver for the Technologic Systems NBUS

2016-12-14 Thread Sebastien Bourdelin
This driver implements a GPIOs bit-banged bus, called the NBUS by Technologic Systems. It is used to communicate with the peripherals in the FPGA on the TS-4600 SoM. Signed-off-by: Sebastien Bourdelin --- drivers/bus/Kconfig | 9 + drivers/bus/Makefile| 1 + drivers/bus/ts-nbus.c