Petro Karashchenko
a743fed63d
file_operations: get back C89 compatible initializer
...
Signed-off-by: Petro Karashchenko <petro.karashchenko@gmail.com>
2022-01-11 02:14:00 +08:00
Jiuzhu Dong
153254a496
sensor: reset interval,latency and circbuf when sensor is closed
...
Signed-off-by: Jiuzhu Dong <dongjiuzhu1@xiaomi.com>
2021-12-17 23:36:07 -06:00
songnannan
550d2bff32
feature: sensor: add set calibration interface for sensor driver.
...
Add standard sensor interface for setting calibartiion value.
Signed-off-by: songnannan <songnannan@xiaomi.com>
2021-11-19 11:55:40 +01:00
buyuer
fa90a3dfd4
Optimized GPS sensor and add gps satellite sensor.
...
Signed-off-by: buyuer <dingddding@163.com>
2021-11-17 08:59:40 -06:00
songnannan
1799994f2c
feature: sensor: Add sensor type ots.
...
Add ots sensor type for ots sensor.
Signed-off-by: songnannan <songnannan@xiaomi.com>
2021-11-16 14:51:57 -03:00
Jiuzhu Dong
f1f0bcc521
driver/sensor: support new sensor type:ECG,PPG,Imdepance
...
Signed-off-by: Jiuzhu Dong <dongjiuzhu1@xiaomi.com>
2021-10-20 09:55:18 -05:00
Jiuzhu Dong
5ee16ee684
driver/sensor: support sensor_ops: selftest
...
Signed-off-by: Jiuzhu Dong <dongjiuzhu1@xiaomi.com>
2021-10-10 08:28:49 -03:00
Jiuzhu Dong
7837a21e4e
sensor: directly return -ENOTSUP without the set_interval or batch
...
implementation for lowerhalf driver.
Change-Id: I7b02e0331e5f8b89b39896049a9e24ce30116f8a
Signed-off-by: Jiuzhu Dong <dongjiuzhu1@xiaomi.com>
2021-07-25 23:29:55 -07:00
Xiang Xiao
2e54df0f35
Don't include assert.h from public header file
...
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2021-06-03 08:36:03 -07:00
Gustavo Henrique Nihei
55d66f60a3
drivers: Fix typos reported by codespell
2021-02-25 18:57:18 -08:00
Jiuzhu Dong
936ce77d21
driver/sensor: gets the capacity of the hardware fifo
...
to hold the number of events
Change-Id: I58a9ad07913c7b189e1fd229ab22e91e220e01f6
Signed-off-by: Jiuzhu Dong <dongjiuzhu1@xiaomi.com>
2021-02-24 15:26:15 -03:00
Jiuzhu Dong
46ea549630
driver/sensor: Fetch(with O_NONBLOCK) will directly return.
...
when sensor is disable.
Change-Id: I02c02aa447ee0b0d681082b4209ecd36e10f2547
Signed-off-by: Jiuzhu Dong <dongjiuzhu1@xiaomi.com>
2021-02-24 15:26:15 -03:00
Jiuzhu Dong
54ea96da6b
driver/sensor: replace lower->buffer_size with lower->buffer_number
...
more efficient
Change-Id: I0823b10248caf75e4dd6a5086ad230ba4a7298f6
Signed-off-by: Jiuzhu Dong <dongjiuzhu1@xiaomi.com>
2021-02-24 15:26:15 -03:00
Matias N
76cc5c36e4
bmp280: convert to common sensor interface
2021-01-18 21:08:34 -03:00
Matias N
42b6c665da
sensor: change set_interval to use a value, not a pointer to value
2021-01-18 21:08:34 -03:00
YAMAMOTO Takashi
f8da954e7c
drivers/sensors/sensor.c: Fix a syslog format
2020-11-24 22:31:33 -08:00
dongjiuzhu
148afd9548
driver/sensors: support custom type of sensor.
...
For examples, the custom sensor could define:
struct custem_event_s
{
uint64_t timestamp;
int16_t adc[8];
};
struct sensor_lowerhalf_s g_lower =
{
.buffer_size = 1024,
};
sensor_custom_register(lower, "/dev/sensor/custom0", sizeof(struct custem_event_s));
Signed-off-by: dongjiuzhu <dongjiuzhu1@xiaomi.com>
2020-11-24 13:23:15 -03:00
dongjiuzhu
8f9ca79ffc
driver/sensor rc: use mm/circbuf manage intermediate buffer
...
N/A
Change-Id: Ifdd8117da9d20ac2f48f04b7b383449e6dd03f06
Signed-off-by: dongjiuzhu <dongjiuzhu1@xiaomi.com>
2020-11-20 05:33:03 -08:00
dongjiuzhu
089b1c17f6
driver/sensor: add fetch api to read sensor data directly
...
1.use userspace buffer rather than intermediate buffer of upperhalf driver
2.support block and non-block ways.
Change-Id: I1d0cecfaa20ce54961c58713d8f2f8857e349791
Signed-off-by: dongjiuzhu <dongjiuzhu1@xiaomi.com>
2020-11-11 18:25:22 -08:00
dongjiuzhu
2cda16b606
driver/sensor: add new feature about sensor driver
...
1.support for multi-user access
2.support special cmd to control sensor
3.support userspace to set size of intermediate buffer
by ioctl: SNOIC_SET_BUFFER_SIZE
Change-Id: I9ce3a65b88b12c28388ec397431f1a277b120c2a
Signed-off-by: dongjiuzhu <dongjiuzhu1@xiaomi.com>
2020-11-11 18:25:22 -08:00
dongjiuzhu
2482052228
driver/sensor: user specifies device register number
...
N/A
Change-Id: Idd11461f933dd21b7271cd3ca87a2e33127a9d34
Signed-off-by: dongjiuzhu <dongjiuzhu1@xiaomi.com>
2020-11-11 18:25:22 -08:00
dongjiuzhu
fa09c6a8bc
driver/sensor: add unified management for sensor
...
Signed-off-by: dongjiuzhu <dongjiuzhu1@xiaomi.com>
2020-10-22 10:17:36 -03:00