diff options
Diffstat (limited to 'drivers/gpio')
-rw-r--r-- | drivers/gpio/74x164_gpio.c | 1 | ||||
-rw-r--r-- | drivers/gpio/adi_gpio2.c | 1 | ||||
-rw-r--r-- | drivers/gpio/at91_gpio.c | 1 | ||||
-rw-r--r-- | drivers/gpio/atmel_pio4.c | 1 | ||||
-rw-r--r-- | drivers/gpio/da8xx_gpio.c | 1 | ||||
-rw-r--r-- | drivers/gpio/dwapb_gpio.c | 2 | ||||
-rw-r--r-- | drivers/gpio/gpio-rcar.c | 4 | ||||
-rw-r--r-- | drivers/gpio/gpio-uclass.c | 8 | ||||
-rw-r--r-- | drivers/gpio/kona_gpio.c | 1 | ||||
-rw-r--r-- | drivers/gpio/mpc83xx_gpio.c | 1 | ||||
-rw-r--r-- | drivers/gpio/mscc_sgpio.c | 2 | ||||
-rw-r--r-- | drivers/gpio/mvgpio.c | 1 | ||||
-rw-r--r-- | drivers/gpio/mxs_gpio.c | 1 | ||||
-rw-r--r-- | drivers/gpio/pca953x_gpio.c | 1 | ||||
-rw-r--r-- | drivers/gpio/pca9698.c | 1 | ||||
-rw-r--r-- | drivers/gpio/sh_pfc.c | 1 | ||||
-rw-r--r-- | drivers/gpio/spear_gpio.c | 1 | ||||
-rw-r--r-- | drivers/gpio/stm32_gpio.c | 1 |
18 files changed, 25 insertions, 5 deletions
diff --git a/drivers/gpio/74x164_gpio.c b/drivers/gpio/74x164_gpio.c index dcb1c1b369..64717a6780 100644 --- a/drivers/gpio/74x164_gpio.c +++ b/drivers/gpio/74x164_gpio.c @@ -15,6 +15,7 @@ #include <malloc.h> #include <asm/gpio.h> #include <asm/io.h> +#include <dm/device_compat.h> #include <dt-bindings/gpio/gpio.h> #include <spi.h> diff --git a/drivers/gpio/adi_gpio2.c b/drivers/gpio/adi_gpio2.c index 1012f2d8eb..9d293b6994 100644 --- a/drivers/gpio/adi_gpio2.c +++ b/drivers/gpio/adi_gpio2.c @@ -8,6 +8,7 @@ */ #include <common.h> +#include <malloc.h> #include <linux/errno.h> #include <asm/gpio.h> diff --git a/drivers/gpio/at91_gpio.c b/drivers/gpio/at91_gpio.c index 5ea3e77b2d..3621cf2408 100644 --- a/drivers/gpio/at91_gpio.c +++ b/drivers/gpio/at91_gpio.c @@ -11,6 +11,7 @@ #include <common.h> #include <clk.h> #include <dm.h> +#include <malloc.h> #include <asm/io.h> #include <linux/sizes.h> #include <asm/gpio.h> diff --git a/drivers/gpio/atmel_pio4.c b/drivers/gpio/atmel_pio4.c index 8e6f32de1f..a3f5e7a2e0 100644 --- a/drivers/gpio/atmel_pio4.c +++ b/drivers/gpio/atmel_pio4.c @@ -9,6 +9,7 @@ #include <clk.h> #include <dm.h> #include <fdtdec.h> +#include <malloc.h> #include <asm/arch/hardware.h> #include <asm/gpio.h> #include <mach/gpio.h> diff --git a/drivers/gpio/da8xx_gpio.c b/drivers/gpio/da8xx_gpio.c index ac88f0ca8d..0d0e9d2254 100644 --- a/drivers/gpio/da8xx_gpio.c +++ b/drivers/gpio/da8xx_gpio.c @@ -9,6 +9,7 @@ #include <common.h> #include <dm.h> #include <fdtdec.h> +#include <malloc.h> #include <asm/io.h> #include <asm/gpio.h> #include <dt-bindings/gpio/gpio.h> diff --git a/drivers/gpio/dwapb_gpio.c b/drivers/gpio/dwapb_gpio.c index 2eb1547b4f..e3439eebb5 100644 --- a/drivers/gpio/dwapb_gpio.c +++ b/drivers/gpio/dwapb_gpio.c @@ -12,6 +12,8 @@ #include <asm/io.h> #include <dm.h> #include <dm/device-internal.h> +#include <dm/device_compat.h> +#include <dm/devres.h> #include <dm/lists.h> #include <dm/root.h> #include <errno.h> diff --git a/drivers/gpio/gpio-rcar.c b/drivers/gpio/gpio-rcar.c index 594e0a470a..9dc4cd6042 100644 --- a/drivers/gpio/gpio-rcar.c +++ b/drivers/gpio/gpio-rcar.c @@ -6,6 +6,8 @@ #include <common.h> #include <clk.h> #include <dm.h> +#include <malloc.h> +#include <dm/device_compat.h> #include <dm/pinctrl.h> #include <errno.h> #include <asm/gpio.h> @@ -128,7 +130,7 @@ static int rcar_gpio_free(struct udevice *dev, unsigned offset) static const struct dm_gpio_ops rcar_gpio_ops = { .request = rcar_gpio_request, - .free = rcar_gpio_free, + .rfree = rcar_gpio_free, .direction_input = rcar_gpio_direction_input, .direction_output = rcar_gpio_direction_output, .get_value = rcar_gpio_get_value, diff --git a/drivers/gpio/gpio-uclass.c b/drivers/gpio/gpio-uclass.c index 90fbed455b..0a22441d38 100644 --- a/drivers/gpio/gpio-uclass.c +++ b/drivers/gpio/gpio-uclass.c @@ -364,8 +364,8 @@ int _dm_gpio_free(struct udevice *dev, uint offset) uc_priv = dev_get_uclass_priv(dev); if (!uc_priv->name[offset]) return -ENXIO; - if (gpio_get_ops(dev)->free) { - ret = gpio_get_ops(dev)->free(dev, offset); + if (gpio_get_ops(dev)->rfree) { + ret = gpio_get_ops(dev)->rfree(dev, offset); if (ret) return ret; } @@ -1043,8 +1043,8 @@ static int gpio_post_bind(struct udevice *dev) if (!reloc_done) { if (ops->request) ops->request += gd->reloc_off; - if (ops->free) - ops->free += gd->reloc_off; + if (ops->rfree) + ops->rfree += gd->reloc_off; if (ops->direction_input) ops->direction_input += gd->reloc_off; if (ops->direction_output) diff --git a/drivers/gpio/kona_gpio.c b/drivers/gpio/kona_gpio.c index 912a4cac59..29791882a3 100644 --- a/drivers/gpio/kona_gpio.c +++ b/drivers/gpio/kona_gpio.c @@ -4,6 +4,7 @@ */ #include <common.h> +#include <malloc.h> #include <asm/io.h> #include <asm/arch/sysmap.h> diff --git a/drivers/gpio/mpc83xx_gpio.c b/drivers/gpio/mpc83xx_gpio.c index dcd78e7e88..276a3b350d 100644 --- a/drivers/gpio/mpc83xx_gpio.c +++ b/drivers/gpio/mpc83xx_gpio.c @@ -4,6 +4,7 @@ */ #include <common.h> +#include <malloc.h> #include <mpc83xx.h> #include <asm/gpio.h> #include <asm/io.h> diff --git a/drivers/gpio/mscc_sgpio.c b/drivers/gpio/mscc_sgpio.c index c899454ec4..c65ca81728 100644 --- a/drivers/gpio/mscc_sgpio.c +++ b/drivers/gpio/mscc_sgpio.c @@ -13,6 +13,8 @@ #include <asm/io.h> #include <errno.h> #include <clk.h> +#include <dm/device_compat.h> +#include <linux/err.h> #define MSCC_SGPIOS_PER_BANK 32 #define MSCC_SGPIO_BANK_DEPTH 4 diff --git a/drivers/gpio/mvgpio.c b/drivers/gpio/mvgpio.c index ea2f689d60..12e7197daf 100644 --- a/drivers/gpio/mvgpio.c +++ b/drivers/gpio/mvgpio.c @@ -9,6 +9,7 @@ */ #include <common.h> +#include <malloc.h> #include <asm/io.h> #include <linux/errno.h> #include "mvgpio.h" diff --git a/drivers/gpio/mxs_gpio.c b/drivers/gpio/mxs_gpio.c index 77778e9ce5..405e9ac135 100644 --- a/drivers/gpio/mxs_gpio.c +++ b/drivers/gpio/mxs_gpio.c @@ -7,6 +7,7 @@ */ #include <common.h> +#include <malloc.h> #include <linux/errno.h> #include <asm/io.h> #include <asm/arch/iomux.h> diff --git a/drivers/gpio/pca953x_gpio.c b/drivers/gpio/pca953x_gpio.c index 5c2944067b..d06b834a3b 100644 --- a/drivers/gpio/pca953x_gpio.c +++ b/drivers/gpio/pca953x_gpio.c @@ -26,6 +26,7 @@ #include <malloc.h> #include <asm/gpio.h> #include <asm/io.h> +#include <dm/device_compat.h> #include <dt-bindings/gpio/gpio.h> #define PCA953X_INPUT 0 diff --git a/drivers/gpio/pca9698.c b/drivers/gpio/pca9698.c index ab0c4c1b97..11274c7810 100644 --- a/drivers/gpio/pca9698.c +++ b/drivers/gpio/pca9698.c @@ -10,6 +10,7 @@ #include <common.h> #include <i2c.h> +#include <malloc.h> #include <linux/errno.h> #include <pca9698.h> diff --git a/drivers/gpio/sh_pfc.c b/drivers/gpio/sh_pfc.c index ad8da9ef28..6320a6280d 100644 --- a/drivers/gpio/sh_pfc.c +++ b/drivers/gpio/sh_pfc.c @@ -10,6 +10,7 @@ */ #include <common.h> +#include <malloc.h> #include <asm/bitops.h> #include <asm/io.h> #include <sh_pfc.h> diff --git a/drivers/gpio/spear_gpio.c b/drivers/gpio/spear_gpio.c index 525aa3b9ac..4e4cd12545 100644 --- a/drivers/gpio/spear_gpio.c +++ b/drivers/gpio/spear_gpio.c @@ -8,6 +8,7 @@ */ #include <common.h> +#include <malloc.h> #include <asm/arch/hardware.h> #include <asm/gpio.h> #include <asm/io.h> diff --git a/drivers/gpio/stm32_gpio.c b/drivers/gpio/stm32_gpio.c index 302a434947..f55f834e7d 100644 --- a/drivers/gpio/stm32_gpio.c +++ b/drivers/gpio/stm32_gpio.c @@ -12,6 +12,7 @@ #include <asm/arch/stm32.h> #include <asm/gpio.h> #include <asm/io.h> +#include <dm/device_compat.h> #include <linux/errno.h> #include <linux/io.h> |