History log of /drivers/gpio/gpio-bcm-kona.c
Revision Date Author Comments
3778129206419c41f0dac877d931900397cab25c 24-Sep-2014 Behan Webster <behanw@converseincode.com> gpio, bcm-kona, LLVMLinux: Remove use of __initconst

The __initconst is in the wrong place, and when moved to the correct place
it uncovers an error where the variable is used by non-init data structures.

Instead merely make them const and put the const in the right spot.

Signed-off-by: Behan Webster <behanw@converseincode.com>
Reviewed-by: Mark Charlebois <charlebm@gmail.com>
Acked-by: Arnd Bergmann <arnd@arndb.de>
Acked-by: Matt Porter <mporter@linaro.org>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
57ef04288abd27a717287a652d324f95cb77c3c6 14-Mar-2014 Linus Walleij <linus.walleij@linaro.org> gpio: switch drivers to use new callback

This switches all GPIO and pin control drivers with irqchips
that were using .startup() and .shutdown() callbacks to lock
GPIO lines for IRQ usage over to using the .request_resources()
and .release_resources() callbacks just introduced into the
irqchip vtable.

Cc: Thomas Gleixner <tglx@linutronix.de>
Cc: Jean-Jacques Hiblot <jjhiblot@traphandler.com>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
b7ab697369716ecf7c5b71114bdd22445f9a7a5e 28-Jan-2014 Markus Mayer <markus.mayer@linaro.org> gpio: bcm281xx: Use "unsigned gpio" consistently throughout the code

This patch removes some inconsistencies caused by the use of "int gpio"
in some parts of the code and "unsigned gpio" in others.

Signed-off-by: Markus Mayer <markus.mayer@linaro.org>
Reviewed-by: Tim Kryger <tim.kryger@linaro.org>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
bdb93c03c5503aba9a6d98d49e543d879d85d0c4 22-Jan-2014 Markus Mayer <markus.mayer@linaro.org> gpio: bcm281xx: Centralize register locking

Rather than unlock/re-lock for every write access, unlock a GPIO when
it is requested and re-lock it when it is freed. As a result, the GPIO
helper functions no longer have to deal with unlocking and re-locking
the register.

In addition, only unlock a specific GPIO rather than unlocking the
entire GPIO bank as before.

Signed-off-by: Markus Mayer <markus.mayer@linaro.org>
Reviewed-by: Tim Kryger <tim.kryger@linaro.org>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
d762bae45a3dd65d02a35b4252598912f7fbcde0 22-Jan-2014 Markus Mayer <markus.mayer@linaro.org> gpio: bcm281xx: Fix parameter name for GPIO_CONTROL macro

The GPIO_CONTROL macro returns the control register offset when given a
GPIO number.

Update the argument name in the macro to reflect that it takes in a
GPIO number and not a bank.

Signed-off-by: Markus Mayer <markus.mayer@linaro.org>
Reviewed-by: Tim Kryger <tim.kryger@linaro.org>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
6f587c9f7bbb50a2dc5ad7bdc43392cf608e0857 03-Feb-2014 Markus Mayer <markus.mayer@linaro.org> gpio: bcm281xx: Update MODULE_AUTHOR

Add Broadcom's upstreaming mailing list address to MODULE_AUTHOR.

Signed-off-by: Markus Mayer <markus.mayer@linaro.org>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
db6b3ad1772e0e0e82c52d6337378e79da2effad 19-Nov-2013 Linus Walleij <linus.walleij@linaro.org> gpio: bcm-kona: lock IRQs when starting them

This uses the new API for tagging GPIO lines as in use by
IRQs. This enforces a few semantic checks on how the underlying
GPIO line is used.

Cc: Christian Daudt <csd@broadcom.com>
Cc: Grygorii Strashko <grygorii.strashko@ti.com>
Reviewed-by: Markus Mayer <markus.mayer@linaro.org>
Tested-by: Markus Mayer <markus.mayer@linaro.org>
Reviewed-by: Javier Martinez Canillas <javier@dowhile0.org>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
e2f0b00560729c47f39b2bc624eb93d82dc0e3e8 22-Nov-2013 Markus Mayer <markus.mayer@linaro.org> gpio: bcm281xx: Fix return value of bcm_kona_gpio_get()

We need to return the corresponding bit for a particular GPIO. This bit
contains shift not mask.

Signed-off-by: Markus Mayer <markus.mayer@linaro.org>
Reviewed-by: Tim Kryger <tim.kryger@linaro.org>
Reviewed-by: Matt Porter <matt.porter@linaro.org>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
afb3690c3cbd0bd82b267934b419c0643e2b938a 29-Oct-2013 Wei Yongjun <yongjun_wei@trendmicro.com.cn> gpio: bcm-kona: add missing .owner to struct gpio_chip

Add missing .owner of struct gpio_chip. This prevents the
module from being removed from underneath its users.

Signed-off-by: Wei Yongjun <yongjun_wei@trendmicro.com.cn>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
23b4faa9a36257e75dade0f2945bc3e487e6f463 18-Oct-2013 Markus Mayer <markus.mayer@linaro.org> gpio: bcm281xx: Don't print addresses of GPIO area in probe()

The physical address of the GPIO memory address is already printed
implicitly by dev_info() as part of the device name. The virtual
address doesn't add any value. In addition, printing a resource_size_t
with %x lead to a compiler warning on some platforms.

Signed-off-by: Markus Mayer <markus.mayer@linaro.org>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
d933cc619e36c2288730fd8a8bdbb16a35dade07 11-Oct-2013 Linus Walleij <linus.walleij@linaro.org> gpio: bcm_kona: rename confusing variables

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. Rename the
"gpio" variable to "hwirq" to reflect what it is. Rename one
instance of "virq" to "child_irq" that better describes what
it is.

Cc: Markus Mayer <markus.mayer@linaro.org>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
fac7ce92d0864e2ab64b9a0e6238e00c019b11ec 07-Oct-2013 Markus Mayer <markus.mayer@linaro.org> gpio: bcm281xx: Fix nested interrupt handler issue

The GPIO interrupt handler does not need to be marked as nested.

Signed-off-by: Markus Mayer <markus.mayer@linaro.org>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
1dc94272117e35c1618516ffe5b129a7663c1d03 20-Sep-2013 Linus Walleij <linus.walleij@linaro.org> gpio: bcm-kona: only use set_irq_flags() on ARM

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.

Reviewed-by: Markus Mayer <mmayer@broadcom.com>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
757651e3d60e5bff705743a301d64035b919fd03 10-Sep-2013 Markus Mayer <mmayer@broadcom.com> gpio: bcm281xx: Add GPIO driver

Add the GPIO driver for the Broadcom bcm281xx family of mobile SoCs.
These GPIO controllers may contain up to 8 banks where each bank
includes 32 pins that can be driven high or low and act as an edge
sensitive interrupt.

Signed-off-by: Markus Mayer <markus.mayer@linaro.org>
Reviewed-by: Christian Daudt <csd@broadcom.com>
Reviewed-by: Tim Kryger <tim.kryger@linaro.org>
Reviewed-by: Matt Porter <matt.porter@linaro.org>
Reviewed-by: Stephen Warren <swarren@nvidia.com>
[Added depends on OF_GPIO]
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>