DescriptionReland of [sensors] Ambient light sensor implementation for ChromeOS and Linux.
The patch introduces sensors implementation for
ChromeOS/Linux platforms using ambient light sensor. Both
platforms share the same code and require polling threads to
be used.
SensorDataIio structure is used to initialize a generic
SensorReader, which is created only when sensor read files
are found, and to create a concrete sensor, which takes
an ownership of the SensorReader.
A SensorReader must always be created on a polling thread,
which is further used by a sensor to poll data. Each new
sensor will have its own thread in order to avoid blocking of
each other.
As a temp solution to manage polling threads, which are not
passed to new sensors, a manager thread is used. It kills a
polling thread if a sensor cannot be created. In the future,
the manager thread will evolve to a manager class that will
manage finding new sensors attached to a system and notify a
provider about that. The provider will have its own cache in
order to avoid trying to find sensors each time after it
fails to find a requested sensor. Once the manager notifies
the provider about a new sensor, the provider updates its
cache and starts to process requests for that type of sensor.
Intent to Implement:
https://groups.google.com/a/chromium.org/forum/#!msg/blink-dev/TkfdVqYAYiE/xLGN2b1-AAAJ
The first patchset is a last reverted patch. The second one provides
a fix to reland the code.
reverted cl:
https://codereview.chromium.org/2370343002/
BUG=606766
CQ_INCLUDE_TRYBOTS=master.tryserver.chromium.linux:linux_site_isolation
Committed: https://crrev.com/c0876ac8f8439dc4511f4172bc4856d2358e9f67
Cr-Commit-Position: refs/heads/master@{#430049}
Patch Set 1 : rebased #Patch Set 2 : fix for reland #
Total comments: 1
Patch Set 3 : remove parenthesis #Messages
Total messages: 20 (13 generated)
|