Some I2C peripherals like TI charger or gauge chips need support for I2C clock stretching. This patch includes that and makes these modules usable with I2C emulation over GPIO. Signed-off-by: Bas van Loon <bas@arch-embedded.com>
26 lines
617 B
Text
26 lines
617 B
Text
# Copyright (c) 2017 Linaro Ltd.
|
|
# SPDX-License-Identifier: Apache-2.0
|
|
|
|
config I2C_GPIO
|
|
bool "GPIO bit banging I2C support"
|
|
default y
|
|
depends on DT_HAS_GPIO_I2C_ENABLED
|
|
select I2C_BITBANG
|
|
help
|
|
Enable software driven (bit banging) I2C support using GPIO pins
|
|
|
|
if I2C_GPIO
|
|
|
|
config I2C_GPIO_CLOCK_STRETCHING
|
|
bool "GPIO bit banging I2C clock stretching support"
|
|
default y
|
|
help
|
|
Enable Slave clock stretching support
|
|
|
|
config I2C_GPIO_CLOCK_STRETCHING_TIMEOUT_US
|
|
int "GPIO bit banging I2C clock stretching timeout (us)"
|
|
default 100000
|
|
help
|
|
Timeout for clock stretching in microseconds.
|
|
|
|
endif # I2C_GPIO
|