Commit Graph

4578 Commits

Author SHA1 Message Date
SPRESENSE
bf332cf888 drivers/sensors: Add new driver for scd41 sensor module
Add Sensirion's SCD41 CO2, temperature and humidity sensor driver.
2022-04-11 13:29:35 +03:00
okayserh
218cbb470a Fixed source code format errors. 2022-04-10 19:12:10 -03:00
okayserh
56f0d72465 Minor fix, function name was wm8994_setvolume instead of
wm8904_setvolume.
2022-04-10 19:12:10 -03:00
okayserh
eb3e8175de Fixes some issues with the implementation of the balance
functionality. In function "wm8904_hw_reset" the priv->balance
is initialized with b16HALF, indicating a range from
0 to b16ONE. In function "wm8904_setvolume" the assumed
range for priv->balance is between 0 and 1000. The changes
now make this consistent for 0 to b16ONE-1. Furthermore,
in wm8904_configure the change of balance was not implemented.
2022-04-10 19:12:10 -03:00
chao.an
ba5320c36f fs/poll: change format for type pollevent_t
complete the following commits:

commit d87cf8d4ca
Author: Jiuzhu Dong <dongjiuzhu1@xiaomi.com>
Date:   Fri Apr 1 20:59:55 2022 +0800

    fs/poll: change format for type pollevent_t

    Signed-off-by: Jiuzhu Dong <dongjiuzhu1@xiaomi.com>

commit d535943a69
Author: Jiuzhu Dong <dongjiuzhu1@xiaomi.com>
Date:   Fri Apr 1 17:49:10 2022 +0800

    fs/epoll: change type of eventset from uint8_t to uint32_t

    to support EPOLLONESHOT and so on.

    Signed-off-by: Jiuzhu Dong <dongjiuzhu1@xiaomi.com>

Signed-off-by: chao.an <anchao@xiaomi.com>
2022-04-07 16:23:32 +08:00
Jiuzhu Dong
d87cf8d4ca fs/poll: change format for type pollevent_t
Signed-off-by: Jiuzhu Dong <dongjiuzhu1@xiaomi.com>
2022-04-07 12:14:06 +08:00
yinshengkai
dfbf06e250 fix uinput rpmsg logic error 2022-04-06 14:36:11 +03:00
Xiang Xiao
9785d6606c openamp: Change the dependence from OPENAMP to RPTUN
since all rpmsg driver need the extension api exposed by rptun driver

Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2022-04-05 10:05:41 +03:00
Petro Karashchenko
d08fbca679 nuttx: unify FAR attribute usage across the code
Signed-off-by: Petro Karashchenko <petro.karashchenko@gmail.com>
2022-04-04 21:32:58 +08:00
raiden00pl
c4c2c46ebf note_sysview.c: fix compilation if CONFIG_SCHED_INSTRUMENTATION_FILTER not defined 2022-04-02 22:24:43 +08:00
raiden00pl
a984de6098 note_sysview.c: fix compilation for CONFIG_TASK_NAME_SIZE == 0 2022-04-02 22:24:43 +08:00
anjianjun
75ec6dffb6 mmcsd: Fix mmc card error but system can not catch it
Signed-off-by: anjianjun <anjianjun@xiaomi.com>
2022-04-01 20:54:57 +03:00
anjianjun
f95d13b3a1 mmcsd: Add gotextcsd callback to sdio_dev_s
so the driver implementation could get critical EXTCSD info

Signed-off-by: anjianjun <anjianjun@xiaomi.com>
2022-04-01 20:54:57 +03:00
zhuyanlin
79bcc662d9 power:driver: move pm_auto_update to outer dir
Pm_auto_update maybe called by outter PM users

Signed-off-by: zhuyanlin <zhuyanlin1@xiaomi.com>
2022-04-02 00:11:00 +08:00
zhuyanlin
ae21df2ed3 power: unify lock states
unify critical_section and nxsem with pm_lock/pm_unlock

Signed-off-by: zhuyanlin <zhuyanlin1@xiaomi.com>
2022-04-02 00:11:00 +08:00
wangbowen6
1b6ce6b4cf SEGGER_RTT: solve compile error when enable segger rtt in armv7m.
1. SEGGER_RTT_ASM_ARMv7M include SEGGER_RTT.h, and SEGGER_RTT.h
include SEGGER_RTT_Conf.h, so add __ASSEMBLY__ in
SEGGER_RTT_Conf.h;
2. AFLAG add segger/config because SEGGER_RTT_ASM_ARMv7M.S
include SEGGER_RTT_Conf.h;

