Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1618713
| From | Pavel Machek <pavel@ucw.cz> |
|---|---|
| Newsgroups | linux.kernel |
| Subject | default-state LED property (was Re: [PATCH v2] Extend pca9532 device tree support) |
| Date | 2017-04-07 14:00 +0200 |
| Message-ID | <ttAIx-6Aj-11@gated-at.bofh.it> (permalink) |
| References | <tqIsW-70Q-21@gated-at.bofh.it> <trOZj-1KM-7@gated-at.bofh.it> <tthZg-2Gn-9@gated-at.bofh.it> <ttkX8-4XH-23@gated-at.bofh.it> <ttxrj-4E7-9@gated-at.bofh.it> |
| Organization | linux.* mail to news gateway |
[Multipart message — attachments visible in raw view] - view raw
Hi! > >> This seems to look for "pwm0" and "pwm1" strings, which do not seem to > >> be documented. > >> > >> Plus... is it useful to have default-state? We already have default > >> trigger. If we keep the value by default (on PC, we do something like > >> that) this patch should not be neccessary? > > > > Thanks for the heads-up. Dropping the patch for now. > > No, please do not drop the patch. > > > I guess that pwm0/1 got propagated to v2 by an omission. > > Yes, I agree. However the two strings do not break anything and behave > analog to the 'on' or 'keep' string. Though this code could be removed > if absolutely necessary. An alternative would be to add a description > for the strings. Just to be clear: these strings have nothing to with > the exposition of device specific registers to the DT. Well, they should be removed. No need to keep surprises in code. > > Regarding default-on: Felix, do you have any use case that require > > default-on set to "keep"? > > This patch is not about 'default-on' which is a value that could be > assigned to the property 'linux,default-trigger' (according to DT > bindings documentation file 'common.txt'). > My patch does not introduce anything new with the'keep' state, it rather > completes the existing bindings according to the description in > Documentation/devicetree/bindings/leds/common.txt which states: Hmm, that was introduce by 1d1a77ddc8acfa3d506f1958e09a12085e71fc69 . I don't quite like the patch -- it duplicates default-trigger functionality without good reason. IMO we should 1) keep the led state by default 2) deprecate the default-state property 3) use default-triggers to emulate the functionality if someone really needs it. > One of my use cases is to turn a LED on by U-Boot. This LED must remain > on until eventually, under certain conditions, some userland code > changes it's state. > Setting 'default-state' to 'keep' is how you can sort of tell the > kernel, or better the driver, 'not to initialize the LED' which would > turn it off. Yes, that's reasonable. Perhaps 'keep' should be the default. Pavel -- (english) http://www.livejournal.com/~pavelmachek (cesky, pictures) http://atrey.karlin.mff.cuni.cz/~pavel/picture/horses/blog.html
Back to linux.kernel | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
[PATCH v2] Extend pca9532 device tree support Felix Brack <fb@ltec.ch> - 2017-03-30 15:40 +0200
Re: [PATCH v2] Extend pca9532 device tree support Jacek Anaszewski <jacek.anaszewski@gmail.com> - 2017-04-02 16:50 +0200
Re: [PATCH v2] Extend pca9532 device tree support Pavel Machek <pavel@ucw.cz> - 2017-04-06 18:00 +0200
Re: [PATCH v2] Extend pca9532 device tree support Jacek Anaszewski <jacek.anaszewski@gmail.com> - 2017-04-06 21:10 +0200
Re: [PATCH v2] Extend pca9532 device tree support Felix Brack <fb@ltec.ch> - 2017-04-07 10:30 +0200
default-state LED property (was Re: [PATCH v2] Extend pca9532 device tree support) Pavel Machek <pavel@ucw.cz> - 2017-04-07 14:00 +0200
Re: [PATCH v2] Extend pca9532 device tree support Jacek Anaszewski <jacek.anaszewski@gmail.com> - 2017-04-09 14:40 +0200
Re: [PATCH v2] Extend pca9532 device tree support Felix Brack <fb@ltec.ch> - 2017-04-09 15:20 +0200
csiph-web