Commit Graph

4761 Commits

Author SHA1 Message Date
Lee Lup Yuen c07bd5d644 arm64/pinephone: Add driver for PinePhone Touch Panel
This PR adds the existing Goodix GT9XX Touch Panel Driver to the Bringup Function for PINE64 PinePhone.

With this PR, LVGL Touchscreen Apps will respond to Touch Input on PinePhone.

### Modified Files

`boards/arm64/a64/pinephone/src/pinephone_bringup.c`: Added GT9XX Touch Panel Driver to PinePhone Bringup Function

`boards/arm64/a64/pinephone/src/Makefile`: Added `pinephone_touch.c` to the Makefile

`include/nuttx/input/gt9xx.h`: Fixed a comment in GT9XX Touch Panel Driver

### New Files

`boards/arm64/a64/pinephone/src/pinephone_touch.c`, `pinephone_touch.h`: Register GT9XX Touch Panel Driver on PinePhone

`boards/arm64/a64/pinephone/configs/lvgl/defconfig`: Added PinePhone Board Config `lvgl` to support LVGL Touchscreen Apps

### Updated Documentation

`Documentation/platforms/arm/a64/boards/pinephone/index.rst`: Added PinePhone Board Config `lvgl` for LVGL Touchscreen Apps
2023-01-16 13:45:17 +08:00
Xiang Xiao a851ad84c3 net: consistent the net sem wait naming conversion
to prepare the new mutex wait function

Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2023-01-15 12:31:30 -03:00
dongjiuzhu1 5c0a5a6627 mm/mempool: support memalign about mempool and mulitple mempool
The memalign is special to multiple mempool because multiple mempool
doesn't support split and shrink chunk operate. So When you alloc a
memory block and find an aligned address in this block, you need to
occupy 8 bytes before the address to save the address of the padding
size and pool to ensure correct use in realloc and free operations.
So we will use bit1 in the previous address of the address to represent
that it is applied by memalign.

Signed-off-by: dongjiuzhu1 <dongjiuzhu1@xiaomi.com>
2023-01-15 20:05:55 +08:00
dongjiuzhu1 e5394be881 mempool/multiple_mempool: add private member delta in multiple-mempool
This delta describes the relationship between the block size of each
mempool in multiple mempool by user initialized. It is automatically
detected by the mempool_multiple_init function. If the delta is not
equal to 0, the block size of the pool in the multiple mempool is an
arithmetic progressions, otherwise it is an increasing progressions.

Signed-off-by: dongjiuzhu1 <dongjiuzhu1@xiaomi.com>
2023-01-15 20:05:55 +08:00
dongjiuzhu1 cd97134c7c mm/mempool: update nexpand/ninitial/ninterrupt to xxxsize
Let's specify size instead of number, so that we can unify the size of
expansion memory in the multiple mempool.

Signed-off-by: dongjiuzhu1 <dongjiuzhu1@xiaomi.com>
2023-01-15 20:05:55 +08:00
dongjiuzhu1 adaca6a5ce mm/mempool: using inline list instead of queue to avoid kasan report
the crash backtrace:
kasan_report (addr=0xf3d02fd4, size=4, is_write=false) at
kasan/kasan.c:106
0x5658518d in __asan_loadN_noabort (addr=0xf3d02fd4, size=4) at
kasan/kasan.c:300
0x565851ee in __asan_load4_noabort (addr=0xf3d02fd4) at
kasan/kasan.c:334
0x56580b02 in sq_remfirst (queue=0xf3d02b08) at
queue/sq_remfirst.c:45
0x565e0e0b in mempool_alloc (pool=0xf3d02aec) at
mempool/mempool.c:161
0x566033d2 in mempool_multiple_alloc (mpool=0xf3d02a30, size=16) at
mempool/mempool_multiple.c:147

Signed-off-by: dongjiuzhu1 <dongjiuzhu1@xiaomi.com>
2023-01-15 20:05:55 +08:00
TimJTi f5e8c30808 Add ACT8945A power driver
Update act8945a.c

Update Kconfig

Update act8945a.c