Signed-off-by: wangbowen6 <wangbowen6@xiaomi.com>
2022-04-01 16:36:19 +08:00
Jiuzhu Dong
840ba09b24 driver/syslog: Add microseconds after date time
Signed-off-by: Jiuzhu Dong <dongjiuzhu1@xiaomi.com>
2022-03-31 23:57:15 +08:00
ligd
8db038c18a ioe_rpmsg: use rptun_wait/post to resolve deadlock with usrsock
Signed-off-by: ligd <liguiding1@xiaomi.com>
2022-03-31 01:37:49 +08:00
ligd
86a496d6ff rptun: forward panic/reset to lowerhalf
Signed-off-by: ligd <liguiding1@xiaomi.com>
2022-03-30 10:00:07 +03:00
ligd
759898c090 rptun: add ping rpmsg support
Signed-off-by: ligd <liguiding1@xiaomi.com>
2022-03-30 10:00:07 +03:00
ligd
a19aef4d36 rptun: enable rx interrupts for virtq
use wait_tx_buffer method need enable rx interrupts

Signed-off-by: ligd <liguiding1@xiaomi.com>
2022-03-30 10:00:07 +03:00
ligd
1c7e59eafa rptun: pm_stay when send msg & pm_relax when all tx buffer returned
Signed-off-by: ligd <liguiding1@xiaomi.com>
2022-03-30 10:00:07 +03:00
ligd
f0ba2f0286 rptun: add rptun dump support
Signed-off-by: ligd <liguiding1@xiaomi.com>
2022-03-30 10:00:07 +03:00
ligd
5599f4e24a rptun: divide shram to TX & RX
Signed-off-by: ligd <liguiding1@xiaomi.com>
2022-03-30 10:00:07 +03:00
ligd
be49f6b87c rptun: add rpmsg_wait/post support for recursive dispatch
Signed-off-by: ligd <liguiding1@xiaomi.com>
2022-03-30 10:00:07 +03:00
ligd
7471d096cc rptun: add rptun_panic for both master & salve
Signed-off-by: ligd <liguiding1@xiaomi.com>
2022-03-30 10:00:07 +03:00
ligd
c9404e2705 rptun: use HPWORK instead of thread
Signed-off-by: ligd <liguiding1@xiaomi.com>
2022-03-30 10:00:07 +03:00
ligd
3ab7ade4ba rptun: add rptun_reset support
Signed-off-by: ligd <liguiding1@xiaomi.com>
2022-03-30 10:00:07 +03:00
ligd
7aba7c3790 rptun: add rptun_force_panic support
Signed-off-by: ligd <liguiding1@xiaomi.com>
2022-03-30 10:00:07 +03:00
ligd
5b6b748f6d rptun: set rptun thread default stack size to 4K
Signed-off-by: ligd <liguiding1@xiaomi.com>
2022-03-30 10:00:07 +03:00
Richard Tucker
163e3fd93c driver/mmcsd: add option to support SD/MMC PHYs that only run in 4-bit mode 2022-03-30 02:35:27 +08:00
ligd
7619d2a6f9 syslog: fix syslog print twice when active assert
Signed-off-by: ligd <liguiding1@xiaomi.com>
2022-03-29 12:20:37 +08:00
ligd
b6e0614be6 syslog: use & instead of % when calculate offset
Signed-off-by: ligd <liguiding1@xiaomi.com>
2022-03-29 12:20:37 +08:00
ligd
61cb79d192 syslog_rpmsg: change head & tail NON-wrap
Signed-off-by: ligd <liguiding1@xiaomi.com>
2022-03-29 12:20:37 +08:00
Jiuzhu Dong
b03f2e34b8 lseek: use type:off_t for return value
Signed-off-by: Jiuzhu Dong <dongjiuzhu1@xiaomi.com>
2022-03-28 22:49:37 +08:00
Jiuzhu Dong
a8866132c2 ramlog: support setting threshold value of ramlog for poll waiters
Signed-off-by: Jiuzhu Dong <dongjiuzhu1@xiaomi.com>
2022-03-28 22:48:56 +08:00
ligd
ed49aa1906 pm: remove unnecessary depends on OSINIT_OS_READY
Signed-off-by: ligd <liguiding1@xiaomi.com>
2022-03-28 22:48:14 +08:00
Xiang Xiao
7b97b3ad70 input/touchscreen: Fix the typo error
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2022-03-28 12:33:48 +03:00
Petro Karashchenko
98ba65c422 c89: get rid of designated initializers in common code
Signed-off-by: Petro Karashchenko <petro.karashchenko@gmail.com>
2022-03-28 13:39:27 +08:00
Eero Nurkkala
1caf7d6f17 rptun: fix compile-time warning
Fix this compile-time warning:

