Commit Graph

5036 Commits

Author SHA1 Message Date
Xiang Xiao 9f027208d4 fs: Add model field to geometry and mtd_geometry_s
the model is very useful to track the device info

Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2023-01-31 11:50:28 -03:00
Ville Juven da83836da7 drivers/mmcsd: Fix kconfig error regarding MMCSD_IOCSUPPORT
Something I noticed in CI:
drivers/mmcsd/Kconfig:32:warning: 'MMCSD_IOCSUPPORT': number is invalid
2023-01-31 13:56:17 +01:00
Xiang Xiao 55679aec5f drivers/camera: Support the private data for imgsensor and imgdata
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2023-01-31 08:04:39 +01:00
dongjiuzhu1 74e032e924 drivers/pipes: fix write busy loop because POLLOUT always ready.
the size of pipes buffer +1 as compensate the full indicator

Signed-off-by: dongjiuzhu1 <dongjiuzhu1@xiaomi.com>
2023-01-31 12:45:16 +08:00
Xiang Xiao 004853d6d1 drivers/watchdog: Fix the wrong value of WATCHDOG_AUTOMONITOR_PING_INTERVAL
if CONFIG_WATCHDOG_AUTOMONITOR_PING_INTERVAL equals 0, we should set
WATCHDOG_AUTOMONITOR_PING_INTERVAL to CONFIG_WATCHDOG_AUTOMONITOR_TIMEOUT / 2, not 0

Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2023-01-31 11:54:36 +08:00
Zhe Weng d3dd349649 net: Implement shutdown() for usrsock
Signed-off-by: Zhe Weng <wengzhe@xiaomi.com>
2023-01-31 11:15:01 +08:00
lilei19 1d8af7e105 add holder for mutex
Signed-off-by: lilei19 <lilei19@xiaomi.com>
2023-01-31 12:08:05 +09:00
Nathan Hartman 6b89b6f945 Remove executable permissions from source files
* arch/arm/src/sama5/sam_flexcom_spi.h,
  arch/risc-v/src/mpfs/mpfs_ihc_sbi.c,
  drivers/usbdev/adb.c,
  libs/libc/math/lib_scalbn.c,
  libs/libc/math/lib_scalbnf.c,
  net/ipfrag/Make.defs,
  net/ipfrag/ipfrag.c,
  net/ipfrag/ipfrag.h,
  net/ipfrag/ipv4_frag.c,
  net/ipfrag/ipv6_frag.c: Remove executable permission.
2023-01-30 20:34:51 -03:00
helei8 4b4004b874 drivers/mmcsd: Add MMC_IOC_CMD ioctl
Signed-off-by: helei8 <helei8@xiaomi.com>
2023-01-30 14:09:23 -03:00
Zhe Weng ff68d9ac04 net/tun: Change TUN/TAP to use IOB
TUN/TAP is not working after IOB offload, try to fix.

Signed-off-by: Zhe Weng <wengzhe@xiaomi.com>
2023-01-31 00:39:15 +08:00
Zhe Weng af0a35f9ae net/slip: Change SLIP to use IOB
Signed-off-by: Zhe Weng <wengzhe@xiaomi.com>
2023-01-30 23:42:01 +08:00
anjiahao 6f2f62f4ce watchdog:fix Kconfig typo
Signed-off-by: anjiahao <anjiahao@xiaomi.com>
2023-01-30 15:49:50 +01:00
Oleksandr Oryshchenko 0842a291e0 [Drivers] Add smart_loop_register_driver call to drivers_initialize 2023-01-30 11:09:40 +08:00
Oleksandr Oryshchenko 28f92e8238 [MTD/SmartFS] Extract register_driver call to own function 2023-01-30 11:09:40 +08:00
Xiang Xiao 7d66a16c53 Minor style clean up
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2023-01-28 19:53:20 +02:00
chao an 94db8a9414 wireless/ieee80211: update ieee80211 header
Signed-off-by: chao an <anchao@xiaomi.com>
2023-01-29 00:34:26 +08:00
Xiang Xiao c137abf4b0 drivers/wireless: Remove the duplicated bc_bifup check from bcmf_wl_auth_event_handler
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2023-01-28 11:31:28 -03:00
Petro Karashchenko 8e72b07a62 nuttx: Add missing FAR and CODE
Signed-off-by: Petro Karashchenko <petro.karashchenko@gmail.com>
2023-01-27 13:23:25 +08:00
chentao9 1e8d9466d6 ref: charge: add support for voltage infomation
Signed-off-by: chentao9 <chentao9@xiaomi.com>
2023-01-27 00:40:43 +02:00
丁欣童 63879598fa sensors/fakesensor: fix timestamp is woring when batch.
Signed-off-by: 丁欣童 <dingxintong@xiaomi.com>
2023-01-27 00:39:15 +02:00
梁超众 7b8ef5dc1b usrsock: only TCP data should be aggregrated for rpmsg case
non-streaming socket's rx data should not be aggregrated.

