In previous versions, during the teardown phase, the "open_blockdriver" would call the "mtd proxy" causing the "file mtd" node to be registered in the ftl. " node is registered in ftl.
Therefore, we changed the behavior to find the corresponding inode by node name.
Signed-off-by: chenrun1 <chenrun1@xiaomi.com>
Add the Sim WiFi function, which can provide the wifi operating on nuttx sim emulator,
and support two modes that simulate wifi, HWSIM and RNC(real network card).
- In the HWSIM mode, we simulates two wlan interfaces. The wlan0 is STA and
the wlan1 is AP. The wlan0 can connect to the wlan1 in the nuttx simulator.
- In the RNC mode, we can use the same wlan interface name on the nuttx simulator
to control the connection behavior of the real wireless card.
Signed-off-by: liqinhui <liqinhui@xiaomi.com>
The BIT macro is widely used in NuttX,
and to achieve a unified strategy,
we have placed the implementation of the BIT macro
in bits.h to simplify code implementation.
Signed-off-by: hujun5 <hujun5@xiaomi.com>
so the user could register fb device directly instead
go through the sequence of up_fbinitialize/up_fbgetvplane
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
forget from patch:
commit bbf5b0bb6d
Author: jianglianfang <jianglianfang@xiaomi.com>
Date: Tue Aug 15 19:47:14 2023 +0800
driver/video: adapting Goldfish FB to VSync optimized FB driver
The circbuf part is implemented by the fb driver, and goldfish needs to
delete the part related to circbuf and adapt to the interface of the fb
driver.
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
==2787216==ERROR: AddressSanitizer: heap-use-after-free on address 0xf4702448 at pc 0x0136c544 bp 0x9f54d358 sp 0x9f54d348
READ of size 4 at 0xf4702448 thread T0
0 0x136c543 in rpmsg_destroy_ept open-amp/lib/rpmsg/rpmsg.c:357
1 0x1252b29 in sensor_rpmsg_ns_unbind_cb sensors/sensor_rpmsg.c:1216
2 0x1371de5 in rpmsg_virtio_ns_callback open-amp/lib/rpmsg/rpmsg_virtio.c:663
3 0x1371026 in rpmsg_virtio_rx_callback open-amp/lib/rpmsg/rpmsg_virtio.c:583
4 0x137c105 in virtqueue_notification open-amp/lib/virtio/virtqueue.c:711
5 0x1368604 in rproc_virtio_notified open-amp/lib/remoteproc/remoteproc_virtio.c:433
6 0x1363abe in remoteproc_get_notification open-amp/lib/remoteproc/remoteproc.c:10
Signed-off-by: yintao <yintao@xiaomi.com>
convert from body coordinate system to right-hand
coordinate system.
Example:
Compared to the standard coordinate system,
the x-axis and y-axis are interchanged and have opposite directions,
the z-axis remains normal.
body coordinate ----> right-hand coordinate
+x +y
| |
| |
| |
| |
-y<-------. .------>+x
/ /
/ /
/ /
/ /
+z +z
So for the above conversion, using "P3" to represent transformation relationships
The front is 1 0 2, which represents the y x z axis.
The standard order is 0 1 2, so y and x are interchanged.
The following -1 1 1 indicates the direction of the axis.
The standard is 1 1 1. Because the current y-axis is opposite to
the standard x-axis, it is -1.
static const struct sensor_axis_map_s g_remap_tbl[] =
{
{ 0, 1, 2, 1, 1, 1 }, /* P0 */
{ 1, 0, 2, 1, -1, 1 }, /* P1 */
{ 0, 1, 2, -1, -1, 1 }, /* P2 */
{ 1, 0, 2, -1, 1, 1 }, /* P3 */
{ 0, 1, 2, -1, 1, -1 }, /* P4 */
{ 1, 0, 2, -1, -1, -1 }, /* P5 */
{ 0, 1, 2, 1, -1, -1 }, /* P6 */
{ 1, 0, 2, 1, 1, -1 }, /* P7 */
};
you can call the function sensor_remap_vector_raw16 and pass P3 parameters
to perform the conversion.
Signed-off-by: Jiuzhu Dong <dongjiuzhu1@xiaomi.com>
When the application calls poll and returns the POLLIN event,
QPOLL will be called again during the read operation,
causing rx_length to change and data to be lost.
Therefore, read only need to actively call qpoll to collect driver
data when rx length is 0.
Signed-off-by: dongjiuzhu1 <dongjiuzhu1@xiaomi.com>
I added a function that I didn't use when I upstream another patch. Delete it
https://github.com/apache/nuttx/pull/10709
Signed-off-by: zhanghongyu <zhanghongyu@xiaomi.com>
1.check the rpmsg name when clk_register.
2.clk_get rpmsg clk print error:
clk/clk.c:1231:3: runtime error: null pointer passed as argument 2, which is declared to never be null
3.fix some function miss keyword FAR.
4.clk_disable_unused may disable rpmsg clk which disable the clk that maybe used by others
Signed-off-by: dulibo1 <dulibo1@xiaomi.com>
1.client get the regualtor which is enabled by server, will disable the regualtor.
2.regulator_rpmsg_server_unbind will disable regualtor which maybe used by other client.
3.regulator_rpmsg_server_unbind will be deadloop when the regulator is always_on;
4.regulator_rpmsg_client_destroy does not match server cpu name,may destory by stop other rptun dev
Signed-off-by: dulibo1 <dulibo1@xiaomi.com>
These structures need to be aligned with the firmware, packed_struct will cause the scan information from Wi-Fi firmware not to be parsed by broadcom Wi-Fi driver. Therefore, we need to remove the packed_struct of the structure associated with the scan information.
Signed-off-by: zhanghongyu <zhanghongyu@xiaomi.com>
Solve the problem that when a user modifies the sampling rate,
the difference between the generation and the mainline generation
may be greater than the own sampling interval.
After this problem occurs, sensor_is_update() will continue to
return true, resulting in a busy loop in the upper-layer application,
so, need update user generation according to mainline generation.
Signed-off-by: dongjiuzhu1 <dongjiuzhu1@xiaomi.com>