Commit Graph

6121 Commits

Author SHA1 Message Date
ligd
ccd87767da timers: add weak function up_timer_gettime()
Signed-off-by: ligd <liguiding1@xiaomi.com>
2024-09-10 23:32:30 +08:00
zhangshoukui
1413fc0c1b drivers/rwbuffer: Set nblocks 0 after using wrflush(skip rwbuffer)
Signed-off-by: zhangshoukui <zhangshoukui@xiaomi.com>
Signed-off-by: dongjiuzhu1 <dongjiuzhu1@xiaomi.com>
2024-09-10 15:22:03 +08:00
fangpeina
cd15d37396 drivers/input: add dummy force feedback driver
Signed-off-by: fangpeina <fangpeina@xiaomi.com>
2024-09-10 15:21:42 +08:00
fangpeina
947a32184b drivers/include: clean up compilation warning about aw86225.c
Signed-off-by: fangpeina <fangpeina@xiaomi.com>
2024-09-10 15:21:42 +08:00
dongjiuzhu1
84b3b1daa0 ff/aw86225: implement aw86225 vibrator driver base on ff
Signed-off-by: dongjiuzhu1 <dongjiuzhu1@xiaomi.com>
2024-09-10 15:21:42 +08:00
dongjiuzhu1
f65491ba44 input/ff: support force feedback driver framework
Add new driver frameworks: force feedback for vibrator, like linux,
unify vendor vibrator driver using.

Incorporating a force feedback-based driving framework to replace the
conventional driver/motor setup for controlling vibrators not only
enhances the precision and responsiveness of the haptic feedback but
also aligns better with the advancements in Linux-based driver systems.

refs docs link: https://www.kernel.org/doc/html/v4.19/input/ff.html

Signed-off-by: dongjiuzhu1 <dongjiuzhu1@xiaomi.com>
2024-09-10 15:21:42 +08:00
Bowen Wang
6c339daa86 rptun/rptun_ivshmem: interrupt mode support
1. Change rptun_ivshmem from pci bus based to pci_ivshmem bus based;
2. Support the interrupt mode.

Signed-off-by: Bowen Wang <wangbowen6@xiaomi.com>
2024-09-10 14:34:31 +08:00
Bowen Wang
9c91ed2360 pci/pci_ivshmem: fix bug in remove and add vmid check
1. Should check the vmid in ivshmem_remove() when release irq instead
check the ivdev->reg;
2. Add vmid check in ivshmem_probe() because ivshmem driver only support
vmid == 0 or 1 for now in NuttX;

Signed-off-by: Bowen Wang <wangbowen6@xiaomi.com>
2024-09-10 14:34:31 +08:00
Bowen Wang
218210d26e pci/pci_ivshmem: add pci ivshmem driver support
Add common ivshmem driver, provide the ivshmem bus mechisam, so
many ivshmem based driver can change to pci_ivshmem based

Signed-off-by: Bowen Wang <wangbowen6@xiaomi.com>
2024-09-10 14:34:31 +08:00
Bowen Wang
ccb17f2bb4 pci/pci_uio_ivshmem: add pci uio ivshmem driver support
Application can open "/dev/uioX" and use `mmap()` to get the
memory provided by ivshmem device.

Signed-off-by: Bowen Wang <wangbowen6@xiaomi.com>
2024-09-10 14:34:31 +08:00
Bowen Wang
fa761a6be7 rptun/rptun_ivshmem: rptun_ivshmem to be compliable with 32 bit arch
Fix the compile waring in 32 bit arch

Signed-off-by: Bowen Wang <wangbowen6@xiaomi.com>
2024-09-10 14:34:31 +08:00
Bowen Wang
f8ba836174 rptun/rptun_ivshmem: add rptun ivshmem support
Rptun is a rptun fremework driver base on the Inter-Virtual Machine
Share Memory Device.
With this driver, two NuttX runs in different QEMU can communicate
with each other by the rpmsg api.

Signed-off-by: Bowen Wang <wangbowen6@xiaomi.com>
2024-09-10 14:34:31 +08:00
meijian
a7224cf35a net/netstatistics: add tx/rx bytes statistics for dev
We can see them in ifconfig:

ap> ifconfig
wlan0   Link encap:Ethernet HWaddr 42:64:7f:b3:12:03 at UP mtu 1500
        inet addr:10.0.1.2 DRaddr:10.0.1.1 Mask:255.255.255.0
        inet6 DRaddr: ::

        RX: Received Fragment Errors   Bytes
            00000b9b 00000000 00000000 21daf5
            IPv4     IPv6     ARP      Dropped
            00000a33 00000137 00000031 00000000
        TX: Queued   Sent     Errors   Timeouts Bytes
            00000ac4 00000ac4 00000000 00000000 1a2103
        Total Errors: 00000000

Signed-off-by: meijian <meijian@xiaomi.com>
2024-09-10 11:36:03 +08:00
Bowen Wang
0fbfcf4caf virtio-blk: support called read/write in interrupt
Coredump need call the block read/write ops in interrupt
Not consider the ops called in thread and intterupt simultaneously.
Only used for coredump now.

