mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
synced 2024-08-23 17:30:02 +00:00
![Thomas Gleixner](/assets/img/avatar_default.png)
Based on 2 normalized pattern(s): 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 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 # extracted by the scancode license scanner the SPDX license identifier GPL-2.0-only has been chosen to replace the boilerplate/reference in 4122 file(s). Signed-off-by: Thomas Gleixner <tglx@linutronix.de> Reviewed-by: Enrico Weigelt <info@metux.net> Reviewed-by: Kate Stewart <kstewart@linuxfoundation.org> Reviewed-by: Allison Randal <allison@lohutok.net> Cc: linux-spdx@vger.kernel.org Link: https://lkml.kernel.org/r/20190604081206.933168790@linutronix.de Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
31 lines
1 KiB
C
31 lines
1 KiB
C
/* SPDX-License-Identifier: GPL-2.0-only */
|
|
/*
|
|
* i2c-gpio interface to platform code
|
|
*
|
|
* Copyright (C) 2007 Atmel Corporation
|
|
*/
|
|
#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 */
|