adc: unify kconfig variables and make them consistent
Change-Id: Icf102cf845f0917263d4286fec7a85112c7f8ffc Signed-off-by: Anas Nashif <anas.nashif@intel.com>
This commit is contained in:
parent
1d547699a5
commit
d0c4b30679
6 changed files with 37 additions and 66 deletions
|
@ -58,16 +58,16 @@
|
||||||
#define IRQ_I2C1_TX_REQ 23
|
#define IRQ_I2C1_TX_REQ 23
|
||||||
#define IRQ_I2C1_STOP_DET 24
|
#define IRQ_I2C1_STOP_DET 24
|
||||||
#define IRQ_I2C1_ERR 25
|
#define IRQ_I2C1_ERR 25
|
||||||
#define IRQ_SPI0_ERR_INT 26
|
#define IRQ_SPI0_ERR_INT 30
|
||||||
#define IRQ_SPI0_RX_AVAIL 27
|
#define IRQ_SPI0_RX_AVAIL 31
|
||||||
#define IRQ_SPI0_TX_REQ 28
|
#define IRQ_SPI0_TX_REQ 32
|
||||||
#define IRQ_SPI1_ERR_INT 29
|
#define IRQ_SPI1_ERR_INT 33
|
||||||
#define IRQ_SPI1_RX_AVAIL 30
|
#define IRQ_SPI1_RX_AVAIL 34
|
||||||
#define IRQ_SPI1_TX_REQ 31
|
#define IRQ_SPI1_TX_REQ 35
|
||||||
#define IRQ_ADC_IRQ 32
|
#define IRQ_ADC_ERR 18
|
||||||
#define IRQ_ADC_ERR 33
|
#define IRQ_ADC_IRQ 19
|
||||||
#define IRQ_GPIO0_INTR 34
|
#define IRQ_GPIO0_INTR 20
|
||||||
#define IRQ_GPIO1_INTR 35
|
#define IRQ_GPIO1_INTR 21
|
||||||
#define IRQ_I2C_MST0_INTR 36
|
#define IRQ_I2C_MST0_INTR 36
|
||||||
#define IRQ_I2C_MST1_INTR 37
|
#define IRQ_I2C_MST1_INTR 37
|
||||||
#define IRQ_SPI_MST0_INTR 38
|
#define IRQ_SPI_MST0_INTR 38
|
||||||
|
|
|
@ -150,4 +150,7 @@ config SPI_INIT_PRIORITY
|
||||||
config PINMUX_INIT_PRIORITY
|
config PINMUX_INIT_PRIORITY
|
||||||
default 80 if PINMUX
|
default 80 if PINMUX
|
||||||
|
|
||||||
|
config ADC_INIT_PRIORITY
|
||||||
|
default 95
|
||||||
|
|
||||||
endif # BOARD_GALILEO
|
endif # BOARD_GALILEO
|
||||||
|
|
|
@ -33,6 +33,22 @@ config ADC_DEBUG
|
||||||
help
|
help
|
||||||
Enable debug output for ADC drivers
|
Enable debug output for ADC drivers
|
||||||
|
|
||||||
|
config ADC_INIT_PRIORITY
|
||||||
|
int
|
||||||
|
default 80
|
||||||
|
prompt "Init priority"
|
||||||
|
help
|
||||||
|
ADC Device driver initialization priority.
|
||||||
|
|
||||||
|
config ADC_0_NAME
|
||||||
|
string "ADC Driver's name"
|
||||||
|
default "ADC_0"
|
||||||
|
|
||||||
|
config ADC_0_IRQ_PRI
|
||||||
|
int
|
||||||
|
prompt "ADC interrupt priority"
|
||||||
|
default 2
|
||||||
|
|
||||||
menuconfig ADC_TI_ADC108S102
|
menuconfig ADC_TI_ADC108S102
|
||||||
bool "TI adc108s102 chip driver"
|
bool "TI adc108s102 chip driver"
|
||||||
depends on ADC
|
depends on ADC
|
||||||
|
@ -44,21 +60,6 @@ menuconfig ADC_TI_ADC108S102
|
||||||
|
|
||||||
if ADC_TI_ADC108S102
|
if ADC_TI_ADC108S102
|
||||||
|
|
||||||
config ADC_TI_ADC108S102_INIT_PRIORITY
|
|
||||||
int
|
|
||||||
depends on ADC_TI_ADC108S102
|
|
||||||
default 95
|
|
||||||
prompt "Init priority"
|
|
||||||
help
|
|
||||||
Device driver initialization priority.
|
|
||||||
Device is connected to SPI bus, it has to
|
|
||||||
be initialized after SPI driver.
|
|
||||||
|
|
||||||
config ADC_TI_ADC108S102_DRV_NAME
|
|
||||||
string "Driver's name"
|
|
||||||
depends on ADC_TI_ADC108S102
|
|
||||||
default "ADC_0"
|
|
||||||
|
|
||||||
config ADC_TI_ADC108S102_SPI_PORT_NAME
|
config ADC_TI_ADC108S102_SPI_PORT_NAME
|
||||||
string "Master SPI port name"
|
string "Master SPI port name"
|
||||||
depends on ADC_TI_ADC108S102
|
depends on ADC_TI_ADC108S102
|
||||||
|
@ -98,28 +99,6 @@ menuconfig ADC_DW
|
||||||
|
|
||||||
if ADC_DW
|
if ADC_DW
|
||||||
|
|
||||||
config ADC_DW_DRV_NAME
|
|
||||||
string "Select a name to lookup the device"
|
|
||||||
default "ADC_0"
|
|
||||||
depends on ADC_DW
|
|
||||||
|
|
||||||
config ADC_DW_RX_IRQ
|
|
||||||
int
|
|
||||||
prompt "ADC reception interrupt"
|
|
||||||
depends on ADC_DW
|
|
||||||
default 19
|
|
||||||
|
|
||||||
config ADC_DW_ERR_IRQ
|
|
||||||
int
|
|
||||||
prompt "ADC error interrupt"
|
|
||||||
depends on ADC_DW
|
|
||||||
default 18
|
|
||||||
|
|
||||||
config ADC_DW_IRQ_PRI
|
|
||||||
int
|
|
||||||
prompt "ADC interrupt priority"
|
|
||||||
depends on ADC_DW
|
|
||||||
default 2
|
|
||||||
|
|
||||||
config ADC_DW_CALIBRATION
|
config ADC_DW_CALIBRATION
|
||||||
bool "Enable Calibration"
|
bool "Enable Calibration"
|
||||||
|
@ -223,17 +202,6 @@ menuconfig ADC_QMSI
|
||||||
|
|
||||||
if ADC_QMSI
|
if ADC_QMSI
|
||||||
|
|
||||||
config ADC_QMSI_0_DRV_NAME
|
|
||||||
string "Select a name to lookup the device"
|
|
||||||
default "ADC_0"
|
|
||||||
depends on ADC_QMSI
|
|
||||||
|
|
||||||
config ADC_QMSI_0_IRQ_PRI
|
|
||||||
int
|
|
||||||
prompt "ADC interrupt priority"
|
|
||||||
depends on ADC_QMSI
|
|
||||||
default 2
|
|
||||||
|
|
||||||
choice
|
choice
|
||||||
prompt "Capturing Mode"
|
prompt "Capturing Mode"
|
||||||
default ADC_QMSI_INTERRUPT
|
default ADC_QMSI_INTERRUPT
|
||||||
|
|
|
@ -497,19 +497,19 @@ struct adc_config adc_config_dev = {
|
||||||
.config_func = adc_config_irq,
|
.config_func = adc_config_irq,
|
||||||
};
|
};
|
||||||
|
|
||||||
DEVICE_AND_API_INIT(adc_dw, CONFIG_ADC_DW_DRV_NAME, &adc_dw_init,
|
DEVICE_AND_API_INIT(adc_dw, CONFIG_ADC_0_NAME, &adc_dw_init,
|
||||||
&adc_info_dev, &adc_config_dev,
|
&adc_info_dev, &adc_config_dev,
|
||||||
SECONDARY, CONFIG_KERNEL_INIT_PRIORITY_DEFAULT,
|
SECONDARY, CONFIG_KERNEL_INIT_PRIORITY_DEFAULT,
|
||||||
&api_funcs);
|
&api_funcs);
|
||||||
|
|
||||||
static void adc_config_irq(void)
|
static void adc_config_irq(void)
|
||||||
{
|
{
|
||||||
IRQ_CONNECT(CONFIG_ADC_DW_RX_IRQ, CONFIG_ADC_DW_IRQ_PRI, adc_dw_rx_isr,
|
IRQ_CONNECT(IRQ_ADC_IRQ, CONFIG_ADC_0_IRQ_PRI, adc_dw_rx_isr,
|
||||||
DEVICE_GET(adc_dw), 0);
|
DEVICE_GET(adc_dw), 0);
|
||||||
irq_enable(CONFIG_ADC_DW_RX_IRQ);
|
irq_enable(IRQ_ADC_IRQ);
|
||||||
|
|
||||||
IRQ_CONNECT(CONFIG_ADC_DW_ERR_IRQ, CONFIG_ADC_DW_IRQ_PRI,
|
IRQ_CONNECT(IRQ_ADC_ERR, CONFIG_ADC_0_IRQ_PRI,
|
||||||
adc_dw_err_isr, DEVICE_GET(adc_dw), 0);
|
adc_dw_err_isr, DEVICE_GET(adc_dw), 0);
|
||||||
irq_enable(CONFIG_ADC_DW_ERR_IRQ);
|
irq_enable(IRQ_ADC_ERR);
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
|
@ -268,7 +268,7 @@ int adc_qmsi_init(struct device *dev)
|
||||||
|
|
||||||
struct adc_info adc_info_dev;
|
struct adc_info adc_info_dev;
|
||||||
|
|
||||||
DEVICE_AND_API_INIT(adc_qmsi, CONFIG_ADC_QMSI_0_DRV_NAME, &adc_qmsi_init,
|
DEVICE_AND_API_INIT(adc_qmsi, CONFIG_ADC_0_NAME, &adc_qmsi_init,
|
||||||
&adc_info_dev, NULL,
|
&adc_info_dev, NULL,
|
||||||
SECONDARY, CONFIG_KERNEL_INIT_PRIORITY_DEFAULT,
|
SECONDARY, CONFIG_KERNEL_INIT_PRIORITY_DEFAULT,
|
||||||
(void *)&api_funcs);
|
(void *)&api_funcs);
|
||||||
|
|
|
@ -244,9 +244,9 @@ struct ti_adc108s102_config adc108s102_config = {
|
||||||
.spi_slave = CONFIG_ADC_TI_ADC108S102_SPI_SLAVE,
|
.spi_slave = CONFIG_ADC_TI_ADC108S102_SPI_SLAVE,
|
||||||
};
|
};
|
||||||
|
|
||||||
DEVICE_INIT(adc108s102, CONFIG_ADC_TI_ADC108S102_DRV_NAME,
|
DEVICE_INIT(adc108s102, CONFIG_ADC_0_NAME,
|
||||||
ti_adc108s102_init,
|
ti_adc108s102_init,
|
||||||
&adc108s102_data, &adc108s102_config,
|
&adc108s102_data, &adc108s102_config,
|
||||||
SECONDARY, CONFIG_ADC_TI_ADC108S102_INIT_PRIORITY);
|
SECONDARY, CONFIG_ADC_INIT_PRIORITY);
|
||||||
|
|
||||||
#endif /* CONFIG_ADC_TI_ADC108S102 */
|
#endif /* CONFIG_ADC_TI_ADC108S102 */
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue