Commit Graph

5647 Commits

Author SHA1 Message Date
SPRESENSE
7f574210a7 drivers:alt1250: Correspond to shutdown
ALT1250 driver to support shutdown.
2023-09-22 13:51:28 +08:00
wanggang26
e930476b4b enable O_CLOEXEC explicit
Signed-off-by: wanggang26 <wanggang26@xiaomi.com>
2023-09-22 13:51:00 +08:00
dulibo1
b57e43b4d0 clk:fix some issues when use rpmsg clk
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>
2023-09-22 08:47:23 +08:00
dulibo1
2db471fab3 regulator:fix some issues when use rpmsg
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>
2023-09-21 19:41:34 -04:00
dulibo1
da1cd59f35 regualtor:fix regulator_register check rpmsg regulator which leads to recursion
Signed-off-by: dulibo1 <dulibo1@xiaomi.com>
2023-09-21 19:41:34 -04:00
wanggang26
db2f204cc4 mmcsd: support dump cid and csd with mmc-utils
Signed-off-by: wanggang26 <wanggang26@xiaomi.com>
2023-09-21 22:40:39 +08:00
raiden00pl
0b00a02f81 sensors: add suffix _uorb to all sensors that use the new sensor framework
This'll make it easier to identify sensors supporting the new sensor approach
2023-09-21 20:30:08 +08:00
SPRESENSE
a3d17a18a7 drivers/modem/alt1250: Fix bug that errno was not converted correctly
Fix bug that errno was not converted correctly.
2023-09-21 13:54:21 +03:00
SPRESENSE
125f4a2ad0 drivers/modem/alt1250: Fix bug that modem version could not be taken
Fix bug that modem version could not be taken.
2023-09-21 17:44:12 +08:00
zhanghongyu
9267dbc7c2 bcm_driver: revert packed attribute for scan structure
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>
2023-09-21 14:03:12 +08:00
dongjiuzhu1
c22646c0d4 driver/sensor: Solve the busy loop problem caused by sampling problems
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>
2023-09-20 23:09:56 +03:00
dongjiuzhu1
93b2a3744f driver/spi: call bind and unbind when user open or close to save power
Signed-off-by: dongjiuzhu1 <dongjiuzhu1@xiaomi.com>
2023-09-20 23:08:36 +03:00
chao.an
76dfffe834 wireless/bcm43xxx: fix nxstyle issue
Signed-off-by: chao.an <anchao@xiaomi.com>
2023-09-21 01:36:21 +08:00
chao.an
ff2b87c298 wireless/bcm43xxx: add Packet Traffic Arbitration Priority support
For Bluetooth wifi co-existence

Signed-off-by: chao.an <anchao@xiaomi.com>
2023-09-21 01:36:21 +08:00
hujun5
1aa42cc7d2 vnc_updater: use [enter|leave]_critical_section replace sched_[un]lock
sched_[un]lock can not prohibit pre-emption in smp

Signed-off-by: hujun5 <hujun5@xiaomi.com>
2023-09-21 00:57:51 +08:00
chao.an
43dd6836f5 wireless/bcm43xxx: correct beacon loss behavior
Signed-off-by: chao.an <anchao@xiaomi.com>
2023-09-21 00:39:40 +08:00
Shanmin Zhang
9b68971853 goldfish: add goldfish gps driver
Verification:

uorb_listener -r 1 sensor_gps

