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

2014-08-29 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

[PATCH v2 2/3] i2c: add support for Diolan DLN-2 USB-I2C adapter

2014-08-29 Thread Octavian Purdila
From: Laurentiu Palcu This patch adds support for the Diolan DLN-2 I2C master module. Due to hardware limitations it does not support SMBUS quick commands. Information about the USB protocol interface can be found in the Programmer's Reference Manual [1], see section 6.2.2 for the I2C master mod

[PATCH v2 0/3] mfd: add support for Diolan DLN-2

2014-08-29 Thread Octavian Purdila
This patch series adds support for Diolan USB-I2C/GPIO Master Adapter DLN-2. Details about device can be found here: https://www.diolan.com/i2c/i2c_interface.html. Changes since v1: * rewrite the drivers as an MFD * rewrite the irq part of the gpio driver to use GPIOLIB_IRQCHIP * cleanup t

[PATCH v2 1/3] mfd: add support for Diolan DLN-2 devices

2014-08-29 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

[PATCH 1/3] gpio: zynq: Mask non-wakeup GPIO interrupts on suspend

2014-08-29 Thread Soren Brinkmann
From: Ezra Savard Added flag to the GPIO chip so that IRQ from non-wakeup GPIO will not wake the system. Signed-off-by: Ezra Savard Reviewed-by: Soren Brinkmann --- drivers/gpio/gpio-zynq.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/drivers/gpio/gpio-zynq.c b/drive

[PATCH 2/3] gpio: zynq: Fixed broken wakeup implementation

2014-08-29 Thread Soren Brinkmann
From: Ezra Savard Use of unmask/mask in set_wake was an incorrect implementation. The new implementation correctly sets wakeup for the gpio chip's IRQ so the gpio chip will not sleep while wakeup-enabled gpio are in use. Signed-off-by: Ezra Savard Reviewed-by: Soren Brinkmann --- drivers/gpio

[PATCH 3/3] gpio: lib-sysfs: Add 'wakeup' attribute

2014-08-29 Thread Soren Brinkmann
Add an attribute 'wakeup' to the GPIO sysfs interface which allows marking/unmarking a GPIO as wake IRQ. The file 'wakeup' is created in each exported GPIOs directory, if an IRQ is associated with that GPIO and the irqchip implements set_wake(). Writing 'enabled' to that file will enable wake for t

[PATCH 0/3] gpio: zynq: Fix suspend/wake

2014-08-29 Thread Soren Brinkmann
Hi Linus, after our discussion during the push of the gpio-zynq driver, we took a closer look at the LED and gpio_keys drivers. For LEDs and other simple use-cases where you need to control an output, that driver is great and a patch to get the LEDs on our boards added to DT is pending. For the

Re: [RFC PATCH] gpiolib: Provide and export gpiod_export_name

2014-08-29 Thread Guenter Roeck
On Fri, Aug 29, 2014 at 10:00:47AM -0700, Alexandre Courbot wrote: > On Thu, Aug 28, 2014 at 10:54 PM, Guenter Roeck wrote: > > On 08/28/2014 10:44 PM, Linus Walleij wrote: > >> > >> On Mon, Aug 11, 2014 at 5:20 PM, Alexandre Courbot > >> wrote: > >>> > >>> On Tue, Aug 12, 2014 at 12:15 AM, Guent

Re: [RFC PATCH] gpiolib: Provide and export gpiod_export_name

2014-08-29 Thread Alexandre Courbot
On Thu, Aug 28, 2014 at 10:54 PM, Guenter Roeck wrote: > On 08/28/2014 10:44 PM, Linus Walleij wrote: >> >> On Mon, Aug 11, 2014 at 5:20 PM, Alexandre Courbot >> wrote: >>> >>> On Tue, Aug 12, 2014 at 12:15 AM, Guenter Roeck >>> wrote: >> >> This is just one of many patches which would make

[PATCH] pinctrl: sh-pfc: use a saner Kconfig symbol

2014-08-29 Thread Linus Walleij
There is currently a kludge to get the Makefile to move down to sh-pfc:s drivers: the arch definitions are used twice to get it done. However we can very well use the Kconfig symbol for the SH PFC pin control feature itself: it doesn't matter that it comes from a lower leaf in the Kconfig hierarchy

Re: [PATCH] RFT: gpio: adnp: switch to use irqchip helpers

2014-08-29 Thread Linus Walleij
On Thu, Jun 12, 2014 at 10:21 AM, Linus Walleij wrote: > On Wed, Jun 4, 2014 at 4:38 PM, Thierry Reding > wrote: > >> Adding a few more people from Avionic Design who might be able to test >> this. I no longer have access to hardware with this controller. > > Always keep a copy of everything you

Re: [PATCH v2] gpio: make driver mcp23s08 to support both device tree and platform data

