diff options
author | Wolfram Sang <wsa@the-dreams.de> | 2018-04-19 23:00:07 +0300 |
---|---|---|
committer | Wolfram Sang <wsa@the-dreams.de> | 2018-05-17 17:27:09 +0300 |
commit | 1e9d42194e4c8f0ba3f9d4f72b5f54050ddf7a39 (patch) | |
tree | b441a72127cda1ceb476700c66359c021c610d7d /include/linux/platform_data/i2c-gpio.h | |
parent | 67b8d5c7081221efa252e111cd52532ec6d4266f (diff) | |
download | linux-1e9d42194e4c8f0ba3f9d4f72b5f54050ddf7a39.tar.xz |
i2c: gpio: move header to platform_data
This header only contains platform_data. Move it to the proper directory.
Signed-off-by: Wolfram Sang <wsa@the-dreams.de>
Acked-by: Tony Lindgren <tony@atomide.com>
Acked-by: Lee Jones <lee.jones@linaro.org>
Acked-by: Robert Jarzmik <robert.jarzmik@free.fr>
Acked-by: Mauro Carvalho Chehab <mchehab+samsung@kernel.org>
Acked-by: James Hogan <jhogan@kernel.org>
Acked-by: Greg Ungerer <gerg@uclinux.org>
Diffstat (limited to 'include/linux/platform_data/i2c-gpio.h')
-rw-r--r-- | include/linux/platform_data/i2c-gpio.h | 34 |
1 files changed, 34 insertions, 0 deletions
diff --git a/include/linux/platform_data/i2c-gpio.h b/include/linux/platform_data/i2c-gpio.h new file mode 100644 index 000000000000..352c1426fd4d --- /dev/null +++ b/include/linux/platform_data/i2c-gpio.h @@ -0,0 +1,34 @@ +/* + * i2c-gpio interface to platform code + * + * Copyright (C) 2007 Atmel Corporation + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License version 2 as + * published by the Free Software Foundation. + */ +#ifndef _LINUX_I2C_GPIO_H +#define _LINUX_I2C_GPIO_H + +/** + * struct i2c_gpio_platform_data - Platform-dependent data for i2c-gpio + * @udelay: signal toggle delay. SCL frequency is (500 / udelay) kHz + * @timeout: clock stretching timeout in jiffies. If the slave keeps + * SCL low for longer than this, the transfer will time out. + * @sda_is_open_drain: SDA is configured as open drain, i.e. the pin + * isn't actively driven high when setting the output value high. + * gpio_get_value() must return the actual pin state even if the + * pin is configured as an output. + * @scl_is_open_drain: SCL is set up as open drain. Same requirements + * as for sda_is_open_drain apply. + * @scl_is_output_only: SCL output drivers cannot be turned off. + */ +struct i2c_gpio_platform_data { + int udelay; + int timeout; + unsigned int sda_is_open_drain:1; + unsigned int scl_is_open_drain:1; + unsigned int scl_is_output_only:1; +}; + +#endif /* _LINUX_I2C_GPIO_H */ |