1 /* SPDX-License-Identifier: GPL-2.0-only */
3 * i2c-gpio interface to platform code
5 * Copyright (C) 2007 Atmel Corporation
7 #ifndef _LINUX_I2C_GPIO_H
8 #define _LINUX_I2C_GPIO_H
11 * struct i2c_gpio_platform_data - Platform-dependent data for i2c-gpio
12 * @udelay: signal toggle delay. SCL frequency is (500 / udelay) kHz
13 * @timeout: clock stretching timeout in jiffies. If the slave keeps
14 * SCL low for longer than this, the transfer will time out.
15 * @sda_is_open_drain: SDA is configured as open drain, i.e. the pin
16 * isn't actively driven high when setting the output value high.
17 * gpio_get_value() must return the actual pin state even if the
18 * pin is configured as an output.
19 * @scl_is_open_drain: SCL is set up as open drain. Same requirements
20 * as for sda_is_open_drain apply.
21 * @scl_is_output_only: SCL output drivers cannot be turned off.
23 struct i2c_gpio_platform_data {
26 unsigned int sda_is_open_drain:1;
27 unsigned int scl_is_open_drain:1;
28 unsigned int scl_is_output_only:1;
31 #endif /* _LINUX_I2C_GPIO_H */