Signed-off-by: 梁超众 <liangchaozhong@xiaomi.com>
2023-01-27 00:38:32 +02:00
Jiuzhu Dong 5bd448825b driver/sensor: sync set buffer number to remote proc
Signed-off-by: Jiuzhu Dong <dongjiuzhu1@xiaomi.com>
2023-01-27 00:37:49 +02:00
Jiuzhu Dong c9c5940382 driver/sensor: using recursive lock to fix deadlock beacuse rptun reentrancy
nxsem_wait
/home/neo/projects/monkey/nuttx/arch/arm/src/../../../sched/semaphore/sem_wait.c:155 (discriminator 2)
sem_wait
/home/neo/projects/monkey/nuttx/arch/arm/src/../../../sched/semaphore/sem_wait.c:273
nxmutex_lock
/home/neo/projects/monkey/nuttx/include/nuttx/mutex.h:161
nxrmutex_lock.isra.0
/home/neo/projects/monkey/nuttx/include/nuttx/mutex.h:348
sensor_rpmsg_unsub_handler
/home/neo/projects/monkey/nuttx/arch/arm/src/../../../drivers/sensors/sensor_rpmsg.c:1048
rpmsg_virtio_rx_callback
/home/neo/projects/monkey/nuttx/arch/arm/src/../../../openamp/open-amp/lib/rpmsg/rpmsg_virtio.c:334
virtqueue_notification
/home/neo/projects/monkey/nuttx/arch/arm/src/../../../openamp/open-amp/lib/virtio/virtqueue.c:623
up_block_task
/home/neo/projects/monkey/nuttx/arch/arm/src/common/arm_blocktask.c:82 (discriminator 2)
nxsem_tickwait
/home/neo/projects/monkey/nuttx/arch/arm/src/../../../sched/semaphore/sem_tickwait.c:116
rptun_wait_tx
/home/neo/projects/monkey/nuttx/arch/arm/src/../../../drivers/rptun/rptun.c:522
rpmsg_virtio_wait_tx_buffer
/home/neo/projects/monkey/nuttx/include/openamp/rpmsg_virtio.h:120
sensor_rpmsg_push_event_one
/home/neo/projects/monkey/nuttx/arch/arm/src/../../../drivers/sensors/sensor_rpmsg.c:778
sensor_rpmsg_alloc_stub
/home/neo/projects/monkey/nuttx/arch/arm/src/../../../drivers/sensors/sensor_rpmsg.c:547
sensor_rpmsg_sub_handler
/home/neo/projects/monkey/nuttx/arch/arm/src/../../../drivers/sensors/sensor_rpmsg.c:991
rpmsg_virtio_rx_callback
/home/neo/projects/monkey/nuttx/arch/arm/src/../../../openamp/open-amp/lib/rpmsg/rpmsg_virtio.c:334

Signed-off-by: Jiuzhu Dong <dongjiuzhu1@xiaomi.com>
2023-01-27 00:37:49 +02:00
fangzhenwei 8a1489c291 driver/h4:increase h4 uart tx/rx buffer default size
tx buffer size 1024 to 2048
rx buffer size 1024 to 8096

Signed-off-by: fangzhenwei <fangzhenwei@xiaomi.com>
2023-01-27 00:27:02 +02:00
xinbingnan 7076de9e8a sensors/bmi160.c: fix the problem Linux SPI doesn't working properly
CH341A chip only supports SPI MODE0, and BMI160 supports both MODE0 and MODE3. So, changing MODE3 to MODE0 makes all cases available.

