Commit Graph

5846 Commits

Author SHA1 Message Date
simbit18
7677f10d3f fix nxstyle
fix Relative file path does not match actual file.
2024-04-16 19:09:12 +08:00
Xiang Xiao
81c8f902b6 video: Move video_format_s from video.h to v4l2_cap.c
since it is only used in v4l2_cap.c.

Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2024-04-14 12:08:30 -03:00
Simon Filgis
cb0e8454d7 enable support for multible devices of mcp48xx
Instead of one static dev and priv, allocate a dedicated one each time
the init is invoked.
2024-04-14 22:10:58 +08:00
Jakub Janousek
23c6b5b07d drivers/spi: Add support for FPGA iCE40 bitstream loading.
Tested on ICE-V-Wireless board.

Signed-off-by: Jakub Janousek <janouja9@fel.cvut.cz>
2024-04-12 10:19:58 -03:00
jianglianfang
62a4799409 video/vnc: add vnc_fb_register
To optimize the initialization of vnc, change it to vnc_fb_register.

Signed-off-by: jianglianfang <jianglianfang@xiaomi.com>
2024-04-12 17:42:49 +08:00
wangjianyu3
f0590eeaf0 drivers/power/pm: Fix warning of type cast
Env: sim (Ubuntu 22.04.3 LTS (x86_64 GNU/Linux)), enable PM
```
power/pm/pm_autoupdate.c: In function ‘pm_auto_updatestate’:
power/pm/pm_autoupdate.c:84:46: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast]
   84 |                      pm_auto_updatestate_cb, (FAR void *)domain, 0);
      |                                              ^
power/pm/pm_autoupdate.c:89:34: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast]
   89 |           pm_auto_updatestate_cb((FAR void *)domain);
      |                                  ^
```

Signed-off-by: wangjianyu3 <wangjianyu3@xiaomi.com>
2024-04-10 22:51:28 +08:00
simbit18
9967989b02 Fix Kconfig style
Remove spaces from Kconfig files
Remove TABs
Add comments
2024-04-09 10:49:23 +08:00
chenrun1
d19486e1f8 driver/filemtd:support isbad & markbad
In this change, we can mount a filesystem on filemtd that works like Yaffs and works on the Nand driver

Signed-off-by: chenrun1 <chenrun1@xiaomi.com>
2024-04-07 18:50:00 +08:00
chenrun1
4fc111965d filemtd:fix Fixed the issue of incorrect content returned when using nandflash earse
Nand_erase return result should be the number of blocks that were successfully erased in NuttX

Signed-off-by: chenrun1 <chenrun1@xiaomi.com>
2024-04-07 18:50:00 +08:00
Michal Lenc
17e1d43f6d ioexpander/icjx: add support for change of input interrupts on NINT
iC-JX expander has NINT (not interrupt) pin that goes to logical zero
if interrupt occurs. This commit adds support for iC-JX options settings
that allows to enable the interrupt for defined input pins.

The interrupt is handled in HP worker thread to avoid waiting for SPI
transfers in interrupt context. Board has to configure interrupt event
for GPIO pin connected to NINT.

Signed-off-by: Michal Lenc <michallenc@seznam.cz>
2024-04-05 15:23:10 -03:00
chenwen@espressif.com
252e0f8a97 drivers/net/lan9250: Fix crash issue of sending packets by lan9250 driver under SMP and multi-thread
Signed-off-by: chenwen@espressif.com <chenwen@espressif.com>
2024-04-03 10:06:43 -03:00
Yanfeng Liu
1eb96c3446 virtio/gpu: minor revision on virtio_gpu_send_cmd()
This revises comments and completes reclaiming buf param.

Signed-off-by: Yanfeng Liu <yfliu2008@qq.com>
2024-04-01 00:27:16 +08:00
Yanfeng Liu
715f8de1bb virtio/cmake: sync with makefile system
This adds drivers like virtio-gpu etc to cmake system to be in line
with the makefile system.

