15 Sep, 2016
1 commit
-
The Kconfig for this file is:
drivers/gpio/Kconfig:config GPIO_ALTERA
drivers/gpio/Kconfig: tristate "Altera GPIO"...but however it does not include module.h -- it in turn gets it from
another header (gpio/driver.h) and we'd like to replace that with a
forward delcaration of "struct module;" but if we do, this file will
fail to compile.So we fix this first to avoid putting build failures into the bisect
commit history.Cc: Linus Walleij
Cc: Alexandre Courbot
Cc: linux-gpio@vger.kernel.org
Signed-off-by: Paul Gortmaker
Signed-off-by: Linus Walleij
27 Jan, 2016
1 commit
-
On failure to setup the irq altera_gpio_probe would return an error
but not go to cleanup. This resulted in kernel fault
"Unable to handle kernel paging request at virtual address xxxxxxxx"
later on in of_gpiochip_find_and_xlate.Signed-off-by: Phil Reid
Signed-off-by: Linus Walleij
05 Jan, 2016
1 commit
-
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: Tien Hock Loh
Signed-off-by: Linus Walleij
19 Nov, 2015
1 commit
-
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->parentand:
@@
struct gpio_chip var;
@@
-var.dev
+var.parentand:
@@
struct bgpio_chip *var;
@@
-var->gc.dev
+var->gc.parentPlus 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
Cc: Rafał Miłecki
Cc: Richard Purdie
Cc: Mauro Carvalho Chehab
Cc: Alek Du
Cc: Jaroslav Kysela
Cc: Takashi Iwai
Acked-by: Dmitry Torokhov
Acked-by: Greg Kroah-Hartman
Acked-by: Lee Jones
Acked-by: Jiri Kosina
Acked-by: Hans-Christian Egtvedt
Acked-by: Jacek Anaszewski
Signed-off-by: Linus Walleij
02 Oct, 2015
1 commit
-
The state container of the Altera GPIO driver is extracted from
the gpio_chip exploiting the fact that offsetof() the
struct gpio_chip inside the struct of_mm_gpio_chip are both 0, so
the container_of() is in practice a noop. However if a member
is added to struct altera_gpio_chip in front of
struct of_mm_gpio_chip, things will break. Using proper
container_of() avoids this problem.Semantically this is a noop, the compiler will optimize it away,
but syntactically it makes me happier.Cc: Tien Hock Loh
Signed-off-by: Linus Walleij
16 Sep, 2015
1 commit
-
Most interrupt flow handlers do not use the irq argument. Those few
which use it can retrieve the irq number from the irq descriptor.Remove the argument.
Search and replace was done with coccinelle and some extra helper
scripts around it. Thanks to Julia for her help!Signed-off-by: Thomas Gleixner
Cc: Julia Lawall
Cc: Jiang Liu
16 Jul, 2015
2 commits
-
This driver calls of_mm_gpiochip_add() to add a memory mapped gpio
chip. So, of_mm_gpiochip_remove() should be used when removing it.The direct call of gpiochip_remove() misses unmapping the register
and freeing the label.Signed-off-by: Masahiro Yamada
Reviewed-by: Alexandre Courbot
Acked-by: Tien Hock Loh
Signed-off-by: Linus Walleij -
The remove callback never succeeds, which seems odd.
Signed-off-by: Masahiro Yamada
Reviewed-by: Alexandre Courbot
Acked-by: Tien Hock Loh
Signed-off-by: Linus Walleij
16 Jun, 2015
1 commit
-
This patch fixes some issues given by checkpatch. Fixes include
bracket placement, spacing and indenting.Signed-off-by: Daniel Lockyer
Reviewed-by: Alexandre Courbot
Signed-off-by: Linus Walleij
27 Mar, 2015
1 commit
-
Signed-off-by: Fengguang Wu
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