Commit Graph

3433 Commits

Author SHA1 Message Date
Pelle Windestam
b6fd522699 drivers/analog: fix nxstyle warnings 2020-03-10 07:20:38 -06:00
Pelle Windestam
8390a66a03 fix nxstyle warnings for drivers/analog/lmp92001.c 2020-03-10 03:53:42 -05:00
Pelle Windestam
633e539362 fix nxstyle warnings for drivers/analog/adc.c 2020-03-10 03:53:42 -05:00
Petro Karashchenko
3fa6baec98 spi: change spi_send() interface to support of 32-bit word transfer
Signed-off-by: Petro Karashchenko <petro.karashchenko@gmail.com>
2020-03-09 08:03:35 -06:00
anjana-tel
655fcf18d0 Fixed RTC periodic callback issue
alarminfo->active = false will kill the signal which will disable the interrupt.
In effect, periodic interrupt will behave like alarm interrupt.

So, removed alarminfo->active = false from rtc_periodic_callback() function

Update rtc.c
2020-03-09 06:21:21 -05:00
Gregory Nutt
0efed95115 drivers/net/tun.c: Eliminate unused function.
Eliminated unused function tun_ipv6multicast().  This eliminates a warning from the build test:

net/tun.c:1061:13: warning: 'tun_ipv6multicast' defined but not used [-Wunused-function]
 static void tun_ipv6multicast(FAR struct tun_device_s *priv)
             ^~~~~~~~~~~~~~~~~
2020-03-08 08:40:05 -05:00
Alan Carvalho de Assis
953a1fafae Fixed compilation issue with poll fds notification
Author: Alan Carvalho de Assis <acassis@gmail.com>
    Fix all nxstyle reported issues

Author: Robin Raymond <robin@opticaltone.com>
    Fixed compilation issue with poll fds notification.
    https://github.com/apache/incubator-nuttx/issues/483
2020-03-07 19:18:50 -03:00
Gregory Nutt
c8b39b48bb z20x: w25boot configuration nees CONFIG_FS_WRITABLE
boards/z80/ez80/z20x/configs/w25boot/defconfig:  needs CONFIG_FS_WRITABLE=y

Style cleanup / Correct file header

  drivers/bch/bchdev_register.c, drivers/mtd/ftl.c, and fs/driver/fs_findblockdriver.c:
  Run through nxstyle; replace BSD-3 license with Apache 2.0
2020-03-07 16:59:38 -03:00
Xiang Xiao
553585a000 net: phy_notify_subscribe call phy_notify_unsubscribe if sigev_notify equals SIGEV_NONE 2020-03-07 12:59:47 -06:00
Gregory Nutt
3a7bf78c56 drivers/mtd/w25.c: Add support for work-alike AMIC parts
Verified with 8Mbit AMIC A25L080 part.
2020-03-07 12:12:50 -06:00
Gregory Nutt
ee9949a724 z20x: Fix some SPI/W25/Timer issues.
arch/z80/src/ez80/ez80_spi.c:  Do not configure SPI chip select pin.  It is not used by the driver and configuring it just clobbers other usage of that pin.  Add some additional debug outputs; correct some exiting debug outputs.

drivers/mtd/w25.c:  Add some debug output.

boards/z80/ez80/z20x/src/ez80_w25.c:  Correct SPI bus number used in initialization.  Only SPI1 is supported.

arch/z80/src/ez80/ez80_timerisr.c:  Some initial timer configuration fixes.
2020-03-06 21:09:14 +01:00
Alin Jerpelea
34f274f9c0 cxd56: move ISX012 camera sensor driver
This sensor driver needs rework to match the needed layout for standar NuttX driver.
In the meantime it is moved to board specific sensors to fix the violation.

