On Wed 2017-08-16 00:55:04, Paulo Costa wrote: > > Hmm. Can we simply use blinking trigger to do that? > > To some extent... > > If you just want to have 50% brightness, set timeon=1, timeoff=1 and > you are done. > > But, accurately seting the brightness to weird numbers is harder. > E.g., To get 37% brightness your only chance is to set timeon=37, > timeoff=63 (Or multiples of it). > > The larger delay causes very visible flickering, which sucks. Well, to set 37% brightness you just set timeon=1 timeoff=2 ;-). > This trigger uses error propagation to continously adjusts the delay, > getting a higher blink frequency and accurate average brightness. > > E.g., For 37% it will alternate between 33% (timeon=1,timeoff=2) and > 50% (timeon=1,timeoff=1) Hmm, ok, clever. > Unfortunately, it doesn't really help when the brightness is near 0% > or near 100%. > E.g., for 1% brightness, this trigger it is equivalent to > timeon=1,timeoff=99 -- Flickering is very visible. Hmm. You could do led=on, udelay(100), led=off. Do that 100 times a second, and I believe you'll get quite nice low levels. Now... nice hack. Probably can be improved. But is it suitable for mainline? Pavel -- (english) http://www.livejournal.com/~pavelmachek (cesky, pictures) http://atrey.karlin.mff.cuni.cz/~pavel/picture/horses/blog.html