13 Aug, 2015
1 commit
-
Uses the gpiolib irqchip helpers. For this to work, the irq setup
function is called once per bank instead of once per device. Note
that all known uses of this block have a BCM7120 L2 interrupt
controller as a parent. Supports interrupts for all GPIOs.In the IRQ handler, we check for raised IRQs for invalid GPIOs and
warn (ratelimited) if they're encountered.Also, several drivers (e.g. gpio-keys) allow for GPIOs to be
configured as wakeup sources, and this GPIO controller supports that
through a separate interrupt path.The de-facto standard DT property "wakeup-source" is checked, since
that indicates whether the GPIO controller hardware can wake. Uses
the IRQCHIP_MASK_ON_SUSPEND irq_chip flag because UPG GIO doesn't have
any of its own wakeup source configuration.Aside regarding gpiolib irqchip helpers: It wasn't obvious (to me)
that you can have multiple chained irqchips and associated IRQ domains
for a single parent IRQ, and as long as the xlate function is written
correctly, a GPIO IRQ request end up checking the correct domain and
will get associated with the correct IRQ. What helps make this clear
is to read
drivers/gpio/gpiolib-of.c:
- of_gpiochip_find_and_xlate()
- of_get_named_gpiod_flags()
drivers/gpio/gpiolib.c:
- gpiochip_find()Signed-off-by: Gregory Fong
Reviewed-by: Florian Fainelli
Signed-off-by: Linus Walleij
03 Aug, 2015
1 commit
-
On ETRAX FS, all pins on the first port (and only the first port) have
interrupt support.On ARTPEC-3, all pins on all ports have interrupt support. However,
there are only eight interrupts. Each of the interrupts is associated
with a group of pins and for each interrupt the one pin from the group
which will trigger it can be selected.Signed-off-by: Rabin Vincent
Signed-off-by: Linus Walleij
16 Jul, 2015
3 commits
-
Add ZTE zx296702 GPIO controller support
Signed-off-by: Jun Nie
Acked-by: Shawn Guo
Signed-off-by: Linus Walleij -
The driver gpio-mvebu.c does not depend on gpio-generic.c at all.
Drop unneeded "select GPIO_GENERIC".Signed-off-by: Masahiro Yamada
Acked-by: Gregory CLEMENT
Signed-off-by: Linus Walleij -
The driver gpio-altera.c does not depend on gpio-generic.c at all.
Drop unneeded "select GPIO_GENERIC".Signed-off-by: Masahiro Yamada
Acked-by: Tien Hock Loh
Signed-off-by: Linus Walleij
10 Jun, 2015
2 commits
-
Added support to Zynq Ultrascale+ MPSoC on the existing zynq
gpio driver.Signed-off-by: Anurag Kumar Vulisha
Acked-by: Michal Simek
Signed-off-by: Linus Walleij -
Add a GPIO driver for the General I/O block on Axis ETRAX FS SoCs.
Signed-off-by: Rabin Vincent
Signed-off-by: Linus Walleij
02 Jun, 2015
1 commit
-
This adds support for the GPIO IP "UPG GIO" used on
Broadcom STB SoCs (BCM7XXX and some others). Uses
basic_mmio_gpio to instantiate a gpio_chip for each bank.
The driver assumes that it handles the base set of GPIOs
on the system and that it can start its numbering sequence
from 0, so any GPIO expanders used with it must dynamically
assign GPIO numbers after this driver has finished
registering its GPIOs.Does not implement the interrupt-controller portion yet,
will be done in a future commit.v2:
- change include to use instead of
- get rid of unnecessary imask member in struct bank
- rename GPIO_PER_BANK -> MAX_GPIO_PER_BANK
- always have 32 GPIOs per bank and add 'width' member in
struct bank to hold actual number of GPIOs in use
- mark of_match table as constList-usage-fixed-by: Brian Norris
Signed-off-by: Gregory Fong
Signed-off-by: Linus Walleij
06 May, 2015
2 commits
-
Add GPIO controller driver for Netlogic XLP MIPS64 SOCs.
This driver is instantiated by device tree and supports interrupts
for GPIOs.Signed-off-by: Kamlakant Patel
Signed-off-by: Linus Walleij -
We currently get all kinds of errors building the omap gpio driver
as a module starting with:undefined reference to `omap2_gpio_resume_after_idle'
undefined reference to `omap2_gpio_prepare_for_idle'
...Let's fix the issue by adding inline functions to the header.
Note that we can now also remove the two unused functions for
omap_set_gpio_debounce and omap_set_gpio_debounce_time.Then doing rmmod on the module produces further warnings
because of missing exit related functions. Let's add those.And finally, we can make the Kconfig entry just a tristate
option that's selected for omaps.Cc: Javier Martinez Canillas
Cc: Kevin Hilman
Cc: Nishanth Menon
Signed-off-by: Tony Lindgren
Reviewed-by: Grygorii Strashko
Acked-by: Santosh Shilimkar
Reviewed-by: Felipe Balbi
Signed-off-by: Linus Walleij
05 May, 2015
1 commit
-
Driver for the GPIO block found on NXP LPC18xx/43xx devices.
Signed-off-by: Joachim Eastwood
Signed-off-by: Linus Walleij
23 Apr, 2015
1 commit
-
Pull ARM SoC cleanups from Olof Johansson:
"We've got a fairly large cleanup branch this time. The bulk of this
is removal of non-DT platforms of several flavors:- Atmel at91 platforms go full-DT, with removal of remaining
board-file based support- OMAP removes legacy board files for three more platforms
- removal of non-DT mach-msm, newer Qualcomm platforms now live in
mach-qcom- Freescale i.MX25 also removes non-DT platform support"
Most of the rest of the changes here are fallout from the above, i.e. for
example removal of drivers that now lack platforms, etc.* tag 'armsoc-cleanup' of git://git.kernel.org/pub/scm/linux/kernel/git/arm/arm-soc: (58 commits)
mmc: Remove msm_sdcc driver
gpio: Remove gpio-msm-v1 driver
ARM: Remove mach-msm and associated ARM architecture code
ARM: shmobile: cpuidle: Remove the pointless default driver
ARM: davinci: dm646x: Add interrupt resource for McASPs
ARM: davinci: irqs: Correct McASP1 TX interrupt definition for DM646x
ARM: davinci: dm646x: Clean up the McASP DMA resources
ARM: davinci: devices-da8xx: Add support for McASP2 on da830
ARM: davinci: devices-da8xx: Clean up and correct the McASP device creation
ARM: davinci: devices-da8xx: Add interrupt resource to McASP structs
ARM: davinci: devices-da8xx: Add resource name for the McASP DMA request
ARM: OMAP2+: Remove legacy support for omap3 TouchBook
ARM: OMAP3: Remove legacy support for devkit8000
ARM: OMAP3: Remove legacy support for EMA-Tech Stalker board
ARM: shmobile: Consolidate the pm code for R-Car Gen2
ARM: shmobile: r8a7791: Correct SYSCIER value
ARM: shmobile: r8a7790: Correct SYSCIER value
ARM: at91: remove old setup
ARM: at91: sama5d4: remove useless map_io
ARM: at91: sama5 use SoC detection infrastructure
...
18 Apr, 2015
1 commit
-
Pull GPIO updates from Linus Walleij:
"This is the bulk of GPIO changes for the v4.1 development cycle:- A new GPIO hogging mechanism has been added. This can be used on
boards that want to drive some GPIO line high, low, or set it as
input on boot and then never touch it again. For some embedded
systems this is bliss and simplifies things to a great extent.- Some API cleanup and closure: gpiod_get_array() and
gpiod_put_array() has been added to get and put GPIOs in bulk as
was possible with the non-descriptor API.- Encapsulate cross-calls to the pin control subsystem in
. Now this should be the only header any GPIO
driver needs to include or something is wrong. Cleanups
restricting drivers to this include are welcomed if tested.- Sort the GPIO Kconfig and split it into submenus, as it was
becoming and unstructured, illogical and unnavigatable mess. I
hope this is easier to follow. Menus that require a certain
subsystem like I2C can now be hidden nicely for example, still
working on others.- New drivers:
- New driver for the Altera Soft GPIO.
- The F7188x driver now handles the F71869 and F71869A variants.
- The MIPS Loongson driver has been moved to drivers/gpio for
consolidation and cleanup.- Cleanups:
- The MAX732x is converted to use the GPIOLIB_IRQCHIP
infrastructure.- The PCF857x is converted to use the GPIOLIB_IRQCHIP
infrastructure.- Radical cleanup of the OMAP driver.
- Misc:
- Enable the DWAPB GPIO for all architectures. This is a "hard
IP" block from Synopsys which has started to turn up in so
diverse architectures as X86 Quark, ARC and a slew of ARM
systems. So even though it's not an expander, it's generic
enough to be available for all.- We add a mock GPIO on Crystalcove PMIC after a long discussion
with Daniel Vetter et al, tracing back to the shootout at the
kernel summit where DRM drivers and sub-componentization was
discussed. In this case a mock GPIO is assumed to be the best
compromise gaining some reuse of infrastructure without making
DRM drivers overly complex at the same time. Let's see"* tag 'gpio-v4.1-1' of git://git.kernel.org/pub/scm/linux/kernel/git/linusw/linux-gpio: (62 commits)
Revert "gpio: sch: use uapi/linux/pci_ids.h directly"
gpio: dwapb: remove dependencies
gpio: dwapb: enable for ARC
gpio: removing kfree remove functionality
gpio: mvebu: Fix mask/unmask managment per irq chip type
gpio: split GPIO drivers in submenus
gpio: move MFD GPIO drivers under their own comment
gpio: move BCM Kona Kconfig option
gpio: arrange SPI Kconfig symbols alphabetically
gpio: arrange PCI GPIO controllers alphabetically
gpio: arrange I2C Kconfig symbols alphabetically
gpio: arrange Kconfig symbols alphabetically
gpio: ich: Implement get_direction function
gpio: use (!foo) instead of (foo == NULL)
gpio: arizona: drop owner assignment from platform_drivers
gpio: max7300: remove 'ret' variable
gpio: use devm_kzalloc
gpio: sch: use uapi/linux/pci_ids.h directly
gpio: x-gene: fix devm_ioremap_resource() check
gpio: loongson: Add Loongson-3A/3B GPIO driver support
...
09 Apr, 2015
1 commit
-
The Synopsys DesignWare DWAPB GPIO block is popular to
synthesize amongst many architectures: X86, ARM, ARC.
The driver was restricted to only these archs due to
using [read|write]l_relaxed() accessors that were not
universally available in the past,
but as of commit 9439eb3ab9d1ece6e4ad7baaa4a7f534f9b9dab0
"asm-generic: io: implement relaxed accessor macros as
conditional wrappers" these accessors are available on all
archs so this should not be a problem any more. Enable the
driver for all archs.Cc: Alexey Brodkin
Cc: Will Deacon
Signed-off-by: Linus Walleij
08 Apr, 2015
9 commits
-
Synopsys SDP platform uses DW GPIO controller in design with
ARC cores. So adding ARC to architectures that may select this
GPIO controller.Even though support for Synopsys SDP is yet to be submitted we'll need
this tiny option enabled at least for properly working interrupts (DW
GPIO controller is used as interrupt controller).Signed-off-by: Vineet Gupta
Signed-off-by: Alexey Brodkin
Cc: Andy Shevchenko
Cc: Linus Walleij
Signed-off-by: Linus Walleij -
Create Kconfig submenus for memory mapped, I2C, MFD,
PCI, SPI and USB GPIO drivers to help navigate the forest
of drivers in this subsystem. The I2C, SPI and USB menus
get dependencies so we don't have to see them unless we
have the required subsystem enabled in the first place.Signed-off-by: Linus Walleij
-
Get rid of AC97, MODULbus and other weird subheadings for
GPIO drivers. Move all MFD drivers out of I2C etc and in under
the MFD comment. This is too weird as it is and makes no
sense, if the dependent parent driver is MFD, group these as
MFD GPIO drivers. Alphabetize and move this comment group
inbetween "I2C" and "PCI" to also have the groups in
alphabetic order.Signed-off-by: Linus Walleij
-
Move the Kconfig option for the Broadcom BCM Kona up to the
commin GPIO controllers, as it is currently grouped under
MODULbus expanders which it definately is not.Signed-off-by: Linus Walleij
-
Rearrange the SPI GPIO expanders in alphabetic order
as already indicated by the comment in the file.Signed-off-by: Linus Walleij
-
Rearrange PCI GPIO controllers in alphabetic order
as already indicated by the comment in the file.Signed-off-by: Linus Walleij
-
Rearrange the I2C GPIO expanders in alphabetic order
as already indicated by the comment in the file.Signed-off-by: Linus Walleij
-
This rearranges the GPIO drivers Kconfig symbols alphabetically
as the top comment in the file already states they should be.
No functional changes whatsoever.Signed-off-by: Linus Walleij
-
Improve Loongson-2's GPIO driver to support Loongson-3A/3B, and update
Loongson-3's default config file.Acked-by: Ralf Baechle
Signed-off-by: Huacai Chen
Reviewed-by: Alexandre Courbot
Signed-off-by: Linus Walleij
07 Apr, 2015
1 commit
-
Move Loongson-2's GPIO driver to drivers/gpio and add Kconfig options.
Acked-by: Ralf Baechle
Signed-off-by: Huacai Chen
Reviewed-by: Alexandre Courbot
Signed-off-by: Linus Walleij
28 Mar, 2015
1 commit
-
This driver is orphaned now that mach-msm has been removed.
Delete it.Cc: David Brown
Cc: Bryan Huntsman
Cc: Daniel Walker
Cc: Linus Walleij
Cc: Alexandre Courbot
Signed-off-by: Stephen Boyd
Acked-by: Linus Walleij
Signed-off-by: Kumar Gala
26 Mar, 2015
1 commit
-
All systems using the TC3589x multifunction expander uses
devicetree, so don't clutter the place with a lot of
and assume it is there.Signed-off-by: Linus Walleij
Signed-off-by: Lee Jones
19 Mar, 2015
1 commit
-
The Intel Quark SoC contains the DW GPIO on board. While fixing the build error
the commit 1972c97db5b0 (gpio: dwapb: fix compile errors) disables the
possibility to build the driver on X86, i.e. Intel Quark.The patch reenables it for Intel Quark as well.
Since we have Intel Quark SoC introduced in 4.0-rc1 I would like to make this
fix available there as well, though the actual MFD driver [1] is applied only
for next version.[1] https://lkml.org/lkml/2015/2/1/217
Fixes: 1972c97db5b0 (gpio: dwapb: fix compile errors)
Signed-off-by: Andy Shevchenko
Signed-off-by: Linus Walleij
18 Mar, 2015
2 commits
-
Add support for the GPIOs found on the Fintek SuperI/O chip F71869A,
such as the one found on the Jetway JNF99-525 motherboard, to the f7188x
gpio driver.Signed-off-by: Andreas Bofjall
Reviewed-by: Alexandre Courbot
Signed-off-by: Linus Walleij -
Add support for the GPIOs found on the Fintek SuperI/O chip F71869, such
as the one found on the Jetway NF96u-525 motherboard, to the f7188x gpio
driver.Signed-off-by: Andreas Bofjall
Tested-by: Les Schaffer
Reviewed-by: Alexandre Courbot
Signed-off-by: Linus Walleij
09 Mar, 2015
1 commit
-
Hisilicon arm64 soc uses designWare gpio, re-enable it after
commit 1972c97db5b(gpio: dwapb: fix compile errors).Signed-off-by: Kefeng Wang
Signed-off-by: Linus Walleij
08 Mar, 2015
1 commit
-
Adds a new driver for Altera soft GPIO IP. The driver is able to do
read/write and allows GPIO to be a interrupt controller.Tested on Altera GHRD on interrupt handling and IO.
v10:
- Updated conflicting device tree parameters
- Removed unused headers
- Used macro instead of magic numbers for ngpio
- Code readability cleanup using ?: and temporal variables
- Removed leftover garbage and unnecessary function calls
- Checked bgpio_init but unusable because Altera GPIO may not
be a multiple of 8 bitsv9:
- Removed duplicated initialization on set_type using temporals
to improve code readability in calling generic_handle_irq
- Using ?: ternary to reduce code sizev8:
- Using for_each_set_bit
- Added const for struct definition
- Removed naggy pr_err
- Sort alpha header
- Remove unused macros
- Use fixed width data types instead of unsigned long
- Whitespace issue fixes
- Removed _relaxed function for better compatibility across different
CPU
- Changed irq_create_mapping to platform_get_irq updated implementation
to use gpiochip_irqchip_add
- Reserve interrupt-cells number 2 in device tree binding for future
use
- Remove confusing sections on devicetree bindings
- Added tristate Kconfig help textv7:
- Used dev_warn instead of pr_warn
- Clean up unnecesarry if else indentationv6:
- Added irq_startup and irq_shutdown
- Changed bitwise clamping style
- Cleanup bitwise operation to improve readability change naming of
mapped irqs from virq to mapped_irqv5:
- Dispose irq_domain mapping correctly
- Update optional binding description in binding docsv4:
- Added vendor prefix to devicetree binding for IP specific properties
using MMIO GPIO helper library instead of manually map PIO to memory
- altera_gpio_chip inline struct documentation to kerneldoc
- Using dev_ print to print a better failure messagev2, v3:
- Do not reference NO_IRQ
- Updated irq_set_type to only allow the hardware configured irq typeSigned-off-by: Tien Hock Loh
Signed-off-by: Linus Walleij
04 Mar, 2015
1 commit
-
Switch the PCF857x GPIO driver to use the gpiolib irqchip helpers.
This driver uses a nested threaded interrupt, hence handle_nested_irq()
and gpiochip_set_chained_irqchip() must be used.Note that this removes the checks added in commit 21fd3cd1874a2ac8
("gpio: pcf857x: call the gpio user handler iff gpio_to_irq is done"),
as the interrupt mappings are no longer created on-demand by the driver,
but by gpiochip_irqchip_add() during initialization.Signed-off-by: Geert Uytterhoeven
Signed-off-by: Linus Walleij
02 Mar, 2015
1 commit
-
Take a sweep to bring the irq support for the MAX732x expanders
into the gpiolib core to cut down on duplicated code.Only compile tested! I need some feedback from people using this
expander with interrupts to tell me if things go right or
wrong when I do this.Cc: Semen Protsenko
Cc: Mans Rullgard
Signed-off-by: Linus Walleij
04 Feb, 2015
1 commit
-
The PPC_OF is a ppc specific option which is used to mean that the
firmware device tree access functions are available. Since all the
ppc platforms have a device tree, it is aways set to 'y' for ppc.
So it makes no sense to keep a such option in the current kernel.
Replace it with PPC.Signed-off-by: Kevin Hao
Signed-off-by: Linus Walleij
20 Jan, 2015
3 commits
-
Driver for Fujitsu MB86S7x SoCs that have a memory mapped GPIO controller.
Signed-off-by: Jassi Brar
Signed-off-by: Andy Green
Signed-off-by: Vincent Yang
Signed-off-by: Tetsuya Nuriya
Signed-off-by: Linus Walleij -
Require that device tree be used with STMPE (all platforms use this)
and enforce OF_GPIO, then delete the platform data.Signed-off-by: Linus Walleij
-
Driver for standby GPIO controller of APM X-Gene SoCs on arm64.
Signed-off-by: Y Vo
Signed-off-by: Linus Walleij
16 Jan, 2015
3 commits
-
This patch converts GE GPIO driver to use basic_mmio_gpio
generic library.Signed-off-by: Kamlakant Patel
Acked-by: Martyn Welch
Signed-off-by: Linus Walleij -
Signed-off-by: Semen Protsenko
Signed-off-by: Linus Walleij -
X86 Kconfig symbol is X86, not ARCH_X86.
Fixes: c586b3075d5b47d8 (gpio/xilinx: Add support for X86 Arch)
Reported-by: Paul Bolle
Signed-off-by: Ricardo Ribalda Delgado
Signed-off-by: Linus Walleij