[   18.240000] [13] [  INFO] [ap]
Mointor objects num:2
[   18.240000] [13] [  INFO] [ap] object_name:sensor_gps, object_instance:0
[   18.240000] [13] [  INFO] [ap] object_name:sensor_gps, object_instance:1
[   18.240000] [13] [ ALERT] [ap] period_us = 1000000
[   19.010000] [13] [  INFO] [ap] sensor_gps:	timestamp: 19010000 (0 us ago) time_utc: 1689601925 latitude: 37.4210 longitude: -121.9150
[   19.010000] [13] [  INFO] [ap] sensor_gps:	altitude: 0.0000 altitude_ellipsoid: 0.0000 ground_speed: 145.3254 course: 166.2700
[   19.010000] [13] [  INFO] [ap] sensor_gps:	eph: nan epv: nan hdop: nan vdop: nan
[   20.020000] [13] [  INFO] [ap] sensor_gps:	timestamp: 20020000 (0 us ago) time_utc: 1689601926 latitude: 37.4210 longitude: -121.9150
[   20.020000] [13] [  INFO] [ap] sensor_gps:	altitude: 0.0000 altitude_ellipsoid: 0.0000 ground_speed: 145.3254 course: 166.2700
[   20.020000] [13] [  INFO] [ap] sensor_gps:	eph: nan epv: nan hdop: nan vdop: nan
[   21.010000] [13] [  INFO] [ap] sensor_gps:	timestamp: 21010000 (0 us ago) time_utc: 1689601927 latitude: 37.4210 longitude: -121.9150
[   21.010000] [13] [  INFO] [ap] sensor_gps:	altitude: 0.0000 altitude_ellipsoid: 0.0000 ground_speed: 145.3254 course: 166.2700
[   21.010000] [13] [  INFO] [ap] sensor_gps:	eph: nan epv: nan hdop: nan vdop: nan
[   22.020000] [13] [  INFO] [ap] sensor_gps:	timestamp: 22020000 (0 us ago) time_utc: 1689601928 latitude: 37.4210 longitude: -121.9150
[   22.020000] [13] [  INFO] [ap] sensor_gps:	altitude: 0.0000 altitude_ellipsoid: 0.0000 ground_speed: 145.3254 course: 166.2700
[   22.020000] [13] [  INFO] [ap] sensor_gps:	eph: nan epv: nan hdop: nan vdop: nan
[   23.010000] [13] [  INFO] [ap] sensor_gps:	timestamp: 23010000 (0 us ago) time_utc: 1689601929 latitude: 37.4210 longitude: -121.9150
[   23.010000] [13] [  INFO] [ap] sensor_gps:	altitude: 0.0000 altitude_ellipsoid: 0.0000 ground_speed: 145.3254 course: 166.2700
[   23.010000] [13] [  INFO] [ap] sensor_gps:	eph: nan epv: nan hdop: nan vdop: nan
...

Signed-off-by: Shanmin Zhang <zhangshanmin@xiaomi.com>
2023-09-21 00:38:14 +08:00
Jani Paalijarvi
c8540a1f9b drivers/net/rpmsgdrv.c: Improve init error handling
Signed-off-by: Jani Paalijarvi <jani.paalijarvi@unikie.com>
2023-09-20 19:23:14 +08:00
Jani Paalijarvi
999970b820 drivers/net/rpmsgdrv.c: Take netdev_register() return value into account
Signed-off-by: Jani Paalijarvi <jani.paalijarvi@unikie.com>
2023-09-20 19:23:14 +08:00
zhanghongyu
398734500e wifi: parse channel from IE when ctl_ch is 0
Signed-off-by: zhanghongyu <zhanghongyu@xiaomi.com>
2023-09-20 14:26:41 +08:00
zhanghongyu
537975656c wifi: Add handle type for disconnecting event
Some disconnected events will be missed

Signed-off-by: zhanghongyu <zhanghongyu@xiaomi.com>
2023-09-20 10:07:40 +08:00
wanggang26
fa744e24a3 mmcsd: update cid reg layout
refer spec: https://www.jedec.org/sites/default/files/docs/JESD84-B51.pdf

Signed-off-by: wanggang26 <wanggang26@xiaomi.com>
2023-09-20 00:42:30 +08:00
yintao
f3c9a8643b nuttx: change RPTUNIOC_START and RPTUNIOC_STOP to synchronous
Support quit remote when server poweroff

Signed-off-by: yintao <yintao@xiaomi.com>
2023-09-20 00:42:02 +08:00
ligd
1f9fb5fce2 rptun: add rptun_update_rx() when device_created()
Signed-off-by: ligd <liguiding1@xiaomi.com>
2023-09-20 00:42:02 +08:00
ligd
378470f611 add remote poweroff support
Signed-off-by: yintao <yintao@xiaomi.com>
2023-09-20 00:42:02 +08:00
yangsen5
e0873c5a48 drivers/video: Fix crash caused by priv->capture_cb = null
When the upper layer calls goldfish_camera_data_uninit, priv->capture_cb=NULL, but when there is data transmission in goldfish_camera_thread, priv->capture_cb will be called, which will cause a crash.

