Commit Graph

4342 Commits

Author SHA1 Message Date
ligd
0155e910dc serial: fix cu crash caused by ioctl is NULL
Signed-off-by: ligd <liguiding1@xiaomi.com>
2022-02-07 13:31:46 +08:00
Xiang Xiao
22f2269d6a drivers/pipe: Remove pipe from file system after open
to make the pipe as an anonymous object as soon as
possible and simplify the life cycle management

Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2022-02-07 12:05:47 +08:00
Xiang Xiao
345d2ac227 drivers/pipe: Add g_ prefix to pipe_fops and fifo_fops
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2022-02-07 12:05:47 +08:00
Xiang Xiao
15c487085a serial/ptmx: Fix the typo error in ptmx_minor_free
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2022-02-06 16:19:27 +01:00
Xiang Xiao
6cc0388f4f serial/ptmx: Add lock to avoid the race condition in ptmx_minor_free
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2022-02-06 16:19:27 +01:00
Xiang Xiao
01a234bfb1 pipe: Add DEV_PIPE_VFS_PATH to specify the pipe location
and put into /var/pipe by default like other pseudo device

Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2022-02-05 23:37:44 +01:00
Xiang Xiao
91c331f3fd pipe: Change the default of DEV_PIPE_MAXSIZE from 256/1024 to 65535
since both values have to typedef pipe_ndx_t to uint16_t,
it doesn't make sense to limit the size smaller than 65535

Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2022-02-05 23:37:44 +01:00
Petro Karashchenko
74a4394352 drivers/syslog/syslog_device: fix flushing data when end of line is detected
Signed-off-by: Petro Karashchenko <petro.karashchenko@gmail.com>
2022-02-05 03:10:31 +08:00
Alexander Lunev
a597e66070 bcm43xxx: fixed several warnings:
warning: ISO C forbids 'return' with expression, in function returning void [-Wpedantic]
warning: format '%x' expects argument of type 'unsigned int', but argument 4 has type 'uint8_t * {aka unsigned char *}' [-Wformat=]
warning: too many arguments for format [-Wformat-extra-args]
2022-02-04 15:26:42 -03:00
chao.an
5457a9a450 serial/pty: fix the lock handling
Signed-off-by: chao.an <anchao@xiaomi.com>
2022-02-03 13:14:34 +08:00
chao.an
2ab4003e0f usbhost/max3421e: fix leaving from critical section
Signed-off-by: chao.an <anchao@xiaomi.com>
2022-02-02 21:45:13 +08:00
Xiang Xiao
4c167b0729 Correct the code alignment
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2022-02-01 21:22:21 -03:00
Xiang Xiao
f987668068 serial: Consolidate the general termios in the common place
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2022-02-01 21:22:21 -03:00
Xiang Xiao
01b791d773 drivers/syslog: Implement RTT based log channel
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2022-02-01 11:26:46 +01:00
Xiang Xiao
1e87d50d34 drivers/syslog: Refine Kconfig option
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2022-01-31 13:42:19 +01:00
Xiang Xiao
6a0dbba62b syslog: Include nuttx/syslog/syslog.h in include/nuttx/syslog/syslog_rpmsg.h
to avoid struct syslog_channel_s used before definition
and remove the unnecessary inclusion

Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2022-01-31 13:41:56 +01:00
Alan C. Assis
0b23257ef1 i2c: Add support to TCA9548A multiplexer 2022-01-31 13:40:17 +01:00
David Sidrane
341bfeb8b6 cdcacm:support returning c_cflag & speed via termios
Implementation was incomplete. This can now be
   used to pass the lincodeing information to
   a real serial port.
2022-01-31 01:15:29 +01:00
chao.an
8e31fa572a segger/RTT: hotfix for RTT compile warning
Signed-off-by: chao.an <anchao@xiaomi.com>
2022-01-29 17:26:04 +08:00
chao.an
11f04e516a drivers/segger: download the RTT/SystemView from github
RTT:
https://github.com/SEGGERMicro/RTT/archive/refs/tags/V7.54.zip

SystemView:
https://github.com/SEGGERMicro/SystemView/archive/refs/tags/V3.30.zip

Signed-off-by: chao.an <anchao@xiaomi.com>
2022-01-29 17:26:04 +08:00
chao.an
e04ccba78a note/sysview: add Segger System View support
Reference:
https://www.segger.com/products/development-tools/systemview
https://github.com/SEGGERMicro/SystemView
https://github.com/SEGGERMicro/RTT

Signed-off-by: chao.an <anchao@xiaomi.com>
2022-01-29 17:26:04 +08:00
liucheng5
764fc7ef5e fix: sensor: ppg of dual- and quad-channel sensor types
Some PPG devices have 4 ADCs to output quad-channel PPG values while some of them only have 2 ADCs to output dual-channel PPG.
To deal the case above, the type PPGD(PPG of Dual-channel) takes the place of former type PPG, which also have 2-channel PPG outputs. Type PPGQ (PPG of Quad-channel) is new for 4-ADC-PPG. Both types have contained new data "gain" to indicate ADC gains of each PPG channel, for the reason that the gains may vary during automatical optical adjustments.

