Commit Graph

5101 Commits

Author SHA1 Message Date
zhangyuan21
699c930987 drivers/usb: fixed sim usb dev and host build issue
Signed-off-by: zhangyuan21 <zhangyuan21@xiaomi.com>
2023-03-03 14:31:30 -03:00
Xiang Xiao
a2190aeb35 Fix error: '%s' directive output may be truncated
writing up to 31 bytes into a region of size 27 [-Werror=format-truncation=]

Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2023-03-03 04:08:22 -08:00
Huang Qi
44857ab30e driver/serial: Echo only determined by ECHO flag with termios enabled
Fix a bug that can not disable echo even if termios is enabled.

Signed-off-by: Huang Qi <huangqi3@xiaomi.com>
2023-03-03 09:44:30 +02:00
Huang Qi
68384e9db4 drivers/serial: Echo input in driver layer
Signed-off-by: Huang Qi <huangqi3@xiaomi.com>
2023-03-03 11:37:41 +08:00
yinshengkai
6e35a51feb note: optimize noteram_add, copy as much content as possible at a time
Signed-off-by: yinshengkai <yinshengkai@xiaomi.com>
2023-03-02 22:55:50 +08:00
Huang Qi
5ced61ce08 drivers/serial: Include spawn.h required by CONFIG_TTY_LAUNCH
Signed-off-by: Huang Qi <huangqi3@xiaomi.com>
2023-03-02 11:43:28 +08:00
zhanghongyu
16ea80e53b rndis: support iob offload
Signed-off-by: zhanghongyu <zhanghongyu@xiaomi.com>
2023-03-02 02:50:59 +08:00
yinshengkai
67461175fe note: support note filtering at runtime
Signed-off-by: yinshengkai <yinshengkai@xiaomi.com>
2023-03-01 22:09:41 +08:00
huxiandong
266455f01c mtd: Extend isbad and markbad func for mtd_dev_s
Signed-off-by: huxiandong <huxiandong@xiaomi.com>
2023-03-01 10:06:56 -03:00
Huang Qi
b178ce4da9 driver/pty: Map CR->LF from terminal input
NuttX only treat \n as new line after https://github.com/apache/nuttx/pull/8628,
so need this conversion to interact with terminal emulator.

Signed-off-by: Huang Qi <huangqi3@xiaomi.com>
2023-02-27 21:12:35 +08:00
Xiang Xiao
2c5f653bfd Remove the tail spaces from all files except Documentation
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2023-02-26 13:24:24 -08:00
zhangyuan21
528dce4f7f usbdev/adb: fixed adb build issue
Signed-off-by: zhangyuan21 <zhangyuan21@xiaomi.com>
2023-02-27 01:30:19 +08:00
yinshengkai
aa6bffef83 drivers/note: dump the latest scheduling information when panic
Signed-off-by: yinshengkai <yinshengkai@xiaomi.com>
2023-02-25 18:39:27 +08:00
yinshengkai
f9f0ab8dc4 drivers: add note driver backend for recording scheduling information
Signed-off-by: yinshengkai <yinshengkai@xiaomi.com>
2023-02-25 18:39:27 +08:00
pengyiqiang
621bf54efc drivers/video/fb: fix poll event lost
Signed-off-by: pengyiqiang <pengyiqiang@xiaomi.com>
2023-02-24 22:21:09 +08:00
yinshengkai
9ed1519cea note: handle tcb is empty, so that it can also record before the driver initialization
Signed-off-by: yinshengkai <yinshengkai@xiaomi.com>
2023-02-24 14:07:33 +08:00
lilei19
38f64f559d change strcpy to strlcpy
Signed-off-by: lilei19 <lilei19@xiaomi.com>
2023-02-24 12:15:40 +08:00
ligd
8b078d261f rptun: fix rptun_start() failed
Signed-off-by: ligd <liguiding1@xiaomi.com>
2023-02-23 22:49:47 +08:00
yinshengkai
29a7d267fb note: correct systime with perf count
Signed-off-by: yinshengkai <yinshengkai@xiaomi.com>
2023-02-23 22:30:07 +08:00
yinshengkai
55ce5d0511 note: remove SCHED_INSTRUMENTATION_HIRES
Signed-off-by: yinshengkai <yinshengkai@xiaomi.com>
2023-02-23 22:30:07 +08:00
Xiang Xiao
c54c9395a5 Revert "drivrs/mtd/filemtd.c: add block device MTD interface. Block MTD interface allows using block device directly as MTD instead of having to use file-system in between. NOTE that this provides the opposite capability of FTL which will let you use an MTD interface directly as a block device."
since filemtd can handle not only char device, but also block device.
This reverts commit 5ef548677a.
2023-02-22 16:38:29 +08:00
Zhe Weng
9d53de374c usrsock: Add DebugAssert for poll setup result
We never check its result and assume it will success, so an assert should be better than retval.

