From 5fbf815419ba7f224ee2cf8cc51a13aa6656590f Mon Sep 17 00:00:00 2001 From: Tomasz Bursztyka Date: Mon, 12 Oct 2015 14:31:45 +0300 Subject: [PATCH] galileo: Kconfig: Add pre-configured settings for Galileo's ADC chip Setting up the right SPI port, its configuration and max frequency. Also, setting NANO_TIMEOUTS by default as it is required for delayed operation inside ADC's driver. Change-Id: I63b2b872ff858f1d80065a94ba3e2f303d279a67 Signed-off-by: Tomasz Bursztyka --- arch/x86/configs/micro_galileo_defconfig | 1 + arch/x86/configs/nano_galileo_defconfig | 1 + arch/x86/platforms/galileo/Kconfig | 13 +++++++++++++ 3 files changed, 15 insertions(+) diff --git a/arch/x86/configs/micro_galileo_defconfig b/arch/x86/configs/micro_galileo_defconfig index 9f3b2c4d9b1..c9d61e32a7c 100644 --- a/arch/x86/configs/micro_galileo_defconfig +++ b/arch/x86/configs/micro_galileo_defconfig @@ -1,5 +1,6 @@ CONFIG_MICROKERNEL=y CONFIG_NANO_TIMERS=y +CONFIG_NANO_TIMEOUTS=y CONFIG_X86_32=y CONFIG_PLATFORM_GALILEO=y CONFIG_CPU_MINUTEIA=y diff --git a/arch/x86/configs/nano_galileo_defconfig b/arch/x86/configs/nano_galileo_defconfig index 160bd7e4177..f70f475ce21 100644 --- a/arch/x86/configs/nano_galileo_defconfig +++ b/arch/x86/configs/nano_galileo_defconfig @@ -1,5 +1,6 @@ CONFIG_NANOKERNEL=y CONFIG_NANO_TIMERS=y +CONFIG_NANO_TIMEOUTS=y CONFIG_X86_32=y CONFIG_PLATFORM_GALILEO=y CONFIG_CPU_MINUTEIA=y diff --git a/arch/x86/platforms/galileo/Kconfig b/arch/x86/platforms/galileo/Kconfig index 2a34568efca..1933d15165a 100644 --- a/arch/x86/platforms/galileo/Kconfig +++ b/arch/x86/platforms/galileo/Kconfig @@ -319,3 +319,16 @@ config NS16550_PORT_0_BASE_ADDR config NS16550_PORT_1_BASE_ADDR default 0x9000b000 endif + +if ADC +config ADC_TI_ADC108S102 + def_bool y +config ADC_TI_ADC108S102_0 + def_bool y +config ADC_TI_ADC108S102_0_SPI_PORT_NAME + default "SPI0" +config ADC_TI_ADC108S102_0_SPI_CONFIGURATION + default 0x103 +config ADC_TI_ADC108S102_0_SPI_MAX_FREQ + default 2147483650 +endif