1.add pin type to cfg gpio as wake up source
2.add IOEXPANDER_OPTION_WAKEUPCFG for set wake up option
Signed-off-by: dulibo1 <dulibo1@xiaomi.com>
Signed-off-by: buxiasen <buxiasen@xiaomi.com>
and move common math funtions to math32.h:
div_round_up
div_round_closest
is_power_of_2
roundup_pow_of_two
rounddown_pow_of_two
Signed-off-by: lipengfei28 <lipengfei28@xiaomi.com>
Summary:
1.Modified the i_crefs from int16_t to atomic_int
2.Modified the i_crefs add, delete, read, and initialize interfaces to atomic operations
The purpose of this change is to avoid deadlock in cross-core scenarios, where A Core blocks B Core’s request for a write operation to A Core when A Core requests a read operation to B Core.
Signed-off-by: chenrun1 <chenrun1@xiaomi.com>
1. cpufreq.h not found if cpufreq is not supported on some branches.
./thermal/thermal_dummy.c:25:10: fatal error: nuttx/cpufreq.h: No such file or directory
25 | #include <nuttx/cpufreq.h>
| ^~~~~~~~~~~~~~~~~
compilation terminated.
2. debug.h is included by including <nuttx/cpufreq.h>, should not.
CC: thermal/thermal_dummy.c thermal/thermal_dummy.c: In function ‘thermal_dummy_init’:
thermal/thermal_dummy.c:338:7: warning: implicit declaration of function ‘therr’ [-Wimplicit-function-declaration]
338 | therr("Register cooling device fan0 failed!\n");
|
https://github.com/apache/nuttx/pull/12824
Signed-off-by: wangjianyu3 <wangjianyu3@xiaomi.com>
When exec "echo 1 > /proc/thermal/cpu-thermal", procfs get "\n" after "1", treat as disable:
```
#1 0x000000000040f452 in thermal_procfs_write (filep=0x7ffff3d241e8, buffer=0x7ffff3d344fc "\n", buflen=1) at thermal/thermal_procfs.c:179
```
Signed-off-by: wangjianyu3 <wangjianyu3@xiaomi.com>
When its remote core publishes a message, all subscribed cores will receive the message,
but the local core "stublist" does not update the user's "generation" and "bufferpos" parameters.
Signed-off-by: likun17 <likun17@xiaomi.com>
After the ap core subscribes to the 25hz batch 120ms data of the sensor core, it switches
to the cp core and subscribes to the 50hz batch 120ms sensor core data. At this time,
the data subscribed by the AP will be abnormally lost (12.5hz). Mainly because ap
subscribes to sensor core data earlier than cp. The subscription of cp will be broadcast
to the ap core at the same time, and the corresponding "path" already exists
under "/dev/uorb" of ap. Thus the ap will create a "stub".
There are some restrictions on the creation of "stub" to avoid this situation.
Signed-off-by: likun17 <likun17@xiaomi.com>
Error: mmcsd/mmcsd_sdio.c:1419:12: error: 'mmcsd_setblockcount' defined
but not used [-Werror=unused-function]
1172 1419 | static int mmcsd_setblockcount(FAR struct mmcsd_state_s
*priv,
Signed-off-by: wanggang26 <wanggang26@xiaomi.com>
1. notify POLLIN to reader.
2. notify POLLPRI to writer,
in addition, notify POLLPRI to the user who completed the flush .
Signed-off-by: dongjiuzhu1 <dongjiuzhu1@xiaomi.com>
Supports the flush operation of the sensor.
The application can initiate a flush action through ioctl SNIOC_FLUSH
to trigger flush, and the call will be returned immediately.
Using SNIOC_GET_EVENTS to clear flush event,
However, the flush implementation is asynchronous, when all the flush
data is push to upper circbuffer, the POLLPRI event(FLUSH_COMPLETED)
will be reported.
Signed-off-by: dongjiuzhu1 <dongjiuzhu1@xiaomi.com>
When there is an actual physical sensor, the driver must implement the get info interface. The upper layer can obtain the actual physical sensor information through SNIOC_GET_INFO.
SNIOC_SET_INFO can only set the information of the local virtual sensor, which means it is bound to the local advertisement. Remote subscribers cannot set the information.
Usage:
struct sensor_device_info dev_info;
orb_ioctl(fd, SNIOC_GET_INFO, (unsigned long)(uintptr_t)&dev_info);
or:
ret = orb_set_info(fd, &dev_info);
ret = orb_get_info(fd, &dev_info);
Signed-off-by: likun17 <likun17@xiaomi.com>
Make sure that interrups are disabled during initialization.
This is a proper fix for an unexpected MSI interrupt for PCI serial driver.
Signed-off-by: p-szafonimateusz <p-szafonimateusz@xiaomi.com>
The interaction between the shell service in adb and adbd occurs through a pseudo-terminal (pty).
so, when a command is launched through adb shell from a PC, users now have the ability to pause
or kill the launched,application by inputting specific commands CONFIG_TTY_SIGTSTP_CHAR or
CONFIG_TTY_SIGTINT_CHAR, akin to the capabilities provided by nsh.
Signed-off-by: dongjiuzhu1 <dongjiuzhu1@xiaomi.com>