aboutsummaryrefslogtreecommitdiff
path: root/drivers/gpio/gpio-pcf857x.c
AgeCommit message (Collapse)Author
2013-12-04gpio/pinctrl: make gpio_chip members typed booleanLinus Walleij
This switches the two members of struct gpio_chip that were defined as unsigned foo:1 to bool, because that is indeed what they are. Switch all users in the gpio and pinctrl subsystems to assign these values with true/false instead of 0/1. The users outside these subsystems will survive since true/false is 1/0, atleast we set some kind of more strict typing example. Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
2013-09-23gpio: pcf857x: Add OF supportLaurent Pinchart
Add DT bindings for the pcf857x-compatible chips and parse the device tree node in the driver. Signed-off-by: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com> Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
2013-09-18gpio: pcf857x: only use set_irq_flags() on ARMLinus Walleij
As per the pattern from other GPIO drivers, use set_irq_flags() on ARM only, use irq_set_noprobe() on other archs. Also rename the argument "virq" to just "irq", this IRQ isn't any more "virtual" than any other Linux IRQ number, we use "hwirq" for the actual hw-numbers, "virq" is just bogus. Cc: George Cherian <george.cherian@ti.com> Cc: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com> Reviewed-by: Felipe Balbi <balbi@ti.com> Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
2013-09-17gpio: pcf857x: call the gpio user handler iff gpio_to_irq is doneGeorge Cherian
For pcf857x driver if the initial state is not set properly (proper n_latch is not passed), we get bad irq prints on console. We get this only for the first interrupt and doesnot repeat for further interrupts unles and until there are other gpio pins which are not flipping continously. following prints are seen on console. [ 40.983924] irq 0, desc: ce004080, depth: 1, count: 0, unhandled: 0 [ 40.990511] ->handle_irq(): c00aa538, handle_bad_irq+0x0/0x260 [ 40.996768] ->irq_data.chip(): c080b6ec, no_irq_chip+0x0/0x60 [ 41.002842] ->action(): (null) [ 41.006242] IRQ_NOPROBE set [ 41.009465] IRQ_NOREQUEST set Signed-off-by: George Cherian <george.cherian@ti.com> Acked-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com> Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
2013-09-17gpio: pcf857x: remove the irq_demux_work and gpio->irqGeorge Cherian
Now that we are using devm_request_threaded_irq no need for irq_demux_work and gpio->irq. Remove all its references. Signed-off-by: George Cherian <george.cherian@ti.com> Acked-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com> Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
2013-09-17gpio: pcf857x: change to devm_request_threaded_irqGeorge Cherian
Remove the request_irq and use devm_request_threaded_irq also cleanup free_irq. devm_* takes care of that. Signed-off-by: George Cherian <george.cherian@ti.com> Acked-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com> Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
2013-08-23gpio: pcf857x: Remove pdata argument to pcf857x_irq_domain_init()Laurent Pinchart
The argument is not used, remove it. No board registers a pcf857x device with an IRQ without specifying platform data, IRQ domain registration behaviour is thus not affected by this change. Signed-off-by: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com> Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
2013-08-23gpio: pcf857x: Sort headers alphabeticallyLaurent Pinchart
This makes checking for duplicates when adding a new #include easier. Signed-off-by: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com> Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
2013-08-16gpio: use dev_get_platdata()Jingoo Han
Use the wrapper function for retrieving the platform data instead of accessing dev->platform_data directly. Signed-off-by: Jingoo Han <jg1.han@samsung.com> Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
2013-03-27gpio: pcf857x: use devm_kzalloc()Jingoo Han
Use devm_kzalloc() to make cleanup paths simpler. Signed-off-by: Jingoo Han <jg1.han@samsung.com> Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
2013-03-27Add TI TCA9554 to supported devices tableNikolay Balandin
Signed-off-by: Nikolay Balandin <nbalandin@dev.rtsoft.ru> Acked-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com> Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
2012-12-07gpio: pcf857x: use client->irq for gpio_to_irq()Kuninori Morimoto
6e20a0a429bd4dc07d6de16d9c247270e04e4aa0 (gpio: pcf857x: enable gpio_to_irq() support) added gpio_to_irq() support on pcf857x driver, but it used pdata->irq. This patch modifies driver to use client->irq instead of it. It modifies kzm9g board platform settings, and device probe information too. This patch is tested on kzm9g board Reported-by: Christian Engelmayer <christian.engelmayer@frequentis.com> Acked-by: Simon Horman <horms+renesas@verge.net.au> Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com> Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
2012-09-12gpio: pcf857x: fixup smatch WARNINGKuninori Morimoto
6e20a0a429bd4dc07d6de16d9c247270e04e4aa0 (gpio: pcf857x: enable gpio_to_irq() support) added new smatch warnings drivers/gpio/gpio-pcf857x.c:288 pcf857x_probe() error: we previously \ assumed 'pdata' could be null (see line 277) drivers/gpio/gpio-pcf857x.c:364 pcf857x_probe() warn: variable dereferenced\ before check 'pdata' (see line 292) drivers/gpio/gpio-pcf857x.c:421 pcf857x_remove() error: we previously\ assumed 'pdata' could be null (see line 410) This patch fixes it Reported-by: Fengguang Wu <fengguang.wu@intel.com> Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com> Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
2012-08-23gpio: pcf857x: enable gpio_to_irq() supportKuninori Morimoto
pcf857x chip has some pins, but interrupt pin is only 1 pin. And gpiolib requests 1 interrupt per 1 gpio pin. Thus, this patch added demuxed irq to pcf857x driver, and enabled gpio_to_irq(). Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com> Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
2012-07-12gpio: pcf857x: share 8/16 bit access functionsKuninori Morimoto
This patch adds 8/16 bit write/read functions, and shared gpio input/output/set/get functions. Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com> Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
2011-12-12gpiolib: output basic details and consolidate gpio device driversGrant Likely
This patch adds a kernel message, containing GPIO range and device name on successful device registration, and removes duplicate messages from the following drivers: * gpio-adp5588 * gpio-bt8xx * gpio-cs5535 * gpio-janz-ttl * gpio-nomadik * gpio-pcf857x * gpio-xilinx * drivers/of/gpio.c Signed-off-by: Hartmut Knaack <knaack.h@gmx.de> [grant.likely@secretlab.ca: squashed 2 patches together] Signed-off-by: Grant Likely <grant.likely@secretlab.ca>
2011-10-31drivers/gpio: Fix drivers who are implicit users of module.hPaul Gortmaker
A pending cleanup will mean that module.h won't be implicitly everywhere anymore. Make sure the modular drivers in gpio are actually calling out for <module.h> explicitly in advance. Signed-off-by: Paul Gortmaker <paul.gortmaker@windriver.com>
2011-06-06gpio: reorganize driversGrant Likely
Sort the gpio makefile and enforce the naming convention gpio-*.c for gpio drivers. v2: cleaned up filenames in Kconfig and comment blocks v3: fixup use of BASIC_MMIO to GENERIC_GPIO for mxc Signed-off-by: Grant Likely <grant.likely@secretlab.ca>