[PATCH v5] ARM: s3c244x: Fix mess with gpio {set, get}_pull callbacks

Vasily Khoruzhick anarsoul at gmail.com
Wed Dec 1 05:17:41 EST 2010


On Wednesday 01 December 2010 09:26:31 Kukjin Kim wrote:

> How about following...
> 
> +void __init s3c2440_map_io(void)
> +{
> +	s3c24xx_gpiocfg_default.set_pull = s3c_gpio_setpull_1up;
> +	s3c24xx_gpiocfg_default.get_pull = s3c_gpio_getpull_1up;
> +
> +	s3c244x_map_io();
> +}

What's difference except order?
 
> Yeah, however, in my opinion, need to add following during gpiolib_init().
> 
> @@ -222,6 +222,11 @@ static __init int s3c24xx_gpiolib_init(void)
>                 if (!chip->config)
>                         chip->config = &s3c24xx_gpiocfg_default;
> 
> +               if (!chip->config->set_pull)
> +                       chip->config->set_pull = s3c_gpio_setpull_1up;
> +               if (!chip->config->get_pull)
> +                       chip->config->get_pull = s3c_gpio_getpull_1up;
> +
>                 s3c_gpiolib_add(chip);
>         }

Pull callbacks are soc-specific, s3c24xx_gpiolib_init is common for all socs, 
so we can't do like this.

Btw, I've sent v6 version of patch, it still with empty line issues, should I 
resend v7 version or maintainers can fixup it at their side? :)

Regards
Vasily



More information about the linux-arm-kernel mailing list