Signed-off-by: Bowen Wang <wangbowen6@xiaomi.com>
2024-09-10 11:35:35 +08:00
zhanghongyu
420648b0c6 drivers/pipes: add fcntl(F_SETPIPE_SZ/F_GETPIPE_SZ) support
allows user programs to modify pipe size, but not larger than
CONFIG_DEV_PIPE_MAXSIZE

Signed-off-by: zhanghongyu <zhanghongyu@xiaomi.com>
2024-09-10 11:35:15 +08:00
dongjiuzhu1
33f3c3552f Revert "Fix unwanted flush in the SPI slave driver"
because if priv->rx_length is zero , need to call SPIS_CTRLR_QPOLL to
receive new data from lower half and update priv->rx_length.

This reverts commit 6cb649ecf6.
2024-09-09 11:05:07 -03:00
dongjiuzhu1
c978f2fe4c drivers/mtd/bch: fix size_t overflow when offset > 4GB
Signed-off-by: dongjiuzhu1 <dongjiuzhu1@xiaomi.com>
2024-09-09 01:23:02 +08:00
dongjiuzhu1
5f0230d79f drivers/bch: fix uint32 overflow issue
Signed-off-by: dongjiuzhu1 <dongjiuzhu1@xiaomi.com>
2024-09-08 21:42:38 +08:00
Luchian Mihai
eadc2f5690 feat: add basic driver for amg88xx sensor
Basic amg88xx sensor handling (open, close, read, ioctl).
No interrupts supported. I intend to add support for this feature when I
gain more know-how on nuttx/posix.
2024-09-07 12:03:38 +08:00
chenrun1
44351959ee mmcsd_sdio:Limit the use of sleep in mmcsd.
reference:https://github.com/apache/nuttx/pull/12971

Signed-off-by: chenrun1 <chenrun1@xiaomi.com>
2024-09-06 12:25:55 +08:00
chenrun1
0e13ea9ed1 mmcsd_sdio:Fix performing read and write in irq
In some usage scenarios, read and write tasks will be performed during interruptions. If sleep is used at this time, it will cause a timeout crash. Therefore, a macro is added to determine whether it is currently interrupted to select sleep/delay.

Signed-off-by: chenrun1 <chenrun1@xiaomi.com>
2024-09-06 12:25:55 +08:00
lipengfei28
aeb98d9c05 fix Compile error
Signed-off-by: lipengfei28 <lipengfei28@xiaomi.com>
2024-09-06 10:01:11 +08:00
lipengfei28
b70922cb24 pci: add ioctl for userspace
which is same as OpenBSD:
https://github.com/openbsd/src/blob/master/sys/sys/pciio.h

Signed-off-by: lipengfei28 <lipengfei28@xiaomi.com>
2024-09-06 10:01:11 +08:00
lipengfei28
dba7700813 pci: add rom addr and rom size to resource
Signed-off-by: lipengfei28 <lipengfei28@xiaomi.com>
2024-09-06 10:01:11 +08:00
lipengfei28
3250625a15 pci: add find device from bus
Signed-off-by: lipengfei28 <lipengfei28@xiaomi.com>
2024-09-06 10:01:11 +08:00
lipengfei28
9dc9500aaf pci add register drivers
Signed-off-by: lipengfei28 <lipengfei28@xiaomi.com>
2024-09-06 10:01:11 +08:00
lipengfei28
c25f839b06 pci: add pci bus find capability interface
Signed-off-by: lipengfei28 <lipengfei28@xiaomi.com>
2024-09-06 10:01:11 +08:00
lipengfei28
45f1597562 pci: add pci read/write config/io space interface
Signed-off-by: lipengfei28 <lipengfei28@xiaomi.com>
2024-09-06 10:01:11 +08:00
lipengfei28
d9c8838319 pci: use g_pci_ctrl_list replace g_root_bus_list
Signed-off-by: lipengfei28 <lipengfei28@xiaomi.com>
2024-09-06 10:01:11 +08:00
yangshuyong
75f8c72dbb drivers/pci/pci_qemu_edu: update qemu edu driver code
Signed-off-by: yangshuyong <yangshuyong@xiaomi.com>
Signed-off-by: Bowen Wang <wangbowen6@xiaomi.com>
Signed-off-by: lipengfei28 <lipengfei28@xiaomi.com>
2024-09-06 10:01:11 +08:00
yangshuyong
9c07b369e9 drivers/pci/pci_qemu_test: update qemu pci test code
Change the qmeu pci test code for new pci driver framework

