[U-Boot] [PATCH 2/4] s5p: gpio: add implementation of dm_gpio_set_pull()

Przemyslaw Marczak p.marczak at samsung.com
Tue Feb 17 14:09:02 CET 2015


This commit adds implementation of driver model gpio pull
setting to s5p gpio driver.

Signed-off-by: Przemyslaw Marczak <p.marczak at samsung.com>
Cc: Simon Glass <sjg at chromium.org>
Cc: Minkyu Kang <mk7.kang at samsung.com>
---
 drivers/gpio/s5p_gpio.c | 11 +++++++++++
 1 file changed, 11 insertions(+)

diff --git a/drivers/gpio/s5p_gpio.c b/drivers/gpio/s5p_gpio.c
index 0a245ba..5de96bf 100644
--- a/drivers/gpio/s5p_gpio.c
+++ b/drivers/gpio/s5p_gpio.c
@@ -231,6 +231,16 @@ static int exynos_gpio_set_value(struct udevice *dev, unsigned offset,
 
 	return 0;
 }
+
+static int exynos_gpio_set_pull(struct udevice *dev, unsigned offset,
+				int pull)
+{
+	struct exynos_bank_info *state = dev_get_priv(dev);
+
+	s5p_gpio_set_pull(state->bank, offset, pull);
+
+	return 0;
+}
 #endif /* nCONFIG_SPL_BUILD */
 
 /*
@@ -290,6 +300,7 @@ static const struct dm_gpio_ops gpio_exynos_ops = {
 	.direction_output	= exynos_gpio_direction_output,
 	.get_value		= exynos_gpio_get_value,
 	.set_value		= exynos_gpio_set_value,
+	.set_pull		= exynos_gpio_set_pull,
 	.get_function		= exynos_gpio_get_function,
 	.xlate			= exynos_gpio_xlate,
 };
-- 
1.9.1



More information about the U-Boot mailing list