Skip to content

Commit

Permalink
drivers/sensors: Fix more naming of configurations to be compliant fo…
Browse files Browse the repository at this point in the history
…r two more drivers. Still a few more to go.
  • Loading branch information
gregory-nutt committed Aug 24, 2017
1 parent 269107a commit 1f023fa
Show file tree
Hide file tree
Showing 30 changed files with 67 additions and 67 deletions.
4 changes: 2 additions & 2 deletions configs/dk-tm4c129x/README.txt
Original file line number Diff line number Diff line change
Expand Up @@ -496,8 +496,8 @@ Temperature Sensor
CONFIG_I2C=y

Drivers -> Sensors
CONFIG_LM75=y
CONFIG_I2C_LM75=y
CONFIG_SENSORS_LM75=y
CONFIG_LM75_I2C=y

Applications -> NSH Library
CONFIG_NSH_ARCHINIT=y
Expand Down
2 changes: 1 addition & 1 deletion configs/dk-tm4c129x/include/board.h
Original file line number Diff line number Diff line change
Expand Up @@ -275,7 +275,7 @@ void tiva_boardinitialize(void);
*
************************************************************************************/

#if defined(CONFIG_I2C) && defined(CONFIG_I2C_LM75) && defined(CONFIG_TIVA_I2C6)
#if defined(CONFIG_I2C) && defined(CONFIG_LM75_I2C) && defined(CONFIG_TIVA_I2C6)
int tiva_tmp100_initialize(FAR const char *devpath);
#endif

Expand Down
2 changes: 1 addition & 1 deletion configs/dk-tm4c129x/ipv6/defconfig
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ CONFIG_I2CTOOL_MAXBUS=6
CONFIG_I2CTOOL_MINBUS=6
CONFIG_LIBC_FLOATINGPOINT=y
CONFIG_LIBM=y
CONFIG_LM75=y
CONFIG_SENSORS_LM75=y
CONFIG_MAX_TASKS=16
CONFIG_MAX_WDOGPARMS=2
CONFIG_NET_BROADCAST=y
Expand Down
2 changes: 1 addition & 1 deletion configs/dk-tm4c129x/nsh/defconfig
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ CONFIG_I2CTOOL_MAXBUS=6
CONFIG_I2CTOOL_MINBUS=6
CONFIG_LIBC_FLOATINGPOINT=y
CONFIG_LIBM=y
CONFIG_LM75=y
CONFIG_SENSORS_LM75=y
CONFIG_MAX_TASKS=16
CONFIG_MAX_WDOGPARMS=2
CONFIG_NET_ARP_IPIN=y
Expand Down
2 changes: 1 addition & 1 deletion configs/dk-tm4c129x/src/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ ifeq ($(CONFIG_LIB_BOARDCTL),y)
CSRCS += tm4c_appinit.c
endif

ifeq ($(CONFIG_I2C_LM75),y)
ifeq ($(CONFIG_LM75_I2C),y)
ifeq ($(CONFIG_TIVA_I2C6),y)
CSRCS += tm4c_tmp100.c
endif
Expand Down
2 changes: 1 addition & 1 deletion configs/dk-tm4c129x/src/tm4c_bringup.c
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@
* Pre-processor Definitions
****************************************************************************/

#if defined(CONFIG_I2C) && defined(CONFIG_I2C_LM75) && defined(CONFIG_TIVA_I2C6)
#if defined(CONFIG_I2C) && defined(CONFIG_LM75_I2C) && defined(CONFIG_TIVA_I2C6)
# define HAVE_TMP100
#endif

Expand Down
4 changes: 2 additions & 2 deletions configs/dk-tm4c129x/src/tm4c_tmp100.c
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@
#include "tiva_i2c.h"
#include "dk-tm4c129x.h"

#if defined(CONFIG_I2C) && defined(CONFIG_I2C_LM75) && \
#if defined(CONFIG_I2C) && defined(CONFIG_LM75_I2C) && \
defined(CONFIG_TIVA_I2C6)

