Age | Commit message (Collapse) | Author | Files | Lines |
|
This is a GPIO driver so use only <linux/gpio/driver.h>.
Acked-by: Michal Simek <[email protected]>
Signed-off-by: Linus Walleij <[email protected]>
|
|
Now that we have a custom printf format specifier, convert users of
full_name to use %pOF instead. This is preparation to remove storing
of the full path string for each node.
Signed-off-by: Rob Herring <[email protected]>
Cc: Tien Hock Loh <[email protected]>
Cc: Linus Walleij <[email protected]>
Cc: Alexandre Courbot <[email protected]>
Cc: Brian Norris <[email protected]>
Cc: Florian Fainelli <[email protected]>
Cc: [email protected]
Cc: Michal Simek <[email protected]>
Cc: "Sören Brinkmann" <[email protected]>
Cc: [email protected]
Cc: [email protected]
Acked-by: Gregory Fong <[email protected]>
Signed-off-by: Linus Walleij <[email protected]>
|
|
Add function to set multiple GPIO of the same chip at the same time
and register it
Signed-off-by: Iban Rodriguez <[email protected]>
Signed-off-by: Linus Walleij <[email protected]>
|
|
Commit 097d88e94c44 ("gpio: xilinx: use gpiochip data pointer") replaces
the use of container_of() with gpiochip_get_data(). Unfortunately, the
data pointer is not yet set by the time xgpio_save_regs() is called,
causing a system hang.
Fixes: 097d88e94c44 ("gpio: xilinx: use gpiochip data pointer")
Signed-off-by: Guenter Roeck <[email protected]>
Signed-off-by: Linus Walleij <[email protected]>
|
|
This makes the driver use the data pointer added to the gpio_chip
to store a pointer to the state container instead of relying on
container_of().
Cc: Michal Simek <[email protected]>
Cc: Sören Brinkmann <[email protected]>
Signed-off-by: Linus Walleij <[email protected]>
|
|
The name .dev in a struct is normally reserved for a struct device
that is let us say a superclass to the thing described by the struct.
struct gpio_chip stands out by confusingly using a struct device *dev
to point to the parent device (such as a platform_device) that
represents the hardware. As we want to give gpio_chip:s real devices,
this is not working. We need to rename this member to parent.
This was done by two coccinelle scripts, I guess it is possible to
combine them into one, but I don't know such stuff. They look like
this:
@@
struct gpio_chip *var;
@@
-var->dev
+var->parent
and:
@@
struct gpio_chip var;
@@
-var.dev
+var.parent
and:
@@
struct bgpio_chip *var;
@@
-var->gc.dev
+var->gc.parent
Plus a few instances of bgpio that I couldn't figure out how
to teach Coccinelle to rewrite.
This patch hits all over the place, but I *strongly* prefer this
solution to any piecemal approaches that just exercise patch
mechanics all over the place. It mainly hits drivers/gpio and
drivers/pinctrl which is my own backyard anyway.
Cc: Haavard Skinnemoen <[email protected]>
Cc: Rafał Miłecki <[email protected]>
Cc: Richard Purdie <[email protected]>
Cc: Mauro Carvalho Chehab <[email protected]>
Cc: Alek Du <[email protected]>
Cc: Jaroslav Kysela <[email protected]>
Cc: Takashi Iwai <[email protected]>
Acked-by: Dmitry Torokhov <[email protected]>
Acked-by: Greg Kroah-Hartman <[email protected]>
Acked-by: Lee Jones <[email protected]>
Acked-by: Jiri Kosina <[email protected]>
Acked-by: Hans-Christian Egtvedt <[email protected]>
Acked-by: Jacek Anaszewski <[email protected]>
Signed-off-by: Linus Walleij <[email protected]>
|
|
xgpio_save_regs() is used in this driver to setup the initial
values of the registers in the hardware.
The relevant registers at that time are:
0x0 -> channel 0 data (32 bits, one for each GPIO on this channel).
0x4 -> channel 0 tri, controls in/out status for each GPIO of this channel.
0x8 -> channel 1 data
0xC -> channel 1 tri
gpio-xilinx.c defines these:
XGPIO_DATA_OFFSET (0x0)
XGPIO_TRI_OFFSET (0x4)
XGPIO_CHANNEL_OFFSET 0x8
Before this patch, the "data" register value of channel 1 was written
at 0x4 intead of 0x8 (overwriting the channel 0 "tri" register),
and the "tri" register value for channel 1 was written at 0x8 instead of 0xC.
Signed-off-by: Raphaël Teysseyre <[email protected]>
Reviewed-by: Michal Simek <[email protected]>
Reviewed-by: Alexandre Courbot <[email protected]>
Signed-off-by: Linus Walleij <[email protected]>
|
|
Fix kernel-doc format:
- Add gpio-width description
- Remove additional "inited" variable description
- Add return value description - xgpio_remove
Signed-off-by: Michal Simek <[email protected]>
Signed-off-by: Linus Walleij <[email protected]>
|
|
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]>
|
|
Instead of calculating the register offset per call, pre-calculate it on
probe time.
Acked-by: Alexandre Courbot <[email protected]>
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]>
|
|
Use BIT macro from linux/bitops.h.
Signed-off-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]>
|
|
CONFIG_HOTPLUG is going away as an option so __devinitdata is no
longer needed.
Signed-off-by: Bill Pemberton <[email protected]>
Cc: Grant Likely <[email protected]>
Acked-by: Linus Walleij <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
|
|
CONFIG_HOTPLUG is going away as an option so __devinit is no longer
needed.
Signed-off-by: Bill Pemberton <[email protected]>
Cc: Grant Likely <[email protected]>
Cc: Peter Tyser <[email protected]>
Cc: Santosh Shilimkar <[email protected]>
Cc: Kevin Hilman <[email protected]>
Acked-by: Linus Walleij <[email protected]>
Acked-by: Mark Brown <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
|
|
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 <[email protected]>
[[email protected]: squashed 2 patches together]
Signed-off-by: Grant Likely <[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]>
|