Signed-off-by: liucheng5 <liucheng5@xiaomi.com>
2022-01-28 14:07:46 +08:00
Xiang Xiao
ecccc614bd arch: Add up_perf_getfreq function
it's important to know the perf count frequency

Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2022-01-25 21:02:14 -03:00
Xiang Xiao
bc2dd37051 drivers/timers: Add weak_function for up_ function
so the user could replace the implementation if need

Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2022-01-25 13:35:05 +01:00
Xiang Xiao
a24ae559c2 arch: Decouple up_critmon_[gettime|convert] from critmon
and rename to up_perf_[gettime|convert] since it's useful in other case

Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2022-01-25 14:43:34 +08:00
chao.an
c50d39060b drivers/sensors: fix Kconfig warning
drivers/sensors/Kconfig:590:warning: defaults for choice values not supported

Signed-off-by: chao.an <anchao@xiaomi.com>
2022-01-24 23:52:56 +08:00
Alan C. Assis
d8163803d1 sensors: Add support to MS5611 Barometer 2022-01-24 10:23:45 +08:00
Alan C. Assis
d664385784 Move MS58xx CRC-4 to include/ it will be used by other sensors 2022-01-24 10:23:45 +08:00
Xu Xingliang
021363f1db driver/mmcsd: add option to limit block count in multiple-block transfer mode.
Signed-off-by: Xu Xingliang <xuxingliang@xiaomi.com>
2022-01-22 14:59:26 +08:00
Petro Karashchenko
08043fb5bc net: unify FAR keyword usage for all net buffer memory mapped buffers
Signed-off-by: Petro Karashchenko <petro.karashchenko@gmail.com>
2022-01-20 01:42:56 +08:00
yinshengkai
3bb4e053fe driver/uinput: add uinput button support
Signed-off-by: yinshengkai <yinshengkai@xiaomi.com>
2022-01-20 01:20:19 +08:00
yinshengkai
377c15955e driver: add uinput support
Signed-off-by: yinshengkai <yinshengkai@xiaomi.com>
2022-01-20 01:20:19 +08:00
yinshengkai
676b735c4a driver/touchscreen: Add support for write operations
Signed-off-by: yinshengkai <yinshengkai@xiaomi.com>
2022-01-20 01:20:19 +08:00
ligd
302945760c rpmsg_rtc: dirctly call rpmsg_rtc_server_xx() in server_ept_cb()
Signed-off-by: ligd <liguiding1@xiaomi.com>
2022-01-19 19:37:02 +08:00
SPRESENSE
021a58d71a usbdev: Add board unique serial string support
iSerialNumber field in the device descriptor can be used to determining the
board when multiple boards connected to the same host. So add feature to change
serial string by board unique ID dynamically.
To use this feature, user must be implement the board_usbdev_serialstr() logic.

refs #13909
2022-01-19 09:25:48 +01:00
ligd
67f7efe0b1 rpmsg_rtc: fix typo
Signed-off-by: ligd <liguiding1@xiaomi.com>
2022-01-18 17:51:02 +01:00
ligd
a9e3a5c233 rpmsg_rtc: to simply the SYNC cmd logic
Signed-off-by: ligd <liguiding1@xiaomi.com>
2022-01-18 22:48:15 +08:00
ligd
cb502a869c clock: update clock_synchronize() to support with time
Signed-off-by: ligd <liguiding1@xiaomi.com>
2022-01-18 22:48:15 +08:00
Petro Karashchenko
9551de7115 net: use HTONS, NTOHS, HTONL, NTOHL macro in kernel code
Signed-off-by: Petro Karashchenko <petro.karashchenko@gmail.com>
2022-01-18 10:59:47 +01:00
Peter Kalbus
04b27b6877 Fix aligment issue: pktbuf needs to be 16bit aligned
Otherwise hardfault in cdcecm_receive() at BUF->type.
2022-01-18 09:08:09 +01:00
Petro Karashchenko
8d3bf05fd2 include: fix double include pre-processor guards
Signed-off-by: Petro Karashchenko <petro.karashchenko@gmail.com>
2022-01-16 11:11:14 -03:00
Xiang Xiao
1adee3d657 rtc/rpmsg: Implement ioctl and destroy on server side
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2022-01-16 11:58:13 +01:00
Xiang Xiao
fd6a643460 rtc/rpmsg: Remove C99 specific statement
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2022-01-16 11:58:13 +01:00
Xiang Xiao
2b238d0772 rtc/rpmsg: Replace clock_[get|set]time with rtc_ops_s::[rd|set]time
to support the multiple rtc driver instance

Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2022-01-16 11:58:13 +01:00
Xiang Xiao
3d3c4767a9 rtc/rpmsg: Replace session to client
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2022-01-16 11:58:13 +01:00
Xiang Xiao
41b9cf3cd8 rtc/rpmsg: Add sync parameter to control whether call clock_synchronize
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2022-01-16 11:58:13 +01:00
Xiang Xiao
6121f15d51 rtc/rpmsg: Move rtc_initialize out of rpmsg_rtc_initialize
like other rtc driver

Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2022-01-16 11:58:13 +01:00
Huang Qi
2e35b6d611 serial/uart_16550: Allow uintptr_t as addr width
Signed-off-by: Huang Qi <huangqi3@xiaomi.com>
2022-01-14 19:40:30 +08:00
Fotis Panagiotopoulos
0c41611429 syslog: Fix in file channel initialization. 2022-01-13 19:16:10 +01:00
Jukka Laitinen
297c8dfc3a drivers/mmcsd/sdio.c: Fix struct packing of sdio_resp_r5
The struct memeber should be packed as well

Signed-off-by: Jukka Laitinen <jukkax@ssrc.tii.ae>
2022-01-13 10:34:28 -03:00