rptun/rptun.c:956:22: warning: '%lx' directive output may be truncated writing between 1 and 16 bytes into a region of size 14 [-Wformat-truncation=]
  956 |   snprintf(arg1, 16, "0x%" PRIxPTR, (uintptr_t)priv);
      |                      ^~~~~
rptun/rptun.c:956:25: note: format string is defined here
  956 |   snprintf(arg1, 16, "0x%" PRIxPTR, (uintptr_t)priv);
rptun/rptun.c:956:22: note: directive argument in the range [1, 18446744073709551615]
  956 |   snprintf(arg1, 16, "0x%" PRIxPTR, (uintptr_t)priv);
      |                      ^~~~~
rptun/rptun.c:956:3: note: 'snprintf' output between 4 and 19 bytes into a destination of size 16
  956 |   snprintf(arg1, 16, "0x%" PRIxPTR, (uintptr_t)priv);
      |   ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

Signed-off-by: Eero Nurkkala <eero.nurkkala@offcode.fi>
2022-03-25 22:18:28 +08:00
Petro Karashchenko
68902d8732 pid_t: unify usage of special task IDs
Signed-off-by: Petro Karashchenko <petro.karashchenko@gmail.com>
2022-03-22 21:22:32 +08:00
Petro Karashchenko
757d01d915 progmem: eliminate PROGMEM_ERASESTATE configuration option
Signed-off-by: Petro Karashchenko <petro.karashchenko@gmail.com>
2022-03-22 10:01:41 -03:00
Xiang Xiao
2277c18673 Fix rptun/rptun.c:572:7: warning: 'strncpy' specified bound 32 equals destination size
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2022-03-22 08:37:33 +02:00
Petro Karashchenko
b7c4746b0a drivers/mtd/mtd_config: set different format versions for named and ID modes
Signed-off-by: Petro Karashchenko <petro.karashchenko@gmail.com>
2022-03-22 10:19:21 +08:00
Xiang Xiao
2ccf54961f drivers: Call uinput_keyboard_initialize in drivers_initialize
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2022-03-21 09:03:05 +02:00
Xiang Xiao
7ea14aa8f8 input/keyboard: Make each instance could have a different buffer size
just like what is done for touch screen driver

Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2022-03-21 09:03:05 +02:00
Xiang Xiao
7de9b879a1 input/touchscreen: Change the type of touch_upperhalf_s::nums from uint32_t to uint8_t
to align with the type of touch_register

Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2022-03-21 09:03:05 +02:00
Xiang Xiao
9b2c89fc0e input/uinput: Remove the argument from initialization function
since each type of uinput just need Instantiate one instance

Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2022-03-21 09:03:05 +02:00
Xiang Xiao
d19aa5aca4 input: Move uinput initialization from boards/sim to drivers
since uinput can be used not only on simulator but also on real device

Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2022-03-21 09:03:05 +02:00
Xiang Xiao
fd5fb26f51 input/uinput: Rename UINPUT_TOUCHSCREEN to UINPUT_TOUCH
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2022-03-21 09:03:05 +02:00
Xiang Xiao
8391ad2721 syslog: Change g_syslog_default_sem to static function variable
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2022-03-20 12:37:09 +02:00
chao.an
cce125aae7 regulator/rpmsg: list delete should use safe version in loop
Signed-off-by: chao.an <anchao@xiaomi.com>
2022-03-19 11:13:55 +02:00
chao.an
40f63453f4 syslog/channel: minor fix to avoid unreachabled return
Signed-off-by: chao.an <anchao@xiaomi.com>
2022-03-19 11:13:44 +02:00
Petro Karashchenko
20ac85860c config: finalize transition from USER_ENTRYPOINT to INIT_ENTRYPOINT
Signed-off-by: Petro Karashchenko <petro.karashchenko@gmail.com>
2022-03-19 11:32:47 +08:00
chao.an
6a212b1a2c mtd/partition: fix compile warning
include/nuttx/mtd/mtd.h: In function ‘mtd_setpartitionname’:
mtd/mtd_partition.c:909:3: warning: ‘strncpy’ specified bound 16 equals destination size [-Wstringop-truncation]
  909 |   strncpy(priv->name, name, sizeof(priv->name));
      |   ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
