Certain variants of the W25QxxxJV Quad SPI NOR flash ICs have the Quad
SPI mode disabled after reset. As the w25qxxxjv driver is operating the
device in Quad SPI mode, make sure it gets enabled if required during
device initialization.
Signed-off-by: Michael Jung <michael.jung@secore.ly>
power/pm_procfs.c:282:27: warning: format specifies type 'unsigned long' but the argument has type 'time_t' (aka 'unsigned int') [-Wformat]
dom->wake[state].tv_sec,
^~~~~~~~~~~~~~~~~~~~~~~
make[2]: Entering directory '/home/ligd/platform/m2/audio/frameworks/media'
power/pm_procfs.c:283:27: warning: format specifies type 'unsigned long' but the argument has type 'unsigned int' [-Wformat]
100 * dom->wake[state].tv_sec / sum,
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
power/pm_procfs.c:284:27: warning: format specifies type 'unsigned long' but the argument has type 'time_t' (aka 'unsigned int') [-Wformat]
dom->sleep[state].tv_sec,
^~~~~~~~~~~~~~~~~~~~~~~~
power/pm_procfs.c:285:27: warning: format specifies type 'unsigned long' but the argument has type 'unsigned int' [-Wformat]
100 * dom->sleep[state].tv_sec / sum,
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
power/pm_procfs.c:286:27: warning: format specifies type 'unsigned long' but the argument has type 'time_t' (aka 'unsigned int') [-Wformat]
total.tv_sec,
^~~~~~~~~~~~
power/pm_procfs.c:287:27: warning: format specifies type 'unsigned long' but the argument has type 'unsigned int' [-Wformat]
100 * total.tv_sec / sum);
^~~~~~~~~~~~~~~~~~~~~~~~
Signed-off-by: ligd <liguiding1@xiaomi.com>
1.Allow multi users to access the same sensor device simultaneously.
2.Get real state of sensor device by cmd SNIOC_GET_STATE for users.
3.Get update state since last read by poll without timeout for users.
4.Sensor device will be activated when first user open and will close when
last user closed.
5.When multi users to access device, driver always set the minimum
sampling interval and latency to the sensor device and allow
downsampled for users above the minimum sampling interval.
6.The circbuffer will overwrite old data when buffer is full, so if users
don't read data soon, data will be lost, and the oldest data in circbuffer
are returned to the users.
7.Always read the last data in the circbuffer as initial value for new
users when the sensor device has not yet generated new data.
8.when user uses poll, if subscription interval is satisfied, the POLLIN
events is returned for each users.
9.When new user generate or the state of sensor device changed, the POLLPRI
will notify to all users.
10.Support multi advertisers to subscribe their own data as loop test.
Signed-off-by: Jiuzhu Dong <dongjiuzhu1@xiaomi.com>
1.cmd:SNIOC_REGISTER with struct sensor_reginfo_s to register user sensor
2.cmd:SNIOC_UNREGISTER to unregister user sensor
Signed-off-by: Jiuzhu Dong <dongjiuzhu1@xiaomi.com>
1.Simplify buffer opeations to avoid frequent resize for batch and no-batch mode.
2.When sensor event is first generated, the buffer is initialized.
3.Remove and merge batch_number to buffer_number when device support batch mode.
Signed-off-by: Jiuzhu Dong <dongjiuzhu1@xiaomi.com>
'putarea' function now has to select the appropriate values from the
whole frame buffer instead of the previous expectation of having just
specified rectangle passed to it.
This required extension of WRRAM handling function as we now are not
writing simply buffer but we want to skip some values and do that
multiple times. Having two implementation in this case is worst as this
function is actually called only twice in the whole code (thus making
dedicated function for every call if we would have two variants).
Calling `st7789_wrram` multiple times is not an option as command
ST7789_RAMWR resets the position and thus calling it multiple times just
overwrites the previous values.
I found an issue in the APA102 framebuffer that wasn't spot
before by fb test because this application draw symetric squares
Normally in a display each line starts at left and increase to the
right, however for this APA102 matrix the next line starts at the
end of previous line and move the opposite direction, forming a
zig-zag pattern.