Signed-off-by: xinbingnan <xinbingnan@xiaomi.com>
2023-01-27 00:26:13 +02:00
Petro Karashchenko e3a8e1e3ef drivers/mtd/mtd_config: switch from semaphore to mutex for exclusive access
Signed-off-by: Petro Karashchenko <petro.karashchenko@gmail.com>
2023-01-26 10:24:05 +08:00
Petro Karashchenko 6e3cb04531 drivers/sensors/msa301: switch from semaphore to mutex for exclusive access
Signed-off-by: Petro Karashchenko <petro.karashchenko@gmail.com>
2023-01-26 10:24:05 +08:00
Petro Karashchenko f952b8456c assert: switch from ASSERT(0/false) to PANIC
Signed-off-by: Petro Karashchenko <petro.karashchenko@gmail.com>
2023-01-26 10:15:34 +08:00
Xiang Xiao 1280a2a8f9 Launch the initial task through task_spawn instead of nxtask_create
to share the code with the code path of posix_spawn

Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2023-01-25 23:34:52 +02:00
raiden00pl 30015b862c drivers/foc: add ioctl interface that turn off all PWM switches 2023-01-21 12:28:16 +08:00
raiden00pl 91d43edffd drivers/foc: support for BEMF sensing 2023-01-20 21:26:27 +02:00
Masayuki Ishikawa dc454765fb Revert "add holder for mutex"
This reverts commit fc176addeb.
2023-01-19 06:04:48 +09:00
To Doan Ngoc Hai 6ca75deec8 drivers/can/can.c: Change size_t type printf formatter %d -> %zu 2023-01-18 22:03:17 +08:00
lilei19 fc176addeb add holder for mutex
Signed-off-by: lilei19 <lilei19@xiaomi.com>
2023-01-18 17:40:58 +08:00
ligd 5b22eba0bd rptun ping: fix warning when open CONFIG_SYSTEM_TIME64
rptun/rptun_ping.c: In function 'rptun_ping':
rptun/rptun_ping.c:171:20: error: format '%lu' expects argument of type 'long unsigned int', but argument 3 has type 'time_t' {aka 'long long int'} [-Werror=format=]
  171 |   syslog(LOG_INFO, "avg: s %" PRIu32 ", ns %ld\n", ts.tv_sec, ts.tv_nsec);
      |                    ^~~~~~~~~~                      ~~~~~~~~~
      |                                                      |
      |

Signed-off-by: ligd <liguiding1@xiaomi.com>
2023-01-17 10:59:59 +08:00
ligd 354abd4e8e uinput: fix uinput compile failed, if no define CONFIG_UINPUT_TOUCH
input/uinput.c:81:28: error: field 'lower' has incomplete type
   81 |   struct touch_lowerhalf_s lower;
      |                            ^~~~~
CC:  pipes/pipe.c

Signed-off-by: ligd <liguiding1@xiaomi.com>
2023-01-17 10:55:52 +08:00
crafcat7 2ec117b3ca fs/fs_fsync:Fix the expected error of socket,fifo and pipe returning error in fsync case 2023-01-17 01:56:40 +08:00
ligd 23d1d4c42a power: avoid sem_wait called in IRQ handler
error backrace:
_assert  --- assert again
sem_wait
pm_unregister
wdog_notifier
panic_notifier_call_chain
_assert
dataabort

Signed-off-by: ligd <liguiding1@xiaomi.com>
2023-01-17 01:25:27 +08:00
ligd 38c6f20d17 pm: add pm_domain_lock/unlock support
Signed-off-by: ligd <liguiding1@xiaomi.com>
2023-01-17 01:25:27 +08:00
ligd d2ef505684 pm: add lock for pm_auto_updatestate_cb()
Signed-off-by: ligd <liguiding1@xiaomi.com>
2023-01-17 01:25:27 +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
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 ea67dafd93 Fix scope issues with "switch ... case"
Signed-off-by: liushuai25 <liushuai25@xiaomi.com>
2023-01-14 13:38:37 +08:00
liushuai25 57295d750d Use C89 compatible initializer and modify code format
Signed-off-by: liushuai25 <liushuai25@xiaomi.com>

Update drivers/video/mipidsi/mipi_dsi_device.c

Co-authored-by: Petro Karashchenko <petro.karashchenko@gmail.com>
2023-01-13 23:10:56 +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
Jani Paalijarvi bd461a1016 drivers/eeprom/i2c_xx24xx.c: Fix compiler warnings
Debug prints were not able to handle 64bit off_t and size_t.
2023-01-13 23:08:58 +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
zhanghongyu 48c9d10336 net_socket: add accept4 function
Signed-off-by: zhanghongyu <zhanghongyu@xiaomi.com>
2023-01-11 23:28:08 +08:00
xinbingnan 1ce93a7d9a sensors/bmi160.c: fix i2C read and write behavior
There is a problem with the original driver reading and writing behavior, refer to the driver of mpu60x0 to make corresponding changes.

Signed-off-by: xinbingnan <xinbingnan@xiaomi.com>
2023-01-11 21:12:29 +08:00
梁超众 aca1a065a8 move usrsock to kernel space
Signed-off-by: 梁超众 <liangchaozhong@xiaomi.com>
2023-01-11 15:14:03 +08:00