Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1521416

Re: PM regression with LED changes in next-20161109

From Pavel Machek <pavel@ucw.cz>
Newsgroups linux.kernel
Subject Re: PM regression with LED changes in next-20161109
Date 2016-11-14 09:40 +0100
Message-ID <sDkY1-4yt-7@gated-at.bofh.it> (permalink)
References (5 earlier) <sCpGq-8u6-11@gated-at.bofh.it> <sCDJo-JU-11@gated-at.bofh.it> <sCE2K-Rt-5@gated-at.bofh.it> <sCM0i-6hX-19@gated-at.bofh.it> <sCNSp-7BL-7@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


[Multipart message — attachments visible in raw view] - view raw

Hi!

> >Also, how would we read the
> >brightness set by the firmware? We'd have to read brightness
> >file, so still two files would have to be opened which is
> >a second drawback of this approach.
> 
> No, look carefully at the definition of the read behavior
> I plan to put in the ABI doc:
> 
> "Reading this file will return the actual led brightness
> when not blinking and no triggers are active; reading this
> file will return the brightness used when the led is on
> when blinking or triggers are active."

That's not sane semantics. Userspace would have to read three files
(racy) to find out about triggers etc.

It also prevents modelling
"hardware-changes-brightness-behind-kernel's-back" as a trigger.

> So for e.g. the backlit keyboard case reading this single
> file will return the actual brightness of the backlight,
> since this does not involve blinking or triggers.

Stop obsessing about "ingle file". FDs are pretty cheap. This is sysfs.

> >Having no difference in this area between the two approaches
> >I'm still in favour of the read-only file for notifying
> >brightness changes procured by hardware.
> 
> That brings back the needing 2 fds problem; and does

Actually you have turned "2 fds" into "3 fds", as userspace now needs
to check for trigger _and_ blinking _and_ actuall brightness.

fds are cheap, but that is still not nice design.

								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 | NextPrevious in thread | Find similar | Unroll thread


Thread

Re: PM regression with LED changes in next-20161109 Jacek Anaszewski <jacek.anaszewski@gmail.com> - 2016-11-12 11:30 +0100
  Re: PM regression with LED changes in next-20161109 Hans de Goede <hdegoede@redhat.com> - 2016-11-12 11:50 +0100
    Re: PM regression with LED changes in next-20161109 Jacek Anaszewski <jacek.anaszewski@gmail.com> - 2016-11-12 20:20 +0100
      Re: PM regression with LED changes in next-20161109 Hans de Goede <hdegoede@redhat.com> - 2016-11-12 22:20 +0100
        Re: PM regression with LED changes in next-20161109 Jacek Anaszewski <jacek.anaszewski@gmail.com> - 2016-11-13 12:50 +0100
          Re: PM regression with LED changes in next-20161109 Hans de Goede <hdegoede@redhat.com> - 2016-11-13 15:00 +0100
            Re: PM regression with LED changes in next-20161109 Jacek Anaszewski <j.anaszewski@samsung.com> - 2016-11-14 10:20 +0100
              Re: PM regression with LED changes in next-20161109 Hans de Goede <hdegoede@redhat.com> - 2016-11-14 14:00 +0100
                Re: PM regression with LED changes in next-20161109 Hans de Goede <hdegoede@redhat.com> - 2016-11-15 11:10 +0100
                Re: PM regression with LED changes in next-20161109 Jacek Anaszewski <j.anaszewski@samsung.com> - 2016-11-15 11:10 +0100
                LEDs that change brightness "itself" -- that's a trigger. Re: PM  regression with LED changes in next-20161109 Pavel Machek <pavel@ucw.cz> - 2016-11-15 11:40 +0100
                Re: LEDs that change brightness "itself" -- that's a trigger. Re: PM  regression with LED changes in next-20161109 Jacek Anaszewski <j.anaszewski@samsung.com> - 2016-11-15 12:00 +0100
                Re: LEDs that change brightness "itself" -- that's a trigger. Re: PM  regression with LED changes in next-20161109 Hans de Goede <hdegoede@redhat.com> - 2016-11-15 12:20 +0100
                Re: LEDs that change brightness "itself" -- that's a trigger. Re: PM  regression with LED changes in next-20161109 Pavel Machek <pavel@ucw.cz> - 2016-11-15 12:20 +0100
                Re: LEDs that change brightness "itself" -- that's a trigger. Re: PM  regression with LED changes in next-20161109 Hans de Goede <hdegoede@redhat.com> - 2016-11-15 12:30 +0100
                Re: LEDs that change brightness "itself" -- that's a trigger. Re: PM  regression with LED changes in next-20161109 Pavel Machek <pavel@ucw.cz> - 2016-11-15 12:50 +0100
                Re: LEDs that change brightness "itself" -- that's a trigger. Re: PM  regression with LED changes in next-20161109 Hans de Goede <hdegoede@redhat.com> - 2016-11-15 13:10 +0100
                Re: LEDs that change brightness "itself" -- that's a trigger. Re: PM  regression with LED changes in next-20161109 Pavel Machek <pavel@ucw.cz> - 2016-11-15 13:20 +0100
                Re: LEDs that change brightness "itself" -- that's a trigger. Re: PM  regression with LED changes in next-20161109 Jacek Anaszewski <j.anaszewski@samsung.com> - 2016-11-15 14:30 +0100
                Re: LEDs that change brightness "itself" -- that's a trigger. Re: PM  regression with LED changes in next-20161109 Hans de Goede <hdegoede@redhat.com> - 2016-11-15 14:50 +0100
                Re: LEDs that change brightness "itself" -- that's a trigger. Re: PM  regression with LED changes in next-20161109 Jacek Anaszewski <j.anaszewski@samsung.com> - 2016-11-15 15:10 +0100
                Re: LEDs that change brightness "itself" -- that's a trigger. Re: PM  regression with LED changes in next-20161109 Hans de Goede <hdegoede@redhat.com> - 2016-11-15 15:40 +0100
                Re: LEDs that change brightness "itself" -- that's a trigger. Re: PM  regression with LED changes in next-20161109 Jacek Anaszewski <j.anaszewski@samsung.com> - 2016-11-15 15:50 +0100
                Re: LEDs that change brightness "itself" -- that's a trigger. Re: PM  regression with LED changes in next-20161109 Hans de Goede <hdegoede@redhat.com> - 2016-11-17 23:20 +0100
        Re: PM regression with LED changes in next-20161109 Pavel Machek <pavel@ucw.cz> - 2016-11-14 09:40 +0100

csiph-web