From db96ebcbe11998d27ab45b3d3e3b89c26efd3478 Mon Sep 17 00:00:00 2001 From: Akshai M Date: Thu, 30 Apr 2020 23:01:55 +0530 Subject: [PATCH] drivers/isl29020 : Expose to Kconfig Expose configurations to Kconfig. --- drivers/Kconfig | 1 + drivers/include/isl29020.h | 7 +++---- drivers/isl29020/Kconfig | 24 ++++++++++++++++++++++++ 3 files changed, 28 insertions(+), 4 deletions(-) create mode 100644 drivers/isl29020/Kconfig diff --git a/drivers/Kconfig b/drivers/Kconfig index d5d68e958d..9eccda868f 100644 --- a/drivers/Kconfig +++ b/drivers/Kconfig @@ -19,6 +19,7 @@ rsource "ads101x/Kconfig" rsource "bmx055/Kconfig" rsource "fxos8700/Kconfig" rsource "hdc1000/Kconfig" +rsource "isl29020/Kconfig" rsource "l3g4200d/Kconfig" rsource "lpsxxx/Kconfig" rsource "mag3110/Kconfig" diff --git a/drivers/include/isl29020.h b/drivers/include/isl29020.h index 1e75506cd3..0c75be8a6e 100644 --- a/drivers/include/isl29020.h +++ b/drivers/include/isl29020.h @@ -39,10 +39,9 @@ extern "C" { /** * @brief Default address * - * The address depends on the status of A0 Pin. - * Default address corresponds to A0 connected to GND. - * For more information on SerialBus Address, refer Section I2C - * Interface on Page 3 of datasheet. + * The address depends on the status of A0 Pin. Default address corresponds to + * A0 connected to GND. For more information refer to the section 'I2C + * Interface' in the datasheet. */ #ifndef CONFIG_ISL29020_DEFAULT_ADDRESS #define CONFIG_ISL29020_DEFAULT_ADDRESS 0x44 diff --git a/drivers/isl29020/Kconfig b/drivers/isl29020/Kconfig new file mode 100644 index 0000000000..76d119e617 --- /dev/null +++ b/drivers/isl29020/Kconfig @@ -0,0 +1,24 @@ +# Copyright (c) 2020 Freie Universitaet Berlin +# +# This file is subject to the terms and conditions of the GNU Lesser +# General Public License v2.1. See the file LICENSE in the top level +# directory for more details. +# +menuconfig KCONFIG_MODULE_ISL29020 + bool "Configure ISL29020 driver" + depends on MODULE_ISL29020 + help + Configure the ISL29020 driver using Kconfig. + +if KCONFIG_MODULE_ISL29020 + +config ISL29020_DEFAULT_ADDRESS + hex "Default I2C address" + range 0x44 0x45 + default 0x44 + help + The address depends on the status of A0 Pin. Default address + corresponds to A0 connected to GND. For more information refer to the + section 'I2C Interface' in the datasheet. + +endif # KCONFIG_MODULE_ISL29020