Re: [PATCH] gpio: Add driver for MEN 16Z127 GPIO controller

2015-10-16 Thread Linus Walleij
On Thu, Oct 8, 2015 at 9:49 PM, Andreas Werner wrote: > if i will implement the open drain support, does it really makes sense to go > with the > generic gpio lib? Open Drain yes, for more esoterin pin config you may need to also implement pin control, see Documentation/pinctrl.txt > I need to

Re: [PATCH] gpio: Add driver for MEN 16Z127 GPIO controller

2015-10-16 Thread Linus Walleij
On Thu, Oct 8, 2015 at 6:55 PM, Andreas Werner wrote: > The register is currently impelemented as a read/write register > which means the pin mode is configurable by software to > Push Pull or Open Drain. OK then you can set it in accordance to what clients request. > There is also the possibli

Re: [PATCH] gpio: Add driver for MEN 16Z127 GPIO controller

2015-10-08 Thread Andreas Werner
Yet another thing. if i will implement the open drain support, does it really makes sense to go with the generic gpio lib? I need to replace the direction_input and direction_outpu functions because if the userland set an open drain pin to input i need to set the pin to High-Z (driver "1") inste

Re: [PATCH] gpio: Add driver for MEN 16Z127 GPIO controller

2015-10-08 Thread Andreas Werner
Hi, i have an additional question regarding the Open Drain setting. The register is currently impelemented as a read/write register which means the pin mode is configurable by software to Push Pull or Open Drain. There is also the possiblity (normal way) that the HW (FPGA) configures each pin to

Re: [PATCH] gpio: Add driver for MEN 16Z127 GPIO controller

2015-10-06 Thread Andreas Werner
On Tue, Oct 06, 2015 at 09:35:51AM +0200, Linus Walleij wrote: > On Mon, Oct 5, 2015 at 8:09 PM, Andreas Werner wrote: > > > The 16Z127 is a GPIO controller on a MCB FPGA and has 32 > > configurable GPIOs. > > The GPIOs can be configured as inputs and outputs > > > > Signed-off-by: Andreas Werner

Re: [PATCH] gpio: Add driver for MEN 16Z127 GPIO controller

2015-10-06 Thread Linus Walleij
On Mon, Oct 5, 2015 at 8:09 PM, Andreas Werner wrote: > The 16Z127 is a GPIO controller on a MCB FPGA and has 32 > configurable GPIOs. > The GPIOs can be configured as inputs and outputs > > Signed-off-by: Andreas Werner This driver looks like it can use the generic MMIO library. select GPIO_G

[PATCH] gpio: Add driver for MEN 16Z127 GPIO controller

2015-10-05 Thread Andreas Werner
The 16Z127 is a GPIO controller on a MCB FPGA and has 32 configurable GPIOs. The GPIOs can be configured as inputs and outputs Signed-off-by: Andreas Werner --- drivers/gpio/Kconfig| 6 ++ drivers/gpio/Makefile | 1 + drivers/gpio/gpio-menz127.c | 186 ++