fangzhenwei
c7c91488d1
nuttx/pty: pass read nonblock flag to pipe
...
Signed-off-by: fangzhenwei <fangzhenwei@xiaomi.com>
2022-02-22 13:42:44 +08:00
fangzhenwei
1afdb06981
nuttx/pty:pty FIONBIO pass to pipe control
...
1. pass FIONBIO ioctl to pipe
2. resolve the return value error
Signed-off-by: fangzhenwei <fangzhenwei@xiaomi.com>
2022-02-22 13:42:44 +08:00
Alan C. Assis
9480ec54eb
drivers: Fix DAC license, the copyright owner didn't modify any line
2022-02-21 14:35:44 +01:00
Alan C. Assis
4553406ad4
drivers: Fix ADC license, the copyright owner didn't modify any line
2022-02-21 14:35:44 +01:00
Xiang Xiao
2dcaab8af8
serial/pty: Remove the unused code related to CONFIG_PSEUDOTERM_FULLBLOCKS
...
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2022-02-20 21:22:24 +01:00
Xiang Xiao
1d1bdd85a3
Remove the double blank line from source files
...
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2022-02-20 20:10:14 +01:00
Petro Karashchenko
27d75e7552
drivers/ioexpander: minor initialize and styling fixes
...
Signed-off-by: Petro Karashchenko <petro.karashchenko@gmail.com>
2022-02-18 16:44:40 +08:00
Xiang Xiao
e0ae2963d2
drivers/pipe: Don't use sched_[lock|unlock] to do protection
...
since the sched lock can't work in SMP context
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2022-02-17 22:08:43 +01:00
Xiang Xiao
fe04eb535f
drivers/pipe: Fix the format style issue
...
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2022-02-17 22:08:43 +01:00
Huang Qi
ccc708a142
vncserver: Fix dead lock on re-connect
...
`vnc_remove_queue` would waiting for new frame update request forever
even if the connection is lost, the updater thread wouldn't exit.
But the server thread will join updater thread before accept new client
connection, then we can't re-conncet to vnc server.
Signed-off-by: Huang Qi <huangqi3@xiaomi.com>
2022-02-16 22:57:21 +08:00
Petro Karashchenko
41c95da594
register_driver: fix driver modes accross the code
...
State of problem:
- Some drivers that do not support write operations (does not
have write handler or ioctl do not perform any write actions)
are registered with write permissions
- Some drivers that do not support read operation (does not
have read handler or ioctl do not perform any read actions)
are registered with read permissions
- Some drivers are registered with execute permissions
Solution:
- Iterate code where register_driver() is used and change 'mode'
parameter to reflect the actual read/write operations executed
by a driver
- Remove execute permissions from 'mode' parameter
Signed-off-by: Petro Karashchenko <petro.karashchenko@gmail.com>
2022-02-16 16:15:29 +08:00
Petro Karashchenko
a1f6717e2a
mtd/filemtd: improve write and erase access
...
Signed-off-by: Petro Karashchenko <petro.karashchenko@gmail.com>
2022-02-15 12:06:24 +08:00
Masayuki Ishikawa
0258968abd
drivers: wireless: Fix gs2200m_ioctl_accept()
...
Summary:
- I received an issue report that multiwebcam in Spresense SDK 2.4.0
has a problem with the Chrome browser
- Actually, the browser tries to establish 2 connections but
the multiwebcam can handle only 1 connection. And if accept() for
the second connection is delayed, the connection no longer exists
in the gs2200m hardware
- This commit fixes this issue by checking if the cid is valid or not.
Impact:
- gs2200m driver only
Testing:
- Tested with spresense:wifi_smp
Signed-off-by: Masayuki Ishikawa <Masayuki.Ishikawa@jp.sony.com>
2022-02-15 10:22:42 +08:00
Jiuzhu Dong
ef66c620c4
input/uinput: fix codesyle issue
...
Signed-off-by: Jiuzhu Dong <dongjiuzhu1@xiaomi.com>
2022-02-11 11:58:49 +08:00
zouboan
3f6626f765
drivers/mtd/sst39vf.c: patch adress bug
2022-02-10 17:05:53 +08:00
Xiang Xiao
845640bc33
serial/pty: Decouple SUSv1 style from pseudo fs operation
...
and always enable BSD style PTYs since this feature doesn't
consume the additional code size
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2022-02-09 20:35:59 +08:00
Xiang Xiao
8e64db45c7
serial/pty: Close the internal pipe when reference count drop to zero
...
so the other side can get the hang up notification
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2022-02-09 01:42:51 +08:00
zouboan
6166dd5833
drivers/mtd/mtd_config.c: enlarge the limits of blocksize in struct mtdconfig_struct_s
2022-02-09 01:39:55 +08:00
Xiang Xiao
358dab3723
serial/pty: Reorder the register driver to simplify the error handling
...
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2022-02-08 16:11:26 +01:00
Xiang Xiao
61066ecbc8
serial/pty: Sync the default termios setting regardless CONFIG_SERIAL_TERMIOS
...
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2022-02-08 09:33:46 -03:00
Xiang Xiao
3ec208fdbc
serial/pty: Don't initialize pd_iflag to ISIG
...
since ISIG belong local mode flags not input mode flags,
but local mode isn't implemented by pty driver yet.
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2022-02-08 09:33:46 -03:00
Xiang Xiao
e3fed03e43
serial/pty: Don't use shced_[lock|unlock] to protect pp_locked
...
since the sched lock can't work in SMP context
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2022-02-08 09:31:56 -03:00
Xiang Xiao
f03fc4a179
serial/pty: Destroy pp_slavesem in pty_destroy to avoid the leak
...
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2022-02-08 09:31:56 -03:00
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