2022-03-19 00:34:26 +08:00
yinshengkai
bfe29c8d1f driver/uinput: add uinput keyboard support
Signed-off-by: yinshengkai <yinshengkai@xiaomi.com>
2022-03-17 19:44:17 +02:00
yinshengkai
a0fa07c275 driver/keyboard: add keyboard upperhalf driver
Signed-off-by: yinshengkai <yinshengkai@xiaomi.com>
2022-03-17 19:44:17 +02:00
yinshengkai
c3c6b64cc3 driver/uinput: Add cross core control function
Signed-off-by: yinshengkai <yinshengkai@xiaomi.com>
2022-03-17 19:44:17 +02:00
yinshengkai
eebd736891 board/sim: update uinput init & Kconfig
Signed-off-by: yinshengkai <yinshengkai@xiaomi.com>
2022-03-17 19:44:17 +02:00
yinshengkai
0c2f86f74d driver/touchscreen: Add multithreaded read support
Signed-off-by: yinshengkai <yinshengkai@xiaomi.com>
2022-03-17 19:44:17 +02:00
Petro Karashchenko
c3bae60c57 drivers/can: optimize can driver reader side
Signed-off-by: Petro Karashchenko <petro.karashchenko@gmail.com>
2022-03-17 15:43:15 +08:00
Petro Karashchenko
18dd5f1216 drivers/mtd/filemtd: fix compilation warnings
Signed-off-by: Petro Karashchenko <petro.karashchenko@gmail.com>
2022-03-16 22:58:46 +08:00
Petro Karashchenko
0df313974c drivers/timers: rename oneshot to periodic notification parameter
Signed-off-by: Petro Karashchenko <petro.karashchenko@gmail.com>
2022-03-15 22:27:15 +08:00
Petro Karashchenko
f30fa2fe57 drivers/timers/timer: Add option for non-periodic notification
Signed-off-by: Petro Karashchenko <petro.karashchenko@gmail.com>
2022-03-15 11:39:12 +08:00
Xiang Xiao
54e630e14d arch: Merge up_arch.h into up_internal.h
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2022-03-14 09:32:17 +02:00
chao.an
4e08b1df93 drviers/syslog: correct the return value of default channel write
Signed-off-by: chao.an <anchao@xiaomi.com>
2022-03-14 08:59:34 +02:00
Huang Qi
7d58e6263f drivers/note: Add macro guard for instrumention switch
Signed-off-by: Huang Qi <huangqi3@xiaomi.com>
2022-03-14 10:52:48 +08:00
Xiang Xiao
c96c96a399 drivers: Merge the common driver initialization into one place
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2022-03-13 11:24:48 -03:00
Xiang Xiao
90c01bde28 drivers: Move the common driver to misc folder
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2022-03-12 02:48:21 +08:00
Xiang Xiao
98976176e1 drivers/wireless/gs2200m: Fix compiler warning
wireless/gs2200m.c: In function 'gs2200m_send_cmd':
Error: wireless/gs2200m.c:1555:32: error: argument to 'sizeof' in 'memset' call is the same expression as the destination; did you mean to dereference it? [-Werror=sizeof-pointer-memaccess]
 1555 |       memset(pkt_dat, 0, sizeof(pkt_dat));
      |                                ^
Error: wireless/gs2200m.c:1570:36: error: argument to 'sizeof' in 'memset' call is the same expression as the destination; did you mean to dereference it? [-Werror=sizeof-pointer-memaccess]
 1570 |           memset(pkt_dat, 0, sizeof(pkt_dat));
      |                                    ^
wireless/gs2200m.c: In function 'gs2200m_ioctl':
Error: wireless/gs2200m.c:318:25: error: 'snprintf' output may be truncated before the last format character [-Werror=format-truncation=]
  318 |   snprintf(str, 5, "%04d", num);
      |                         ^
wireless/gs2200m.c:318:3: note: 'snprintf' output between 5 and 6 bytes into a destination of size 5
  318 |   snprintf(str, 5, "%04d", num);
      |   ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~

Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2022-03-10 19:46:01 +02:00
Xiang Xiao
366e2d5f64 Fix error: array subscript 2 is above array bounds of 'uint8_t[2]'
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2022-03-10 19:46:01 +02:00
Xiang Xiao
50f84f2632 Fix error: 'snprintf' output may be truncated before the last format character
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2022-03-10 19:46:01 +02:00
zhuyanlin
5ce181e6b7 power:govorner: add govorner to per domain.
For mult domains scene,,
activity and greety can be used at same time.
Let user to select domain governor.

