Re: [PATCH v2 0/3] leds: blink resolution improvements

2015-05-11 Thread Pavel Machek
> >>- You will set the delay in ms units. For example for 100us you'll > >>write 0.1. IMHO it is counter-intuitive: people will make a mistake > >>and try 0.0001 instead, wrongly assuming that this is in seconds. > >>And nanoseconds should then better be removed, as writing > >>nanosecond delay wil

Re: [PATCH v2 0/3] leds: blink resolution improvements

2015-05-06 Thread Jacek Anaszewski
On 05/05/2015 03:02 PM, Stas Sergeev wrote: 05.05.2015 11:22, Jacek Anaszewski пишет: On 05/04/2015 07:20 PM, Stas Sergeev wrote: 04.05.2015 18:22, Jacek Anaszewski пишет: On 05/04/2015 02:12 PM, Stas Sergeev wrote: Only under that condition: --- if (led_cdev->blink_delay_on || led_cdev->blin

Re: [PATCH v2 0/3] leds: blink resolution improvements

2015-05-05 Thread Stas Sergeev
05.05.2015 11:22, Jacek Anaszewski пишет: On 05/04/2015 07:20 PM, Stas Sergeev wrote: 04.05.2015 18:22, Jacek Anaszewski пишет: On 05/04/2015 02:12 PM, Stas Sergeev wrote: Only under that condition: --- if (led_cdev->blink_delay_on || led_cdev->blink_delay_off) { led_cdev->delayed_set

Re: [PATCH v2 0/3] leds: blink resolution improvements

2015-05-05 Thread Jacek Anaszewski
On 05/04/2015 07:20 PM, Stas Sergeev wrote: 04.05.2015 18:22, Jacek Anaszewski пишет: On 05/04/2015 02:12 PM, Stas Sergeev wrote: Only under that condition: --- if (led_cdev->blink_delay_on || led_cdev->blink_delay_off) { led_cdev->delayed_set_value = brightness; schedule_work

Re: [PATCH v2 0/3] leds: blink resolution improvements

2015-05-04 Thread Stas Sergeev
04.05.2015 18:22, Jacek Anaszewski пишет: On 05/04/2015 02:12 PM, Stas Sergeev wrote: Only under that condition: --- if (led_cdev->blink_delay_on || led_cdev->blink_delay_off) { led_cdev->delayed_set_value = brightness; schedule_work(&led_cdev->set_brightness_work); --- But th

Re: [PATCH v2 0/3] leds: blink resolution improvements

2015-05-04 Thread Jacek Anaszewski
On 05/04/2015 02:12 PM, Stas Sergeev wrote: 04.05.2015 10:55, Jacek Anaszewski пишет: So it seems the problem is already solved on the per-driver basis. I don't have leds-aat1290 driver, it is probably not in the kernel. It is currently on linux-next/master branch. So that driver is not in lin

Re: [PATCH v2 0/3] leds: blink resolution improvements

2015-05-04 Thread Stas Sergeev
04.05.2015 10:55, Jacek Anaszewski пишет: So it seems the problem is already solved on the per-driver basis. I don't have leds-aat1290 driver, it is probably not in the kernel. It is currently on linux-next/master branch. So that driver is not in line with others. It is likely forgetting to u

Re: [PATCH v2 0/3] leds: blink resolution improvements

2015-05-04 Thread Jacek Anaszewski
On 04/30/2015 07:11 PM, Stas Sergeev wrote: 28.04.2015 15:58, Jacek Anaszewski пишет: I tried it with Samsung M0 board and my leds-aat1290 driver. It didn't work well. And for small delay intervals it will not have a chance to work reliably with all drivers, especially the ones which use mutex i

Re: [PATCH v2 0/3] leds: blink resolution improvements

2015-05-03 Thread Stas Sergeev
03.05.2015 13:34, Pavel Machek пишет: What about simply "echo 0.001 > delay_on"? This is possible. But please consider the following reservations: - There is already 2 files, so you are not going to write settings atomically anyway. When resolution changes, it might be better to just reset to th

Re: [PATCH v2 0/3] leds: blink resolution improvements

2015-05-03 Thread Pavel Machek
> >What about simply "echo 0.001 > delay_on"? > This is possible. > But please consider the following reservations: > - There is already 2 files, so you are not going to write settings > atomically anyway. When resolution changes, it might be better > to just reset to the sane defaults (not in my

Re: [PATCH v2 0/3] leds: blink resolution improvements

2015-04-30 Thread Stas Sergeev
30.04.2015 20:30, Pavel Machek пишет: For the timer trigger I would pretty much like my approach to stay. The reason is that the PWM I need to do, is not strictly a PWM - it needs the ON period in range of tens or hundreds of milliseconds, while the OFF period is in a couple of usecs (or vice-ver

Re: [PATCH v2 0/3] leds: blink resolution improvements

2015-04-30 Thread Pavel Machek
Hi! > >>The following patches improve the precision of led > >>timer trigger and add the delay unit control. > >>That allows to make PWM brightness control with timer > >>trigger. > >Are you sure that is good idea? Doing LED pwm with main cpu is quite harsh... > Do you remember the pc-speaker driv

Re: [PATCH v2 0/3] leds: blink resolution improvements

2015-04-30 Thread Stas Sergeev
28.04.2015 15:58, Jacek Anaszewski пишет: >>> I tried it with Samsung M0 board and >>> my leds-aat1290 driver. It didn't work well. And for small delay >>> intervals it will not have a chance to work reliably with all drivers, >>> especially the ones which use mutex in their brightness_set op, >>>

Re: [PATCH v2 0/3] leds: blink resolution improvements

2015-04-29 Thread Jacek Anaszewski
On 04/29/2015 01:26 PM, Stas Sergeev wrote: 28.04.2015 15:58, Jacek Anaszewski пишет: On 04/28/2015 12:12 PM, Stas Sergeev wrote: 28.04.2015 11:57, Jacek Anaszewski пишет: Hi Stas, Have you tested it? Of course I did. Works with gpio driver and provides up to 10usec precision on armada-xp bo

Re: [PATCH v2 0/3] leds: blink resolution improvements

2015-04-29 Thread Jacek Anaszewski
On 04/28/2015 03:26 PM, Stas Sergeev wrote: 28.04.2015 15:58, Jacek Anaszewski пишет: On 04/28/2015 12:12 PM, Stas Sergeev wrote: 28.04.2015 11:57, Jacek Anaszewski пишет: Hi Stas, Have you tested it? Of course I did. Works with gpio driver and provides up to 10usec precision on armada-xp bo

Re: [PATCH v2 0/3] leds: blink resolution improvements

2015-04-29 Thread Stas Sergeev
28.04.2015 15:58, Jacek Anaszewski пишет: > On 04/28/2015 12:12 PM, Stas Sergeev wrote: >> 28.04.2015 11:57, Jacek Anaszewski пишет: >>> Hi Stas, >>> >>> Have you tested it? >> Of course I did. >> Works with gpio driver and provides up to 10usec precision on >> armada-xp board. >> This is 1000 time

Re: [PATCH v2 0/3] leds: blink resolution improvements

2015-04-28 Thread Stas Sergeev
28.04.2015 15:58, Jacek Anaszewski пишет: > On 04/28/2015 12:12 PM, Stas Sergeev wrote: >> 28.04.2015 11:57, Jacek Anaszewski пишет: >>> Hi Stas, >>> >>> Have you tested it? >> Of course I did. >> Works with gpio driver and provides up to 10usec precision on >> armada-xp board. >> This is 1000 time

Re: [PATCH v2 0/3] leds: blink resolution improvements

2015-04-28 Thread Jacek Anaszewski
On 04/28/2015 12:12 PM, Stas Sergeev wrote: 28.04.2015 11:57, Jacek Anaszewski пишет: Hi Stas, Have you tested it? Of course I did. Works with gpio driver and provides up to 10usec precision on armada-xp board. This is 1000 times better than without my patch - the precision was 10ms (jiffy).

Re: [PATCH v2 0/3] leds: blink resolution improvements

2015-04-28 Thread Stas Sergeev
28.04.2015 11:57, Jacek Anaszewski пишет: > Hi Stas, > > Have you tested it? Of course I did. Works with gpio driver and provides up to 10usec precision on armada-xp board. This is 1000 times better than without my patch - the precision was 10ms (jiffy). > I tried it with Samsung M0 board and > m

Re: [PATCH v2 0/3] leds: blink resolution improvements

2015-04-28 Thread Jacek Anaszewski
Hi Stas, Have you tested it? I tried it with Samsung M0 board and my leds-aat1290 driver. It didn't work well. And for small delay intervals it will not have a chance to work reliably with all drivers, especially the ones which use mutex in their brightness_set op, since mutex can sleep. I am af

Re: [PATCH v2 0/3] leds: blink resolution improvements

2015-04-27 Thread Stas Sergeev
27.04.2015 23:54, Pavel Machek пишет: Hi! The following patches improve the precision of led timer trigger and add the delay unit control. That allows to make PWM brightness control with timer trigger. Are you sure that is good idea? Doing LED pwm with main cpu is quite harsh... We already ha

Re: [PATCH v2 0/3] leds: blink resolution improvements

2015-04-27 Thread Stas Sergeev
Hi. 27.04.2015 23:54, Pavel Machek пишет: Hi! The following patches improve the precision of led timer trigger and add the delay unit control. That allows to make PWM brightness control with timer trigger. Are you sure that is good idea? Doing LED pwm with main cpu is quite harsh... Do you r

Re: [PATCH v2 0/3] leds: blink resolution improvements

2015-04-27 Thread Pavel Machek
Hi! > The following patches improve the precision of led > timer trigger and add the delay unit control. > That allows to make PWM brightness control with timer > trigger. Are you sure that is good idea? Doing LED pwm with main cpu is quite harsh... We already have "brightness" for... well... br