Re: [PATCH/RFC v9 08/19] leds: Add driver for AAT1290 current regulator

From: Sakari Ailus
Date: Thu Dec 11 2014 - 10:53:01 EST


Hi Jacek,

On Thu, Dec 11, 2014 at 04:34:45PM +0100, Jacek Anaszewski wrote:
> >>+
> >>+ /* write address */
> >>+ for (i = 0; i < addr; ++i) {
> >>+ udelay(AAT1290_EN_SET_TICK_TIME_US);
> >>+ gpio_set_value(led->en_set_gpio, 0);
> >>+ udelay(AAT1290_EN_SET_TICK_TIME_US);
> >>+ gpio_set_value(led->en_set_gpio, 1);
> >>+ }
> >
> >This is a very interesting approach to bus implementation. It's a bit like
> >pulse dial on POTS. :-)
> >
> >>+
> >>+ udelay(AAT1290_LATCH_TIME_US);
> >
> >How precise does this need to be? Could you use usleep_range() instead?
>
> This is minimal required time, so usleep_range could be used here,
> which would however make the delay of setting the torch brightness
> even more unstable.

True as well. Half a ms isn't that long but then again torch typically isn't
time critical either. I'd use usleep_range(), up to you.

--
Regards,

Sakari Ailus
e-mail: sakari.ailus@xxxxxx XMPP: sailus@xxxxxxxxxxxxxx
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/