Signed-off-by: zhuyanlin <zhuyanlin1@xiaomi.com>
2022-03-09 14:17:57 -03:00
chao.an
d6bbe4f6a5 segger/sysview: add syscall support
Signed-off-by: chao.an <anchao@xiaomi.com>
2022-03-09 22:32:39 +08:00
Xiang Xiao
b690262aac input/buttons: Always protect the resource by critical section
it's wrong to protect the resource by bu_exclsem
in some case and critical section in others

Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2022-03-09 10:10:38 +02:00
Xiang Xiao
f884e647ec input/djoystck: Always protect the resource by critical section
it's wrong to protect the resource by du_exclsem
in some case and critical section in others

Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2022-03-09 10:10:38 +02:00
Xiang Xiao
a924d7a17e input/ajoystck: Always protect the resource by critical section
it's wrong to protect the resource by au_exclsem
in some case and critical section in others

Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2022-03-09 10:10:38 +02:00
Xiang Xiao
8a880df37d syslog/ramlog: Fix error: argument to 'section' attribute is not valid
mach-o section specifier requires a segment and section separated by a comma

Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2022-03-05 17:23:48 +02:00
Petro Karashchenko
041f25fe72 drivers/ioexpander: fix output inversion for ioe_dummy
Signed-off-by: Petro Karashchenko <petro.karashchenko@gmail.com>
2022-03-04 21:17:16 +08:00
xueyanhong
b953296de7 input/buttons: Fix the event lose between the invocation of poll
Signed-off-by: xueyanhong <xueyanhong@xiaomi.com>
2022-03-03 10:38:00 +02:00
Xiang Xiao
2c8437151f input/djoystick: Fix the event lose between the invocation of poll
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2022-03-03 10:38:00 +02:00
Xiang Xiao
9436a78a5f input/ajoystick: Fix the event lose between the invocation of poll
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2022-03-03 10:38:00 +02:00
Petro Karashchenko
9c7eea7949 drivers/ioexpander: Fix invert option value usage
Signed-off-by: Petro Karashchenko <petro.karashchenko@gmail.com>
2022-03-02 01:54:31 +08:00
Xiang Xiao
36909f5f6c input/buttons: Remove the unused bu_enabled from btn_upperhalf_s
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2022-03-01 01:08:13 +08:00
Xiang Xiao
70d90340c7 input/djoystick: Remove the unused du_enabled from djoy_upperhalf_s
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2022-03-01 01:08:13 +08:00
Xiang Xiao
f4b1b1262f input/ajoystick: Remove the unused au_enabled from ajoy_upperhalf_s
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2022-03-01 01:08:13 +08:00
Xiang Xiao
478b292a87 input/buttons: Remove btn_enable from btn_sample
since btn_sample doesn't change the status

Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2022-03-01 01:08:13 +08:00
Xiang Xiao
207249afdc input/djoystck: Remove djoy_enable from djoy_sample
since djoy_sample doesn't change the status

Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2022-03-01 01:08:13 +08:00
Xiang Xiao
aac9c4b78a input/ajoystck: Remove ajoy_enable from ajoy_sample
since ajoy_sample doesn't change the status

Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2022-03-01 01:08:13 +08:00
Xiang Xiao
f42b56b1c4 input/touch: Remove the couple from uinput
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2022-02-27 22:19:23 +01:00
Xiang Xiao
63c911fb56 input/button: Remove the couple from uinput
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2022-02-27 22:19:23 +01:00
liuzhao
fb6f058395 Add EPSON RX8010SJ I2C RTC timer support 2022-02-26 11:47:24 -03:00
Gustavo Henrique Nihei
1a1409cbc3 drivers/timers: Fix domain of log messages
Signed-off-by: Gustavo Henrique Nihei <gustavo.nihei@espressif.com>
2022-02-25 22:49:22 +08:00
zhuyanlin
f7a7eb9ee3 power/PM: add domain inner update power state feature
In some scenarios, We need to update state information internally.
Instead of use idle-task to drive the checkstate and change state
function.

Signed-off-by: zhuyanlin <zhuyanlin1@xiaomi.com>
2022-02-25 00:16:48 +08:00
Alin Jerpelea
52558e7245 drivers: usbhost-hid: exclude BSD components from build
Unless ALLOW_BSD_COMPONENTS is enabled support will not be built

