ARM: SAMSUNG: Add the missed s3c_gpio_getpull() API
Subsystems (3)
PATCH 1/1 ARM: SAMSUNG: Add the missed s3c_gpio_getpull() API
From: Daein Moon <[email protected]>
This patch adds the s3c_gpio_getpull() API that has been missed in the plat-samsung/gpio-config.c and actullay there is its extern declaration in plat/gpio-cfg.h.
---
NOTE:
- already issued about this
arch/arm/plat-samsung/gpio-config.c | 19 +++++++++++++++++++ .../plat-samsung/include/plat/gpio-cfg-helpers.h | 6 ++++++ 2 files changed, 25 insertions(+), 0 deletions(-)
arch/arm/plat-samsung/gpio-config.c +19 -0
@@ -111,6 +111,25 @@ int s3c_gpio_setpull(unsigned int pin, s3c_gpio_pull_t pull) }EXPORT_SYMBOL (s3c_gpio_setpull); +s3c_gpio_pull_t s3c_gpio_getpull (unsigned int pin) +{ +struct s3c_gpio_chip *chip =s3c_gpiolib_getchip (pin); +unsigned long flags; +int offset; +u32 pup =0 ; + +if (chip) { + offset = pin - chip->chip.base; + +s3c_gpio_lock (chip, flags); + pup =s3c_gpio_do_getpull (chip, offset); +s3c_gpio_unlock (chip, flags); + } + +return (__force s3c_gpio_pull_t )pup; +} +EXPORT_SYMBOL (s3c_gpio_getpull); +#ifdef CONFIG_S3C_GPIO_CFG_S3C24XX int s3c_gpio_setcfg_s3c24xx_a (struct s3c_gpio_chip *chip,unsigned int off,unsigned int cfg)
arch/arm/plat-samsung/include/plat/gpio-cfg-helpers.h +6 -0
@@ -42,6 +42,12 @@ static inline int s3c_gpio_do_setpull(struct s3c_gpio_chip *chip,return (chip->config->set_pull)(chip, off, pull); } +static inline unsigned s3c_gpio_do_getpull (struct s3c_gpio_chip *chip, +unsigned int off) +{ +return (chip->config->get_pull)(chip, off); +} +/** * s3c_gpio_setcfg_s3c24xx - S3C24XX style GPIO configuration. * @chip: The gpio chip that is being configured.
Signature · 1 line
1.6.3.3
PATCH 1/1 ARM: SAMSUNG: Add the missed s3c_gpio_getpull() API
Hello.
Quoted 21 lines · Kukjin Kim
From: Daein Moon<[email protected]>
This patch adds the
s3c_gpio_getpull()API that has been missed in theplat-samsung/gpio-config.cand actullay there is its extern declaration inplat/gpio-cfg.h.Signed-off-by Daein Moon<[email protected]>Cc Ben Dooks<[email protected]>Signed-off-by Kukjin Kim<[email protected]>---
NOTE:
- already issued about thisarch/arm/plat-samsung/gpio-config.c | 19 +++++++++++++++++++ .../plat-samsung/include/plat/gpio-cfg-helpers.h | 6 ++++++ 2 files changed, 25 insertions(+), 0 deletions(-)arch/arm/plat-samsung/gpio-config.c +0
-0
[...]
arch/arm/plat-samsung/include/plat/gpio-cfg-helpers.h static inline int s3c_gpio_do_setpull(struct s3c_gpio_chip *chip, · line 48
Quoted 12 lines
arch/arm/plat-samsung/include/plat/gpio-cfg-helpers.h +4
-0@@ -42,6 +42,12 @@ static inline int s3c_gpio_do_setpull(struct s3c_gpio_chip *chip,return (chip->config->set_pull)(chip, off, pull); } +static inline unsigned s3c_gpio_do_getpull (struct s3c_gpio_chip *chip, +unsigned int off) +{ +return (chip->config->get_pull)(chip, off);
Parens are not necessary here.
arch/arm/plat-samsung/include/plat/gpio-cfg-helpers.h static inline int s3c_gpio_do_setpull(struct s3c_gpio_chip *chip, · line 50
Quoted 2 lines
arch/arm/plat-samsung/include/plat/gpio-cfg-helpers.h +2
-0+} +
WBR, Sergei
PATCH 1/1 ARM: SAMSUNG: Add the missed s3c_gpio_getpull() API
Quoted 3 lines · Sergei Shtylyov
Hello.
Hi,
Quoted 36 lines · Kukjin Kim
Quoted 7 lines
From: Daein Moon<[email protected]>
This patch adds the
s3c_gpio_getpull()API that has been missed in theplat-samsung/gpio-config.cand actullay there is its extern declaration inplat/gpio-cfg.h.Quoted 8 lines
Signed-off-by Daein Moon<[email protected]>Cc Ben Dooks<[email protected]>Signed-off-by Kukjin Kim<[email protected]>---
NOTE:
- already issued about thisarch/arm/plat-samsung/gpio-config.c | 19+++++++++++++++++++
arch/arm/plat-
Quoted 4 lines
.../plat-samsung/include/plat/gpio-cfg-helpers.h | 6 ++++++ 2 files changed, 25 insertions(+), 0 deletions(-)arch/arm/plat- renamed from arch/arm/plat-samsung/gpio-config.c +0
-0
samsung/gpio-config.cQuoted 3 lines
index 8a37211..b732b77 100644
arch/arm/plat-samsung/gpio-config.c +0
-0[...]
Review
Quoted 1 line
(quoted diff) +0
-0
b/arch/arm/plat-samsung/include/plat/gpio-cfg-helpers.harch/arm/plat-samsung/include/plat/gpio-cfg-helpers.h static inline int s3c_gpio_do_setpull(struct
Quoted 4 lines
index 3e21c75..c417f85 100644
arch/arm/plat-samsung/include/plat/gpio-cfg-helpers.h +0
-0@@ -42,6 +42,12 @@ static inline int s3c_gpio_do_setpull(struct
s3c_gpio_chip*chip,Quoted 3 lines
arch/arm/plat-samsung/include/plat/gpio-cfg-helpers.h +0
-0return (chip->config->set_pull)(chip, off, pull); }
Quoted 7 lines
arch/arm/plat-samsung/include/plat/gpio-cfg-helpers.h static inline int s3c_gpio_do_setpull(struct s3c_gpio_chip *chip, · line 48
Quoted 4 lines
arch/arm/plat-samsung/include/plat/gpio-cfg-helpers.h +4
-0+static inline unsigned s3c_gpio_do_getpull (struct s3c_gpio_chip *chip, +unsigned int off) +{ +return (chip->config->get_pull)(chip, off);Parens are not necessary here.
Thanks for your pointing out :-)
Will fix it.
Thanks.
Best regards,
Kgene.
--
Kukjin Kim <[email protected]>, Senior Engineer, SW Solution Development Team, Samsung Electronics Co., Ltd.
PATCH 1/1 ARM: SAMSUNG: Add the missed s3c_gpio_getpull() API
In reply to Kukjin KimQuoted 22 lines · Kukjin Kim
From: Daein Moon <[email protected]>
This patch adds the
s3c_gpio_getpull()API that has been missed in theplat-samsung/gpio-config.cand actullay there is its extern declaration inplat/gpio-cfg.h.Signed-off-by Daein Moon <[email protected]>Cc Ben Dooks <[email protected]>Signed-off-by Kukjin Kim <[email protected]>---
NOTE:
- already issued about thisarch/arm/plat-samsung/gpio-config.c | 19 +++++++++++++++++++ .../plat-samsung/include/plat/gpio-cfg-helpers.h | 6 ++++++ 2 files changed, 25 insertions(+), 0 deletions(-)arch/arm/plat-samsung/gpio-config.c +0
-0
arch/arm/plat-samsung/gpio-config.c int s3c_gpio_setpull(unsigned int pin, s3c_gpio_pull_t pull) · line 119
Quoted 9 lines
arch/arm/plat-samsung/gpio-config.c +6
-0@@ -111,6 +111,25 @@ int s3c_gpio_setpull(unsigned int pin, s3c_gpio_pull_t pull) }EXPORT_SYMBOL (s3c_gpio_setpull); +s3c_gpio_pull_t s3c_gpio_getpull (unsigned int pin) +{ +struct s3c_gpio_chip *chip =s3c_gpiolib_getchip (pin); +unsigned long flags; +int offset; +u32 pup =0 ;
would the result of s3c_gpio_do_getpull() should be a s3c_gpio_pull_t?
Quoted 11 lines
arch/arm/plat-samsung/gpio-config.c +11
-0+if (chip) { + offset = pin - chip->chip.base; + +s3c_gpio_lock (chip, flags); + pup =s3c_gpio_do_getpull (chip, offset); +s3c_gpio_unlock (chip, flags); + } + +return (__force s3c_gpio_pull_t )pup; +} +EXPORT_SYMBOL (s3c_gpio_getpull);
PATCH 1/1 ARM: SAMSUNG: Add the missed s3c_gpio_getpull() API
Quoted 20 lines · Ben Dooks
Quoted 6 lines · Kukjin Kim
From: Daein Moon <[email protected]>
This patch adds the
s3c_gpio_getpull()API that has been missed in theplat-samsung/gpio-config.cand actullay there is its extern declaration inplat/gpio-cfg.h.Quoted 8 lines
Signed-off-by Daein Moon <[email protected]>Cc Ben Dooks <[email protected]>Signed-off-by Kukjin Kim <[email protected]>---
NOTE:
- already issued about thisarch/arm/plat-samsung/gpio-config.c | 19+++++++++++++++++++
Quoted 3 lines
.../plat-samsung/include/plat/gpio-cfg-helpers.h | 6 ++++++ 2 files changed, 25 insertions(+), 0 deletions(-)
Quoted 6 lines
arch/arm/plat-
Quoted 1 line
arch/arm/plat- renamed from arch/arm/plat-samsung/gpio-config.c +0
-0
samsung/gpio-config.carch/arm/plat-samsung/gpio-config.c int s3c_gpio_setpull(unsigned int pin,
Quoted 4 lines
index 8a37211..b732b77 100644
arch/arm/plat-samsung/gpio-config.c +0
-0@@ -111,6 +111,25 @@ int s3c_gpio_setpull(unsigned int pin,
s3c_gpio_pull_t
Quoted 4 lines
pull)
Quoted 3 lines
arch/arm/plat-samsung/gpio-config.c +0
-0}EXPORT_SYMBOL (s3c_gpio_setpull);
Quoted 9 lines
arch/arm/plat-samsung/gpio-config.c int s3c_gpio_setpull(unsigned int pin, s3c_gpio_pull_t pull) · line 119
Quoted 6 lines
arch/arm/plat-samsung/gpio-config.c +6
-0+s3c_gpio_pull_t s3c_gpio_getpull (unsigned int pin) +{ +struct s3c_gpio_chip *chip =s3c_gpiolib_getchip (pin); +unsigned long flags; +int offset; +u32 pup =0 ;would the result of
s3c_gpio_do_getpull()should be as3c_gpio_pull_t?
Yes, righit.
Mr. Moon,
Could you please update your patch as per Ben's comment?
Quoted 11 lines
arch/arm/plat-samsung/gpio-config.c int s3c_gpio_setpull(unsigned int pin, s3c_gpio_pull_t pull) · line 131
Quoted 11 lines
arch/arm/plat-samsung/gpio-config.c +11
-0+if (chip) { + offset = pin - chip->chip.base; + +s3c_gpio_lock (chip, flags); + pup =s3c_gpio_do_getpull (chip, offset); +s3c_gpio_unlock (chip, flags); + } + +return (__force s3c_gpio_pull_t )pup; +} +EXPORT_SYMBOL (s3c_gpio_getpull);
Thanks.
Best regards,
Kgene.
--
Kukjin Kim <[email protected]>, Senior Engineer, SW Solution Development Team, Samsung Electronics Co., Ltd.