Skip to content
Snippets Groups Projects
Commit 44ba9876 authored by Linus Walleij's avatar Linus Walleij
Browse files

Merge branch 'devel' into for-next

parents 304440aa 85fdda01
No related branches found
No related tags found
No related merge requests found
Showing
with 273 additions and 59 deletions
* Actions Semi OWL GPIO controller bindings
The GPIOs are organized as individual banks/ports with variable number
of GPIOs. Each bank is represented as an individual GPIO controller.
Required properties:
- compatible : Should be "actions,s900-gpio"
- reg : Address and range of the GPIO controller registers.
- gpio-controller : Marks the device node as a GPIO controller.
- #gpio-cells : Should be <2>. The first cell is the gpio number
and the second cell is used to specify optional
parameters.
- ngpios : Specifies the number of GPIO lines.
- interrupt-controller : Marks the device node as an interrupt controller.
- #interrupt-cells : Specifies the number of cells needed to encode an
interrupt. Shall be set to 2. The first cell
defines the interrupt number, the second encodes
the trigger flags described in
bindings/interrupt-controller/interrupts.txt
Optional properties:
- gpio-ranges : Mapping between GPIO and pinctrl
Examples:
gpioa: gpio@e01b0000 {
compatible = "actions,s900-gpio";
reg = <0x0 0xe01b0000 0x0 0x000c>;
gpio-controller;
#gpio-cells = <2>;
gpio-ranges = <&pinctrl 0 0 32>;
interrupt-controller;
#interrupt-cells = <2>;
};
gpiob: gpio@e01b000c {
compatible = "actions,s900-gpio";
reg = <0x0 0xe01b000c 0x0 0x000c>;
gpio-controller;
#gpio-cells = <2>;
gpio-ranges = <&pinctrl 0 32 32>;
interrupt-controller;
#interrupt-cells = <2>;
};
gpioc: gpio@e01b0018 {
compatible = "actions,s900-gpio";
reg = <0x0 0xe01b0018 0x0 0x000c>;
gpio-controller;
#gpio-cells = <2>;
gpio-ranges = <&pinctrl 0 64 12>;
ngpios = <12>;
interrupt-controller;
#interrupt-cells = <2>;
};
gpiod: gpio@e01b0024 {
compatible = "actions,s900-gpio";
reg = <0x0 0xe01b0024 0x0 0x000c>;
gpio-controller;
#gpio-cells = <2>;
gpio-ranges = <&pinctrl 0 76 30>;
ngpios = <30>;
interrupt-controller;
#interrupt-cells = <2>;
};
gpioe: gpio@e01b0030 {
compatible = "actions,s900-gpio";
reg = <0x0 0xe01b0030 0x0 0x000c>;
gpio-controller;
#gpio-cells = <2>;
gpio-ranges = <&pinctrl 0 106 32>;
interrupt-controller;
#interrupt-cells = <2>;
};
gpiof: gpio@e01b00f0 {
compatible = "actions,s900-gpio";
reg = <0x0 0xe01b00f0 0x0 0x000c>;
gpio-controller;
#gpio-cells = <2>;
gpio-ranges = <&pinctrl 0 138 8>;
ngpios = <8>;
interrupt-controller;
#interrupt-cells = <2>;
};
...@@ -5,6 +5,7 @@ Required Properties: ...@@ -5,6 +5,7 @@ Required Properties:
- compatible: should contain one or more of the following: - compatible: should contain one or more of the following:
- "renesas,gpio-r8a7743": for R8A7743 (RZ/G1M) compatible GPIO controller. - "renesas,gpio-r8a7743": for R8A7743 (RZ/G1M) compatible GPIO controller.
- "renesas,gpio-r8a7745": for R8A7745 (RZ/G1E) compatible GPIO controller. - "renesas,gpio-r8a7745": for R8A7745 (RZ/G1E) compatible GPIO controller.
- "renesas,gpio-r8a77470": for R8A77470 (RZ/G1C) compatible GPIO controller.
- "renesas,gpio-r8a7778": for R8A7778 (R-Car M1) compatible GPIO controller. - "renesas,gpio-r8a7778": for R8A7778 (R-Car M1) compatible GPIO controller.
- "renesas,gpio-r8a7779": for R8A7779 (R-Car H1) compatible GPIO controller. - "renesas,gpio-r8a7779": for R8A7779 (R-Car H1) compatible GPIO controller.
- "renesas,gpio-r8a7790": for R8A7790 (R-Car H2) compatible GPIO controller. - "renesas,gpio-r8a7790": for R8A7790 (R-Car H2) compatible GPIO controller.
...@@ -14,6 +15,7 @@ Required Properties: ...@@ -14,6 +15,7 @@ Required Properties:
- "renesas,gpio-r8a7794": for R8A7794 (R-Car E2) compatible GPIO controller. - "renesas,gpio-r8a7794": for R8A7794 (R-Car E2) compatible GPIO controller.
- "renesas,gpio-r8a7795": for R8A7795 (R-Car H3) compatible GPIO controller. - "renesas,gpio-r8a7795": for R8A7795 (R-Car H3) compatible GPIO controller.
- "renesas,gpio-r8a7796": for R8A7796 (R-Car M3-W) compatible GPIO controller. - "renesas,gpio-r8a7796": for R8A7796 (R-Car M3-W) compatible GPIO controller.
- "renesas,gpio-r8a77965": for R8A77965 (R-Car M3-N) compatible GPIO controller.
- "renesas,gpio-r8a77970": for R8A77970 (R-Car V3M) compatible GPIO controller. - "renesas,gpio-r8a77970": for R8A77970 (R-Car V3M) compatible GPIO controller.
- "renesas,gpio-r8a77995": for R8A77995 (R-Car D3) compatible GPIO controller. - "renesas,gpio-r8a77995": for R8A77995 (R-Car D3) compatible GPIO controller.
- "renesas,rcar-gen1-gpio": for a generic R-Car Gen1 GPIO controller. - "renesas,rcar-gen1-gpio": for a generic R-Car Gen1 GPIO controller.
......
...@@ -177,3 +177,19 @@ mapping and is thus transparent to GPIO consumers. ...@@ -177,3 +177,19 @@ mapping and is thus transparent to GPIO consumers.
A set of functions such as gpiod_set_value() is available to work with A set of functions such as gpiod_set_value() is available to work with
the new descriptor-oriented interface. the new descriptor-oriented interface.
Boards using platform data can also hog GPIO lines by defining GPIO hog tables.
.. code-block:: c
struct gpiod_hog gpio_hog_table[] = {
GPIO_HOG("gpio.0", 10, "foo", GPIO_ACTIVE_LOW, GPIOD_OUT_HIGH),
{ }
};
And the table can be added to the board code as follows::
gpiod_add_hogs(gpio_hog_table);
The line will be hogged as soon as the gpiochip is created or - in case the
chip was created earlier - when the hog table is registered.
...@@ -85,6 +85,10 @@ hardware descriptions such as device tree or ACPI: ...@@ -85,6 +85,10 @@ hardware descriptions such as device tree or ACPI:
any other serio bus to the system and makes it possible to connect drivers any other serio bus to the system and makes it possible to connect drivers
for e.g. keyboards and other PS/2 protocol based devices. for e.g. keyboards and other PS/2 protocol based devices.
- cec-gpio: drivers/media/platform/cec-gpio/ is used to interact with a CEC
Consumer Electronics Control bus using only GPIO. It is used to communicate
with devices on the HDMI bus.
Apart from this there are special GPIO drivers in subsystems like MMC/SD to Apart from this there are special GPIO drivers in subsystems like MMC/SD to
read card detect and write protect GPIO lines, and in the TTY serial subsystem read card detect and write protect GPIO lines, and in the TTY serial subsystem
to emulate MCTRL (modem control) signals CTS/RTS by using two GPIO lines. The to emulate MCTRL (modem control) signals CTS/RTS by using two GPIO lines. The
......
...@@ -383,6 +383,14 @@ config GPIO_OMAP ...@@ -383,6 +383,14 @@ config GPIO_OMAP
help help
Say yes here to enable GPIO support for TI OMAP SoCs. Say yes here to enable GPIO support for TI OMAP SoCs.
config GPIO_OWL
tristate "Actions Semi OWL GPIO support"
default ARCH_ACTIONS
depends on ARCH_ACTIONS || COMPILE_TEST
depends on OF_GPIO
help
Say yes here to enable GPIO support for Actions Semi OWL SoCs.
config GPIO_PL061 config GPIO_PL061
bool "PrimeCell PL061 GPIO support" bool "PrimeCell PL061 GPIO support"
depends on ARM_AMBA depends on ARM_AMBA
......
...@@ -93,6 +93,7 @@ obj-$(CONFIG_GPIO_MXC) += gpio-mxc.o ...@@ -93,6 +93,7 @@ obj-$(CONFIG_GPIO_MXC) += gpio-mxc.o
obj-$(CONFIG_GPIO_MXS) += gpio-mxs.o obj-$(CONFIG_GPIO_MXS) += gpio-mxs.o
obj-$(CONFIG_GPIO_OCTEON) += gpio-octeon.o obj-$(CONFIG_GPIO_OCTEON) += gpio-octeon.o
obj-$(CONFIG_GPIO_OMAP) += gpio-omap.o obj-$(CONFIG_GPIO_OMAP) += gpio-omap.o
obj-$(CONFIG_GPIO_OWL) += gpio-owl.o
obj-$(CONFIG_GPIO_PCA953X) += gpio-pca953x.o obj-$(CONFIG_GPIO_PCA953X) += gpio-pca953x.o
obj-$(CONFIG_GPIO_PCF857X) += gpio-pcf857x.o obj-$(CONFIG_GPIO_PCF857X) += gpio-pcf857x.o
obj-$(CONFIG_GPIO_PCH) += gpio-pch.o obj-$(CONFIG_GPIO_PCH) += gpio-pch.o
......
...@@ -188,7 +188,7 @@ static int dio48e_gpio_get_multiple(struct gpio_chip *chip, unsigned long *mask, ...@@ -188,7 +188,7 @@ static int dio48e_gpio_get_multiple(struct gpio_chip *chip, unsigned long *mask,
{ {
struct dio48e_gpio *const dio48egpio = gpiochip_get_data(chip); struct dio48e_gpio *const dio48egpio = gpiochip_get_data(chip);
size_t i; size_t i;
const size_t ports[] = { 0, 1, 2, 4, 5, 6 }; static const size_t ports[] = { 0, 1, 2, 4, 5, 6 };
const unsigned int gpio_reg_size = 8; const unsigned int gpio_reg_size = 8;
unsigned int bits_offset; unsigned int bits_offset;
size_t word_index; size_t word_index;
......
...@@ -94,7 +94,7 @@ static int idi_48_gpio_get_multiple(struct gpio_chip *chip, unsigned long *mask, ...@@ -94,7 +94,7 @@ static int idi_48_gpio_get_multiple(struct gpio_chip *chip, unsigned long *mask,
{ {
struct idi_48_gpio *const idi48gpio = gpiochip_get_data(chip); struct idi_48_gpio *const idi48gpio = gpiochip_get_data(chip);
size_t i; size_t i;
const size_t ports[] = { 0, 1, 2, 4, 5, 6 }; static const size_t ports[] = { 0, 1, 2, 4, 5, 6 };
const unsigned int gpio_reg_size = 8; const unsigned int gpio_reg_size = 8;
unsigned int bits_offset; unsigned int bits_offset;
size_t word_index; size_t word_index;
......
...@@ -300,6 +300,7 @@ static int sprd_eic_irq_set_type(struct irq_data *data, unsigned int flow_type) ...@@ -300,6 +300,7 @@ static int sprd_eic_irq_set_type(struct irq_data *data, unsigned int flow_type)
struct gpio_chip *chip = irq_data_get_irq_chip_data(data); struct gpio_chip *chip = irq_data_get_irq_chip_data(data);
struct sprd_eic *sprd_eic = gpiochip_get_data(chip); struct sprd_eic *sprd_eic = gpiochip_get_data(chip);
u32 offset = irqd_to_hwirq(data); u32 offset = irqd_to_hwirq(data);
int state;
switch (sprd_eic->type) { switch (sprd_eic->type) {
case SPRD_EIC_DEBOUNCE: case SPRD_EIC_DEBOUNCE:
...@@ -310,6 +311,17 @@ static int sprd_eic_irq_set_type(struct irq_data *data, unsigned int flow_type) ...@@ -310,6 +311,17 @@ static int sprd_eic_irq_set_type(struct irq_data *data, unsigned int flow_type)
case IRQ_TYPE_LEVEL_LOW: case IRQ_TYPE_LEVEL_LOW:
sprd_eic_update(chip, offset, SPRD_EIC_DBNC_IEV, 0); sprd_eic_update(chip, offset, SPRD_EIC_DBNC_IEV, 0);
break; break;
case IRQ_TYPE_EDGE_RISING:
case IRQ_TYPE_EDGE_FALLING:
case IRQ_TYPE_EDGE_BOTH:
state = sprd_eic_get(chip, offset);
if (state)
sprd_eic_update(chip, offset,
SPRD_EIC_DBNC_IEV, 0);
else
sprd_eic_update(chip, offset,
SPRD_EIC_DBNC_IEV, 1);
break;
default: default:
return -ENOTSUPP; return -ENOTSUPP;
} }
...@@ -324,6 +336,17 @@ static int sprd_eic_irq_set_type(struct irq_data *data, unsigned int flow_type) ...@@ -324,6 +336,17 @@ static int sprd_eic_irq_set_type(struct irq_data *data, unsigned int flow_type)
case IRQ_TYPE_LEVEL_LOW: case IRQ_TYPE_LEVEL_LOW:
sprd_eic_update(chip, offset, SPRD_EIC_LATCH_INTPOL, 1); sprd_eic_update(chip, offset, SPRD_EIC_LATCH_INTPOL, 1);
break; break;
case IRQ_TYPE_EDGE_RISING:
case IRQ_TYPE_EDGE_FALLING:
case IRQ_TYPE_EDGE_BOTH:
state = sprd_eic_get(chip, offset);
if (state)
sprd_eic_update(chip, offset,
SPRD_EIC_LATCH_INTPOL, 0);
else
sprd_eic_update(chip, offset,
SPRD_EIC_LATCH_INTPOL, 1);
break;
default: default:
return -ENOTSUPP; return -ENOTSUPP;
} }
...@@ -405,6 +428,55 @@ static int sprd_eic_irq_set_type(struct irq_data *data, unsigned int flow_type) ...@@ -405,6 +428,55 @@ static int sprd_eic_irq_set_type(struct irq_data *data, unsigned int flow_type)
return 0; return 0;
} }
static void sprd_eic_toggle_trigger(struct gpio_chip *chip, unsigned int irq,
unsigned int offset)
{
struct sprd_eic *sprd_eic = gpiochip_get_data(chip);
struct irq_data *data = irq_get_irq_data(irq);
u32 trigger = irqd_get_trigger_type(data);
int state, post_state;
/*
* The debounce EIC and latch EIC can only support level trigger, so we
* can toggle the level trigger to emulate the edge trigger.
*/
if ((sprd_eic->type != SPRD_EIC_DEBOUNCE &&
sprd_eic->type != SPRD_EIC_LATCH) ||
!(trigger & IRQ_TYPE_EDGE_BOTH))
return;
sprd_eic_irq_mask(data);
state = sprd_eic_get(chip, offset);
retry:
switch (sprd_eic->type) {
case SPRD_EIC_DEBOUNCE:
if (state)
sprd_eic_update(chip, offset, SPRD_EIC_DBNC_IEV, 0);
else
sprd_eic_update(chip, offset, SPRD_EIC_DBNC_IEV, 1);
break;
case SPRD_EIC_LATCH:
if (state)
sprd_eic_update(chip, offset, SPRD_EIC_LATCH_INTPOL, 0);
else
sprd_eic_update(chip, offset, SPRD_EIC_LATCH_INTPOL, 1);
break;
default:
sprd_eic_irq_unmask(data);
return;
}
post_state = sprd_eic_get(chip, offset);
if (state != post_state) {
dev_warn(chip->parent, "EIC level was changed.\n");
state = post_state;
goto retry;
}
sprd_eic_irq_unmask(data);
}
static int sprd_eic_match_chip_by_type(struct gpio_chip *chip, void *data) static int sprd_eic_match_chip_by_type(struct gpio_chip *chip, void *data)
{ {
enum sprd_eic_type type = *(enum sprd_eic_type *)data; enum sprd_eic_type type = *(enum sprd_eic_type *)data;
...@@ -448,6 +520,7 @@ static void sprd_eic_handle_one_type(struct gpio_chip *chip) ...@@ -448,6 +520,7 @@ static void sprd_eic_handle_one_type(struct gpio_chip *chip)
bank * SPRD_EIC_PER_BANK_NR + n); bank * SPRD_EIC_PER_BANK_NR + n);
generic_handle_irq(girq); generic_handle_irq(girq);
sprd_eic_toggle_trigger(chip, girq, n);
} }
} }
} }
......
...@@ -177,7 +177,7 @@ static int gpiomm_gpio_get_multiple(struct gpio_chip *chip, unsigned long *mask, ...@@ -177,7 +177,7 @@ static int gpiomm_gpio_get_multiple(struct gpio_chip *chip, unsigned long *mask,
{ {
struct gpiomm_gpio *const gpiommgpio = gpiochip_get_data(chip); struct gpiomm_gpio *const gpiommgpio = gpiochip_get_data(chip);
size_t i; size_t i;
const size_t ports[] = { 0, 1, 2, 4, 5, 6 }; static const size_t ports[] = { 0, 1, 2, 4, 5, 6 };
const unsigned int gpio_reg_size = 8; const unsigned int gpio_reg_size = 8;
unsigned int bits_offset; unsigned int bits_offset;
size_t word_index; size_t word_index;
......
...@@ -17,9 +17,11 @@ ...@@ -17,9 +17,11 @@
#include <linux/module.h> #include <linux/module.h>
#include <linux/spinlock.h> #include <linux/spinlock.h>
#include <linux/err.h> #include <linux/err.h>
#include <linux/gpio/driver.h>
#include <linux/platform_device.h>
#include <linux/bitops.h>
#include <asm/types.h> #include <asm/types.h>
#include <loongson.h> #include <loongson.h>
#include <linux/gpio.h>
#define STLS2F_N_GPIO 4 #define STLS2F_N_GPIO 4
#define STLS3A_N_GPIO 16 #define STLS3A_N_GPIO 16
...@@ -30,86 +32,108 @@ ...@@ -30,86 +32,108 @@
#define LOONGSON_N_GPIO STLS2F_N_GPIO #define LOONGSON_N_GPIO STLS2F_N_GPIO
#endif #endif
/*
* Offset into the register where we read lines, we write them from offset 0.
* This offset is the only thing that stand between us and using
* GPIO_GENERIC.
*/
#define LOONGSON_GPIO_IN_OFFSET 16 #define LOONGSON_GPIO_IN_OFFSET 16
static DEFINE_SPINLOCK(gpio_lock); static DEFINE_SPINLOCK(gpio_lock);
static int loongson_gpio_direction_input(struct gpio_chip *chip, unsigned gpio) static int loongson_gpio_get_value(struct gpio_chip *chip, unsigned gpio)
{ {
u32 temp; u32 val;
u32 mask;
spin_lock(&gpio_lock); spin_lock(&gpio_lock);
mask = 1 << gpio; val = LOONGSON_GPIODATA;
temp = LOONGSON_GPIOIE;
temp |= mask;
LOONGSON_GPIOIE = temp;
spin_unlock(&gpio_lock); spin_unlock(&gpio_lock);
return 0; return !!(val & BIT(gpio + LOONGSON_GPIO_IN_OFFSET));
} }
static int loongson_gpio_direction_output(struct gpio_chip *chip, static void loongson_gpio_set_value(struct gpio_chip *chip,
unsigned gpio, int level) unsigned gpio, int value)
{
u32 val;
spin_lock(&gpio_lock);
val = LOONGSON_GPIODATA;
if (value)
val |= BIT(gpio);
else
val &= ~BIT(gpio);
LOONGSON_GPIODATA = val;
spin_unlock(&gpio_lock);
}
static int loongson_gpio_direction_input(struct gpio_chip *chip, unsigned gpio)
{ {
u32 temp; u32 temp;
u32 mask;
gpio_set_value(gpio, level);
spin_lock(&gpio_lock); spin_lock(&gpio_lock);
mask = 1 << gpio;
temp = LOONGSON_GPIOIE; temp = LOONGSON_GPIOIE;
temp &= (~mask); temp |= BIT(gpio);
LOONGSON_GPIOIE = temp; LOONGSON_GPIOIE = temp;
spin_unlock(&gpio_lock); spin_unlock(&gpio_lock);
return 0; return 0;
} }
static int loongson_gpio_get_value(struct gpio_chip *chip, unsigned gpio) static int loongson_gpio_direction_output(struct gpio_chip *chip,
unsigned gpio, int level)
{ {
u32 val; u32 temp;
u32 mask;
mask = 1 << (gpio + LOONGSON_GPIO_IN_OFFSET); loongson_gpio_set_value(chip, gpio, level);
spin_lock(&gpio_lock); spin_lock(&gpio_lock);
val = LOONGSON_GPIODATA; temp = LOONGSON_GPIOIE;
temp &= ~BIT(gpio);
LOONGSON_GPIOIE = temp;
spin_unlock(&gpio_lock); spin_unlock(&gpio_lock);
return (val & mask) != 0; return 0;
} }
static void loongson_gpio_set_value(struct gpio_chip *chip, static int loongson_gpio_probe(struct platform_device *pdev)
unsigned gpio, int value)
{ {
u32 val; struct gpio_chip *gc;
u32 mask; struct device *dev = &pdev->dev;
mask = 1 << gpio; gc = devm_kzalloc(dev, sizeof(*gc), GFP_KERNEL);
if (!gc)
spin_lock(&gpio_lock); return -ENOMEM;
val = LOONGSON_GPIODATA;
if (value) gc->label = "loongson-gpio-chip";
val |= mask; gc->base = 0;
else gc->ngpio = LOONGSON_N_GPIO;
val &= (~mask); gc->get = loongson_gpio_get_value;
LOONGSON_GPIODATA = val; gc->set = loongson_gpio_set_value;
spin_unlock(&gpio_lock); gc->direction_input = loongson_gpio_direction_input;
gc->direction_output = loongson_gpio_direction_output;
return gpiochip_add_data(gc, NULL);
} }
static struct gpio_chip loongson_chip = { static struct platform_driver loongson_gpio_driver = {
.label = "Loongson-gpio-chip", .driver = {
.direction_input = loongson_gpio_direction_input, .name = "loongson-gpio",
.get = loongson_gpio_get_value, },
.direction_output = loongson_gpio_direction_output, .probe = loongson_gpio_probe,
.set = loongson_gpio_set_value,
.base = 0,
.ngpio = LOONGSON_N_GPIO,
.can_sleep = false,
}; };
static int __init loongson_gpio_setup(void) static int __init loongson_gpio_setup(void)
{ {
return gpiochip_add_data(&loongson_chip, NULL); struct platform_device *pdev;
int ret;
ret = platform_driver_register(&loongson_gpio_driver);
if (ret) {
pr_err("error registering loongson GPIO driver\n");
return ret;
}
pdev = platform_device_register_simple("loongson-gpio", -1, NULL, 0);
return PTR_ERR_OR_ZERO(pdev);
} }
postcore_initcall(loongson_gpio_setup); postcore_initcall(loongson_gpio_setup);
...@@ -12,7 +12,7 @@ ...@@ -12,7 +12,7 @@
#include <linux/bitops.h> #include <linux/bitops.h>
#include <linux/err.h> #include <linux/err.h>
#include <linux/gpio.h> #include <linux/gpio/driver.h>
#include <linux/i2c.h> #include <linux/i2c.h>
#include <linux/mfd/lp3943.h> #include <linux/mfd/lp3943.h>
#include <linux/module.h> #include <linux/module.h>
......
...@@ -14,7 +14,7 @@ ...@@ -14,7 +14,7 @@
* Based on the TPS65218 driver * Based on the TPS65218 driver
*/ */
#include <linux/gpio.h> #include <linux/gpio/driver.h>
#include <linux/module.h> #include <linux/module.h>
#include <linux/platform_device.h> #include <linux/platform_device.h>
#include <linux/regmap.h> #include <linux/regmap.h>
......
...@@ -20,9 +20,8 @@ ...@@ -20,9 +20,8 @@
#include <linux/init.h> #include <linux/init.h>
#include <linux/io.h> #include <linux/io.h>
#include <linux/errno.h> #include <linux/errno.h>
#include <linux/gpio.h> #include <linux/gpio/driver.h>
#include <linux/of.h> #include <linux/of.h>
#include <linux/of_gpio.h>
#include <linux/platform_device.h> #include <linux/platform_device.h>
#include <linux/module.h> #include <linux/module.h>
......
...@@ -25,7 +25,7 @@ ...@@ -25,7 +25,7 @@
#include <linux/types.h> #include <linux/types.h>
#include <linux/bitops.h> #include <linux/bitops.h>
#include <linux/interrupt.h> #include <linux/interrupt.h>
#include <linux/gpio.h> #include <linux/gpio/driver.h>
#include <linux/slab.h> #include <linux/slab.h>
#include <linux/acpi.h> #include <linux/acpi.h>
#include <linux/platform_device.h> #include <linux/platform_device.h>
......
...@@ -35,7 +35,7 @@ ...@@ -35,7 +35,7 @@
#include <linux/platform_device.h> #include <linux/platform_device.h>
#include <linux/mutex.h> #include <linux/mutex.h>
#include <linux/spi/max7301.h> #include <linux/spi/max7301.h>
#include <linux/gpio.h> #include <linux/gpio/driver.h>
#include <linux/slab.h> #include <linux/slab.h>
/* /*
......
...@@ -24,7 +24,7 @@ ...@@ -24,7 +24,7 @@
#include <linux/mutex.h> #include <linux/mutex.h>
#include <linux/spi/spi.h> #include <linux/spi/spi.h>
#include <linux/spi/mc33880.h> #include <linux/spi/mc33880.h>
#include <linux/gpio.h> #include <linux/gpio/driver.h>
#include <linux/slab.h> #include <linux/slab.h>
#include <linux/module.h> #include <linux/module.h>
......
...@@ -18,7 +18,7 @@ ...@@ -18,7 +18,7 @@
#include <linux/init.h> #include <linux/init.h>
#include <linux/slab.h> #include <linux/slab.h>
#include <linux/i2c.h> #include <linux/i2c.h>
#include <linux/gpio.h> #include <linux/gpio/driver.h>
#define GPIO_GROUP_NUM 2 #define GPIO_GROUP_NUM 2
#define GPIO_NUM_PER_GROUP 8 #define GPIO_NUM_PER_GROUP 8
......
...@@ -18,7 +18,7 @@ ...@@ -18,7 +18,7 @@
#include <linux/kernel.h> #include <linux/kernel.h>
#include <linux/slab.h> #include <linux/slab.h>
#include <linux/pci.h> #include <linux/pci.h>
#include <linux/gpio.h> #include <linux/gpio/driver.h>
#include <linux/interrupt.h> #include <linux/interrupt.h>
#include <linux/irq.h> #include <linux/irq.h>
......
...@@ -11,7 +11,7 @@ ...@@ -11,7 +11,7 @@
#include <linux/types.h> #include <linux/types.h>
#include <linux/platform_device.h> #include <linux/platform_device.h>
#include <linux/mutex.h> #include <linux/mutex.h>
#include <linux/gpio.h> #include <linux/gpio/driver.h>
#include <linux/of.h> #include <linux/of.h>
#include <linux/of_gpio.h> #include <linux/of_gpio.h>
#include <linux/io.h> #include <linux/io.h>
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment