Commit Graph

3896 Commits

Author SHA1 Message Date
Alexander Vasiljev dbec1cf694 drivers:mtd:smart.c: entryname is declared and should be under ifdef 2021-02-04 10:05:59 -08:00
Alexander Vasiljev 9146878dad drivers:mtd:w25qxxxjv.c: use different protect bits and address lengths for different chips 2021-02-04 10:05:59 -08:00
Masayuki Ishikawa 0c68ddb760 drivers: wireless: Change retry condition in gs2200m_hal_write()
Summary:
- During Wi-Fi stress test, I noticed that ASSERT() happened
  in gs2200m_hal_write(). Actually, this happens in 20-40 hours.
- In this case, resp[1] was always 0x0 which is not defined
  in the spec.
- In the previous implementation, retry was only done in case of
  WR_RESP_NOK. (0x13)
- This commit changes this condition and it reties in case of
  0x0 as well

Impact:
- gs2200m driver

Testing:
- Tested with spresense:wifi_smp and stm32f4discovery:wifi

Signed-off-by: Masayuki Ishikawa <Masayuki.Ishikawa@jp.sony.com>
2021-02-03 10:29:05 +01:00
Jukka Laitinen b8dc64ffed drivers/net/encx24j600.c: Correct setting of ifstate
The ifstate is already set in
  enc_ifup -> enc_reset -> enc_linkstatus

The ifstate after this call is either ENCSTATE_RUNNING or ENCSTATE_UP

If ifstate is ENCSTATE_RUNNING, it would be wrong to set it to ENCSTATE_UP;
this would lead to enc_txavail never invoking the driver callback, causing
very long latencies in sending.

Signed-off-by: Jukka Laitinen <jukkax@ssrc.tii.ae>
2021-01-29 09:52:04 -08:00
Alexander Vasiljev 96cbd1d8a1 drivers: mtd: w25qxxxjv.c : W25Q256's sector count is 8192 2021-01-29 06:47:03 -08:00
Alin Jerpelea 6d786bedb5 drivers: mtd: mx35.c: mix case identifier fix
nxstyle fix for mix case identifier.

Signed-off-by: Alin Jerpelea <alin.jerpelea@sony.com>
2021-01-27 18:40:00 -08:00
Alin Jerpelea 2d8b193df4 drivers: mtd: fix nxstyle errors
Fix nxstyle errors to pass the CI errors.

Signed-off-by: Alin Jerpelea <alin.jerpelea@sony.com>
2021-01-27 18:40:00 -08:00
Alin Jerpelea 95adb15824 drivers: mtd: nxstyle errors fix
Fixed to pass the nxstyle CI erros

Signed-off-by: Alin Jerpelea <alin.jerpelea@sony.com>
2021-01-27 18:40:00 -08:00
Alin Jerpelea 822fbe5c10 drivers: mtd: mtd_nandscheme: mix case identifier fix
nxstyle fix for mix case identifier.

Signed-off-by: Alin Jerpelea <alin.jerpelea@sony.com>
2021-01-27 18:40:00 -08:00
Alan C. Assis f63e1e277f Add generic support to LWL Console 2021-01-26 18:21:28 -08:00
Alin Jerpelea cb5d8b53cb drivers: video: altair: nxstyle fixes
Nxstyle fixes to pass CI

Signed-off-by: Alin Jerpelea <alin.jerpelea@sony.com>
2021-01-26 05:11:58 -08:00
Alin Jerpelea bdb4b344a8 drivers: sensors: bmi160.c: nxstyle fixes
Nxstyle fixes to pass CI

Signed-off-by: Alin Jerpelea <alin.jerpelea@sony.com>
2021-01-26 05:11:58 -08:00
Alin Jerpelea baac749d4f drivers: modem: altair: altmdm_spi.h: nxstyle fixes
Nxstyle fixes to pass CI

Signed-off-by: Alin Jerpelea <alin.jerpelea@sony.com>
2021-01-26 05:11:58 -08:00
Alin Jerpelea f22683a0a6 drivers: replace licenses with Apache 2.0
This change is a license change to Apache 2.0 license.

Signed-off-by: Alin Jerpelea <alin.jerpelea@sony.com>
2021-01-26 05:11:58 -08:00
Masayuki Ishikawa c6ed7dd760 drivers: wireless: Fix _read_data() in gs2200m.c
Summary:
- During reviewing the GS2200M document, I noticed that
   _read_data() implementation is incorrect.
- Actually, we do not use "SPI Byte Stuffing for SPI-NO-DMA"
  but use "SPI Command Response (SPI-DMA)", so the sequence
  should use SPI_RECVBLOCK().

Impact:
- gs2200m.c only

Testing:
- Tested with stm32f4discovery:wifi and spresense:wifi_smp

Signed-off-by: Masayuki Ishikawa <Masayuki.Ishikawa@jp.sony.com>
2021-01-25 19:13:17 -08:00
Masayuki Ishikawa 8a72ab1a50 drivers: wireless: Print error massages with wlerr() in gs2200m.c
Summary:
- I noticed that some error messages are printed with wlinfo()
- This commit prints such error messages with wlerr()

Impact:
- No impact

Testing:
- Tested with spresense:wifi
- NOTE: CONFIG_DEBUG_WIRELESS_ERROR must be enabled

Signed-off-by: Masayuki Ishikawa <Masayuki.Ishikawa@jp.sony.com>
2021-01-24 20:03:53 -08:00
Matias N 0fa34a0b64 drivers: add generic i2c bitbang driver 2021-01-24 19:03:56 -08:00
Matias N 76cc5c36e4 bmp280: convert to common sensor interface 2021-01-18 21:08:34 -03:00
Matias N 42b6c665da sensor: change set_interval to use a value, not a pointer to value 2021-01-18 21:08:34 -03:00
Matias N 1b8e9312dc bmp280: minor fixes
Fixed a minor typo, a missing break in switch (gave error while
actually did the right thing) and added settable I2C frequency
2021-01-18 17:36:10 -03:00
Fotis Panagiotopoulos eabb2fbf38 Re-arranged syslog fields. 2021-01-18 05:37:55 -08:00
Masayuki Ishikawa 11a842333f drivers: wireless: Fix ASSERT() in _read_data_len() in gs2200m.c
Summary:
- During stress test with spresense:wifi (non-SMP), I noticed
  sometimes ASSERT() happened in _read_data_len()
- Actually, up_udelay(50) has been added to avoid the ASSERT
- However, I finally noticed that it should be moved before
  calling dready()
- Also, I cofirmed that we can reduced the time from 50 to 30
- NOTE: we need at least 15us in my experience

Impact:
- gs2200m.c only

Testing:
- Tested with following configurations
- spresense:wifi, spresense:wifi_smp, stm32f4discovery:wifi

Signed-off-by: Masayuki Ishikawa <Masayuki.Ishikawa@jp.sony.com>
2021-01-17 21:43:23 -08:00
Xiang Xiao 7df322c6be bluetooth: Move the lower half null check to common place
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2021-01-17 20:49:19 -08:00
Xiang Xiao 9103184722 bluetooth: Rename *bt_uart_shim_getdevice to btuart_shim_getdevice
follow other bluetooth driver convention(e.g. btuart_register)

Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2021-01-17 20:49:19 -08:00
chao.an efe236ba84 drivers/syslog: Prepend Process ID to syslog message
Signed-off-by: chao.an <anchao@xiaomi.com>
2021-01-16 18:38:18 -08:00
Fotis Panagiotopoulos cb78dadc4b Added color output to syslog. 2021-01-16 16:17:16 -08:00
chao.an c8a6f31a33 wireless/bluetooth: move H4_* definition to external
Reference the define from board or arch driver

Signed-off-by: chao.an <anchao@xiaomi.com>
2021-01-16 11:18:26 -08:00
chao.an f308ac1583 wireless/bluetooth: add more hci event definitions
Signed-off-by: chao.an <anchao@xiaomi.com>
2021-01-16 11:18:26 -08:00
chao.an 605cd77a23 wireless/bluetooth: remove the host dependency
HCI driver should not depend on the bluetooth host

Signed-off-by: chao.an <anchao@xiaomi.com>
2021-01-16 11:18:26 -08:00
Fotis Panagiotopoulos 946443e190 Added printing of log priority in syslog. 2021-01-16 08:56:24 -08:00
Alan C. Assis 154949403c Add generic efuse driver for NuttX
Squashed commits:

    Fix small typos on efuse driver
    Fix nxstyle issues
    Fix aligment and missing FAR
    Improvements to efuse driver
    Fix: don't free 'lower' on efuse_unregister
    Describe the efuse_param
    Remove upper pointer from lowerhalt
    Fix blank line at end of function