Signed-off-by: yangsen5 <yangsen5@xiaomi.com>
2023-09-20 00:34:54 +08:00
sunkun3
219677cdae rndis: Fixed rndis assert issue when calling composite_uninitlize
Signed-off-by: sunkun3 <sunkun3@xiaomi.com>
2023-09-19 07:51:49 +02:00
Xiang Xiao
635d578a73 drivers/sensor: Remove the selection of UORB from Kconfig
since the driver doesn't depend on userspace library(uORB) at all

Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2023-09-19 11:27:47 +08:00
zhengshaobo1
6e6ba062fd clock flags add CLK_OPS_PARENT_ENABLE, parents need enable during gate/ungate, set rate and re-parent
Signed-off-by: zhengshaobo1 <zhengshaobo1@xiaomi.com>
2023-09-19 10:34:48 +08:00
zhengshaobo1
be767dde01 vela fs procfs add clock procfs entry
procfs enrty add clock feature procfs operations

Signed-off-by: zhengshaobo1 <zhengshaobo1@xiaomi.com>
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2023-09-19 10:34:48 +08:00
Xiang Xiao
4d2cc2ab4d supply/regulator: Refine rpmsg regulator
1.Change priv to client or server
2.Allocate memory for name in regulator_rpmsg_get
3.Lock/unlock regulator_list in regulator_rpmsg_server_s

Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2023-09-19 10:33:09 +08:00
yinshengkai
1d8e69700f drivers/serial: add ram uart driver
It uses the memory block as the serial communication medium, which can communicate between different processes or different CPUs

Using the following configuration, the cross-core communication rate of 200MHz cortex-M55 is about 461KB/s
RAM_UART_BUFSIZE=1024
RAM_UART_POLLING_INTERVAL=100

Signed-off-by: yinshengkai <yinshengkai@xiaomi.com>
2023-09-19 09:41:07 +08:00
yinshengkai
1d9097f1df drivers/serial: unmodify head and tail pointers
Signed-off-by: yinshengkai <yinshengkai@xiaomi.com>
2023-09-19 09:41:07 +08:00
chao an
5026a96cfa nxstyle: cleanup UTF-8 Unicode to ASCII
Signed-off-by: chao an <anchao@xiaomi.com>
2023-09-18 11:54:17 -04:00
Daniel Appiagyei
5bfda12634 c++ compatibility: rename reserved c++ keywords 'public' and 'this' 2023-09-16 19:45:02 +08:00
dulibo1
ac62a08ac9 support pm runtime base function
Signed-off-by: dulibo1 <dulibo1@xiaomi.com>
2023-09-16 14:44:08 +08:00
dongjiuzhu1
8ababfc310 usbdev/mtp: support mtp class driver
Signed-off-by: dongjiuzhu1 <dongjiuzhu1@xiaomi.com>
2023-09-16 14:40:08 +08:00
jturnsek
4407aa148e Fixing row_size calculation when bpp is equal 1 2023-09-16 14:37:19 +08:00
jturnsek
6840b4444b Adding Byte-Per-Pixel Memory model option to memlcd 2023-09-16 14:34:32 +08:00
Petro Karashchenko
dbc37a0165 nuttx: fix nxstyle issues
Signed-off-by: Petro Karashchenko <petro.karashchenko@gmail.com>
2023-09-16 14:17:47 +08:00
Petro Karashchenko
1c9fe095bf drivers/ramdisk: add missing 'FAR'
Signed-off-by: Petro Karashchenko <petro.karashchenko@gmail.com>
2023-09-16 14:17:47 +08:00
liushuai25
10fce11e19 After turning on the system by power button, the first press of the power button is ineffective.
Signed-off-by: liushuai25 <liushuai25@xiaomi.com>
Co-authored-by: Petro Karashchenko <petro.karashchenko@gmail.com>
2023-09-16 08:31:44 +03:00
SPRESENSE
1b1b1a025d usbdev: Fix build error with BOARD_USBDEV_SERIALSTR 2023-09-15 13:34:06 +08:00
Zhe Weng
e4721cef5c usrsock_rpmsg_server: Add net_lock to combine get_tx_payload and recvfrom in recvfrom_handler
A dead lock may happen before this patch:
rptun thread (usrsock_rpmsg_recvfrom_handler):
 Gets all tx payload but waiting net_lock in psock_recvfrom
