[PATCH 08/17] ARM: pxa/raumfeld: add one-wire function

Russell King - ARM Linux linux at arm.linux.org.uk
Wed Nov 25 12:02:00 EST 2009


On Wed, Nov 25, 2009 at 11:42:22AM +0100, Daniel Mack wrote:
> +/**
> + * One-wire (W1 bus) support
> + */
> +static void w1_enable_external_pullup(int enable)
> +{
> +	gpio_set_value(mfp_to_gpio(GPIO_W1_PULLUP_ENABLE), enable);
> +	schedule_timeout(HZ);

Shouldn't you be using msleep() here?  schedule_timeout() can terminate
prematurely, particularly if there's a signal pending.  msleep() will
wait for the full timeout.



More information about the linux-arm-kernel mailing list