sensors: move grove sensors under drivers/sensor
Grove devices are sensors, so no need to have them under their own category. Signed-off-by: Anas Nashif <anas.nashif@intel.com>
This commit is contained in:
parent
d2c8d52336
commit
203948e156
10 changed files with 15 additions and 19 deletions
|
@ -27,8 +27,6 @@ source "drivers/timer/Kconfig"
|
||||||
|
|
||||||
source "drivers/entropy/Kconfig"
|
source "drivers/entropy/Kconfig"
|
||||||
|
|
||||||
source "drivers/grove/Kconfig"
|
|
||||||
|
|
||||||
source "drivers/pci/Kconfig"
|
source "drivers/pci/Kconfig"
|
||||||
|
|
||||||
source "drivers/gpio/Kconfig"
|
source "drivers/gpio/Kconfig"
|
||||||
|
|
|
@ -14,6 +14,7 @@ add_subdirectory_ifdef(CONFIG_CCS811 ccs811)
|
||||||
add_subdirectory_ifdef(CONFIG_DHT dht)
|
add_subdirectory_ifdef(CONFIG_DHT dht)
|
||||||
add_subdirectory_ifdef(CONFIG_FXAS21002 fxas21002)
|
add_subdirectory_ifdef(CONFIG_FXAS21002 fxas21002)
|
||||||
add_subdirectory_ifdef(CONFIG_FXOS8700 fxos8700)
|
add_subdirectory_ifdef(CONFIG_FXOS8700 fxos8700)
|
||||||
|
add_subdirectory(grove)
|
||||||
add_subdirectory_ifdef(CONFIG_HDC1008 hdc1008)
|
add_subdirectory_ifdef(CONFIG_HDC1008 hdc1008)
|
||||||
add_subdirectory_ifdef(CONFIG_HMC5883L hmc5883l)
|
add_subdirectory_ifdef(CONFIG_HMC5883L hmc5883l)
|
||||||
add_subdirectory_ifdef(CONFIG_HP206C hp206c)
|
add_subdirectory_ifdef(CONFIG_HP206C hp206c)
|
||||||
|
|
|
@ -57,6 +57,8 @@ source "drivers/sensor/fxas21002/Kconfig"
|
||||||
|
|
||||||
source "drivers/sensor/fxos8700/Kconfig"
|
source "drivers/sensor/fxos8700/Kconfig"
|
||||||
|
|
||||||
|
source "drivers/sensor/grove/Kconfig"
|
||||||
|
|
||||||
source "drivers/sensor/hdc1008/Kconfig"
|
source "drivers/sensor/hdc1008/Kconfig"
|
||||||
|
|
||||||
source "drivers/sensor/hmc5883l/Kconfig"
|
source "drivers/sensor/hmc5883l/Kconfig"
|
||||||
|
|
|
@ -5,26 +5,23 @@
|
||||||
#
|
#
|
||||||
# SPDX-License-Identifier: Apache-2.0
|
# SPDX-License-Identifier: Apache-2.0
|
||||||
#
|
#
|
||||||
|
if SENSOR
|
||||||
|
|
||||||
|
|
||||||
config GROVE_LIGHT_SENSOR
|
config GROVE_LIGHT_SENSOR
|
||||||
bool "Enable the Seeed Grove Light Sensor"
|
bool "Enable the Seeed Grove Light Sensor"
|
||||||
depends on SENSOR && GROVE && ADC && NEWLIB_LIBC
|
depends on ADC && NEWLIB_LIBC
|
||||||
help
|
help
|
||||||
Setting this value will enable driver support for the Grove Light
|
Setting this value will enable driver support for the Grove Light
|
||||||
Sensor.
|
Sensor.
|
||||||
|
|
||||||
|
if GROVE_LIGHT_SENSOR
|
||||||
config GROVE_LIGHT_SENSOR_NAME
|
config GROVE_LIGHT_SENSOR_NAME
|
||||||
string "Driver name"
|
string "Driver name"
|
||||||
depends on GROVE_LIGHT_SENSOR
|
|
||||||
default "GROVE_LIGHT_SENSOR"
|
default "GROVE_LIGHT_SENSOR"
|
||||||
help
|
help
|
||||||
Specify the device name with which the sensor is identified.
|
Specify the device name with which the sensor is identified.
|
||||||
|
|
||||||
config GROVE_LIGHT_SENSOR_ADC_DEV_NAME
|
config GROVE_LIGHT_SENSOR_ADC_DEV_NAME
|
||||||
string "ADC where Grove Light Sensor is connected"
|
string "ADC where Grove Light Sensor is connected"
|
||||||
depends on GROVE_LIGHT_SENSOR
|
|
||||||
default "ADC_0"
|
default "ADC_0"
|
||||||
help
|
help
|
||||||
Specify the device name of the ADC to which the Grove Light Sensor
|
Specify the device name of the ADC to which the Grove Light Sensor
|
||||||
|
@ -32,22 +29,22 @@ config GROVE_LIGHT_SENSOR_ADC_DEV_NAME
|
||||||
|
|
||||||
config GROVE_LIGHT_SENSOR_ADC_CHANNEL
|
config GROVE_LIGHT_SENSOR_ADC_CHANNEL
|
||||||
int "ADC channel used by Grove Light Sensor"
|
int "ADC channel used by Grove Light Sensor"
|
||||||
depends on GROVE_LIGHT_SENSOR
|
|
||||||
default 10
|
default 10
|
||||||
help
|
help
|
||||||
Specify the channel of the ADC to which the Grove Light Sensor is
|
Specify the channel of the ADC to which the Grove Light Sensor is
|
||||||
connected.
|
connected.
|
||||||
|
endif
|
||||||
|
|
||||||
config GROVE_TEMPERATURE_SENSOR
|
config GROVE_TEMPERATURE_SENSOR
|
||||||
bool "Enable the Seeed Grove Temperature Sensor"
|
bool "Enable the Seeed Grove Temperature Sensor"
|
||||||
depends on SENSOR && GROVE && ADC && NEWLIB_LIBC
|
depends on ADC && NEWLIB_LIBC
|
||||||
help
|
help
|
||||||
Setting this value will enable driver support for the Grove
|
Setting this value will enable driver support for the Grove
|
||||||
Temperature Sensor.
|
Temperature Sensor.
|
||||||
|
|
||||||
|
if GROVE_TEMPERATURE_SENSOR
|
||||||
config GROVE_TEMPERATURE_SENSOR_NAME
|
config GROVE_TEMPERATURE_SENSOR_NAME
|
||||||
string "Driver name"
|
string "Driver name"
|
||||||
depends on GROVE_TEMPERATURE_SENSOR
|
|
||||||
default "GROVE_TEMPERATURE_SENSOR"
|
default "GROVE_TEMPERATURE_SENSOR"
|
||||||
help
|
help
|
||||||
Specify the device name with which the Grove Temperature Sensor
|
Specify the device name with which the Grove Temperature Sensor
|
||||||
|
@ -55,7 +52,6 @@ config GROVE_TEMPERATURE_SENSOR_NAME
|
||||||
|
|
||||||
choice
|
choice
|
||||||
prompt "Sensor version"
|
prompt "Sensor version"
|
||||||
depends on GROVE_TEMPERATURE_SENSOR
|
|
||||||
default GROVE_TEMPERATURE_SENSOR_V1_0
|
default GROVE_TEMPERATURE_SENSOR_V1_0
|
||||||
help
|
help
|
||||||
Choose the version of the Grove Temperature Sensor.
|
Choose the version of the Grove Temperature Sensor.
|
||||||
|
@ -74,7 +70,6 @@ endchoice
|
||||||
|
|
||||||
config GROVE_TEMPERATURE_SENSOR_ADC_DEV_NAME
|
config GROVE_TEMPERATURE_SENSOR_ADC_DEV_NAME
|
||||||
string "ADC where Grove Temperature Sensor is connected"
|
string "ADC where Grove Temperature Sensor is connected"
|
||||||
depends on GROVE_TEMPERATURE_SENSOR
|
|
||||||
default "ADC_0"
|
default "ADC_0"
|
||||||
help
|
help
|
||||||
Specify the device name of the ADC to which the Grove Temperature
|
Specify the device name of the ADC to which the Grove Temperature
|
||||||
|
@ -82,8 +77,11 @@ config GROVE_TEMPERATURE_SENSOR_ADC_DEV_NAME
|
||||||
|
|
||||||
config GROVE_TEMPERATURE_SENSOR_ADC_CHANNEL
|
config GROVE_TEMPERATURE_SENSOR_ADC_CHANNEL
|
||||||
int "ADC channel used by Grove Temperature Sensor"
|
int "ADC channel used by Grove Temperature Sensor"
|
||||||
depends on GROVE_TEMPERATURE_SENSOR
|
|
||||||
default 10
|
default 10
|
||||||
help
|
help
|
||||||
Specify the channel of the ADC to which the Grove Temperature Sensor
|
Specify the channel of the ADC to which the Grove Temperature Sensor
|
||||||
is connected.
|
is connected.
|
||||||
|
|
||||||
|
endif
|
||||||
|
|
||||||
|
endif
|
|
@ -10,7 +10,7 @@
|
||||||
#include <sensor.h>
|
#include <sensor.h>
|
||||||
#include <zephyr.h>
|
#include <zephyr.h>
|
||||||
|
|
||||||
#define LOG_LEVEL CONFIG_GROVE_LOG_LEVEL
|
#define LOG_LEVEL CONFIG_SENSOR_LOG_LEVEL
|
||||||
#include <logging/log.h>
|
#include <logging/log.h>
|
||||||
LOG_MODULE_REGISTER(grove_light);
|
LOG_MODULE_REGISTER(grove_light);
|
||||||
|
|
|
@ -10,7 +10,7 @@
|
||||||
#include <sensor.h>
|
#include <sensor.h>
|
||||||
#include <zephyr.h>
|
#include <zephyr.h>
|
||||||
|
|
||||||
#define LOG_LEVEL CONFIG_GROVE_LOG_LEVEL
|
#define LOG_LEVEL CONFIG_SENSOR_LOG_LEVEL
|
||||||
#include <logging/log.h>
|
#include <logging/log.h>
|
||||||
LOG_MODULE_REGISTER(grove_temp);
|
LOG_MODULE_REGISTER(grove_temp);
|
||||||
|
|
|
@ -1,6 +1,5 @@
|
||||||
CONFIG_ADC=y
|
CONFIG_ADC=y
|
||||||
CONFIG_GROVE_LIGHT_SENSOR=y
|
CONFIG_GROVE_LIGHT_SENSOR=y
|
||||||
CONFIG_GROVE=y
|
|
||||||
CONFIG_SENSOR=y
|
CONFIG_SENSOR=y
|
||||||
CONFIG_NEWLIB_LIBC=y
|
CONFIG_NEWLIB_LIBC=y
|
||||||
CONFIG_STDOUT_CONSOLE=y
|
CONFIG_STDOUT_CONSOLE=y
|
||||||
|
|
|
@ -4,7 +4,6 @@ CONFIG_I2C=y
|
||||||
CONFIG_ADC=y
|
CONFIG_ADC=y
|
||||||
CONFIG_NEWLIB_LIBC=y
|
CONFIG_NEWLIB_LIBC=y
|
||||||
CONFIG_DISPLAY=y
|
CONFIG_DISPLAY=y
|
||||||
CONFIG_GROVE=y
|
|
||||||
CONFIG_GROVE_TEMPERATURE_SENSOR_ADC_CHANNEL=10
|
CONFIG_GROVE_TEMPERATURE_SENSOR_ADC_CHANNEL=10
|
||||||
CONFIG_GROVE_TEMPERATURE_SENSOR=y
|
CONFIG_GROVE_TEMPERATURE_SENSOR=y
|
||||||
CONFIG_GROVE_TEMPERATURE_SENSOR_V1_X=y
|
CONFIG_GROVE_TEMPERATURE_SENSOR_V1_X=y
|
||||||
|
|
|
@ -4,6 +4,5 @@ CONFIG_SENSOR=y
|
||||||
CONFIG_TH02=y
|
CONFIG_TH02=y
|
||||||
CONFIG_LOG=n
|
CONFIG_LOG=n
|
||||||
CONFIG_SENSOR_LOG_LEVEL_DBG=y
|
CONFIG_SENSOR_LOG_LEVEL_DBG=y
|
||||||
CONFIG_GROVE=y
|
|
||||||
CONFIG_GROVE_LCD_RGB=y
|
CONFIG_GROVE_LCD_RGB=y
|
||||||
CONFIG_DISPLAY=y
|
CONFIG_DISPLAY=y
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue