diff mbox

[1/3,V2] S5P: GPIO: Add generic pin numbering API's

Message ID 1358862489-28818-2-git-send-email-rajeshwari.s@samsung.com
State New
Headers show

Commit Message

Rajeshwari Shinde Jan. 22, 2013, 1:48 p.m. UTC
This patch adds API's to set config, drive and pull factor in
gpio pin mumbering feature.

Signed-off-by: Rajeshawari Shinde <rajeshwari.s@samsung.com>
---
Changes in V2:
	- none.
 drivers/gpio/s5p_gpio.c |   18 ++++++++++++++++++
 1 files changed, 18 insertions(+), 0 deletions(-)

Comments

Simon Glass Jan. 26, 2013, 7:48 p.m. UTC | #1
Hi Rajeshwari,

On Wed, Jan 23, 2013 at 2:48 AM, Rajeshwari Shinde
<rajeshwari.s@samsung.com> wrote:
> This patch adds API's to set config, drive and pull factor in
> gpio pin mumbering feature.

nit: numbering

>
> Signed-off-by: Rajeshawari Shinde <rajeshwari.s@samsung.com>

Acked-by: Simon Glass <sjg@chromium.org>

> ---
> Changes in V2:
>         - none.
>  drivers/gpio/s5p_gpio.c |   18 ++++++++++++++++++
>  1 files changed, 18 insertions(+), 0 deletions(-)
>
> diff --git a/drivers/gpio/s5p_gpio.c b/drivers/gpio/s5p_gpio.c
> index 656bf4a..a53bdca 100644
> --- a/drivers/gpio/s5p_gpio.c
> +++ b/drivers/gpio/s5p_gpio.c
> @@ -196,3 +196,21 @@ int gpio_set_value(unsigned gpio, int value)
>
>         return 0;
>  }
> +
> +void gpio_set_pull(int gpio, int mode)
> +{
> +       s5p_gpio_set_pull(s5p_gpio_get_bank(gpio),
> +                       s5p_gpio_get_pin(gpio), mode);
> +}
> +
> +void gpio_set_drv(int gpio, int mode)
> +{
> +       s5p_gpio_set_drv(s5p_gpio_get_bank(gpio),
> +                       s5p_gpio_get_pin(gpio), mode);
> +}
> +
> +void gpio_cfg_pin(int gpio, int cfg)
> +{
> +       s5p_gpio_cfg_pin(s5p_gpio_get_bank(gpio),
> +                       s5p_gpio_get_pin(gpio), cfg);
> +}
> --
> 1.7.4.4
>
diff mbox

Patch

diff --git a/drivers/gpio/s5p_gpio.c b/drivers/gpio/s5p_gpio.c
index 656bf4a..a53bdca 100644
--- a/drivers/gpio/s5p_gpio.c
+++ b/drivers/gpio/s5p_gpio.c
@@ -196,3 +196,21 @@  int gpio_set_value(unsigned gpio, int value)
 
 	return 0;
 }
+
+void gpio_set_pull(int gpio, int mode)
+{
+	s5p_gpio_set_pull(s5p_gpio_get_bank(gpio),
+			s5p_gpio_get_pin(gpio), mode);
+}
+
+void gpio_set_drv(int gpio, int mode)
+{
+	s5p_gpio_set_drv(s5p_gpio_get_bank(gpio),
+			s5p_gpio_get_pin(gpio), mode);
+}
+
+void gpio_cfg_pin(int gpio, int cfg)
+{
+	s5p_gpio_cfg_pin(s5p_gpio_get_bank(gpio),
+			s5p_gpio_get_pin(gpio), cfg);
+}