/****************************************************************************
Expand Down Expand Up @@ -100,4 +100,4 @@ int tiva_tmp100_initialize(FAR const char *devpath)
return ret;
}

#endif /* CONFIG_I2C && CONFIG_I2C_LM75 && CONFIG_TIVA_I2C6 */
#endif /* CONFIG_I2C && CONFIG_LM75_I2C && CONFIG_TIVA_I2C6 */
4 changes: 2 additions & 2 deletions configs/stm3210e-eval/README.txt
Original file line number Diff line number Diff line change
Expand Up @@ -346,8 +346,8 @@ Temperature Sensor
following to the NuttX configuration file

Drivers -> Sensors
CONFIG_LM75=y
CONFIG_I2C_LM75=y
CONFIG_SENSORS_LM75=y
CONFIG_LM75_I2C=y

Then you can implement logic like the following to use the temperature
sensor:
Expand Down
4 changes: 2 additions & 2 deletions configs/stm3210e-eval/include/board.h
Original file line number Diff line number Diff line change
Expand Up @@ -277,7 +277,7 @@ void stm3210e_lcdclear(uint16_t color);
*
************************************************************************************/

#if defined(CONFIG_I2C) && defined(CONFIG_I2C_LM75) && defined(CONFIG_STM32_I2C1)
#if defined(CONFIG_I2C) && defined(CONFIG_LM75_I2C) && defined(CONFIG_STM32_I2C1)
int stm32_lm75initialize(FAR const char *devpath);
#endif

Expand All @@ -296,7 +296,7 @@ int stm32_lm75initialize(FAR const char *devpath);
*
************************************************************************************/

#if defined(CONFIG_I2C) && defined(CONFIG_I2C_LM75) && defined(CONFIG_STM32_I2C1)
#if defined(CONFIG_I2C) && defined(CONFIG_LM75_I2C) && defined(CONFIG_STM32_I2C1)
int stm32_lm75attach(xcpt_t irqhandler, void *arg);
#endif

Expand Down
2 changes: 1 addition & 1 deletion configs/stm3210e-eval/src/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ ifeq ($(CONFIG_USBDEV_COMPOSITE),y)
CSRCS += stm32_composite.c
endif

ifeq ($(CONFIG_I2C_LM75),y)
ifeq ($(CONFIG_LM75_I2C),y)
CSRCS += stm32_lm75.c
endif

Expand Down
4 changes: 2 additions & 2 deletions configs/stm3210e-eval/src/stm32_lm75.c
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@
#include "stm32_i2c.h"
#include "stm3210e-eval.h"

#if defined(CONFIG_I2C) && defined(CONFIG_I2C_LM75) && defined(CONFIG_STM32_I2C1)
#if defined(CONFIG_I2C) && defined(CONFIG_LM75_I2C) && defined(CONFIG_STM32_I2C1)

/************************************************************************************
* Public Functions
Expand Down Expand Up @@ -119,4 +119,4 @@ int stm32_lm75attach(xcpt_t irqhandler, void *arg)
return OK;
}

#endif /* CONFIG_I2C && CONFIG_I2C_LM75 && CONFIG_STM32_I2C1 */
#endif /* CONFIG_I2C && CONFIG_LM75_I2C && CONFIG_STM32_I2C1 */
4 changes: 2 additions & 2 deletions configs/stm32f4discovery/src/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -68,11 +68,11 @@ ifeq ($(CONFIG_SENSORS_BMP180),y)
CSRCS += stm32_bmp180.c
endif

ifeq ($(CONFIG_MAX31855),y)
ifeq ($(CONFIG_SENSORS_MAX31855),y)
CSRCS += stm32_max31855.c
endif

ifeq ($(CONFIG_MAX6675),y)
ifeq ($(CONFIG_SENSORS_MAX6675),y)
CSRCS += stm32_max6675.c
endif