Signed-off-by: Alin Jerpelea <alin.jerpelea@sony.com>
2022-02-24 22:48:47 +08:00
Alin Jerpelea
8e8b68b131 drivers: analog: exclude BSD components from build
Unless ALLOW_BSD_COMPONENTS is enabled ADC/DAC support will not
be built

Signed-off-by: Alin Jerpelea <alin.jerpelea@sony.com>
2022-02-24 22:48:47 +08:00
Alin Jerpelea
32401a0adb drivers: wireless: spirit: exclude BSD components from build
Unless ALLOW_BSD_COMPONENTS is enabled support will not be built

Signed-off-by: Alin Jerpelea <alin.jerpelea@sony.com>
2022-02-24 22:48:47 +08:00
Alin Jerpelea
bbfed12fd9 drivers: wireless: bluetooth: exclude BSD components from build
Unless ALLOW_BSD_COMPONENTS is enabled support will not be built

Signed-off-by: Alin Jerpelea <alin.jerpelea@sony.com>
2022-02-24 22:48:47 +08:00
Alin Jerpelea
660da04204 drivers: sensors: exclude BSD components from build
Unless ALLOW_BSD_COMPONENTS is enabled support will not be built

Signed-off-by: Alin Jerpelea <alin.jerpelea@sony.com>
2022-02-24 22:48:47 +08:00
Alin Jerpelea
3a77cd3d6a drivers: power: exclude BSD components from build
Unless ALLOW_BSD_COMPONENTS is enabled support will not be built

Signed-off-by: Alin Jerpelea <alin.jerpelea@sony.com>
2022-02-24 22:48:47 +08:00
Alin Jerpelea
96ce5347fa drivers: modem: exclude BSD components from build
Unless ALLOW_BSD_COMPONENTS is enabled support will not be built

Signed-off-by: Alin Jerpelea <alin.jerpelea@sony.com>
2022-02-24 22:48:47 +08:00
Alin Jerpelea
fe06e51df2 drivers: lcd: exclude BSD components from build
Unless ALLOW_BSD_COMPONENTS is enabled support will not be built

Signed-off-by: Alin Jerpelea <alin.jerpelea@sony.com>
2022-02-24 22:48:47 +08:00
Xiang Xiao
d7fe0127b0 Replece clock_gettime(CLOCK_REALTIME) with clock_systime_timespec if suitable
it's better to call the kernrel api insteaad user space api in kernel

Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2022-02-24 01:06:36 +08:00
Xiang Xiao
43f57240e0 Replece clock_gettime(CLOCK_MONOTONIC) with clock_systime_timespec
it's better to call the kernrel api insteaad user space api in kernel

Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2022-02-24 01:06:36 +08:00
Huang Qi
1699f530a5 vncserver: Allow fb operation while no connection
Signed-off-by: Huang Qi <huangqi3@xiaomi.com>
2022-02-23 23:18:30 +08:00
Alin Jerpelea
1dada85b52 drivers: Giorgio Gross : update licenses to Apache
Gregory Nutt has submitted the SGA
Giorgio Gross has submitted the ICLA

as a result we can migrate the licenses to Apache.

Signed-off-by: Alin Jerpelea <alin.jerpelea@sony.com>
2022-02-23 12:06:54 +01:00
Xiang Xiao
f1ed349dd9 sched/clock: Remove CLOCK_MONOTONIC option from Kconfig
here is the reason:
1.clock_systime_timespec(core function) always exist regardless the setting
2.CLOCK_MONOTONIC is a foundamental clock type required by many places

Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2022-02-23 01:21:26 +08:00
Xiang Xiao
a5a25f72ab pty: Move the post process after reading the buffer
to simplify the code logic

Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2022-02-22 16:17:07 +01:00
Xiang Xiao
630b55feec serial/pty: Remove the TODO comment for O_NONBLOCK
since it is fully suppported now

Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2022-02-22 09:34:57 -03:00
Masayuki Ishikawa
6a1a7bf455 Revert "pm: remove unnecessary depends on OSINIT_OS_READY"
This reverts commit 8785673a70.
2022-02-22 10:56:14 +01:00
ligd
8785673a70 pm: remove unnecessary depends on OSINIT_OS_READY
Signed-off-by: ligd <liguiding1@xiaomi.com>
2022-02-22 07:58:55 +01:00
fangzhenwei
84b88205ab serial/pty:Don't assert EBUSY when pty unregister driver
Signed-off-by: fangzhenwei <fangzhenwei@xiaomi.com>
2022-02-22 13:42:44 +08:00
fangzhenwei
88e871b13e nuttx/pty: pty FIONBIO return -ENOTTY when pipe_ioctl return OK
Signed-off-by: fangzhenwei <fangzhenwei@xiaomi.com>
2022-02-22 13:42:44 +08:00
fangzhenwei
c7c91488d1 nuttx/pty: pass read nonblock flag to pipe
Signed-off-by: fangzhenwei <fangzhenwei@xiaomi.com>
2022-02-22 13:42:44 +08:00
fangzhenwei
1afdb06981 nuttx/pty:pty FIONBIO pass to pipe control
1. pass FIONBIO ioctl to pipe
2. resolve the return value error

