walnux/drivers/ioexpander/Make.defs
Zik Saleeba 835c535e18 drivers/ioexpander/aw9523b: New driver for AW9523B i/o expander
This is an I2C driver for the Awinic AW9523B I/O expander. As well
as the supporting usual digital I/Os, this device features the
ability to drive LEDs directly, and can control the drive current
to each LED individually. The driver was derived from the PCA9555
driver, provides all the standard interfaces of an i/o expander
driver. It also features support for the special features of the
AW9523B through pin direction IOEXPANDER_DIRECTION_OUT_LED and
IOEXPANDER_OPTION_NONGENERIC with AW9523B_OPTION_* options.

The driver has a number of configurable features including interrupt
handling and a shadow register mode based on the PCA9555 driver,
plus new LED/dimming support.

Testing was done using an ESP32S3 host and I2C connection to the
Adafruit AW9523 breakout board.

Signed-off-by: Zik Saleeba <zik@zikzak.net>
2025-08-29 09:10:50 -03:00

118 lines
2.7 KiB
Text

############################################################################
# drivers/ioexpander/Make.defs
#
# SPDX-License-Identifier: Apache-2.0
#
# Licensed to the Apache Software Foundation (ASF) under one or more
# contributor license agreements. See the NOTICE file distributed with
# this work for additional information regarding copyright ownership. The
# ASF licenses this file to you under the Apache License, Version 2.0 (the
# "License"); you may not use this file except in compliance with the
# License. You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
# License for the specific language governing permissions and limitations
# under the License.
#
############################################################################
# Check if I/O expander support is enabled
ifeq ($(CONFIG_IOEXPANDER),y)
# Include the selected I/O expander drivers
ifeq ($(CONFIG_IOEXPANDER_RPMSG),y)
CSRCS += ioe_rpmsg.c
endif
ifeq ($(CONFIG_IOEXPANDER_DUMMY),y)
CSRCS += ioe_dummy.c
endif
ifeq ($(CONFIG_IOEXPANDER_ICJX),y)
CSRCS += icjx.c
endif
ifeq ($(CONFIG_IOEXPANDER_ISO1H812G),y)
CSRCS += iso1h812g.c
endif
ifeq ($(CONFIG_IOEXPANDER_ISO1I813T),y)
CSRCS += iso1i813t.c
endif
ifeq ($(CONFIG_IOEXPANDER_PCA9555),y)
CSRCS += pca9555.c
endif
ifeq ($(CONFIG_IOEXPANDER_PCA9538),y)
CSRCS += pca9538.c
endif
ifeq ($(CONFIG_IOEXPANDER_PCA9557),y)
CSRCS += pca9557.c
endif
ifeq ($(CONFIG_IOEXPANDER_TCA64XX),y)
CSRCS += tca64xx.c
endif
ifeq ($(CONFIG_IOEXPANDER_PCF8574),y)
CSRCS += pcf8574.c
endif
ifeq ($(CONFIG_IOEXPANDER_PCF8575),y)
CSRCS += pcf8575.c
endif
ifeq ($(CONFIG_IOEXPANDER_MCP23X08),y)
CSRCS += mcp23x08.c
endif
ifeq ($(CONFIG_IOEXPANDER_MCP23X17),y)
CSRCS += mcp23x17.c
endif
ifeq ($(CONFIG_IOEXPANDER_SX1509),y)
CSRCS += sx1509.c
endif
ifeq ($(CONFIG_IOEXPANDER_AW9523B),y)
CSRCS += aw9523b.c
endif
endif # CONFIG_IOEXPANDER
# GPIO test device driver (independent of IOEXPANDERS)
ifeq ($(CONFIG_DEV_GPIO),y)
CSRCS += gpio.c
ifeq ($(CONFIG_GPIO_LOWER_HALF),y)
CSRCS += gpio_lower_half.c
endif
endif
# The following implements an awkward OR
ifeq ($(CONFIG_IOEXPANDER),y)
# Include ioexpander I/O device driver build support
DEPPATH += --dep-path ioexpander
VPATH += :ioexpander
CFLAGS += ${INCDIR_PREFIX}$(TOPDIR)$(DELIM)drivers$(DELIM)ioexpander
else ifeq ($(CONFIG_DEV_GPIO),y)
# Include ioexpander I/O device driver build support
DEPPATH += --dep-path ioexpander
VPATH += :ioexpander
CFLAGS += ${INCDIR_PREFIX}$(TOPDIR)$(DELIM)drivers$(DELIM)ioexpander
endif