Expand Down
4 changes: 2 additions & 2 deletions configs/stm32f4discovery/src/stm32_bringup.c
Original file line number Diff line number Diff line change
Expand Up @@ -264,11 +264,11 @@ int stm32_bringup(void)
}
#endif

#ifdef CONFIG_MAX31855
#ifdef CONFIG_SENSORS_MAX31855
ret = stm32_max31855initialize("/dev/temp0");
#endif

#ifdef CONFIG_MAX6675
#ifdef CONFIG_SENSORS_MAX6675
ret = stm32_max6675initialize("/dev/temp0");
#endif

Expand Down
4 changes: 2 additions & 2 deletions configs/stm32f4discovery/src/stm32_max31855.c
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@
#include "stm32_spi.h"
#include "stm32f4discovery.h"

#if defined(CONFIG_SPI) && defined(CONFIG_MAX31855) && defined(CONFIG_STM32_SPI2)
#if defined(CONFIG_SPI) && defined(CONFIG_SENSORS_MAX31855) && defined(CONFIG_STM32_SPI2)

/************************************************************************************
* Pre-processor Definitions
Expand Down Expand Up @@ -98,4 +98,4 @@ int stm32_max31855initialize(FAR const char *devpath)
return ret;
}

#endif /* CONFIG_SPI && CONFIG_MAX31855 */
#endif /* CONFIG_SPI && CONFIG_SENSORS_MAX31855 */
4 changes: 2 additions & 2 deletions configs/stm32f4discovery/src/stm32_max6675.c
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@
#include "stm32_spi.h"
#include "stm32f4discovery.h"

#if defined(CONFIG_SPI) && defined(CONFIG_MAX6675) && defined(CONFIG_STM32_SPI2)
#if defined(CONFIG_SPI) && defined(CONFIG_SENSORS_MAX6675) && defined(CONFIG_STM32_SPI2)

