From mboxrd@z Thu Jan 1 00:00:00 1970 From: Przemyslaw Marczak Date: Tue, 17 Feb 2015 14:09:02 +0100 Subject: [U-Boot] [PATCH 2/4] s5p: gpio: add implementation of dm_gpio_set_pull() In-Reply-To: <1424178544-28632-1-git-send-email-p.marczak@samsung.com> References: <1424178544-28632-1-git-send-email-p.marczak@samsung.com> Message-ID: <1424178544-28632-3-git-send-email-p.marczak@samsung.com> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de This commit adds implementation of driver model gpio pull setting to s5p gpio driver. Signed-off-by: Przemyslaw Marczak Cc: Simon Glass Cc: Minkyu Kang --- 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