Commit Graph

4049 Commits

Author SHA1 Message Date
Fotis Panagiotopoulos
b73dc0f166 syslog: Added separator in file logs. 2021-06-09 10:09:04 -05:00
Xiang Xiao
5b2a17b892 Include assert.h in necessary place
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2021-06-08 13:06:08 -07:00
Fotis Panagiotopoulos
37ec290a11 Syslog file rotations number is configurable. 2021-06-08 04:12:48 -05:00
Alan C. Assis
3859031a6b Fix ht16k33 driver to support multi-modules 2021-06-07 01:08:11 -05:00
Xiang Xiao
f7c0d46ed8 serial: Remove the unnecessary err_out label 2021-06-07 07:55:14 +09:00
Masayuki Ishikawa
3ccef09b4e drivers: serial: Remove an unnecessary critical section (cs) for SMP
Summary:
- I thought this cs is needed to avoid data corruption
- For example, while executing uart_xmitchar() in the interrupt
  handler on CPU0, an application running on CPU1 can call
  uart_putxmitchar() via write()->uart_write().
- In this case, taking xmit.sem in uart_write() will wait for CPU0
  to finish uart_xmitchar() because CPU0 has already taken a cs
  in uart_xmitchar() then nxsem_wait() on CPU0 takes a new cs
  inside (and release the cs when returning but it's OK)
- Then uart_write() on CPU1 disables UART TX, so uart_xmitchar()
  on CPU0 will not be called while executing uart_write() on CPU1.
- So this critical section in uart_putxmitchar() can be removed.

Impact:
- None

Testing:
- Tested with spresense:wifi_smp, esp32-devkitc:smp

Reported-by: Xiang Xiao <xiaoxiang@xiaomi.com>
Signed-off-by: Masayuki Ishikawa <Masayuki.Ishikawa@jp.sony.com>
2021-06-05 22:33:09 -05:00
Alan C. Assis
54134507ff lcd: Add support to Holtek HT16K33 as 14-segment display controller 2021-06-05 20:32:04 -05:00
Gustavo Henrique Nihei
0b3c2c7603 spi: Refactor SPI Slave interface prefix to sync with I2C Slave 2021-06-05 04:50:34 -07:00
Gustavo Henrique Nihei
91b1de4a67 drivers/spi: Include missing assert.h header 2021-06-05 04:50:34 -07:00
Fotis Panagiotopoulos
216194d31b Added automatic log rotation, when log file is opened. 2021-06-03 15:57:28 -03:00
Xiang Xiao
2e54df0f35 Don't include assert.h from public header file
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2021-06-03 08:36:03 -07:00
Fotis Panagiotopoulos
e189d83e11 SYSLOG channel add functions return handle to the channel. 2021-06-03 08:36:15 -05:00
Masayuki Ishikawa
822002d347 drivers: audio: Apply CXD56_PHYSADDR to cxd56.c
Summary:
- This commit converts data to the physical address for DMA transfer.

Impact:
- cxd56.c only

Testing
- Tested with nxplayer and nxrecorder

Signed-off-by: Masayuki Ishikawa <Masayuki.Ishikawa@jp.sony.com>
2021-06-02 22:13:10 -05:00
Xiang Xiao
81e63e3a63 serial: Remove the unnecessary critical section in uart_pollnotify
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2021-06-02 15:46:53 -07:00
Jiuzhu Dong
ed6b257fa4 syslog: support ramlog, up_putc, rpmsg_syslog coexist
N/A

Change-Id: Ia58c7e195da7ad48f3018a131a78b2f01f94e741
Signed-off-by: Jiuzhu Dong <dongjiuzhu1@xiaomi.com>
2021-06-02 08:45:20 -05:00
Jiuzhu Dong
01ff3604b0 syslog/Kconfig: support config multi syslog channel
delete choice for select syslog log device

Change-Id: Ifc02e687526506afac46febec375062949869356
Signed-off-by: Jiuzhu Dong <dongjiuzhu1@xiaomi.com>
2021-06-02 08:45:20 -05:00
Jiuzhu Dong
e21fddbb34 syslog/emerg: fix bug about printing LOG_EMERG log from iob buffer
The patch is related to: commit 5f7c98b6e1

Author: Xiang Xiao <xiaoxiang@xiaomi.com>
Date:   Mon May 17 22:38:22 2021 +0800

    drivers/syslog: Remove emergstream implementation and caller

    since emergstream always call syslog_force, but syslog_force is designed
    for the interrupt context, and then doesn't mean any emergency thing.
    On the other hand, emergstream has other bad side effect:
    1.Can't output to file or dev channel
    2.Can't work well with the interrupt buffer

    Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>

Signed-off-by: Jiuzhu Dong <dongjiuzhu1@xiaomi.com>
2021-06-02 10:25:19 -03:00
Jiuzhu Dong
aeb7ed8c53 syslog/ramlog: initialize g_sysdev based on the current ramlog buffer
by ramlog_initbuf();
Algorithm: Scan the entire ramlog buffer, the position of the head
is the first byte is not empty and second byte is empty. The position
of the tail is the first byte is empty and second byte is not empty.

Change-Id: Ieb9161bd670481cd335e9a901287cd5e589f0849
Signed-off-by: Jiuzhu Dong <dongjiuzhu1@xiaomi.com>
2021-06-01 15:16:45 -03:00
Jiuzhu Dong
ec38d0ce98 syslog/ramlog: save ramlog to fixed section
we can reload ramlog after hot reboot.

Change-Id: Iee7c105a2358075302121d6bf0047bc54d07e9a6
Signed-off-by: Jiuzhu Dong <dongjiuzhu1@xiaomi.com>
2021-06-01 15:16:45 -03:00
Jiuzhu Dong
4ae6862bbe syslog: fix bug about syslog_default_write
Change-Id: I6d8b5bce8071f11b1903fe1fa0fe8dbc34bf3a09
Signed-off-by: Jiuzhu Dong <dongjiuzhu1@xiaomi.com>
2021-06-01 12:44:17 -05:00
Masayuki Ishikawa
ab7ceb26e0 drivers: wireless: Remove ASSERT() in _check_pkt_q_empty() in gs2200m.c
Summary:
- During Wi-Fi stress test, sometimes ASSERT() happens in gs2200m.c
- This commit removes the ASSERT() but calls _remove_all_pkt()
  for a workaround.

Impact:
- None

Testing:
- Tested with spresense:wifi_smp

Signed-off-by: Masayuki Ishikawa <Masayuki.Ishikawa@jp.sony.com>
2021-05-31 21:27:28 -05:00
Xiang Xiao
d7f96003cf Don't include debug.h from public header file
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2021-06-01 06:42:02 +09:00
Gustavo Henrique Nihei
8a41d849df drivers/spi: Change prefix to a more intuitive "spislave" 2021-05-31 07:54:08 -07:00
chao.an
99bfd355c7 serial/uart/h4: add bt h4 uart serial driver
Signed-off-by: chao.an <anchao@xiaomi.com>
2021-05-31 09:50:54 -03:00
chao.an
6c69b12000 wireless/bluetooth: decoupling bt_driver_s and bt_buf_s
Signed-off-by: chao.an <anchao@xiaomi.com>
2021-05-31 09:50:54 -03:00
Alin Jerpelea
13e4f9b6b2 drivers: update licenses to Apache
Gregory Nutt is the copyright holder for those files and he has submitted the
SGA as a result we can migrate the licenses to Apache.

Signed-off-by: Alin Jerpelea <alin.jerpelea@sony.com>
2021-05-31 02:58:08 -05:00
Jiuzhu Dong
c06bc9eebd sim_addrenv: support add addrenv dynamically multiple times.
N/A

Change-Id: Ie34f6c59bc16fb147c7103978253dbe9403990d3
Signed-off-by: Jiuzhu Dong <dongjiuzhu1@xiaomi.com>
2021-05-30 23:28:40 -05:00
Gustavo Henrique Nihei
57723eaedf drivers/spi: Add SPI Slave character device driver 2021-05-27 12:13:48 -03:00
Masayuki Ishikawa
59ab8151cc drivers: serial: Remove unnecessary DEBUGASSERT in serial.c
Summary:
- This commit removes unnecessary DEBUGASSERT in serial.c

Impact:
- None

Testing:
- Tested with sabre-6quad (QEMU) and sim

Signed-off-by: Masayuki Ishikawa <Masayuki.Ishikawa@jp.sony.com>
2021-05-26 23:20:29 -03:00
Sebastien Lorquet
a35f0675e1 user correct printf specifiers
fix long line
2021-05-26 09:30:05 -03:00
me@me.net
85b0faed21 fix typo in pca9555 2021-05-25 16:13:48 +01:00
Xiang Xiao
001e7c3e76 sched: Don't include nuttx/sched.h inside sched.h
But let nuttx/sched.h include sched.h instead to
avoid expose nuttx kernel API to userspace.

Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2021-05-24 12:11:53 +09:00
SPRESENSE
139f1f1548 drivers/modem/altair: Fix behavior when a reset packet conflicts with a send packet
Even in the case of a conflict between a reset packet
and a send packet, the send size is compared and the
larger size is sent as the payload.
2021-05-19 12:15:59 +02:00
SPRESENSE
4b1fddec8a drivers/mtd/smart.c: Recover the missing link of directory entry
When creating the next chain of directory entries, (1) add the position
of next entry to the current sector, and then (2) update the sector of
next entry. If the power is turned off between (1) and (2), the next
entry will not be found, and the chain of directory entries will break.
It causes the SmartFS file system corruption, and we will not be able
to add files.

To avoid this issue, in checking the filesystem by smart_fsck_directory,
if the sector of next entry does not exist, update the sector of
directory entry to invalidate the field of next entry.
2021-05-19 11:02:50 +02:00
Xiang Xiao
5f7c98b6e1 drivers/syslog: Remove emergstream implementation and caller
since emergstream always call syslog_force, but syslog_force is designed
for the interrupt context, and then doesn't mean any emergency thing.
On the other hand, emergstream has other bad side effect:
1.Can't output to file or dev channel
2.Can't work well with the interrupt buffer

Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2021-05-18 09:26:28 -03:00
Alan C. Assis
4c74f46afe Add basic support for MCP23017 I/O Expander 2021-05-16 12:48:52 -05:00
Jiuzhu Dong
73cc1f8884 driver/rtc: add config CONFIG_RTC_RPMSG_SERVER to
N/A
select rtc rpmsg role.

Change-Id: I7f9053b070593573caa5d988c6a2e13593da6bc5
Signed-off-by: Jiuzhu Dong <dongjiuzhu1@xiaomi.com>
2021-05-15 14:33:52 -03:00
Jiuzhu Dong
f082893b9a driver/rtc: add config RTC_RPMSG_SERVER_NAME to
specified the name of remote proc(rpmsg server)

Change-Id: I0086bb43727a2bbb5e68f88907b5e4608182ef9c
Signed-off-by: Jiuzhu Dong <dongjiuzhu1@xiaomi.com>
2021-05-15 14:33:52 -03:00
Jiuzhu Dong
018cf26605 lirc: fix bug about lirc_raw_event
N/A

Change-Id: If00d0a7e4e4f9a0d9119b6a170cffd993f23f71a
Signed-off-by: Jiuzhu Dong <dongjiuzhu1@xiaomi.com>
2021-05-15 09:47:28 -07:00
Jiuzhu Dong
ff567124d3 driver/syslog: add config SYSLOG_RPMSG_SERVER_NAME to
N/A

specified the name of remote proc(rpmsg server)

Change-Id: Ie270d651071e87a40a80ab489597ae18db9814f0
Signed-off-by: Jiuzhu Dong <dongjiuzhu1@xiaomi.com>
2021-05-15 09:39:57 -03:00
Xiang Xiao
7169c7c5f8 drivers/rptun: Adapter to openamp 2020.10.0 release
change the callback implementation from mmap to get_mem

Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2021-05-13 18:43:19 +01:00
Xiang Xiao
276fa2ff1c drivers/serial: Change the default value of SERIAL_NPOLLWAITERS to 4
since the console is normally opened three time as stdin, stdout and
stderr and remove the dependence on STANDARD_SERIAL because other type
of serial drivers also support the poll through the same codebase.

Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
Change-Id: Ie68322c4647cc838b295491329969869d6ba310b
2021-05-11 16:45:22 +01:00
Diego Herranz
a1c4ba379f drivers/sensors/hdc1008: add missing break
It was not possible to use the HDC1008_MEAS_T_AND_RH
operation mode since it was running the default case too.
2021-05-07 21:19:14 -03:00
Julian Oes
644a0cd525 drivers/serial: fix Rx interrupt enable for cdcacm
This is addressing an issue where Rx interrupts were not restored for
cdcacm after the buffer had been filled (in a burst).
The Rx interrupts were only restored after the watchdog timeout of 200ms
fired.

This happened because CONFIG_SERIAL_RXDMA was set, however, for the
cdcacm driver this does not actually matter as it is relying on
uart_enablerxint to be called via the ops table.

This patch makes sure that uart_enablerxint and uart_disablerxint are
always called, independent of CONFIG_SERIAL_RXDMA, relying on the ops
table to be correct for the case where it should be only a no-op.
2021-05-06 06:49:07 -07:00
raiden00pl
a74ea51aae drivers/timers/pwm.c: fix compilation warnings 2021-05-05 09:32:58 -03:00
raiden00pl
3fb78a8299 drivers: move the generic upper-half motor driver from drivers/power to drivers/motor 2021-05-05 09:00:22 +02:00
Brennan Ashton
2c91805d8f boards/stm32f7: Add i2c and mpu60x0 support to nucleo-144 2021-05-04 10:17:44 -03:00
Brennan Ashton
e155af891a sensor: Fix bad bit mask macro in mpu60x0 2021-05-04 10:17:44 -03:00
David Sidrane
8f8befaa25 mtd:ramtron Use inttypes in printing macros 2021-05-03 16:58:47 -04:00
Nathan Hartman
8efec13ab0 drivers/motor - Fix CFLAGS path
* drivers/motor/Make.defs b/drivers/motor/Make.defs:
  Fix typo in MOTOR_CFLAGS path (motr -> motor)
2021-05-03 12:23:54 -07:00