Signed-off-by: fangzhenwei <fangzhenwei@xiaomi.com>
2022-02-22 13:42:44 +08:00
Alan C. Assis
9480ec54eb drivers: Fix DAC license, the copyright owner didn't modify any line 2022-02-21 14:35:44 +01:00
Alan C. Assis
4553406ad4 drivers: Fix ADC license, the copyright owner didn't modify any line 2022-02-21 14:35:44 +01:00
Xiang Xiao
2dcaab8af8 serial/pty: Remove the unused code related to CONFIG_PSEUDOTERM_FULLBLOCKS
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2022-02-20 21:22:24 +01:00
Xiang Xiao
1d1bdd85a3 Remove the double blank line from source files
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2022-02-20 20:10:14 +01:00
Petro Karashchenko
27d75e7552 drivers/ioexpander: minor initialize and styling fixes
Signed-off-by: Petro Karashchenko <petro.karashchenko@gmail.com>
2022-02-18 16:44:40 +08:00
Xiang Xiao
e0ae2963d2 drivers/pipe: Don't use sched_[lock|unlock] to do protection
since the sched lock can't work in SMP context

Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2022-02-17 22:08:43 +01:00
Xiang Xiao
fe04eb535f drivers/pipe: Fix the format style issue
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2022-02-17 22:08:43 +01:00
Huang Qi
ccc708a142 vncserver: Fix dead lock on re-connect
`vnc_remove_queue` would waiting for new frame update request forever
even if the connection is lost, the updater thread wouldn't exit.
But the server thread will join updater thread before accept new client
connection, then we can't re-conncet to vnc server.

Signed-off-by: Huang Qi <huangqi3@xiaomi.com>
2022-02-16 22:57:21 +08:00
Petro Karashchenko
41c95da594 register_driver: fix driver modes accross the code
State of problem:
 - Some drivers that do not support write operations (does not
   have write handler or ioctl do not perform any write actions)
   are registered with write permissions
 - Some drivers that do not support read operation (does not
   have read handler or ioctl do not perform any read actions)
   are registered with read permissions
 - Some drivers are registered with execute permissions

Solution:
 - Iterate code where register_driver() is used and change 'mode'
   parameter to reflect the actual read/write operations executed
   by a driver
 - Remove execute permissions from 'mode' parameter

Signed-off-by: Petro Karashchenko <petro.karashchenko@gmail.com>
2022-02-16 16:15:29 +08:00
Petro Karashchenko
a1f6717e2a mtd/filemtd: improve write and erase access
Signed-off-by: Petro Karashchenko <petro.karashchenko@gmail.com>
2022-02-15 12:06:24 +08:00
Masayuki Ishikawa
0258968abd drivers: wireless: Fix gs2200m_ioctl_accept()
Summary:
- I received an issue report that multiwebcam in Spresense SDK 2.4.0
  has a problem with the Chrome browser
- Actually, the browser tries to establish 2 connections but
  the multiwebcam can handle only 1 connection. And if accept() for
  the second connection is delayed, the connection no longer exists
  in the gs2200m hardware
- This commit fixes this issue by checking if the cid is valid or not.

Impact:
- gs2200m driver only

Testing:
- Tested with spresense:wifi_smp