Signed-off-by: Alin Jerpelea <alin.jerpelea@sony.com>
2020-03-06 08:58:57 -06:00
Juha Niskanen
83b6953624 drivers/sensors/sgp30.c: Reset I2C in case init msg takes too long
We have experimentally found out that this change helps with somewhat quirky CO2/VOC-sensor.
2020-03-05 08:01:43 -06:00
GAEHWILER Reto
85e461c59c STM32H7/STM32F30: Typos, register correction and extension
* Correction in stm32h7x3xx_rcc
* Adding GPIO_TIM2_CH1OUT_1 to stm32f30xxx_pinmap
* Comment typo fix in drivers/mmcsd/mmcsd_spi.c
2020-03-03 09:20:58 -06:00
Juha Niskanen
f3490e42c3 Fix typos in comments 2020-03-03 09:11:57 -06:00
macman88
43dfbdb348 Battery monitor support (#404)
* Adding support for BQ769x0 Battery Monitor IC (Work In Progress)
* Additional changes to support BQ769x0
* Store cell count and chip type when setting up
* Added shutdown, limits, charge/discharge switch, and clear faults operations
* Added support for current measurement; some cleanup
* Updated temperature reporting.  Fixed negative current reporting.
* When setting safety limits, update limit structure with actual values used.
* Added note on battery limit structure
* Updates to BQ769x0.  Re-ordered fault reporting, added fault cache, added ordered fault clearing
2020-02-28 18:18:50 -06:00
macman88
922e67c7cc MCP9844 shutdown mode support (#403)
* Added shutdown support to the MCP9844 sensor driver.
* Clean up debug messages
* Clean up comments and formatting
2020-02-28 16:21:56 -06:00
Xiang Xiao
c161dc07a9 syslog/file: Remove syslog_dev_uninitialize return value
To simplify the initializition process
2020-02-27 08:02:50 -06:00
Xiang Xiao
3e41e82942 drivers/serial: Remove the nonexistent CMSDK_UART option 2020-02-24 08:47:36 -06:00
Xiang Xiao
1d339eb80c syslog: Make g_default_channel as static 2020-02-24 08:47:27 -06:00
Xiang Xiao
46e22d7fd9 syslog/rpmsg: Don't overwrite up_putc
Hook into syslog subsystem like ramlog approach
2020-02-24 08:47:13 -06:00
Xiang Xiao
cde88cabcc Run codespell -w with the latest dictonary again
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2020-02-23 22:27:46 +01:00
Xiang Xiao
ebdfc93ee3 drivers/syslog: Rename SYSLOG_NONE to SYSLOG_DEFAULT
Since syslog still output if ARCH_LOWPUTC == y and select the default syslog device by ARCH_LOWPUTC
2020-02-23 09:11:22 -06:00
Xiang Xiao
bd4e8e19d3 Run codespell -w against all files
and fix the wrong correction
2020-02-22 14:45:07 -06:00
Nicholas Chin
0f284c3025 driver/ioexpander: adds driver for the PCA9538 I2C ioexpander 2020-02-19 11:53:08 -06:00
Xiang Xiao
892290f76b syslog: Call syslog_rpmsg_init inside syslog_initialize like other syslog driver 2020-02-19 07:19:34 -06:00
Xiang Xiao
553f12b4e8 syslog: Remove SYSLOG_SERIAL_CONSOLE which isn't really used 2020-02-19 07:19:20 -06:00
Nicholas Chin
85caee63b4 drivers/analog: Adds driver for the ADS7828 I2C analog to digital converter 2020-02-18 14:19:40 -06:00
Xiang Xiao
51a2171c71 ramlog: Remove g_ramlog_syslog_channel since it's same as g_default_channel
And remove syslog_init_e because all initialization is later now and we don't
distinguish the initialition phase anymore after ramlog don't need special
initialize.
2020-02-18 13:04:45 -06:00
Xiang Xiao
dcaaf2d912 ramlog: Remove all ramlog_consoleinit related code
Because we can get the same function by CONSOLE_SYSLOG/syslog_console_init.
BTW, it isn't a good choice to use g_ramlogfops as /dev/console since nsh
will read back what it send out which will surprise most people.
2020-02-18 12:57:43 -06:00
Xiang Xiao
f982ee43db drivers/serial: Remove the lowconsole driver
Replace with the syslog console driver which has more capability than lowconsole
2020-02-18 12:51:09 -06:00
Gregory Nutt
21aef0dd68 drivers/*/Kconfig: Consolidate driver Kconfig Files.
This commit does two things:

1. First, it reorganizes the driver Kconfig files so that each is self contained.  Before, a part of the driver configuration was in drivers/Kconfig and the rest was in in drivers/xyz/Konfig.  Now, all of the driver configuration is consolitated in the latter.

2. Second, this commit correct numerous serious errors introduced in a previous reorganization of the driver Kconfig files.  This was first noted by Nicholas Chin in PR270 for the case of the drivers/i2c/Kconfig but some examination indicates that the error was introduced into several other Kconfig files as well.

The nature of the introduced error was basically this:

- Nothing must intervene between the menuconfig selection and the following conditional configuration otpions.
- A previous PR erroneously introduced unconditional options between the menuconfig and the following confditional logic, thus corrupting the driver menus.

This error was easy to make because the driver Kconfig files were not well modularized.  Making them fully self-contained should eliminate this kind of error in the future.
2020-02-15 15:19:11 +01:00
Gregory Nutt
f5e0bb2d30 Run all files modified by PR274 through nxstyle. 2020-02-15 07:17:22 -06:00
Xiang Xiao
20a9a62fdf Make compare_timespec public so timer driver could reuse it 2020-02-15 07:17:07 -06:00
Nicholas Chin
ddc8f52202 drivers/eeprom/i2c_xx24xx.c: increase number of retries in ee24xx_waitwritecomplete 2020-02-14 09:20:33 -06:00
Juha Niskanen
15b78abccf Fix typos in comments 2020-02-14 08:50:45 -06:00
Gregory Nutt
3c0b49448a Network Loopback Driver: A configuration option to control packet size.
Historically, the loopback driver used the largest packet size of all enabled link layer protocols.  This permitted packets to be forward via the loopbak device with no major loss of performance.  However, in experimenting with configurations where no other link layer protocols were enabled, this means the loopback packet size was set to the smallest possible size, to the SLIP minimum of 296 bytes.  This resulted in terrible loopback performance.

    This commit adds an option to increase the loopback packet size with the option CONFIG_NET_LOOPBACK_PACKETSIZE.

    The loopback driver packet buffer should be quite large.  The larger the loopback packet buffer, the better will be TCP performance of the loopback transfers.  The Linux loopback device historically used packet buffers of size 16Kb, but that was increased in recent Linux versions to 64Kb.  Those sizes may be excessive for resource constrained MCUs, however.

    The network still enforces the lower limit that is the maximum packet size of all enabled link layer protocols.  But this new option permits the loopback packet size to be increased from that.

    * net/Kconfig:  Adds CONFIG_NET_LOOPBACK_PKTSIZE option
    * include/nuttx/net/netconfig.h:  Assures that the packet size that is used is at least as large as the largest packet size of other link layer protocols.
    * drivers/net/loopback.c:  Use that larger packet size.
    * boards/sim/sim/sim/configs/tcploop/defconfig:  Set the loopback packet size to 1500
2020-02-10 22:17:32 -03:00
Xiang Xiao
d68693f74c drivers/telnet: Stop the loop if SIGSTP char is match and SIGINT not enabled
Change-Id: I78510616e68330b0171230ca0e081c0d702a6f42
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2020-02-10 09:21:34 -06:00
Gregory Nutt
d09af3b7f3 Run .c and .h files modified by PR241 through nxstyle. 2020-02-10 08:57:20 -06:00
liuhaitao
bbd102808d drivers/net/telnet.c: correct typo error to fix build break
Signed-off-by: liuhaitao <liuhaitao@xiaomi.com>
2020-02-10 10:12:10 -03:00
Gregory Nutt
10721c0826 Kconfig: Move the ARCH_PHY_INTERRUPT option to net/Kconfig and make it
unconditionally selectable.
2020-02-09 00:55:41 +00:00
Xiang Xiao
3cb259daa6 drivers/Kconfig: Move if/endif to subfolder Kconfig
Move if/endif to subfolder Kconfig and make ARCH_HAVE_XXX option always selectable by moving out of if/endif
2020-02-08 08:04:05 -06:00
Xiang Xiao
a8de37fbec Ensure all source code end with one and only one newline
by this command:
git ls-files -z | while IFS= read -rd '' f; do tail -c1 < "$f" | read -r _ || echo >> "$f"; done
2020-02-08 07:25:56 -06:00
Gregory Nutt
b35bf20824 drivers/net/telnet.c: Run file changed in last PR through nxstyle. 2020-02-07 07:25:57 -06:00
Xiang Xiao
652c763a32 drivers/net/telnet.c: Unify the coding style in telnet driver
Unify th ecoding style in the telenet driver and ensure kernel version API used in all place and remove the unused stuff
2020-02-07 07:24:43 -06:00
Xiang Xiao
6be0b2f1b8 drivers/net/telnet.c: Trigger SGA and ECHO proactively in the character mode
Trigger SGA and ECHO proactively in character mode otherwise Ubuntu bultin telnet can't enter this mode

Change-Id: I8aa2ab2b31c35007077c701c264b3971152435f0
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2020-02-07 07:23:45 -06:00
Xiang Xiao
ed2a002ee5 drivers/net/telnet.c: Remove g_telnet_common global variable
Remove g_telnet_common global variable; we can reuse g_clients_sem as the lock guard

Change-Id: Ic3af9f2116f70523a4249b29c65bd1fb83ca4da2
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2020-02-07 07:21:54 -06:00
Xiang Xiao
70786fa758 drivers/net/telnet.c: telnet driver should return -EAGAIN if O_NONBLOCK
Telnet driver should return -EAGAIN is O_NONBLOCK is active also should report -EPIPE first

Change-Id: I7ad2df15377c7bec8e22d0f5d1b54f7ce33eb0db
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2020-02-07 07:20:54 -06:00
Xiang Xiao
350d25c855 driverts/net/telnet.c: Refine Ctrl+C handling in telnet driver
Refine Ctrl-C handling in telnet driver to avoid issue the kill more than once

Change-Id: I9fcec5d861ea85258170f379d741d2bb8e4d9b9e
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2020-02-07 07:19:58 -06:00
Xiang Xiao
3c425a8d82 drivers/net/telnet.c Remove the unnecessary '\0' terminator from telnet driver 2020-02-07 07:19:21 -06:00