Signed-off-by: Zhe Weng <wengzhe@xiaomi.com>
2023-02-22 01:42:14 +08:00
Xiang Xiao
a841be9b9c drivers/note: Remove the warning of preemption and critical sections
since both aren't suitable after:
commit 98ab55ef68
Author: Xiang Xiao <xiaoxiang@xiaomi.com>
Date:   Fri Dec 30 12:02:47 2022 +0800

    drivers/note: Replace the scritical section with spin_xxx_wo_note

    to avoid to generate the unexpected schedule information

Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2023-02-20 19:27:32 +08:00
chao an
ee1e1108a7 drivers/note: fix build break by note rename change
Regression by:

| commit ee24396d77
| Author: Xiang Xiao <xiaoxiang@xiaomi.com>
| Date:   Tue Feb 14 01:11:48 2023 +0800
|
|     drivers/note: Change DRIVER_NOTExxx to DRIVERS_NOTExxx
|
|     follow other driver config style
|
|     Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>

Signed-off-by: chao an <anchao@xiaomi.com>
2023-02-20 16:19:57 +08:00
Xiang Xiao
ee24396d77 drivers/note: Change DRIVER_NOTExxx to DRIVERS_NOTExxx
follow other driver config style

Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2023-02-20 14:30:59 +08:00
Xiang Xiao
eafc80c055 drivers/note: Remove the dependence of noteram driver
since after the below commit, noteram driver can work even when
the instrumentation of csection, spinlock and smp is enabled

Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2023-02-20 14:30:59 +08:00
Xiang Xiao
6b14ad9337 driver/note: Restore SCHED_INSTRUMENTATION config to sched/Konfig
since the chip/board vendor could disable dirvers/note and
provide the implementation of sched_note_xxx by self

Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2023-02-20 14:30:59 +08:00
Oreh
9902f39d92 Add MTD loop driver (use filemtd) 2023-02-19 19:46:48 +08:00
Michal Lenc
333707e101 pwm: add PWM overwrite under CONFIG_PWM_OVERWRITE option
Generic drivers shoud not use architecture related config options like
CONFIG_SAMV7_PWM. This commit adds PWM pin overwrite under generic
configuration option CONFIG_PWM_OVERWRITE.

Now the overwrite can be used on other architectures as well or can be
completely disabled for SAMv7.

Signed-off-by: Michal Lenc <michallenc@seznam.cz>
2023-02-19 00:16:41 +08:00
TimJTi
f629b6063c Correct inconsistencies 2023-02-18 11:03:38 +08:00
Igor Mišić
8e4d461d61 drivers/mtd/ramtron: change nsectors size to uint32 2023-02-17 11:19:46 -03:00
Fotis Panagiotopoulos
85ceb7920e Typo fixes. 2023-02-17 11:17:11 -03:00
David Sidrane
9d0e712347 mmcsd_sdio:Release CPU during wait for Write Completion 2023-02-17 15:26:19 +08:00
David Sidrane
d570a93945 mmcsd_sdio:Insure a error exiting via mmcsd_removed will not Hang system.
mmcsd_removed will be called if the card is in invalid state.
   This can happen if the card is bad, or vibrations causes a power
   loss.

   mmcsd_removed resets:
     priv->capacity     = 0; /* Capacity=0 sometimes means no media */
     priv->blocksize    = 0;
     priv->probed       = false;
     priv->mediachanged = false;
     priv->wrbusy       = false;
     priv->type         = MMCSD_CARDTYPE_UNKNOWN;
     priv->rca          = 0;
     priv->selblocklen  = 0;
     priv->widebus      = false;

  If blocksize is set to 0 will cause the log2 to result
  in an infinate loop in some drivers.

  IS_EMPTY will check for priv->type = MMCSD_CARDTYPE_UNKNOWN
  and return ENODEV.
2023-02-17 15:26:19 +08:00
Nathan Hartman
409e2f3701 drivers/serial, libc/termios: Implement tcsendbreak
The TERMIOS(3) function tcsendbreak() and the IOCTLs TCSBRK and TCSBRKP
transmit a serial line Break.

Previously NuttX included an extern declaration for tcsendbreak() and
defines for TCSBRK and TCSBRKP but none of these were implemented.
Attempting to build programs that called tcsendbreak() would fail with
a linker error; attempting to use TCSBRK and TCSBRKP would result in an
error at runtime.

