adc: Introduce multiple instance configs

The Kconfig assumed that there would only ever be one instance of an
adc, but some Kinetis devices have multiple adc instances.

Jira: ZEP-1396

Signed-off-by: Maureen Helm <maureen.helm@nxp.com>
This commit is contained in:
Maureen Helm 2017-06-06 17:56:14 -05:00 committed by Kumar Gala
commit a8b1b7f118

View file

@ -46,18 +46,40 @@ config ADC_INIT_PRIORITY
help help
ADC Device driver initialization priority. ADC Device driver initialization priority.
config ADC_0
bool "Enable ADC 0"
default n
config ADC_0_NAME config ADC_0_NAME
string "ADC Driver's name" string "ADC 0 Driver's name"
depends on ADC_0
default "ADC_0" default "ADC_0"
config ADC_0_IRQ_PRI config ADC_0_IRQ_PRI
int int
prompt "ADC interrupt priority" depends on ADC_0
prompt "ADC 0 interrupt priority"
default 2
config ADC_1
bool "Enable ADC 1"
default n
config ADC_1_NAME
string "ADC 1 Driver's name"
depends on ADC_1
default "ADC_1"
config ADC_1_IRQ_PRI
int
depends on ADC_1
prompt "ADC 1 interrupt priority"
default 2 default 2
menuconfig ADC_TI_ADC108S102 menuconfig ADC_TI_ADC108S102
bool "TI adc108s102 chip driver" bool "TI adc108s102 chip driver"
select SPI select SPI
select ADC_0
default n default n
help help
Enable support for TI's ADC chip adc108s102 driver. Enable support for TI's ADC chip adc108s102 driver.
@ -93,6 +115,7 @@ endif # ADC_TI_ADC108S102
menuconfig ADC_DW menuconfig ADC_DW
bool "ARC Designware Driver" bool "ARC Designware Driver"
depends on ARC depends on ARC
select ADC_0
default n default n
help help
Enable the driver implementation of the Designware ADC IP. Enable the driver implementation of the Designware ADC IP.
@ -194,6 +217,7 @@ endif # ADC_DW
menuconfig ADC_QMSI menuconfig ADC_QMSI
bool "QMSI ADC Driver" bool "QMSI ADC Driver"
depends on QMSI depends on QMSI
select ADC_0
default n default n
help help
Enable the driver implementation of the QMSI ADC IP. Enable the driver implementation of the QMSI ADC IP.
@ -201,6 +225,7 @@ menuconfig ADC_QMSI
menuconfig ADC_QMSI_SS menuconfig ADC_QMSI_SS
bool "QMSI ADC Driver for the Sensor Subsystem" bool "QMSI ADC Driver for the Sensor Subsystem"
depends on QMSI depends on QMSI
select ADC_0
default n default n
help help
Enable the driver implementation of the QMSI ADC IP. Enable the driver implementation of the QMSI ADC IP.