Use the newly created of_mm_gpiochip_remove function for cleaning up
of_mm_gpiochip_add
Suggested-by: Alexandre Courbot <[email protected]>
Signed-off-by: Ricardo Ribalda Delgado <[email protected]>
Signed-off-by: Linus Walleij <[email protected]>
Currently, we had two gpio chips on cores configured as dual.
This lead to mapping the same memory region twice and duplicating the
init and remove code.
This patch creates a single gpiochip for single and dual cores.
Suggested-by: Alexandre Courbot <[email protected]>
Signed-off-by: Ricardo Ribalda Delgado <[email protected]>
Signed-off-by: Linus Walleij <[email protected]>
Some documentation were not following the kernel-doc format.
Backporting patch from Xilinx git repository.
Suggested-by: Michal Simek <[email protected]>
Acked-by: Michal Simek <[email protected]>
Acked-by: Alexandre Courbot <[email protected]>
Signed-off-by: Ricardo Ribalda Delgado <[email protected]>
Signed-off-by: Linus Walleij <[email protected]>
Core can be accessed via PCIe on X86 platform.
This patch also allows the driver to be used as module.
Acked-by: Michal Simek <[email protected]>
Signed-off-by: Ricardo Ribalda Delgado <[email protected]>
Signed-off-by: Linus Walleij <[email protected]>
This way we do not need to transverse the device tree manually and we
support hot plugged devices.
Also Implement remove callback so the driver can be unloaded
Acked-by: Michal Simek <[email protected]>
Signed-off-by: Ricardo Ribalda Delgado <[email protected]>
Signed-off-by: Linus Walleij <[email protected]>
If one adds gpio-controller; to the chip in the devicetree, then
initialization fails with 'gpiochip_find_base: cannot find free range',
because ngpio is 0. This patch fixes the bug.
This version includes the suggestions from Linus Walleij.
Tested on ml507 board.
Signed-off-by: Gernot Vormayr <[email protected]>
Signed-off-by: Linus Walleij <[email protected]>
Make of_device_id array const, because all OF functions
handle it as const.
Signed-off-by: Jingoo Han <[email protected]>
Reviewed-by: Michal Simek <[email protected]>
Signed-off-by: Linus Walleij <[email protected]>
This driver can be used on Xilinx ARM Zynq platform
where in_be32/out_be32 functions are not implemented.
Use __raw_readl/__raw_writel functions which are
implemented on Microblaze and PowerPC.
For ARM readl/writel functions are used instead.
The correct way how to implement this is to detect
endians directly on IP. But for the gpio case
without interrupt connected(it means without
interrupt logic) there are just 2 registers
data and tristate where auto detection can't be done.
Signed-off-by: Michal Simek <[email protected]>
Signed-off-by: Linus Walleij <[email protected]>
Supporting the second channel in the driver.
Offset is 0x8 and both channnels share the same
IRQ.
Signed-off-by: Michal Simek <[email protected]>
Signed-off-by: Linus Walleij <[email protected]>
Simplification is done by using OF helper function
which increase readability of code and remove
(if (var) var = be32_to_cpup;) assignment.
Signed-off-by: Michal Simek <[email protected]>
Signed-off-by: Linus Walleij <[email protected]>
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 <[email protected]>
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 <[email protected]>