Signed-off-by: yangshuyong <yangshuyong@xiaomi.com>
Signed-off-by: Bowen Wang <wangbowen6@xiaomi.com>
Signed-off-by: lipengfei28 <lipengfei28@xiaomi.com>
2024-09-06 10:01:11 +08:00
yangshuyong
7cbb7d36d8 Changed the x86 64 pci driver
Signed-off-by: yangshuyong <yangshuyong@xiaomi.com>
Signed-off-by: lipengfei28 <lipengfei28@xiaomi.com>
2024-09-06 10:01:11 +08:00
yangshuyong
125884ae95 Changed the pci bus for arm architecture
Signed-off-by: yangshuyong <yangshuyong@xiaomi.com>
Signed-off-by: lipengfei28 <lipengfei28@xiaomi.com>
2024-09-06 10:01:11 +08:00
fangxinyong
7b05a550dc sched: replace up_cpu_index with this_cpu
Make this_cpu is arch independent and up_cpu_index do that.
In AMP mode, up_cpu_index() may return the index of the physical core.

Signed-off-by: fangxinyong <fangxinyong@xiaomi.com>
2024-09-05 12:09:24 +08:00
Saurav Pal
fc31c61730 boards/sim: Defconfigs for nand and mnemofs
Adds nand and mnemofs sim configs.

Signed-off-by: Saurav Pal <resyfer.dev@gmail.com>
2024-09-05 11:02:05 +08:00
yangsong8
918ae4cc84 drivers: usbdev: Fix USB descriptor
This commit fixes the regression from https://github.com/apache/nuttx/pull/13190

Signed-off-by: yangsong8 <yangsong8@xiaomi.com>
2024-09-03 11:45:45 -03:00
chao an
85c39e96d6 global/variables: add g_ prefix to some global variables
Signed-off-by: chao an <anchao@lixiang.com>
2024-09-02 18:23:57 +08:00
zhaoxingyu1
79199e25f1 mtd/nvs: fix align size
when gc, move data requires byte alignment

Signed-off-by: zhaoxingyu1 <zhaoxingyu1@xiaomi.com>
2024-08-30 21:25:33 +08:00
daichuan
e48d5d8271 add for support cmake with netdev_notify_recvcpu.c
Signed-off-by: daichuan <daichuan@xiaomi.com>
2024-08-30 01:45:06 +08:00
daichuan
b5753d06f2 support rss/arfs with device
Signed-off-by: daichuan <daichuan@xiaomi.com>
2024-08-30 01:45:06 +08:00
yangsong8
5a39e83c05 usbdev: extend the usb req len to size_t
Some USB controllers can receive or send multiple data packets then
generate one interrupt. This mechanism can reduce the number of data
copies. Extend req buf to accommodate this.

Signed-off-by: yangsong8 <yangsong8@xiaomi.com>
2024-08-30 01:32:02 +08:00
chenzhijia
f526b91165 nuttx/drivers:Modify errcode returned by relay_ioctl
Fixed system function call failure due to return errcode error

Signed-off-by: chenzhijia <chenzhijia@xiaomi.com>
2024-08-29 01:04:03 +08:00
yangguangcai
efbf43cdfa driver/mem:add Mem Driver.
Signed-off-by: yangguangcai <yangguangcai@xiaomi.com>
2024-08-28 13:59:04 +08:00
yangsong8
a2e7265adb cdcacm: align cdcacm_epconfigure function parameters
Signed-off-by: yangsong8 <yangsong8@xiaomi.com>
2024-08-28 13:48:55 +08:00
yangguangcai
45625cbe3b timer driver:support poll.
Signed-off-by: yangguangcai <yangguangcai@xiaomi.com>
2024-08-28 13:46:47 +08:00
yangsong8
fa1c094e65 usbdev: add usb3.0 ep companion struct and descriptor
Signed-off-by: yangsong8 <yangsong8@xiaomi.com>
2024-08-27 12:53:15 -03:00
yangsong8
1dd38fe974 usbdev: unify the parameter of mkconfdesc function
Signed-off-by: yangsong8 <yangsong8@xiaomi.com>
2024-08-27 12:53:15 -03:00
yangsong8
07aa8a5c57 usbdev: modify usb device support USB3.0 MaxPacketSize
Signed-off-by: yangsong8 <yangsong8@xiaomi.com>
2024-08-27 12:53:15 -03:00
yangsong8
0788e68285 usbdev: usb device descriptor support USB3.0
Signed-off-by: yangsong8 <yangsong8@xiaomi.com>
2024-08-27 12:53:15 -03:00
yangsong8
af017a5c30 usbdev: fix usb cdcecm build error
usbdev/cdcecm.c:295:3: error: invalid type argument of '->' (have 'struct net_driver_s')
  295 |   NETDEV_TXPACKETS(self->dev);
      |   ^~~~~~~~~~~~~~~~
usbdev/cdcecm.c: In function 'cdcecm_txdone':
usbdev/cdcecm.c:495:3: error: invalid type argument of '->' (have 'struct net_driver_s')
  495 |   NETDEV_TXDONE(priv->dev);
      |   ^~~~~~~~~~~~~

Signed-off-by: yangsong8 <yangsong8@xiaomi.com>
2024-08-27 12:53:15 -03:00