Corrections (xiaoxiang781216)
2023-01-14 18:49:25 +08:00
liushuai25 6b729487fb feat: add mipidsi support
add mipi dsi subsystem support.

reference links:
https://github.com/torvalds/linux/blob/master/drivers/gpu/drm/drm_mipi_dsi.c
https://github.com/torvalds/linux/blob/master/include/video/mipi_display.h

Signed-off-by: liushuai25 <liushuai25@xiaomi.com>
2023-01-13 23:10:56 +08:00
Lee Lup Yuen 6de5a862cd drivers/input: Add driver for Goodix GT9XX Touch Panel
This PR adds the driver for Goodix GT9XX I2C Touch Panel, which will be called by PINE64 PinePhone.

Our driver follows the design of the NuttX Driver for [Cypress MBR3108](https://github.com/apache/nuttx/blob/master/drivers/input/cypress_mbr3108.c).

We have documented our driver here: ["NuttX Touch Panel Driver for PinePhone"](https://lupyuen.github.io/articles/touch2#appendix-nuttx-touch-panel-driver-for-pinephone)

`drivers/input/Kconfig`: Added option `INPUT_GT9XX` to select GT9XX Driver

`drivers/input/Make.defs`: Added GT9XX Driver to Makefile

`drivers/input/gt9xx.c`, `gt9xx.h`: I2C Driver for GT9XX Touch Panel
2023-01-13 12:19:53 +08:00
Jukka Laitinen a2a10c87e3 mm/shm: Switch to use process' common virtual memory region allocator
- Also remove the nuttx private shm.h file nuttx/mm/shm.h, which became redundant
- Also remove the gran allocator initialization/release in binfmt since common
  vpage allocator is initialized in group_create/group_leave

Signed-off-by: Jukka Laitinen <jukkax@ssrc.tii.ae>
2023-01-13 02:20:13 +08:00
Jukka Laitinen 2236facca9 mm/map: Add a common virtual memory region allocator
Signed-off-by: Jukka Laitinen <jukkax@ssrc.tii.ae>
2023-01-13 02:20:13 +08:00
Jukka Laitinen 70de321de3 arch/Kconfig: remove virtual memory allocator dependency from MM_SHM
The dependency should be vice versa; the MM_SHM should depend on the
existence of the virtual memory range allocator.

Create a new CONFIG flag CONFIG_ARCH_VMA_MAPPING, which will define that
there is a virtual memory range allocator. Make MM_SHM select that flag

Signed-off-by: Jukka Laitinen <jukkax@ssrc.tii.ae>
2023-01-13 02:20:13 +08:00
Xuxingliang 431e31b6b2 libc/math: add simple implementation for sincos API
Signed-off-by: Xuxingliang <xuxingliang@xiaomi.com>
2023-01-12 00:07:44 +08:00
Xiang Xiao ef65d443ad sem: Remove PRIOINHERIT_FLAGS_ENABLE and use SEM_PRIO_INHERIT instead
and refine the code to prepare the support of new flags

Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2023-01-11 17:35:28 +02:00
zhanghongyu 48c9d10336 net_socket: add accept4 function
Signed-off-by: zhanghongyu <zhanghongyu@xiaomi.com>
2023-01-11 23:28:08 +08:00
梁超众 aca1a065a8 move usrsock to kernel space
Signed-off-by: 梁超众 <liangchaozhong@xiaomi.com>
2023-01-11 15:14:03 +08:00
Jukka Laitinen 3ea7a6fb77 mm/shm: Clean up the System-V shm driver
Move shmdt functionality into shm_unmap, and use shm_unmap as the common
detach function.

Signed-off-by: Jukka Laitinen <jukkax@ssrc.tii.ae>
2023-01-10 23:24:50 +08:00
Jukka Laitinen 5150979488 mm/shm: Remove gs_vaddr from task group and use dynamic vm_map instead
Replace static gs_vaddr with a new dynamic mapping list. Collecting all
this kind of virtual memory mappings into a single structure makes
things more consistent.

This still leaves the task group specific granule alloocator, gs_handle,
in the task group

Signed-off-by: Jukka Laitinen <jukkax@ssrc.tii.ae>
2023-01-10 18:34:25 +08:00
Jukka Laitinen 7f8bec7070 Add mm/mm_map virtual memory mapping list
The task_group specific list can be used to store information about
mmappings.

For a driver or filesystem performing mmap can also enable munmap by
adding an item to this list using mm_map_add(). The item is then
returned in the corresponding munmap call.

Signed-off-by: Jukka Laitinen <jukkax@ssrc.tii.ae>
2023-01-10 18:34:25 +08:00
Jukka Laitinen 6e4ddf78bb include/nuttx/mm/map.h: Change mm_map_entry "priv" into union type
To be able to directly store also other than pointer types

Signed-off-by: Jukka Laitinen <jukkax@ssrc.tii.ae>
2023-01-10 18:34:25 +08:00
chengkai f864e5f657 wireless/bluetooth: add interrupt_context hander for netsnoop
Signed-off-by: chengkai <chengkai@xiaomi.com>
2023-01-10 18:08:22 +08:00
田昕 587305723e drivers/pipe:add PIPEIOC_POLLTHRES to set POLLIN/POLLOUT threshold
Signed-off-by: 田昕 <tianxin7@xiaomi.com>
2023-01-10 13:33:13 +08:00
anjiahao 9a32cf7a1a assert:add a last type to call notifier
Signed-off-by: anjiahao <anjiahao@xiaomi.com>
2023-01-05 22:58:00 +08:00
Xiang Xiao 1a59f4ed00 mm/map: Remove the unnessary map.h inclusion in various drivers
and Fix include/nuttx/mm/map.h:55:28: error: 'struct task_group_s' declared inside parameter list will not be visible outside of this definition or declaration

Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2023-01-05 16:06:53 +02:00
yinshengkai 8f823ce320 sergger: add note_ prefix to sysview
change 1: rename sysview.c to note_sysview.c
change 2: add note_ prefix to sysview's public function

Signed-off-by: yinshengkai <yinshengkai@xiaomi.com>
2023-01-05 22:04:52 +08:00
yinshengkai 77466742c7 drivers/segger: register sysview to note drivers list
Signed-off-by: yinshengkai <yinshengkai@xiaomi.com>
2023-01-05 22:04:52 +08:00
yinshengkai 4ba7624804 Revert "Sysview add prefix kconfig to add an option to decouple sched_note calls"
This reverts commit f72f7ebee0.
2023-01-05 22:04:52 +08:00
Xiang Xiao b0a0ba3ad7 fs: Move mmap callback before truncate in [file|mountpt]_operations
since mmap may exist in block_operations, but truncate may not,
moving mmap beforee truncate could make three struct more compatible

Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2023-01-04 17:43:59 +02:00
liucheng5 abf5ea24b4 fix: sensor: new member into ECG sensor type
ECG sensors usually output some status info besides ECG data, such as lead and fast-recovery status. Thus a new member "status" is added into sensor_ecg struct.

Signed-off-by: liucheng5 <liucheng5@xiaomi.com>
2023-01-03 19:23:30 +08:00
Xiang Xiao b7febf4e19 libc: Move tree.h from include/nuttx to include/sys
to match freebsd layout

Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2023-01-03 10:34:57 +02:00
yinshengkai 81448b5021 sched/irq: add spin_unlock_irqsave/irqrestore_wo_note
Signed-off-by: yinshengkai <yinshengkai@xiaomi.com>
2023-01-02 22:29:01 +08:00
Jukka Laitinen f33dc4df3f Change FIOC_MMAP into file operation call
- Add mmap into file_operations and remove it from ioctl definitions.
- Add mm_map structure definitions to support future unmapping
- Modify all drivers to initialize the operations struct accordingly

Signed-off-by: Jukka Laitinen <jukkax@ssrc.tii.ae>
2023-01-02 11:23:20 -03:00
Jukka Laitinen 41e9df2f3e Add ftruncate into file operation calls
- Add truncate into file_operations
- Move truncate to be common for mountpt_operations and file_operations
- Modify all drivers to initialize the operations struct accordingly

Signed-off-by: Jukka Laitinen <jukkax@ssrc.tii.ae>
2023-01-02 11:23:20 -03:00
Jukka Laitinen 36528eed64 Revert "fs/vfs/fs_truncate.c: Use ioctl to truncate on non-mountpoint inode"
This reverts commit dbc163f1b0.
2023-01-02 11:23:20 -03:00
yinshengkai 275b2e70a4 syslog: fix extra line breaks in syslog when SYSLOG_COLOR_OUTPUT is enabled
Signed-off-by: yinshengkai <yinshengkai@xiaomi.com>
2023-01-02 21:22:46 +08:00
yinshengkai 64b6df42a4 drivers/note: register notelog device
Signed-off-by: yinshengkai <yinshengkai@xiaomi.com>
2022-12-30 22:21:12 +08:00
dongjiuzhu1 8f05661a53 syslog: A trailing newline is added if none is present.
refs:
https://www.manpagez.com/man/3/syslog/

Signed-off-by: dongjiuzhu1 <dongjiuzhu1@xiaomi.com>
2022-12-30 00:20:33 +08:00
yinshengkai bc7c520eca drivers/note: add note_syscall_enter parameter list
Signed-off-by: yinshengkai <yinshengkai@xiaomi.com>
2022-12-29 09:25:54 -03:00
田昕 96a45e2c75 sched/misc:add linux-like reboot notifier list
Signed-off-by: 田昕 <tianxin7@xiaomi.com>
2022-12-29 19:18:42 +08:00
dongjiuzhu1 3927d878e4 signal/nxsig_pengingset: move nxsig_pendingset to common header
Signed-off-by: dongjiuzhu1 <dongjiuzhu1@xiaomi.com>
2022-12-28 23:05:58 +08:00
Zhe Weng cbe4cb2056 net: Add set/getsockopt options compatible with iptables.
Signed-off-by: Zhe Weng <wengzhe@xiaomi.com>
2022-12-28 22:40:53 +08:00
Zhe Weng 5a0d8fdf49 net: Add netfilter compatible headers.
Signed-off-by: Zhe Weng <wengzhe@xiaomi.com>
2022-12-26 22:41:16 +08:00
yinshengkai dd32eccfc3 drivers/note: Move taskname related functions to note_driver.c
so all note drivers can retrieve the task name even after the task exit

Signed-off-by: yinshengkai <yinshengkai@xiaomi.com>
2022-12-26 15:03:57 +08:00
Xiang Xiao b9d7d00943 arch: Remove the unused arch color function variant
up_check_tcbstack_remain, up_check_stack, up_check_stack_remain and up_check_intstack_remain

Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2022-12-24 22:40:52 +02:00
zhangyuan21 45394eb6dc arch: save user context in assert common code
This is the work continue with #7875

Signed-off-by: zhangyuan21 <zhangyuan21@xiaomi.com>
2022-12-24 13:02:56 +08:00
wangbowen6 069fac1c67 power/relay: add relay driver framework for NuttX
Signed-off-by: wangbowen6 <wangbowen6@xiaomi.com>
2022-12-22 20:30:49 +08:00
Zhe Weng 573c79fd56 hashtable.h: Added a hashtable implementation
Signed-off-by: Zhe Weng <wengzhe@xiaomi.com>
2022-12-22 20:20:12 +08:00
Ville Juven 2ed51d026c fs/streams: Move the file streams from the group structure into TLS
This is preparation for flushing streams from user space, like it should
be done.

- Move tg_streamlist (group, kernel space) ->
       ta_streamlist (TLS, user space)
- Access stream list via tg_info in kernel
- Access stream list via TLS in user space
- Remove / rename nxsched_get_streams -> lib_getstreams
- Remove system call for nxsched_get_streams
2022-12-22 20:16:11 +08:00
TimJTi 5f7bf743c5 Add LP503x RGB LED driver
style corrections

Update lp503x.h

Update lp503x.h

Update lp503x.c

Update lp503x.h

post review changes
2022-12-22 13:39:05 +08:00
Petro Karashchenko 3e36f40130 compiler.h: rename printflike to printf_like
Signed-off-by: Petro Karashchenko <petro.karashchenko@gmail.com>
2022-12-21 10:56:45 +08:00