This reverts commit b9ace36fcc.
This change was added by PR 625 but has a serious logic flaw. It removes all occurrences of INCDIROPT and replaces it with a definition in tools/Config.mk:
else ifeq ($(WINTOOL),y)
DEFINE = "$(TOPDIR)/tools/define.sh"
INCDIR = "$(TOPDIR)/tools/incdir.sh" -w
This logic flaw is the Config.mk is included in all Make.defs files BEFORE WINTOOL is defined. As a result, the definition is wrong in many places when building under Cygwin with a Windows native toolchain.
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.
* Simplify EINTR/ECANCEL error handling
1. Add semaphore uninterruptible wait function
2 .Replace semaphore wait loop with a single uninterruptible wait
3. Replace all sem_xxx to nxsem_xxx
* Unify the void cast usage
1. Remove void cast for function because many place ignore the returned value witout cast
2. Replace void cast for variable with UNUSED macro
drivers/1wire: add PM hooks and unlink support to sht21 sensor (allowing hot-swappable I2C bus from 1-wire converter)
* drivers/1wire: add PM hook to 1wire bus
* drivers/1wire/ds28e17.c: i2c instance must be zeroed
* drivers/sht21: add unlink support
Unlike most other unlink implementations in NuttX drivers, this one
does not allow any I2C operations after unlink, making it possible to
deallocate the I2C bus.
Approved-by: Gregory Nutt <gnutt@nuttx.org>
Squashed commit of the following:
Author: Gregory Nutt <gnutt@nuttx.org>
Some cosmetic changes from coding style review.
Author: Juha Niskanen <juha.niskanen@haltian.com>
drivers/1wire: add 1-wire subsystem and ds28e17 driver