net driver thread (higher priority):
 Receives a packet, holding net_lock, calling usrsock_rpmsg_send_event
 But no tx buffer left, so rpmsg_send blocks, and won't release net_lock

In short:
Rptun: Hold all `tx_payload_buffer` -> want `net_lock`
Driver: Hold `net_lock` -> want `tx_payload_buffer`

This patch use net_lock to combine get_tx_payload and recvfrom together,
then:
- If it's waiting net_lock, tx payload will not be held, other threads
  may get tx buffer and do their work.
- If net_lock is got, it won't be disturbed before finish receiving,
  then tx payload won't have chance to be blocked before releasing.

Signed-off-by: Zhe Weng <wengzhe@xiaomi.com>
2023-09-14 14:32:40 +08:00
wanggang26
dcadd87919 pm: fix issue that system crash when passed invalid relpath value
Signed-off-by: wanggang26 <wanggang26@xiaomi.com>
2023-09-13 21:47:27 +08:00
simbit18
b3973496cd Fix Kconfig style
Remove spaces from Kconfig
Add comments
2023-09-13 21:39:49 +08:00
Zhe Weng
33da959fbc usrsock_rpmsg_server: Clear revents for POLLHUP and POLLERR
Note:
tcp_poll_eventhandler have logic after poll_notify, if we teardown poll
inside poll callback without clearing revents, use-after-free will
happen.

Signed-off-by: Zhe Weng <wengzhe@xiaomi.com>
2023-09-12 22:12:31 +08:00
jianglianfang
bbf5b0bb6d 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: jianglianfang <jianglianfang@xiaomi.com>
2023-09-12 22:10:10 +08:00
pengyiqiang
e578f3b20d video/fb: add vsync queue
refact vsync queue to support multi fb poll and overlay poll.

Signed-off-by: pengyiqiang <pengyiqiang@xiaomi.com>
Signed-off-by: rongyichang <rongyichang@xiaomi.com>
2023-09-12 22:10:10 +08:00
jianglianfang
43ea7e65e1 driver/fb: add fb_get_planeinfo and initialize local variable pinfo
VELAPLATFO-11808

Change-Id: I32db03d52b778cc7dd1784adea0a432976fde6bf
Signed-off-by: jianglianfang <jianglianfang@xiaomi.com>
2023-09-12 22:10:10 +08:00
pengyiqiang
7485816d6f video/fb: use counter record the num of poll ready
add a count to record the number of pollready.

Signed-off-by: pengyiqiang <pengyiqiang@xiaomi.com>
2023-09-12 22:10:10 +08:00
yangsen5
f8b19c2030 drivers/video: Modify the properties of the goldfish camera driver kthread_create
1. priority   = SCHED_PRIORITY_DEFAULT
2. stack_size = DEFAULT_TASK_STACKSIZE

Signed-off-by: yangsen5 <yangsen5@xiaomi.com>
2023-09-12 16:28:16 +08:00
zhangyuan21
fb7c36978f usbdev: support usb adb fastboot
Enable CONFIG_USBFASTBOOT to support fastboot driver.

Signed-off-by: zhangyuan21 <zhangyuan21@xiaomi.com>
2023-09-12 16:27:49 +08:00
Xiang Xiao
78728fc5eb Fix error: spi/qspi_flash.c:576:45: error: a function declaration without a prototype is deprecated in all versions of C [-Werror,-Wstrict-prototypes]
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2023-09-12 10:02:50 +08:00
Xiang Xiao
08b151a681 Fix error: mtd/smart.c:2800:12: error: variable 'mincount' set but not used [-Werror,-Wunused-but-set-variable]
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2023-09-11 17:38:45 +08:00
zhengshaobo1
09a81017b8 To solve the problem of unordered setting of div & mux, after solving the problem, the frequency will be set to mux first, and then div
Signed-off-by: zhengshaobo1 <zhengshaobo1@xiaomi.com>
2023-09-10 13:36:16 +03:00
zhengshaobo1
f6ba2970e0 Solve the risk of dividing by 0 when setting frequency points
Signed-off-by: zhengshaobo1 <zhengshaobo1@xiaomi.com>
2023-09-10 13:36:16 +03:00
wangming9
f05e72324c drivers/video: fix build error on CONFIG_DEBUG_OPTLEVEL="-O3"
Summary
The following compilation error occurs after configuring CONFIG_DEBUG_OPTLEVEL="-O3"
CC:  ping.c video/video.c: In function 'video_ioctl':
video/video.c:2347:22: error: 'control.size' may be used uninitialized [-Werror=maybe-uninitialized]
 2347 |               control->size,
      |                      ^~