/************************************************************************************
* Pre-processor Definitions
Expand Down Expand Up @@ -98,4 +98,4 @@ int stm32_max6675initialize(FAR const char *devpath)
return ret;
}

#endif /* CONFIG_SPI && CONFIG_MAX6675 */
#endif /* CONFIG_SPI && CONFIG_SENSORS_MAX6675 */
8 changes: 4 additions & 4 deletions configs/stm32f4discovery/src/stm32_spi.c
Original file line number Diff line number Diff line change
Expand Up @@ -72,10 +72,10 @@ void weak_function stm32_spidev_initialize(void)
#ifdef CONFIG_STM32_SPI1
(void)stm32_configgpio(GPIO_CS_MEMS); /* MEMS chip select */
#endif
#if defined(CONFIG_STM32_SPI2) && defined(CONFIG_MAX31855)
#if defined(CONFIG_STM32_SPI2) && defined(CONFIG_SENSORS_MAX31855)
(void)stm32_configgpio(GPIO_MAX31855_CS); /* MAX31855 chip select */
#endif
#if defined(CONFIG_STM32_SPI2) && defined(CONFIG_MAX6675)
#if defined(CONFIG_STM32_SPI2) && defined(CONFIG_SENSORS_MAX6675)
(void)stm32_configgpio(GPIO_MAX6675_CS); /* MAX6675 chip select */
#endif
#if defined(CONFIG_LCD_UG2864AMBAG01) || defined(CONFIG_LCD_UG2864HSWEG01) || \
Expand Down Expand Up @@ -144,13 +144,13 @@ void stm32_spi2select(FAR struct spi_dev_s *dev, uint32_t devid, bool selected)
{
spiinfo("devid: %d CS: %s\n", (int)devid, selected ? "assert" : "de-assert");

#if defined(CONFIG_MAX31855)
#if defined(CONFIG_SENSORS_MAX31855)
if (devid == SPIDEV_TEMPERATURE(0))
{
stm32_gpiowrite(GPIO_MAX31855_CS, !selected);
}
#endif
#if defined(CONFIG_MAX6675)
#if defined(CONFIG_SENSORS_MAX6675)
if (devid == SPIDEV_TEMPERATURE(0))
{
stm32_gpiowrite(GPIO_MAX6675_CS, !selected);
Expand Down
2 changes: 1 addition & 1 deletion configs/stm32f4discovery/src/stm32f4discovery.h
Original file line number Diff line number Diff line change
Expand Up @@ -638,7 +638,7 @@ int stm32_zerocross_initialize(void);
*
****************************************************************************/

#ifdef CONFIG_MAX6675
#ifdef CONFIG_SENSORS_MAX6675
int stm32_max6675initialize(FAR const char *devpath);
#endif

Expand Down
20 changes: 10 additions & 10 deletions drivers/sensors/Kconfig
Original file line number Diff line number Diff line change
Expand Up @@ -302,36 +302,36 @@ config ADXL345_REGDEBUG

endif # SENSORS_ADXL345

config MAX31855
config SENSORS_MAX31855
bool "Maxim MAX31855 Driver"
default n
select SPI
---help---
Enables support for the MAX31855 driver

config MAX6675
config SENSORS_MAX6675
bool "Maxim MAX6675 Driver"
default n
select SPI
---help---
Enables support for the MAX6675 driver

config I2C_LM75
bool
default y if LM75

config LIS3MDL
config SENSORS_LIS3MDL
bool "STMicro LIS3MDL 3-Axis magnetometer support"
default n
select SPI
---help---
Enable driver support for the STMicro LIS3MDL 3-axis magnetometer.

config LM75
config LM75_I2C
bool
default y if LM75

config SENSORS_LM75
bool "STMicro LM-75 Temperature Sensor support"
default n
select I2C
select I2C_LM75
select LM75_I2C
---help---
Enable driver support for the STMicro LM-75 temperature sensor.
This should also work with compatible temperature sensors such as
Expand All @@ -341,7 +341,7 @@ config LM75_I2C_FREQUENCY
int "LM75 I2C frequency"
default 100000
range 1 100000
depends on I2C_LM75
depends on LM75_I2C

config LM92
bool "TI LM92 Temperature Sensor support"
Expand Down
10 changes: 5 additions & 5 deletions drivers/sensors/Make.defs
Original file line number Diff line number Diff line change
Expand Up @@ -93,11 +93,11 @@ ifeq ($(CONFIG_SENSORS_HTS221),y)
CSRCS += hts221.c
endif

ifeq ($(CONFIG_I2C_LM75),y)
ifeq ($(CONFIG_LM75_I2C),y)
CSRCS += lm75.c
endif

ifeq ($(CONFIG_LM92),y)
ifeq ($(CONFIG_SENSORS_LM92),y)
CSRCS += lm92.c
endif

Expand Down Expand Up @@ -134,19 +134,19 @@ ifeq ($(CONFIG_LIS3DSH),y)
CSRCS += lis3dsh.c
endif

ifeq ($(CONFIG_MAX31855),y)
ifeq ($(CONFIG_SENSORS_MAX31855),y)
CSRCS += max31855.c
endif

ifeq ($(CONFIG_MAX6675),y)
ifeq ($(CONFIG_SENSORS_MAX6675),y)
CSRCS += max6675.c
endif

ifeq ($(CONFIG_MPL115A),y)
CSRCS += mpl115a.c
endif

ifeq ($(CONFIG_LIS3MDL),y)
ifeq ($(CONFIG_SENSORS_LIS3MDL),y)
CSRCS += lis3mdl.c
endif

Expand Down
4 changes: 2 additions & 2 deletions drivers/sensors/lis3mdl.c
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@
#include <nuttx/fs/fs.h>
#include <nuttx/sensors/lis3mdl.h>

#if defined(CONFIG_SPI) && defined(CONFIG_LIS3MDL)
#if defined(CONFIG_SPI) && defined(CONFIG_SENSORS_LIS3MDL)

/****************************************************************************
* Private
Expand Down Expand Up @@ -638,4 +638,4 @@ int lis3mdl_register(FAR const char *devpath, FAR struct spi_dev_s *spi,
return OK;
}

#endif /* CONFIG_SPI && CONFIG_LIS3MDL */
#endif /* CONFIG_SPI && CONFIG_SENSORS_LIS3MDL */
4 changes: 2 additions & 2 deletions drivers/sensors/lm75.c
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@
#include <nuttx/sensors/lm75.h>
#include <nuttx/random.h>

#if defined(CONFIG_I2C) && defined(CONFIG_I2C_LM75)
#if defined(CONFIG_I2C) && defined(CONFIG_LM75_I2C)

/****************************************************************************
* Pre-processor Definitions
Expand Down Expand Up @@ -604,4 +604,4 @@ int lm75_register(FAR const char *devpath, FAR struct i2c_master_s *i2c, uint8_t

return ret;
}
#endif /* CONFIG_I2C && CONFIG_I2C_LM75 */
#endif /* CONFIG_I2C && CONFIG_LM75_I2C */
4 changes: 2 additions & 2 deletions drivers/sensors/lm92.c
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@
#include <nuttx/sensors/lm92.h>
#include <nuttx/random.h>

#if defined(CONFIG_I2C) && defined(CONFIG_LM92)
#if defined(CONFIG_I2C) && defined(CONFIG_SENSORS_LM92)

/****************************************************************************
* Pre-processor Definitions
Expand Down Expand Up @@ -694,4 +694,4 @@ int lm92_register(FAR const char *devpath, FAR struct i2c_master_s *i2c,

return ret;
}
#endif /* CONFIG_I2C && CONFIG_LM92 */
#endif /* CONFIG_I2C && CONFIG_SENSORS_LM92 */
4 changes: 2 additions & 2 deletions drivers/sensors/max31855.c
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@
#include <nuttx/sensors/max31855.h>
#include <nuttx/random.h>

#if defined(CONFIG_SPI) && defined(CONFIG_MAX31855)
#if defined(CONFIG_SPI) && defined(CONFIG_SENSORS_MAX31855)

/****************************************************************************
* Pre-processor Definitions
Expand Down Expand Up @@ -331,4 +331,4 @@ int max31855_register(FAR const char *devpath, FAR struct spi_dev_s *spi)

return ret;
}
#endif /* CONFIG_SPI && CONFIG_MAX31855 */
#endif /* CONFIG_SPI && CONFIG_SENSORS_MAX31855 */
4 changes: 2 additions & 2 deletions drivers/sensors/max6675.c
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@
#include <nuttx/sensors/max6675.h>
#include <nuttx/random.h>

#if defined(CONFIG_SPI) && defined(CONFIG_MAX6675)
#if defined(CONFIG_SPI) && defined(CONFIG_SENSORS_MAX6675)

/****************************************************************************
* Pre-processor Definitions
Expand Down Expand Up @@ -308,4 +308,4 @@ int max6675_register(FAR const char *devpath, FAR struct spi_dev_s *spi)

return ret;
}
#endif /* CONFIG_SPI && CONFIG_MAX6675 */
#endif /* CONFIG_SPI && CONFIG_SENSORS_MAX6675 */
2 changes: 1 addition & 1 deletion drivers/sensors/mcp9844.c
Original file line number Diff line number Diff line change
Expand Up @@ -374,4 +374,4 @@ int mcp9844_register(FAR const char *devpath, FAR struct i2c_master_s *i2c,

return ret;
}
#endif /* CONFIG_I2C && CONFIG_I2C_LM75 */
#endif /* CONFIG_I2C && CONFIG_LM75_I2C */
Loading

0 comments on commit 1f023fa

Please sign in to comment.