2d93f03c25
RT1718S is an i2c-based TCPC chip that supports 3 additional GPIOs. The pins can be used for USB-C operations e.g. handling FRS, but they can also work as usual GPIOs. Add a driver for the RT1718S GPIO and a handler for an alert signal from the chip. The handler reads the alert register once asserted and calls the GPIO interrupt handler if needed(Vendor-defined alert). gpio_rt1718s.c file and "richtek,rt1718s" node collect common properties and data for all RS1718S functionalities. The file can be extended for TCPC driver. rt1718s.h file also defines inline functions with i2c operations common for all drivers. The common header and source files can be moved to tcpc directories once the tcpc driver is added since it is the main functionality. Signed-off-by: Dawid Niedzwiecki <dn@semihalf.com>
36 lines
903 B
Plaintext
36 lines
903 B
Plaintext
# RT1718S driver configuration options
|
|
|
|
# Copyright 2022 Google LLC
|
|
# SPDX-License-Identifier: Apache-2.0
|
|
|
|
menuconfig GPIO_RT1718S
|
|
bool "RT1718S I2C-based TCPC chip with GPIOs"
|
|
default y
|
|
depends on DT_HAS_RICHTEK_RT1718S_GPIO_PORT_ENABLED
|
|
help
|
|
Enable driver GPIO for RT1718S I2C-based TCPC chip.
|
|
|
|
if GPIO_RT1718S
|
|
|
|
config RT1718S_INIT_PRIORITY
|
|
int "RT1718S GPIO init priority"
|
|
default 60
|
|
help
|
|
RT1718S device driver initialization priority. The priority should be
|
|
lower than I2C device.
|
|
|
|
config GPIO_RT1718S_PORT_INIT_PRIORITY
|
|
int "RT1718S GPIO port init priority"
|
|
default 61
|
|
help
|
|
RT1718S GPIO driver initialization priority. The priority should be lower
|
|
than I2C & RT1718S_INIT_PRIORITY device.
|
|
|
|
config GPIO_RT1718S_INTERRUPT
|
|
bool "RT1718S alert handler"
|
|
help
|
|
Enable support for handling RT1718S Alert with a GPIO interrupt connected
|
|
from the chip.
|
|
|
|
endif # GPIO_RT1718S
|