video/video.c:2273:28: note: 'control' declared here
 2273 |   struct v4l2_ext_control  control;
      |                            ^~~~~~~

Signed-off-by: wangming9 <wangming9@xiaomi.com>
2023-09-09 17:08:23 +03:00
Andre Heinemans
329e050c30 Added NXP SE05x support (secure element) 2023-09-09 15:54:08 +08:00
zhangyuan21
59f7fe11a3 usbdev: adb use fs device for ep process
Signed-off-by: zhangyuan21 <zhangyuan21@xiaomi.com>
2023-09-09 15:52:08 +08:00
zhangyuan21
1f6d9bbd17 usbdev: add usbdev fs device for usb char device
Add usb_fs driver so that userspace can directly transfer USB packets
through the EP node. ADB, Fastboot, MTP will use usb_fs, these class
driver only need to provide the descriptors and register the usb_fs device.

Signed-off-by: zhangyuan21 <zhangyuan21@xiaomi.com>

Signed-off-by: zhangyuan21 <zhangyuan21@xiaomi.com>
2023-09-09 15:52:08 +08:00
SPRESENSE
60364d7c72 drivers/sensors/bmi270: Enable to select config memory
Allow to transfer the BMI270 configuration data directly, and
provide an option to use the heap memory if it cannot transfer
directly.
2023-09-09 00:46:24 +08:00
SPRESENSE
a015aa4fca boards: cxd56xx: Add board-specific driver for bmi270 2023-09-09 00:46:24 +08:00
raiden00pl
e26dfec157 cmake: add support for sensors/bmi270 2023-09-09 00:43:09 +08:00
raiden00pl
e83fd87f9c driver/sensors/: BMI270 fix compilation if sensor works in SPI mode 2023-09-09 00:43:09 +08:00
wanggang26
0e7e7c4ee6 rpmb: add virtio rpmb support
The RPMB partition cannot be accessed via standard block layer, but by a set of specific commands: WRITE, READ, GET_WRITE_COUNTER, and PROGRAM_KEY. Such a partition provides authenticated and replay protected access, hence suitable as a secure storage.

Signed-off-by: wanggang26 <wanggang26@xiaomi.com>
2023-09-09 00:13:25 +08:00
dongjiuzhu1
88105f2b3d driver/sensors: fix race condiftion about rptun thread recursive
In sensor_rpmsg_ioctl, when rpmsg_get_tx_payload_buffer is block,
The rptun thread will continue to process rx_buffers from other cores,
So the proxy may be released in sensor_unadv_handler, then if using
the proxy, It causes a crash.
backtrace:
0  0x06007c2e in is_rpmsg_ept_ready (ept=0x5a5a5a5a) at nuttx/include/openamp/rpmsg.h:172
1  0x06013354 in rpmsg_send_nocopy (len=<optimized out>,
    data=<optimized out>, ept=<optimized out>) at nuttx/include/openamp/rpmsg.h:521
2  rpmsg_send_nocopy (ept=0x5a5a5a5a, data=data@entry=0x201facf0,
    len=len@entry=40) at nuttx/include/openamp/rpmsg.h:512
3  0x06013b34 in sensor_rpmsg_ioctl (dev=dev@entry=0x201b7388,
    cmd=538701816, cmd@entry=2690, arg=0, len=len@entry=0,
        wait=<error reading variable: dwarf2_find_location_expression:
        Corrupted DWARF expression.>) at ../../../drivers/sensors/sensor_rpmsg.c:395
4  0x06013cce in sensor_rpmsg_alloc_proxy (dev=dev@entry=0x201b7388,
    ept=ept@entry=0x202073d0, msg=msg@entry=0x201684f0) at ../../../drivers/sensors/sensor_rpmsg.c:498
5  0x06013d12 in sensor_rpmsg_adv_handler (ept=0x202073d0,
    data=0x201684f0, len=49, src=<optimized out>, priv=0x202073c8) at ../../../drivers/sensors/sensor_rpmsg.c:905
6  0x0600d45e in sensor_rpmsg_ept_cb (ept=<optimized out>,
    data=<optimized out>, len=<optimized out>, src=<optimized out>,
    priv=0x202073c8) at ../../../drivers/sensors/sensor_rpmsg.c:1168

Signed-off-by: dongjiuzhu1 <dongjiuzhu1@xiaomi.com>
2023-09-08 22:39:02 +08:00
dongjiuzhu1
f8052cdc76 driver/sensors: using list_for_every_entry_safe to fix race condition
Signed-off-by: dongjiuzhu1 <dongjiuzhu1@xiaomi.com>
2023-09-08 22:39:02 +08:00
Jukka Laitinen
b343f5c0e7 drivers/net: Add a management driver for ksz9477 ethernet switch
Signed-off-by: Jukka Laitinen <jukkax@ssrc.tii.ae>
2023-09-08 22:34:27 +08:00
chenrun1
dd4055be78 button_upper.c:Modify the unknown command message level in ioctl to iinfo
Signed-off-by: chenrun1 <chenrun1@xiaomi.com>
2023-09-08 15:55:28 +03:00
yinshengkai
15f88804ca drivers/alarm: modify the default precision of up_perf_gettime to ns
Signed-off-by: yinshengkai <yinshengkai@xiaomi.com>
2023-09-08 01:09:02 +03:00
yangyalei
fd776e8cee fix wait after vfork return error
vfork use waitpid hang father process,
but waitpid release child processs information by default.
So when user call wait, it return errno 10.

Signed-off-by: yangyalei <yangyalei@xiaomi.com>
2023-09-08 00:53:56 +03:00
Alan Carvalho de Assis
4b67e23049 mcp23008 Initial support 2023-09-08 01:33:12 +08:00
yintao
23dee24a7d nuttx/usrsock: fix rpmsg_usrsock memory leak when stop remote
1 0x826037 in host_memalign sim/posix/sim_hostmemory.c:180
2 0x82665a in host_realloc sim/posix/sim_hostmemory.c:222
3 0x6320b8 in mm_realloc sim/sim_heap.c:261
4 0x63201f in mm_malloc sim/sim_heap.c:193
5 0x632124 in mm_zalloc sim/sim_heap.c:296
6 0x62cbd2 in zalloc umm_heap/umm_zalloc.c:70
7 0x5f3548 in usrsock_rpmsg_ns_bind usrsock/usrsock_rpmsg_server.c:977
8 0x5cdb7a in rptun_ns_bind rptun/rptun.c:604
9 0x760a94 in rpmsg_virtio_ns_callback open-amp/lib/rpmsg/rpmsg_virtio.c:676
10 0x75f958 in rpmsg_virtio_rx_callback open-amp/lib/rpmsg/rpmsg_virtio.c:583
11 0x76b2c6 in virtqueue_notification open-amp/lib/virtio/virtqueue.c:711
12 0x756872 in rproc_virtio_notified open-amp/lib/remoteproc/remoteproc_virtio.c:433
13 0x751d2c in remoteproc_get_notification open-amp/lib/remoteproc/remoteproc.c:1005
14 0x5caa15 in rptun_worker rptun/rptun.c:344
15 0x5cabc7 in rptun_thread rptun/rptun.c:380
16 0x5849ca in nxtask_start task/task_start.c:129
17 0x62fd6a in pre_start sim/sim_initialstate.c:52

Signed-off-by: yintao <yintao@xiaomi.com>
2023-09-08 01:15:26 +08:00
haopengxiang
3a0e713f2e dirvers/mtd/dhara: add dhara folder in gitignore
Signed-off-by: haopengxiang <haopengxiang@xiaomi.com>
2023-09-07 23:05:11 +08:00
dongjiuzhu1
bfb0095ec7 driver/syslog: reset syslog buffer when syslog buffer include invalid data
When the machine is cold started, the psram area where the syslog
buffer is located contains some random values, so it will cause
loss of valid log.

