Age | Commit message (Collapse) | Author | Files | Lines |
|
Use resource managed variants of irq_alloc_generic_chip() and
irq_setup_generic_chip().
Signed-off-by: Bartosz Golaszewski <[email protected]>
Signed-off-by: Linus Walleij <[email protected]>
|
|
This function can fail, so check the return value before dereferencing
the returned pointer.
Signed-off-by: Bartosz Golaszewski <[email protected]>
Signed-off-by: Linus Walleij <[email protected]>
|
|
Use device resource managed variants of irq_alloc_descs() and
request_irq() and remove the code manually freeing irq resources.
Signed-off-by: Bartosz Golaszewski <[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: Feng Tang <[email protected]>
Cc: Tomoya MORINAGA <[email protected]>
Signed-off-by: Linus Walleij <[email protected]>
|
|
As we want gpio_chip .get() calls to be able to return negative
error codes and propagate to drivers, we need to go over all
drivers and make sure their return values are clamped to [0,1].
We do this by using the ret = !!(val) design pattern.
Cc: Feng Tang <[email protected]>
Cc: Tomoya MORINAGA <[email protected]>
Signed-off-by: Linus Walleij <[email protected]>
|
|
Signed-off-by: abdoulaye berthe <[email protected]>
Signed-off-by: Linus Walleij <[email protected]>
|
|
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 <[email protected]>
|
|
Don't use DEFINE_PCI_DEVICE_TABLE macro, because this macro
is not preferred.
Signed-off-by: Jingoo Han <[email protected]>
Signed-off-by: Linus Walleij <[email protected]>
|
|
Fix to return a negative error code in the irq descs alloc error
handling case instead of 0, as done elsewhere in this function.
Signed-off-by: Wei Yongjun <[email protected]>
Signed-off-by: Linus Walleij <[email protected]>
|
|
Otherwise, we return 0 in probe error paths when gpiochip_remove() returns 0.
Also show error message if gpiochip_remove() fails.
Signed-off-by: Axel Lin <[email protected]>
Cc: Tomoya MORINAGA <[email protected]>
Cc: Denis Turischev <[email protected]>
Cc: Lars Poeschel <[email protected]>
Signed-off-by: Linus Walleij <[email protected]>
|
|
CONFIG_HOTPLUG is going away as an option so __devexit is no
longer needed.
Signed-off-by: Bill Pemberton <[email protected]>
Cc: Grant Likely <[email protected]>
Acked-by: Linus Walleij <[email protected]>
Cc: Peter Tyser <[email protected]>
Acked-by: Mark Brown <[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]>
|
|
CONFIG_HOTPLUG is going away as an option so __devexit_p is no longer
needed.
Signed-off-by: Bill Pemberton <[email protected]>
Cc: Grant Likely <[email protected]>
Cc: Peter Tyser <[email protected]>
Acked-by: Linus Walleij <[email protected]>
Acked-by: Mark Brown <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
|
|
gpio_chip.can_sleep is 0, but current code uses mutex in ioh_gpio_set,
ioh_gpio_get and ioh_gpio_direction_input functions.
Thus those functions are not callable from interrupt context.
This patch converts mutex into spinlock.
Signed-off-by: Axel Lin <[email protected]>
Signed-off-by: Linus Walleij <[email protected]>
|
|
This patch converts the drivers in drivers/gpio/* to use
module_pci_driver() macro which makes the code smaller and a bit
simpler by having less boilerplate.
Signed-off-by: Axel Lin <[email protected]>
Signed-off-by: Grant Likely <[email protected]>
|
|
This bug was introduced by commit 54be5663
"gpio-ml-ioh: Support interrupt function" which adds a spinlock to struct
ioh_gpio but never init the spinlock.
Signed-off-by: Axel Lin <[email protected]>
Signed-off-by: Grant Likely <[email protected]>
|
|
The __iomem annotation is to be used together with pointers used
in iowrite32() but not for pointers returned by kzalloc().
For more details see [1] and [2].
This patch will remove the following sparse warning (i.e. when
copiling with "make C=1"):
* warning: incorrect type in assignment (different address spaces)
References:
[1] A new I/O memory access mechanism (Sep 15, 2004)
http://lwn.net/Articles/102232/
[2] Being more anal about iospace accesses (Sep 15, 2004)
http://lwn.net/Articles/102240/
Signed-off-by: Márton Németh <[email protected]>
Signed-off-by: Grant Likely <[email protected]>
|
|
This patch will remove the following sparse warning ("make C=1"):
* warning: Using plain integer as NULL pointer
Signed-off-by: Márton Németh <[email protected]>
Signed-off-by: Grant Likely <[email protected]>
|
|
These hooks will be needed by the general disabl/enable_irq();
Signed-off-by: Feng Tang <[email protected]>
Signed-off-by: Grant Likely <[email protected]>
|
|
GPIO's irq action's dev_id is set to the first struct ioh_gpio chip,
so when loop checking the 8 chips, the "chip" should be changed
according.
Signed-off-by: Feng Tang <[email protected]>
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]>
|
|
Currently, GFP_KERNEL is used as parameter of irq_alloc_descs like below.
irq_base = irq_alloc_descs(-1, IOH_IRQ_BASE, num_ports[j],
GFP_KERNEL);
This is not true.
So, this patch uses NUMA_NO_NODE not GFP_KERNEL.
Reported-by: Dan Carpenter <[email protected]>
Reported-by: David Rientjes <[email protected]>
Signed-off-by: Tomoya MORINAGA <[email protected]>
Acked-by: David Rientjes <[email protected]>
Signed-off-by: Grant Likely <[email protected]>
|
|
Currently, some registers are not saved in case changing to suspend state.
This patch fixes the issue.
Signed-off-by: Tomoya MORINAGA <[email protected]>
Signed-off-by: Grant Likely <[email protected]>
|
|
Signed-off-by: Tomoya MORINAGA <[email protected]>
Signed-off-by: Grant Likely <[email protected]>
|
|
This register restore processing is unnecessary in suspend processing.
(The restore processing is already in resume processing)
Signed-off-by: Tomoya MORINAGA <[email protected]>
Signed-off-by: Grant Likely <[email protected]>
|
|
with the "for (; i != 0; i--)" sytax, i-- will be executed after the iteration.
thus dev_err shows wrong i value.
Switch to "while(--i >= 0)" which is better in readability.
Signed-off-by: Axel Lin <[email protected]>
Signed-off-by: Grant Likely <[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]>
|