linux-arm-kernel.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
* missing definition of 's3c_gpio_getpull' function in 'plat-samsung'
@ 2010-10-08  6:07 Daein Moon
  2010-10-08  6:22 ` Kukjin Kim
  2010-10-08  6:50 ` Kukjin Kim
  0 siblings, 2 replies; 3+ messages in thread
From: Daein Moon @ 2010-10-08  6:07 UTC (permalink / raw)
  To: linux-arm-kernel

Hi Ben Dooks and Kukjin,

I found an issue about s3c_gpio_getpull API.

The 'plat-samsung' provides 's3c_gpio_setpull' and 's3c_gpio_getpull'
to set and get pull-{none|up|down} of GPIO. But there is no
's3c_gpio_getpull' definition in 'arch/arm/plat-samsung/gpio-config.c',
and there is only declaration in the corresponding header file.

's3c_gpio_getpull' isn't supported/used. So if providing this api, its
definition should be inserted.

Otherwise, code that is used to provide s3c_gpio_getpull including
following code should be removed.

arch/arm/plat-samsung/include/plat/gpio-cfg.h:
	extern s3c_gpio_pull_t s3c_gpio_getpull(unsigned int pin);

arch/arm/mach-{s3c*|s5p*}/gpiolib.c:
        .get_pull       = s3c_gpio_getpull_updown,


What do you think about that?

Best Regards,
Daein Moon

^ permalink raw reply	[flat|nested] 3+ messages in thread

* missing definition of 's3c_gpio_getpull' function in 'plat-samsung'
  2010-10-08  6:07 missing definition of 's3c_gpio_getpull' function in 'plat-samsung' Daein Moon
@ 2010-10-08  6:22 ` Kukjin Kim
  2010-10-08  6:50 ` Kukjin Kim
  1 sibling, 0 replies; 3+ messages in thread
From: Kukjin Kim @ 2010-10-08  6:22 UTC (permalink / raw)
  To: linux-arm-kernel

Daein Moon wrote:
> 
> Hi Ben Dooks and Kukjin,
> 
Hi,

> I found an issue about s3c_gpio_getpull API.
> 
> The 'plat-samsung' provides 's3c_gpio_setpull' and 's3c_gpio_getpull'
> to set and get pull-{none|up|down} of GPIO. But there is no
> 's3c_gpio_getpull' definition in 'arch/arm/plat-samsung/gpio-config.c',
> and there is only declaration in the corresponding header file.
> 
> 's3c_gpio_getpull' isn't supported/used. So if providing this api, its
> definition should be inserted.
> 
> Otherwise, code that is used to provide s3c_gpio_getpull including
> following code should be removed.
> 
> arch/arm/plat-samsung/include/plat/gpio-cfg.h:
> 	extern s3c_gpio_pull_t s3c_gpio_getpull(unsigned int pin);
> 
> arch/arm/mach-{s3c*|s5p*}/gpiolib.c:
>         .get_pull       = s3c_gpio_getpull_updown,
> 
> 
> What do you think about that?:
> 

Hmm...
I found s3c_gpio_getpull_updown() in plat-samsung/gpio-config.c like below.

220 s3c_gpio_pull_t s3c_gpio_getpull_updown(struct s3c_gpio_chip *chip,
221                                         unsigned int off)
222 {
223         void __iomem *reg = chip->base + 0x08;
224         int shift = off * 2;
225         u32 pup = __raw_readl(reg);
226
227         pup >>= shift;
228         pup &= 0x3;
229         return (__force s3c_gpio_pull_t)pup;
230 }

Thanks.

Best regards,
Kgene.
--
Kukjin Kim <kgene.kim@samsung.com>, Senior Engineer,
SW Solution Development Team, Samsung Electronics Co., Ltd.

^ permalink raw reply	[flat|nested] 3+ messages in thread

* missing definition of 's3c_gpio_getpull' function in 'plat-samsung'
  2010-10-08  6:07 missing definition of 's3c_gpio_getpull' function in 'plat-samsung' Daein Moon
  2010-10-08  6:22 ` Kukjin Kim
@ 2010-10-08  6:50 ` Kukjin Kim
  1 sibling, 0 replies; 3+ messages in thread
From: Kukjin Kim @ 2010-10-08  6:50 UTC (permalink / raw)
  To: linux-arm-kernel

Daein Moon wrote:
> 
> Hi Ben Dooks and Kukjin,
> 
> I found an issue about s3c_gpio_getpull API.
> 
> The 'plat-samsung' provides 's3c_gpio_setpull' and 's3c_gpio_getpull'
> to set and get pull-{none|up|down} of GPIO. But there is no
> 's3c_gpio_getpull' definition in 'arch/arm/plat-samsung/gpio-config.c',
> and there is only declaration in the corresponding header file.
> 
> 's3c_gpio_getpull' isn't supported/used. So if providing this api, its
> definition should be inserted.
> 
> Otherwise, code that is used to provide s3c_gpio_getpull including
> following code should be removed.
> 
> arch/arm/plat-samsung/include/plat/gpio-cfg.h:
> 	extern s3c_gpio_pull_t s3c_gpio_getpull(unsigned int pin);
> 
> arch/arm/mach-{s3c*|s5p*}/gpiolib.c:
>         .get_pull       = s3c_gpio_getpull_updown,
> 
> 
> What do you think about that?
> 
Oh...you mean s3c_gpio_getpull()?
Yes right..there is no it in gpio-config.c..maybe missed.

Anyway...in this case, I think to add missed function is better.

Thanks.

Best regards,
Kgene.
--
Kukjin Kim <kgene.kim@samsung.com>, Senior Engineer,
SW Solution Development Team, Samsung Electronics Co., Ltd.

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2010-10-08  6:50 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-10-08  6:07 missing definition of 's3c_gpio_getpull' function in 'plat-samsung' Daein Moon
2010-10-08  6:22 ` Kukjin Kim
2010-10-08  6:50 ` Kukjin Kim

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).