Co-authored-by: saramonteiro <saramonteirosouza44@gmail.com>
Co-authored-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2021-01-15 10:34:12 -06:00
Fotis Panagiotopoulos c11413a258 Added formatted timestamps in syslog. 2021-01-14 07:55:22 -06:00
Xiang Xiao 0dc6990166 Fix nxstyle warning
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2021-01-13 08:57:58 +01:00
Xiang Xiao 0536953ded Kernel module should prefer functions with nx/kmm prefix
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2021-01-13 08:57:58 +01:00
Matthew Trescott 301ba3a5cd can: fix RTR ioctl and support timeout 2021-01-12 11:57:22 -06:00
Xiang Xiao fe96250c40 fs: Make nx_vxxx and file_vxxx as internal functions
these functions are the implementation detail and then
don't need expose to external

Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
Change-Id: Ief832391d5b42d1f1645907eb465631650490234
2021-01-12 17:08:22 +01:00
Xiang Xiao 1aa69f4c73 fs: Remove the special hack for pty in nx_vopen
let's replace the content of file in place instead

Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
Change-Id: I538910d55815c7aec656c05dba4eab2fa1d6d964
2021-01-08 11:04:24 +08:00
Xiang Xiao a24ff44ae6 fs: Add file_pipe function
so pty don't need call nx_pipe and then file_detach

Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
Change-Id: Ibb8d108abd76bafe53897e5fca35babcf3e1bae9
2021-01-08 11:03:19 +08:00
Xiang Xiao 4d4cba41f6 Move the declaration of nx_mkfifo/nx_pipe to nuttx/fs/fs.h
the new location is better than nuttx/drivers/drivers.h
since they are part of the file system api.

Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2021-01-08 11:03:19 +08:00
ligd f63db66382 mqueue: add file_mq_xx for kernel use
Change-Id: Ida12f5938388cca2f233a4cde90277a218033645
Signed-off-by: ligd <liguiding1@xiaomi.com>
2021-01-05 02:40:43 -06:00
Xiang Xiao 40516a3df9 drivers/pipes: Fix a typo error
"event & POLLOUT"(not "event | POLLOUT") should be used to check POLLOUT is set

Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
Change-Id: I09af7669a1c8ee46118b904d2c5946ecb99e6215
2021-01-02 02:01:52 +01:00
Xiang Xiao c647faa117 Fix nxstyle warning
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2020-12-31 09:37:29 +01:00
Xiang Xiao 0defe43282 OS internal function should indicate the error by return negative value
instead to change errno value by calling set_errno

Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2020-12-31 09:37:29 +01:00
Xiang Xiao d9b1cb3d27 bluetooth: BLUETOOTH_BCM4343X shouldn't select BLUETOOTH_UART_SHIM
since bcm4343x bluetooth driver doesn't depend on uart shim driver

Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2020-12-29 18:11:21 -08:00
Xiang Xiao 753cb6c22b bluetooth: Remove BLUETOOTH_UART_BT860 from Kconfig
it isn't difference from BLUETOOTH_UART_OTHER, so let's use the later instead

Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2020-12-29 18:11:21 -08:00
ligd 6ad1181923 serial: should include <signal.h> explicitly
Change-Id: I20260ad3bcceb30207c9c12041dd95de41e13777
Signed-off-by: ligd <liguiding1@xiaomi.com>
2020-12-29 04:21:42 -08:00
Xiang Xiao c612c068e1 bt_uart_shim: Setup pollfd with file* correctly
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2020-12-28 10:38:42 +01:00
Xiang Xiao c258fe0f85 bt_uart_shim: Make CONFIG_SERIAL_TERMIOS optional
since the caller don't always need to use setbaud callback

Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2020-12-28 10:38:42 +01:00
Xiang Xiao 9f463fd3da bt_uart_shim: Remove g_lowerstatic static variable
let's initialize the callback directly to save the memory

Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2020-12-28 10:38:42 +01:00
Xiang Xiao 8ce2d376cc bt_uart_shim: Don't hardcode the thread stack size
so let's change 1024 to CONFIG_DEFAULT_TASKSIZE

Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2020-12-28 10:38:42 +01:00