Signed-off-by: dongjiuzhu1 <dongjiuzhu1@xiaomi.com>
2023-09-07 11:42:24 +03:00
zhangyuan21
aa9f15d635 arch_alarm: change tick to g_current_tick
When the system starts up, the hw count may not start counting from 0,
which can cause the processing time of the first oneshot handler to be
too long. Therefore, the current tick value should be set based on the
hw count during initialization.

Signed-off-by: zhangyuan21 <zhangyuan21@xiaomi.com>
2023-09-06 17:28:26 +08:00
likun17
7d7345a620 sensor/bmp180.c:provides work in character device mode and UORB communication mode.
Use the macro CONFIG_SENSORS_BMP180_UORB to enable the uorb feature.

Signed-off-by: likun17 <likun17@xiaomi.com>
2023-09-06 08:02:52 +02:00
Jukka Laitinen
7ec3cad5af drivers/timers/pcf85263.c: Fix compilation
Add the missing semicolons

Signed-off-by: Jukka Laitinen <jukkax@ssrc.tii.ae>
2023-09-06 12:20:57 +08:00
zhangyuan21
0efd4d0e12 usbdev: Split usbdev descriptor information
The class device only handles descriptor information specific to the class,
and shared descriptor information is passed through parameters and
handled by the composite driver.

Signed-off-by: zhangyuan21 <zhangyuan21@xiaomi.com>
2023-09-06 02:29:32 +08:00
likun17
b5bccbb70e sensor:bmi160.c:Fix the missing items caused by resolving merge conflicts after bmi160 cherry-pick submission. This cherry-pick missing CI check did not detect it.
Signed-off-by: likun17 <likun17@xiaomi.com>
2023-09-06 02:24:35 +08:00
Xiang Xiao
a9efeeeebc drivers/clk: Change CLK_SET_RATE_NO_REPARENT to CLK_MUX_SET_RATE_NO_REPARENT
since only mux clk use this flag

Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2023-09-05 18:05:50 +03:00
Tiago Medicci Serrano
9357d70c25 audio/cs4344: Set master clock when resetting the device
Whevenever the bit rate is going to be set, it's necessary to first
set the master clock if the underlying device supports it. If it
fails, just return the error code.
2023-09-05 13:33:05 +08:00
Tiago Medicci Serrano
d9169b84e4 audio/cs4344: Set the default sample rate to the lowest possible
According to the struct `mclk_rate_s`, set the default sample rate
to its lowest valid value. This prevents the underlying driver from
setting unsupported values.
2023-09-05 13:33:05 +08:00
likun17
ad643fe7a3 sensor/bmi160.c:provides work in character device mode and UORB communication mode.
Create bmi160_base.h, bmi160_base.c bmi160_uorb.c files, the bmi160_base file stores
public function interfaces, and the bmi160_uorb file stores functions related to the
uorb framework. Switch the character interface and UORB interface through the
macro CONFIG_SENSORS_BMI160_UORB.

Signed-off-by: likun17 <likun17@xiaomi.com>
2023-09-04 08:17:44 +02:00
likun17
bc066af50a sensor/bmi160.c:provides work in character device mode and UORB communication mode.
create a new bmi160.h file.

Signed-off-by: likun17 <likun17@xiaomi.com>
2023-09-04 08:17:44 +02:00
TimJTi
3b4ea52a79 Remove spinlock, change to i2c_readwrite where appropriate , and consolidate i2c read and write calls. 2023-09-02 16:26:10 +03:00
zhangyuan21
06d9356d12 usbdev: Use BOARD_USBDEV_SERIALSTR config directly
A usbdev has only one serial string, so use a unique macro to control it.

For boards that enable board serial string using COMPOSITE_BOARD_SERIALSTR,
PL2303_BOARD_SERIALSTR, CDCACM_BOARD_SERIALSTR, USBADB_BOARD_SERIALSTR,
USBMSC_BOARD_SERIALSTR, and RNDIS_BOARD_SERIALSTR, they need to be replaced
with BOARD_USBDEV_SERIALSTR.

