zephyr/drivers/gpio/Kconfig.mcp23xxx
Kumar Gala 957e263120 drivers: gpio: Update drivers to use devicetree Kconfig symbol
Update gpio drivers to use DT_HAS_<compat>_ENABLED Kconfig symbol
to expose the driver and enable it by default based on devicetree.

We remove 'depend on' Kconfig for symbols that would be implied by
the devicetree node existing.

Signed-off-by: Kumar Gala <galak@kernel.org>
2022-07-23 09:26:09 -05:00

49 lines
1,003 B
Plaintext

# MCP23S17 GPIO configuration options
# Copyright (c) 2021 metraTec GmbH
# SPDX-License-Identifier: Apache-2.0
config GPIO_MCP23XXX
bool
help
Enable support for the Microchip 23xxx I2C/SPI IO
expanders.
menuconfig GPIO_MCP230XX
bool "MCP230XX I2C-based GPIO chip"
default y
depends on DT_HAS_MICROCHIP_MCP230XX_ENABLED
depends on I2C
select GPIO_MCP23XXX
help
Enable driver for MCP230XX I2C-based GPIO chip.
if GPIO_MCP230XX
config GPIO_MCP230XX_INIT_PRIORITY
int "MCP230XX GPIO expander init priority"
default 75
help
Device driver initialization priority.
endif #GPIO_MCP230XX
menuconfig GPIO_MCP23SXX
bool "MCP23SXX SPI-based GPIO chip"
default y
depends on DT_HAS_MICROCHIP_MCP23SXX_ENABLED
depends on SPI
select GPIO_MCP23XXX
help
Enable driver for MCP23SXX SPI-based GPIO chip.
if GPIO_MCP23SXX
config GPIO_MCP23SXX_INIT_PRIORITY
int "MCP23SXX GPIO expander init priority"
default 75
help
Device driver initialization priority.
endif #GPIO_MCP23SXX