2014-08-29 Thread Linus Walleij
On Tue, Aug 26, 2014 at 12:28 PM, Sonic Zhang wrote: > From: Sonic Zhang > > Device tree is not enabled in some archtecture where gpio driver mcp23s08 > is still required. > > Signed-off-by: Sonic Zhang > > v2-changes: > - Parse device tree properties into platform data other than individual >

Re: [PATCH 4/4 v2] mmc: mmci: augment driver to handle gpio descriptors

2014-08-29 Thread Ulf Hansson
On 27 August 2014 15:13, Linus Walleij wrote: > Currently the MMCI driver will only handle GPIO descriptors > implicitly through the device tree probe glue in mmc_of_init(), > but devices instatiated other ways such as through board files > and passing descriptors using the GPIO descriptor table w

Re: [PATCH 3/4 v2] mmc: host: switch OF parser to use gpio descriptors

2014-08-29 Thread Ulf Hansson
On 27 August 2014 13:00, Linus Walleij wrote: > This switches the central MMC OF parser to use gpio descriptors > instead of grabbing GPIOs explicitly from the device tree. > This strips out an unecessary use of the integer-based GPIO > API that we want to get rid of, cuts down on code as the > gp

Re: [PATCH 1/4] mmc: slot-gpio: switch to use flags when getting GPIO

2014-08-29 Thread Ulf Hansson
On 27 August 2014 13:00, Linus Walleij wrote: > When the slot GPIO driver gets the GPIO to be used for card > detect, it is now possible to specify a flag to have the line > set up as input. Get rid of the explicit setup call for input > and use the flag. > > The extra argument works as there are

Re: [PATCH 2/4] mmc: slot-gpio: add gpiod variant to get wp GPIO

2014-08-29 Thread Ulf Hansson
On 27 August 2014 13:00, Linus Walleij wrote: > This makes it possible to get the write protect (read only) > GPIO line from a GPIO descriptor. Written to exactly mirror > the card detect function. > > Acked-by: Alexandre Courbot > Signed-off-by: Linus Walleij Thanks! Applied for next. Kind re

Re: [PATCH v2 2/2] gpio: zynq: Take bank offset into account when reporting a IRQ

2014-08-29 Thread Michal Simek
Hi Lars and Linus, On 08/29/2014 09:34 AM, Lars-Peter Clausen wrote: > On 08/29/2014 09:20 AM, Linus Walleij wrote: >> On Thu, Aug 21, 2014 at 3:30 PM, Lars-Peter Clausen wrote: >>> On 08/21/2014 02:40 PM, Linus Walleij wrote: On Mon, Aug 18, 2014 at 4:54 AM, Lars-Peter Clausen wr

Re: [PATCH 1/2][v5] gpiolib: allow simultaneous setting of multiple GPIO outputs

2014-08-29 Thread Wolfram Sang
> > So, Linus, would a patched version of one of the mentioned drivers qualify > > as > > a user that would allow you to merge my patch? > > I think so. My concern is with code that doesn't get exercised, anywhere. If we have a gpio-chardev somewhen, I know a bunch of industrial customers who w

Re: [PATCH 2/3] GPIO: gpio-dwapb: Support Debounce

2014-08-29 Thread Shevchenko, Andriy
On Thu, 2014-08-28 at 10:11 -0500, atull wrote: > On Wed, 27 Aug 2014, Weike Chen wrote: [] > > +static inline u32 dwapb_read(struct dwapb_gpio *gpio, unsigned int offset) > > +{ > > + struct bgpio_chip *bgc = &gpio->ports[0].bgc; > > + void __iomem *reg_base = gpio->regs; > > + > > + ret

Re: [PATCH v2 2/2] gpio: zynq: Take bank offset into account when reporting a IRQ

2014-08-29 Thread Lars-Peter Clausen
On 08/29/2014 09:20 AM, Linus Walleij wrote: On Thu, Aug 21, 2014 at 3:30 PM, Lars-Peter Clausen wrote: On 08/21/2014 02:40 PM, Linus Walleij wrote: On Mon, Aug 18, 2014 at 4:54 AM, Lars-Peter Clausen wrote: When looking up the IRQ the bank offset needs to be taken into account. Otherwise

Re: [PATCH v2 2/2] gpio: zynq: Take bank offset into account when reporting a IRQ

2014-08-29 Thread Linus Walleij
On Thu, Aug 21, 2014 at 3:30 PM, Lars-Peter Clausen wrote: > On 08/21/2014 02:40 PM, Linus Walleij wrote: >> >> On Mon, Aug 18, 2014 at 4:54 AM, Lars-Peter Clausen >> wrote: >> >>> When looking up the IRQ the bank offset needs to be taken into account. >>> Otherwise interrupts for banks other tha

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

2014-08-29 Thread Linus Walleij
On Wed, Aug 20, 2014 at 1:24 PM, Daniel Baluta wrote: > 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. >