diff options
author | Anas Nashif <anas.nashif@intel.com> | 2016-10-07 13:03:51 -0400 |
---|---|---|
committer | Anas Nashif <nashif@linux.intel.com> | 2016-10-07 20:53:29 +0000 |
commit | 33118f9212277303f76d21b2e2842f79bdce9e7d (patch) | |
tree | f50dbfaf6d5fc915283bece65be35c037c8a0393 | |
parent | df4c0acd2d443f428961c149304536b84067d671 (diff) |
sensor: grove: use global sensor init priority
Change-Id: Ie56ee7e4b267b4dc67026be4531834f550134969
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
-rw-r--r-- | drivers/grove/Kconfig | 30 | ||||
-rw-r--r-- | drivers/grove/lcd_rgb.c | 2 | ||||
-rw-r--r-- | drivers/grove/light_sensor.c | 2 | ||||
-rw-r--r-- | drivers/grove/temperature_sensor.c | 2 | ||||
-rw-r--r-- | kernel/Kconfig | 8 |
5 files changed, 11 insertions, 33 deletions
diff --git a/drivers/grove/Kconfig b/drivers/grove/Kconfig index c69838066..fd8c8331f 100644 --- a/drivers/grove/Kconfig +++ b/drivers/grove/Kconfig @@ -57,16 +57,6 @@ config GROVE_LCD_RGB_I2C_MASTER_DEV_NAME Specify the device name of the I2C master device to which the Grove LCD is connected. -config GROVE_LCD_RGB_INIT_PRIORITY - int - prompt "Init priority" - default 70 - depends on GROVE_LCD_RGB - help - Device driver initialization priority. - As the device is connected to I2C bus, its driver has - to be initialized after the I2C one. - config GROVE_LIGHT_SENSOR bool prompt "Enable the Seeed Grove Light Sensor" @@ -102,16 +92,6 @@ config GROVE_LIGHT_SENSOR_ADC_CHANNEL Specify the channel of the ADC to which the Grove Light Sensor is connected. -config GROVE_LIGHT_SENSOR_INIT_PRIORITY - int - prompt "Init priority" - default 70 - depends on GROVE_LIGHT_SENSOR - help - Device driver initialization priority. - As the device is connected to an ADC device, its driver has to be - initialized after the ADC device. - config GROVE_TEMPERATURE_SENSOR bool prompt "Enable the Seeed Grove Temperature Sensor" @@ -168,13 +148,3 @@ config GROVE_TEMPERATURE_SENSOR_ADC_CHANNEL help Specify the channel of the ADC to which the Grove Temperature Sensor is connected. - -config GROVE_TEMPERATURE_SENSOR_INIT_PRIORITY - int - prompt "Init priority" - default 70 - depends on GROVE_TEMPERATURE_SENSOR - help - Device driver initialization priority. - As the device is connected to an ADC device, its driver has to be - initialized after the ADC device. diff --git a/drivers/grove/lcd_rgb.c b/drivers/grove/lcd_rgb.c index 177d2fef0..684cfeca0 100644 --- a/drivers/grove/lcd_rgb.c +++ b/drivers/grove/lcd_rgb.c @@ -362,4 +362,4 @@ struct glcd_data grove_lcd_driver = { DEVICE_INIT(grove_lcd, GROVE_LCD_NAME, glcd_initialize, &grove_lcd_driver, &grove_lcd_config, - NANOKERNEL, CONFIG_GROVE_LCD_RGB_INIT_PRIORITY); + NANOKERNEL, CONFIG_APPLICATION_INIT_PRIORITY); diff --git a/drivers/grove/light_sensor.c b/drivers/grove/light_sensor.c index 92ba181a5..4a5a5c1bb 100644 --- a/drivers/grove/light_sensor.c +++ b/drivers/grove/light_sensor.c @@ -97,4 +97,4 @@ static int gls_init(struct device *dev) struct gls_data gls_data; DEVICE_INIT(gls_dev, CONFIG_GROVE_LIGHT_SENSOR_NAME, &gls_init, &gls_data, - NULL, SECONDARY, CONFIG_GROVE_LIGHT_SENSOR_INIT_PRIORITY); + NULL, SECONDARY, CONFIG_SENSOR_INIT_PRIORITY); diff --git a/drivers/grove/temperature_sensor.c b/drivers/grove/temperature_sensor.c index 16d833ff5..e66b876ca 100644 --- a/drivers/grove/temperature_sensor.c +++ b/drivers/grove/temperature_sensor.c @@ -104,4 +104,4 @@ static int gts_init(struct device *dev) struct gts_data gts_data; DEVICE_INIT(gts_dev, CONFIG_GROVE_TEMPERATURE_SENSOR_NAME, >s_init, >s_data, - NULL, SECONDARY, CONFIG_GROVE_TEMPERATURE_SENSOR_INIT_PRIORITY); + NULL, SECONDARY, CONFIG_SENSOR_INIT_PRIORITY); diff --git a/kernel/Kconfig b/kernel/Kconfig index 27a9c472b..e97057b1e 100644 --- a/kernel/Kconfig +++ b/kernel/Kconfig @@ -161,6 +161,14 @@ config KERNEL_INIT_PRIORITY_DEVICE interrupt controller, but does not depend on other devices, uses this init priority. +config APPLICATION_INIT_PRIORITY + int + prompt "Default init priority for application level drivers" + default 90 + help + This priority level is for end-user drivers such as sensors and display + which have no inward dependencies. + menu "Kernel event logging points" depends on KERNEL_EVENT_LOGGER |