Signed-off-by: Yanfeng Liu <yfliu2008@qq.com>
2024-03-31 08:04:47 -03:00
SPRESENSE
d5c654914e drivers/video/isx019: Fix default_value of 3A status
Fix default_value of ioctl(VIDIOC_QUERYCTRL)(id=V4L2_CID_3A_STATUS)
to AE operating and AWB operating, because both AE and AWB are
automatical adjustment mode by default.
2024-03-29 16:05:37 +08:00
SPRESENSE
33485cfe7c drivers/video/isx019: Fix the default_value of some parameters
Because the exposure time and ISO sensitivity are adjusted automatically
by default, the default value can not be defined.
So, return the value out of range as the default_value of
ioctl(VIDIOC_QUERYCTRL).
2024-03-26 20:52:28 +08:00
Xiang Xiao
79f834dcbb video: Make v4l2_ops_s to support the mutilple context
which is useful in the m2m usage scenario, by replacing the first
argument of callback from "struct v4l2_ops_s *" to "struct file *"

Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2024-03-26 15:21:05 +08:00
Xiang Xiao
c6821c741d video_framebuff: Replace critical section with spinlock
to avoid th global big lock and improve the performance.

Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2024-03-26 15:21:05 +08:00
Xiang Xiao
0db82210fd video_framebuff: Hold mutex in video_framebuff_realloc_container
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2024-03-26 15:21:05 +08:00
Xiang Xiao
efee5f86e8 video_framebuff: Remove the unnecessary vbuf_curr field
since vbuf_curr is always equal to vbuf_next

Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2024-03-26 15:21:05 +08:00
yaojingwei
25e7d9e43e video: add video buffer overflow warning info.
Signed-off-by: yaojingwei <yaojingwei@xiaomi.com>
2024-03-26 15:21:05 +08:00
shizhenghui
fa1b55d297 v4l2-cap: Add FAR to pointer
Signed-off-by: shizhenghui <shizhenghui@xiaomi.com>
2024-03-26 15:21:05 +08:00
yaojingwei
f03a1a14f3 video: move user define mem_ops into imgdata_ops.
Signed-off-by: yaojingwei <yaojingwei@xiaomi.com>
2024-03-26 15:21:05 +08:00
yaojingwei
64aecbcc5c video: add user define memory ops for v4l2 frame buffers.
Signed-off-by: yaojingwei <yaojingwei@xiaomi.com>
2024-03-26 15:21:05 +08:00
SPRESENSE
1d2fcc81f4 drivers/video/isx012: Make the I2C access more efficient
Store the i2c configuration in power on
because they are not changed permanently.
2024-03-26 07:41:21 +01:00
SPRESENSE
d9f9c0143c drivers/video/isx019: Make the I2C access more efficient
Store the length of address and the frequency in power on
because they are not changed permanently.
2024-03-26 07:41:21 +01:00
ligd
a1836de09a fdt: move fdx_xx extend APIs from boards to drivers
Signed-off-by: ligd <liguiding1@xiaomi.com>
2024-03-22 18:51:33 +08:00
zhanghongyu
a65cdce281 cdcecm: remove duplicate assignment statements
Signed-off-by: zhanghongyu <zhanghongyu@xiaomi.com>
2024-03-21 20:06:13 +08:00
shizhenghui
3afd26bcd1 Add ioctl interface used in v4l2m2m
Signed-off-by: shizhenghui <shizhenghui@xiaomi.com>
2024-03-21 19:23:53 +08:00
chao an
feb6ede434 sched/cpu: replace up_cpu_index() to this_cpu()
In SMP mode, up_cpu_index()/this_cpu() are the same, both return the index of the physical core.
In AMP mode, up_cpu_index() will return the index of the physical core, and this_cpu() will always return 0

| #ifdef CONFIG_SMP
| #  define this_cpu()             up_cpu_index()
| #elif defined(CONFIG_AMP)
| #  define this_cpu()             (0)
| #else
| #  define this_cpu()             (0)
| #endif

Signed-off-by: chao an <anchao@lixiang.com>
2024-03-21 18:52:35 +08:00
chao an
4e62d0005a sched: replace some global variables to macro
replace to macro will help to extend the scheduling implementation

Signed-off-by: chao an <anchao@lixiang.com>
2024-03-21 18:51:25 +08:00
Michal Lenc
7c7e163e23 icjx: add support for multiple pin read/write
This commit implements functions icjx_multireadpin and icjx_multiwritepin.
These functions can be used for multiple pin access (read/write) if
CONFIG_IOEXPANDER_MULTIPIN is selected. This access is generally
faster than one by one pin and may simplify user application.

Changes to general functions icjx_read and icjx_write were also required
to provide support for multiple data send/receive.

Signed-off-by: Michal Lenc <michallenc@seznam.cz>
2024-03-20 20:06:33 +08:00
Radek Pesina
8f9c337c66 drivers/can/sja1000: Add SJA1000 CAN driver support
This driver is based on ESP32 TWAI CAN drivers currently available
in Nuttx, and captures the differences currently present across the
TWAI drivers for easy future adaption to remaining ESP32 platforms
with no loss of support/function. Also provides a generic SJA1000 CAN
driver solution that is CPU-architecture independent.

Changes:
- Low-level driver re-written to allow usage independent of CPU
architecture, and support both SJA1000 and TWAI CAN controllers.
- Platform-specific settings abstracted away to be provided by board
layer.
- Support for multiple instances of SJA1000 driver.
2024-03-19 15:45:53 -03:00
raiden00pl
8bf6b17cc0 sensors/bmi270: fix accel and gyro data position
accel registers are DATA_8 to DATA_13
gyro registers are DATA_14 to DATA_19
2024-03-14 21:16:46 -03:00
dongjiuzhu1
e0c18c05e8 fs/driver: using nx_unlink to call unlink ops to release some resource
if driver complete unlink ops, we need to call it to release some resource,
otherwise, it will only remove inode.

Signed-off-by: dongjiuzhu1 <dongjiuzhu1@xiaomi.com>
2024-03-14 11:53:30 +08:00
xucheng5
3b79363041 mtd_config_fs : optimize nvs
Signed-off-by: xucheng5 <xucheng5@xiaomi.com>
2024-03-14 00:11:41 +08:00
xucheng5
cd80900646 mtd_config_fs : support algin size
Signed-off-by: xucheng5 <xucheng5@xiaomi.com>
2024-03-14 00:11:41 +08:00
zhanghongyu
e93bdfe089 tun: in tun_write, try to release iob before iob_prepare
io_pktlen will incorrect when two packets are received in a row and the packet length decreases.

Signed-off-by: zhanghongyu <zhanghongyu@xiaomi.com>
2024-03-13 22:23:52 +08:00
shizhenghui
255090d594 Refactor nuttx v4l2
Adjust the v4l2 framework to support both capture and v4l2m2m,
and can easily add other v4l2 features.

Signed-off-by: shizhenghui <shizhenghui@xiaomi.com>
2024-03-13 09:51:08 +08:00
yaojingwei
c3a3f79741 video: extend imgsensor_s interface for getting sensor device params.
Signed-off-by: yaojingwei <yaojingwei@xiaomi.com>
2024-03-13 09:51:08 +08:00
SPRESENSE
bac0228825 drivers/video/isx012: Fix buffer overrun of isx012_putreg()
The maximum size of ISX012 register is 4 bytes.
So, extend temporary buffer size.

Detected by CodeSonar 141893
2024-03-11 15:44:39 +01:00
SPRESENSE
3419f018a4 drivers/video/isx019: Delete unnecessary code
Because of misunderstanding spec, unnecessary codes exist.
Delete them.
2024-03-11 15:44:39 +01:00
SPRESENSE
baa2dc5cad drivers/video/isx019: Store initial gamma value
Set initial gamma value to enable application to get
the correct initial gamma value.
2024-03-11 15:44:39 +01:00
SPRESENSE
2b04210b16 drivers/video/isx019: Fix default ISO sensitivity
ISX019's ISO sensitivity is in auto adjustment mode by default.
Then, default ISO sensitivity value should be auto adjusted value.
2024-03-11 15:44:39 +01:00
SPRESENSE
ae970a8ed3 drivers/video: Fix bug that can not use scene mode
Because the mode is set in scene parameter table,
All scene modes was recognized as disabled.
2024-03-11 15:44:39 +01:00
SPRESENSE
8f0ed67339 drivers/video/isx019: Fix mismatch bug of HUE value
Because the ratio between API value and ISX019 register value
is 128 : 90 about HUE, some different API values become the
same register value.
So, store the value specified by application in setting,
and return the stored value in getting so that the gotten value
is the same as the setting value by application.
2024-03-11 15:44:39 +01:00
SPRESENSE
de3bee313e drivers/video/isx019: Fix control type about some parameters
About IMGSENSOR_ID_EXPOSURE_AUTO, IMGSENSOR_ID_ISO_SENSITIVITY_AUTO,
and IMGSENSOR_ID_EXPOSURE_METERING, enumerations are defined.
So, control type should be not integer but integer menu.
2024-03-11 15:44:39 +01:00
SPRESENSE
865c88e34b drivers/video: Add elems setting
Add elems setting to ioctl(VIDIOC_QUERY_EXT_CTRL)
for V4L2 compatibility.
2024-03-11 15:44:39 +01:00
SPRESENSE
fd5c2d4922 drivers/video/isx019: Fix bug that read value is not correct
About parameter whose register size is less than 4 bytes,
when transfer read value to API parameter, cast appropriately
to avoid the following problems.
- Read value includes garbage value
- Negative value becomes huge positive value
2024-03-11 15:44:39 +01:00
SPRESENSE
33f7923d72 drivers/video/isx019: Fix bug that initial exposure time is not correct
Because exposure time calculation needs the cxd56xx clock value,
get the cxd56xx clock value before saving initial value.
2024-03-11 15:44:39 +01:00
SPRESENSE
76e91a69f7 drivers/video/isx019: Fix maximum value of exposure time
Modify maximum value of exposure time from 102000 to 2740
according to hardware specification.
2024-03-11 15:44:39 +01:00