Signed-off-by: Masayuki Ishikawa <Masayuki.Ishikawa@jp.sony.com>
2022-02-15 10:22:42 +08:00
Jiuzhu Dong
ef66c620c4 input/uinput: fix codesyle issue
Signed-off-by: Jiuzhu Dong <dongjiuzhu1@xiaomi.com>
2022-02-11 11:58:49 +08:00
zouboan
3f6626f765 drivers/mtd/sst39vf.c: patch adress bug 2022-02-10 17:05:53 +08:00
Xiang Xiao
845640bc33 serial/pty: Decouple SUSv1 style from pseudo fs operation
and always enable BSD style PTYs since this feature doesn't
consume the additional code size

Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2022-02-09 20:35:59 +08:00
Xiang Xiao
8e64db45c7 serial/pty: Close the internal pipe when reference count drop to zero
so the other side can get the hang up notification

Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2022-02-09 01:42:51 +08:00
zouboan
6166dd5833 drivers/mtd/mtd_config.c: enlarge the limits of blocksize in struct mtdconfig_struct_s 2022-02-09 01:39:55 +08:00
Xiang Xiao
358dab3723 serial/pty: Reorder the register driver to simplify the error handling
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2022-02-08 16:11:26 +01:00
Xiang Xiao
61066ecbc8 serial/pty: Sync the default termios setting regardless CONFIG_SERIAL_TERMIOS
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2022-02-08 09:33:46 -03:00
Xiang Xiao
3ec208fdbc serial/pty: Don't initialize pd_iflag to ISIG
since ISIG belong local mode flags not input mode flags,
but local mode isn't implemented by pty driver yet.

Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2022-02-08 09:33:46 -03:00
Xiang Xiao
e3fed03e43 serial/pty: Don't use shced_[lock|unlock] to protect pp_locked
since the sched lock can't work in SMP context

Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2022-02-08 09:31:56 -03:00
Xiang Xiao
f03fc4a179 serial/pty: Destroy pp_slavesem in pty_destroy to avoid the leak
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2022-02-08 09:31:56 -03:00
ligd
0155e910dc serial: fix cu crash caused by ioctl is NULL
Signed-off-by: ligd <liguiding1@xiaomi.com>
2022-02-07 13:31:46 +08:00
Xiang Xiao
22f2269d6a drivers/pipe: Remove pipe from file system after open
to make the pipe as an anonymous object as soon as
possible and simplify the life cycle management

Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2022-02-07 12:05:47 +08:00
Xiang Xiao
345d2ac227 drivers/pipe: Add g_ prefix to pipe_fops and fifo_fops
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2022-02-07 12:05:47 +08:00
Xiang Xiao
15c487085a serial/ptmx: Fix the typo error in ptmx_minor_free
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2022-02-06 16:19:27 +01:00
Xiang Xiao
6cc0388f4f serial/ptmx: Add lock to avoid the race condition in ptmx_minor_free
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2022-02-06 16:19:27 +01:00
Xiang Xiao
01a234bfb1 pipe: Add DEV_PIPE_VFS_PATH to specify the pipe location
and put into /var/pipe by default like other pseudo device

Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2022-02-05 23:37:44 +01:00
Xiang Xiao
91c331f3fd pipe: Change the default of DEV_PIPE_MAXSIZE from 256/1024 to 65535
since both values have to typedef pipe_ndx_t to uint16_t,
it doesn't make sense to limit the size smaller than 65535

Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2022-02-05 23:37:44 +01:00
Petro Karashchenko
74a4394352 drivers/syslog/syslog_device: fix flushing data when end of line is detected
Signed-off-by: Petro Karashchenko <petro.karashchenko@gmail.com>
2022-02-05 03:10:31 +08:00
Alexander Lunev
a597e66070 bcm43xxx: fixed several warnings:
warning: ISO C forbids 'return' with expression, in function returning void [-Wpedantic]
warning: format '%x' expects argument of type 'unsigned int', but argument 4 has type 'uint8_t * {aka unsigned char *}' [-Wformat=]
warning: too many arguments for format [-Wformat-extra-args]
2022-02-04 15:26:42 -03:00
chao.an
5457a9a450 serial/pty: fix the lock handling
Signed-off-by: chao.an <anchao@xiaomi.com>
2022-02-03 13:14:34 +08:00
chao.an
2ab4003e0f usbhost/max3421e: fix leaving from critical section
Signed-off-by: chao.an <anchao@xiaomi.com>
2022-02-02 21:45:13 +08:00
Xiang Xiao
4c167b0729 Correct the code alignment
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2022-02-01 21:22:21 -03:00
Xiang Xiao
f987668068 serial: Consolidate the general termios in the common place
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2022-02-01 21:22:21 -03:00
Xiang Xiao
01b791d773 drivers/syslog: Implement RTT based log channel
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2022-02-01 11:26:46 +01:00