This changeset adds the tcsendbreak() function and handling for TCSBRK
and TCSBRKP; tcsendbreak() is implemented in terms of TCSBRK. Both
TCSBRK and TCSBRKP are implemented in terms of the BSD-compatible Break
IOCTLs TIOCSBRK and TIOCCBRK, which must be provided by the lower half
serial driver. Currently, not all lower half serial drivers in NuttX
support these IOCTLs. Those that do implement them may need one or more
Kconfig options to be set, such as `CONFIG_*_U[S]ART_BREAKS` and, on
some architectures, a separate `CONFIG_*_SERIALBRK_BSDCOMPAT`.

* drivers/serial/serial.c
  (uart_tcsendbreak): New function.
  (uart_ioctl): Implement TCSBRK and TCSBRKP.

* libs/libc/termios/lib_tcsendbreak.c
  (): New file.

* libs/libc/termios/Make.defs
  (CSRCS): Add lib_tcsendbreak.c to the build.

Thanks to Xiang Xiao for PR feedback.

Co-authored-by: Xiang Xiao <xiaoxiang781216@gmail.com>
2023-02-15 07:50:02 +08:00
zhangyuan21
32513cedf0 usbdev/adb: add adb usbclass_unbind function
Signed-off-by: zhangyuan21 <zhangyuan21@xiaomi.com>
2023-02-14 22:20:12 +08:00
jihandong
a1e04617f8 drivers/video/video: add poll support to capture
support part of Linux std:
https://www.kernel.org/doc/html/v4.9/media/uapi/v4l/func-poll.html

Capture devices set the POLLIN and POLLRDNORM flags in the revents field

Signed-off-by: jihandong <jihandong@xiaomi.com>
2023-02-13 23:17:45 +08:00
jihandong
ae7bc4e300 drivers/video/video: add NONBLOCK support
Signed-off-by: jihandong <jihandong@xiaomi.com>
2023-02-13 23:17:45 +08:00
zhangyuan21
b4aa5b0d0b usbdev: fixed DUALSPEED issue for adb/cdcecm/rndis
Signed-off-by: zhangyuan21 <zhangyuan21@xiaomi.com>
2023-02-13 18:47:42 +08:00
TimJTi
98e47a1770 FUSB302
Update fusb302.c

Update fusb302.c
2023-02-12 16:48:44 +08:00
zhangyuan21
8f4cb0fec3 rndis: add endpoint configure
ep3 is not avaliable in dummy hcd, so need to
make the endpoint number configurable.

Signed-off-by: zhangyuan21 <zhangyuan21@xiaomi.com>
2023-02-12 16:38:11 +08:00
zhangyuan21
f77a824105 usbdev/composite: remove excess uninitialize code
Signed-off-by: zhangyuan21 <zhangyuan21@xiaomi.com>
2023-02-12 16:37:21 +08:00
zhangyuan21
4ddcb88c65 usbhost: fixed cdcacm issue
1. fixed cdcacm build issue
2. unregister uart driver when usbhost destroy

Signed-off-by: zhangyuan21 <zhangyuan21@xiaomi.com>
2023-02-12 14:17:51 +08:00
Michal Lenc
824e6b3271 lcd/st7789: raise compilation error when CONFIG_SPI_CMDDATA is not set
CONFIG_SPI_CMDDATA is required for correct functionality of the display.

Signed-off-by: Michal Lenc <michallenc@seznam.cz>
2023-02-11 20:32:20 +08:00
David Sidrane
ac50b3a473 ioexpander/gpio:Add gpio_pin_register_byname 2023-02-11 18:31:40 +08:00
Peter Bee
1949991fe0 drivers/video: add sequence number to video frames
Signed-off-by: Peter Bee <bijunda1@xiaomi.com>
2023-02-09 23:27:15 +08:00
Peter Bee
2ebccd82b6 drivers/video: add timestamp support
Add support for timestamp and change in related drivers

Signed-off-by: Peter Bee <bijunda1@xiaomi.com>
2023-02-09 23:27:15 +08:00
chao an
74ce3b81d3 build/Kconfig: add BINDIR/APPSBINDIR to support out of tree build
First decoupling changes related to CMAKE

BINDIR/APPSBINDIR:
Output path of Kconfig which dynamically generated by NuttX Kernel/Apps
This option is consistent with the TOPDIR/APPSDIR by default, and will
be changed when out-of-tree compilation is supported

Signed-off-by: chao an <anchao@xiaomi.com>
2023-02-09 20:13:04 +08:00
chao an
e942a7c55e build/Kconfig: fix warnings detected by kconfiglib
Signed-off-by: chao an <anchao@xiaomi.com>
2023-02-09 20:07:46 +08:00
chao an
3a0fdb019d nuttx: replace all ARRAY_SIZE()/ARRAYSIZE() to nitems()
Signed-off-by: chao an <anchao@xiaomi.com>
2023-02-09 20:05:44 +08:00