Signed-off-by: zhangyuan21 <zhangyuan21@xiaomi.com>
2023-09-01 19:29:12 +08:00
zhanghongyu
b30a389459 usrsock_server: fix coverity for recvfrom handle
req->usockid may not be in a valid range when ret less than zero and not -EAGAIN.

Signed-off-by: zhanghongyu <zhanghongyu@xiaomi.com>
2023-09-01 12:30:54 +03:00
chao an
664927c86e mm/alloc: remove all unnecessary cast for alloc
Fix the minor style issue and remove unnecessary cast

Signed-off-by: chao an <anchao@xiaomi.com>
2023-08-30 14:34:20 +08:00
Eero Nurkkala
db13d5e24c drivers/mmcsd: fix regression causing emmcsd not working
Commit 50a8ec6 broke many mmc devices.  Only if the flag
priv->caps & SDIO_CAPS_4BIT_ONLY was set, it migth work.
Without the flag, the mmc clock is never set (mmcsd_widebus()
call is terminated early stopping the clock).  This flag
is probably not very generic because most mmc hw support
1, 4 and 8 bit modes.

JEDEC specifies a bus width selection procedure, but it's
not implemented in this mmcsd_sdio.c driver.  Thus, it's
not known whether the hw supports 1, 4 anf 8 bit modes or
a combination of them.

However, with priv->caps & SDIO_CAPS_4BIT_ONLY the driver
suddenly assigns priv->buswidth = MMCSD_SCR_BUSWIDTH_4BIT
making it the only way to have the driver working.

Fix this by relaxing the above mentioned restrictions.

Signed-off-by: Eero Nurkkala <eero.nurkkala@offcode.fi>
2023-08-30 14:33:32 +08:00
dongjiuzhu1
c983aee38a driver/serial: fix race condition about calling rxflowcontrol in mutli thread
Signed-off-by: dongjiuzhu1 <dongjiuzhu1@xiaomi.com>
2023-08-30 14:33:00 +08:00
dongjiuzhu1
ec4f6ecce2 driver/serial: fix error echo about VT100 escape sequence
Signed-off-by: dongjiuzhu1 <dongjiuzhu1@xiaomi.com>
2023-08-30 14:26:11 +08:00
Michal Lenc
f9d4a47889 pcf8575: fix compilation warnings
Just few compile warning fixes in case CONFIG_IOEXPANDER_MULTIPIN is
selected.

Signed-off-by: Michal Lenc <michallenc@seznam.cz>
2023-08-29 20:34:12 +08:00
Michal Lenc
b005f844f5 ioexpander: add support for ISO1I813T expander
This commit adds basic support for electrically isolated 8 bit expander.
The expander communicates with the MCU via SPI interface. Both single
and multiple pin read are supported.

Signed-off-by: Michal Lenc <michallenc@seznam.cz>
2023-08-29 17:35:59 +08:00
chao an
b60f01a55b inode/i_private: remove all unnecessary cast for i_private
Signed-off-by: chao an <anchao@xiaomi.com>
2023-08-29 08:58:07 +02:00
SPRESENSE
f556cb106a drivers/video: Fix an issue isx019 may freeze
isx019 driver freezes by I2C access in the interrupt context.
This I2C access is intended to stop data output from FPGA.
Delete this I2C access for the following reasons.
- Data output from FPGA does not affect power consumption
- There are no problems in capture restart without data output stop
  since restart is done by image data block first.
2023-08-29 13:37:01 +08:00
Michal Lenc
fa63ef69c9 ioexpander: add support for ISO1H812G expander
This commit adds support for galvanic isolated ISO1H812G SPI expander.
Both single pin and multiple pin writes are supported.

Signed-off-by: Michal Lenc <michallenc@seznam.cz>
2023-08-29 10:31:40 +08:00
chao an
7aa45305b7 fs/inode: remove all unnecessary check for filep/inode
Since VFS layer already contains sanity checks, so remove unnecessary lower half checks

Signed-off-by: chao an <anchao@xiaomi.com>
2023-08-29 09:47:11 +08:00
dulibo1
127bd81674 regulator:check id conflict when register
Signed-off-by: dulibo1 <dulibo1@xiaomi.com>
2023-08-29 02:59:59 +08:00