diff options
| author | Linus Torvalds <torvalds@linux-foundation.org> | 2018-06-14 03:21:46 -0400 |
|---|---|---|
| committer | Linus Torvalds <torvalds@linux-foundation.org> | 2018-06-14 03:21:46 -0400 |
| commit | 9bca19a01d50143b736f0f59eb3ccc05b1106172 (patch) | |
| tree | 3321118b4a6bd4c949634bbdbb3d2c03454ae33b /include/linux/platform_data | |
| parent | 463f202172c31b9c36278001cabfbad4e12da42e (diff) | |
| parent | 53e39628ac228fada53cc0106be62c6f65f67501 (diff) | |
Merge branch 'i2c/for-4.18' of git://git.kernel.org/pub/scm/linux/kernel/git/wsa/linux
Pull i2c updates from Wolfram Sang:
- mainly feature additions to drivers (stm32f7, qup, xlp9xx, mlxcpld, ...)
- conversion to use the i2c_8bit_addr_from_msg macro consistently
- move includes to platform_data
- core updates to allow the (still in review) I3C subsystem to connect
- and the regular share of smaller driver updates
* 'i2c/for-4.18' of git://git.kernel.org/pub/scm/linux/kernel/git/wsa/linux: (68 commits)
i2c: qup: fix building without CONFIG_ACPI
i2c: tegra: Remove suspend-resume
i2c: imx-lpi2c: Switch to SPDX identifier
i2c: mxs: Switch to SPDX identifier
i2c: busses: make use of i2c_8bit_addr_from_msg
i2c: algos: make use of i2c_8bit_addr_from_msg
i2c: rcar: document R8A77980 bindings
i2c: qup: Add command-line parameter to override SCL frequency
i2c: qup: Correct duty cycle for FM and FM+
i2c: qup: Add support for Fast Mode Plus
i2c: qup: add probe path for Centriq ACPI devices
i2c: robotfuzz-osif: drop pointless test
i2c: robotfuzz-osif: remove pointless local variable
i2c: rk3x: Don't print visible virtual mapping MMIO address
i2c: opal: don't check number of messages in the driver
i2c: ibm_iic: don't check number of messages in the driver
i2c: imx: Switch to SPDX identifier
i2c: mux: pca954x: merge calls to of_match_device and of_device_get_match_data
i2c: mux: demux-pinctrl: use proper parent device for demux adapter
i2c: mux: improve error message for failed symlink
...
Diffstat (limited to 'include/linux/platform_data')
| -rw-r--r-- | include/linux/platform_data/i2c-gpio.h | 34 | ||||
| -rw-r--r-- | include/linux/platform_data/i2c-mux-gpio.h | 43 | ||||
| -rw-r--r-- | include/linux/platform_data/i2c-ocores.h | 23 | ||||
| -rw-r--r-- | include/linux/platform_data/i2c-omap.h | 39 | ||||
| -rw-r--r-- | include/linux/platform_data/i2c-pca-platform.h | 10 | ||||
| -rw-r--r-- | include/linux/platform_data/i2c-xiic.h | 43 |
6 files changed, 192 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 @@ | |||
| 1 | /* | ||
| 2 | * i2c-gpio interface to platform code | ||
| 3 | * | ||
| 4 | * Copyright (C) 2007 Atmel Corporation | ||
| 5 | * | ||
| 6 | * This program is free software; you can redistribute it and/or modify | ||
| 7 | * it under the terms of the GNU General Public License version 2 as | ||
| 8 | * published by the Free Software Foundation. | ||
| 9 | */ | ||
| 10 | #ifndef _LINUX_I2C_GPIO_H | ||
| 11 | #define _LINUX_I2C_GPIO_H | ||
| 12 | |||
| 13 | /** | ||
| 14 | * struct i2c_gpio_platform_data - Platform-dependent data for i2c-gpio | ||
| 15 | * @udelay: signal toggle delay. SCL frequency is (500 / udelay) kHz | ||
| 16 | * @timeout: clock stretching timeout in jiffies. If the slave keeps | ||
| 17 | * SCL low for longer than this, the transfer will time out. | ||
| 18 | * @sda_is_open_drain: SDA is configured as open drain, i.e. the pin | ||
| 19 | * isn't actively driven high when setting the output value high. | ||
| 20 | * gpio_get_value() must return the actual pin state even if the | ||
| 21 | * pin is configured as an output. | ||
| 22 | * @scl_is_open_drain: SCL is set up as open drain. Same requirements | ||
| 23 | * as for sda_is_open_drain apply. | ||
| 24 | * @scl_is_output_only: SCL output drivers cannot be turned off. | ||
| 25 | */ | ||
| 26 | struct i2c_gpio_platform_data { | ||
| 27 | int udelay; | ||
| 28 | int timeout; | ||
| 29 | unsigned int sda_is_open_drain:1; | ||
| 30 | unsigned int scl_is_open_drain:1; | ||
| 31 | unsigned int scl_is_output_only:1; | ||
| 32 | }; | ||
| 33 | |||
| 34 | #endif /* _LINUX_I2C_GPIO_H */ | ||
diff --git a/include/linux/platform_data/i2c-mux-gpio.h b/include/linux/platform_data/i2c-mux-gpio.h new file mode 100644 index 000000000000..4406108201fe --- /dev/null +++ b/include/linux/platform_data/i2c-mux-gpio.h | |||
| @@ -0,0 +1,43 @@ | |||
| 1 | /* | ||
| 2 | * i2c-mux-gpio interface to platform code | ||
| 3 | * | ||
| 4 | * Peter Korsgaard <peter.korsgaard@barco.com> | ||
| 5 | * | ||
| 6 | * This program is free software; you can redistribute it and/or modify | ||
| 7 | * it under the terms of the GNU General Public License version 2 as | ||
| 8 | * published by the Free Software Foundation. | ||
| 9 | */ | ||
| 10 | |||
| 11 | #ifndef _LINUX_I2C_MUX_GPIO_H | ||
| 12 | #define _LINUX_I2C_MUX_GPIO_H | ||
| 13 | |||
| 14 | /* MUX has no specific idle mode */ | ||
| 15 | #define I2C_MUX_GPIO_NO_IDLE ((unsigned)-1) | ||
| 16 | |||
| 17 | /** | ||
| 18 | * struct i2c_mux_gpio_platform_data - Platform-dependent data for i2c-mux-gpio | ||
| 19 | * @parent: Parent I2C bus adapter number | ||
| 20 | * @base_nr: Base I2C bus number to number adapters from or zero for dynamic | ||
| 21 | * @values: Array of bitmasks of GPIO settings (low/high) for each | ||
| 22 | * position | ||
| 23 | * @n_values: Number of multiplexer positions (busses to instantiate) | ||
| 24 | * @classes: Optional I2C auto-detection classes | ||
| 25 | * @gpio_chip: Optional GPIO chip name; if set, GPIO pin numbers are given | ||
| 26 | * relative to the base GPIO number of that chip | ||
| 27 | * @gpios: Array of GPIO numbers used to control MUX | ||
| 28 | * @n_gpios: Number of GPIOs used to control MUX | ||
| 29 | * @idle: Bitmask to write to MUX when idle or GPIO_I2CMUX_NO_IDLE if not used | ||
| 30 | */ | ||
| 31 | struct i2c_mux_gpio_platform_data { | ||
| 32 | int parent; | ||
| 33 | int base_nr; | ||
| 34 | const unsigned *values; | ||
| 35 | int n_values; | ||
| 36 | const unsigned *classes; | ||
| 37 | char *gpio_chip; | ||
| 38 | const unsigned *gpios; | ||
| 39 | int n_gpios; | ||
| 40 | unsigned idle; | ||
| 41 | }; | ||
| 42 | |||
| 43 | #endif /* _LINUX_I2C_MUX_GPIO_H */ | ||
diff --git a/include/linux/platform_data/i2c-ocores.h b/include/linux/platform_data/i2c-ocores.h new file mode 100644 index 000000000000..01edd96fe1f7 --- /dev/null +++ b/include/linux/platform_data/i2c-ocores.h | |||
| @@ -0,0 +1,23 @@ | |||
| 1 | /* | ||
| 2 | * i2c-ocores.h - definitions for the i2c-ocores interface | ||
| 3 | * | ||
| 4 | * Peter Korsgaard <jacmet@sunsite.dk> | ||
| 5 | * | ||
| 6 | * This file is licensed under the terms of the GNU General Public License | ||
| 7 | * version 2. This program is licensed "as is" without any warranty of any | ||
| 8 | * kind, whether express or implied. | ||
| 9 | */ | ||
| 10 | |||
| 11 | #ifndef _LINUX_I2C_OCORES_H | ||
| 12 | #define _LINUX_I2C_OCORES_H | ||
| 13 | |||
| 14 | struct ocores_i2c_platform_data { | ||
| 15 | u32 reg_shift; /* register offset shift value */ | ||
| 16 | u32 reg_io_width; /* register io read/write width */ | ||
| 17 | u32 clock_khz; /* input clock in kHz */ | ||
| 18 | bool big_endian; /* registers are big endian */ | ||
| 19 | u8 num_devices; /* number of devices in the devices list */ | ||
| 20 | struct i2c_board_info const *devices; /* devices connected to the bus */ | ||
| 21 | }; | ||
| 22 | |||
| 23 | #endif /* _LINUX_I2C_OCORES_H */ | ||
diff --git a/include/linux/platform_data/i2c-omap.h b/include/linux/platform_data/i2c-omap.h new file mode 100644 index 000000000000..3444265ee8ee --- /dev/null +++ b/include/linux/platform_data/i2c-omap.h | |||
| @@ -0,0 +1,39 @@ | |||
| 1 | /* SPDX-License-Identifier: GPL-2.0 */ | ||
| 2 | #ifndef __I2C_OMAP_H__ | ||
| 3 | #define __I2C_OMAP_H__ | ||
| 4 | |||
| 5 | #include <linux/platform_device.h> | ||
| 6 | |||
| 7 | /* | ||
| 8 | * Version 2 of the I2C peripheral unit has a different register | ||
| 9 | * layout and extra registers. The ID register in the V2 peripheral | ||
| 10 | * unit on the OMAP4430 reports the same ID as the V1 peripheral | ||
| 11 | * unit on the OMAP3530, so we must inform the driver which IP | ||
| 12 | * version we know it is running on from platform / cpu-specific | ||
| 13 | * code using these constants in the hwmod class definition. | ||
| 14 | */ | ||
| 15 | |||
| 16 | #define OMAP_I2C_IP_VERSION_1 1 | ||
| 17 | #define OMAP_I2C_IP_VERSION_2 2 | ||
| 18 | |||
| 19 | /* struct omap_i2c_bus_platform_data .flags meanings */ | ||
| 20 | |||
| 21 | #define OMAP_I2C_FLAG_NO_FIFO BIT(0) | ||
| 22 | #define OMAP_I2C_FLAG_SIMPLE_CLOCK BIT(1) | ||
| 23 | #define OMAP_I2C_FLAG_16BIT_DATA_REG BIT(2) | ||
| 24 | #define OMAP_I2C_FLAG_ALWAYS_ARMXOR_CLK BIT(5) | ||
| 25 | #define OMAP_I2C_FLAG_FORCE_19200_INT_CLK BIT(6) | ||
| 26 | /* how the CPU address bus must be translated for I2C unit access */ | ||
| 27 | #define OMAP_I2C_FLAG_BUS_SHIFT_NONE 0 | ||
| 28 | #define OMAP_I2C_FLAG_BUS_SHIFT_1 BIT(7) | ||
| 29 | #define OMAP_I2C_FLAG_BUS_SHIFT_2 BIT(8) | ||
| 30 | #define OMAP_I2C_FLAG_BUS_SHIFT__SHIFT 7 | ||
| 31 | |||
| 32 | struct omap_i2c_bus_platform_data { | ||
| 33 | u32 clkrate; | ||
| 34 | u32 rev; | ||
| 35 | u32 flags; | ||
| 36 | void (*set_mpu_wkup_lat)(struct device *dev, long set); | ||
| 37 | }; | ||
| 38 | |||
| 39 | #endif | ||
diff --git a/include/linux/platform_data/i2c-pca-platform.h b/include/linux/platform_data/i2c-pca-platform.h new file mode 100644 index 000000000000..c37329432a8e --- /dev/null +++ b/include/linux/platform_data/i2c-pca-platform.h | |||
| @@ -0,0 +1,10 @@ | |||
| 1 | /* SPDX-License-Identifier: GPL-2.0 */ | ||
| 2 | #ifndef I2C_PCA9564_PLATFORM_H | ||
| 3 | #define I2C_PCA9564_PLATFORM_H | ||
| 4 | |||
| 5 | struct i2c_pca9564_pf_platform_data { | ||
| 6 | int i2c_clock_speed; /* values are defined in linux/i2c-algo-pca.h */ | ||
| 7 | int timeout; /* timeout in jiffies */ | ||
| 8 | }; | ||
| 9 | |||
| 10 | #endif /* I2C_PCA9564_PLATFORM_H */ | ||
diff --git a/include/linux/platform_data/i2c-xiic.h b/include/linux/platform_data/i2c-xiic.h new file mode 100644 index 000000000000..4f9f2256a97e --- /dev/null +++ b/include/linux/platform_data/i2c-xiic.h | |||
| @@ -0,0 +1,43 @@ | |||
| 1 | /* | ||
| 2 | * i2c-xiic.h | ||
| 3 | * Copyright (c) 2009 Intel Corporation | ||
| 4 | * | ||
| 5 | * This program is free software; you can redistribute it and/or modify | ||
| 6 | * it under the terms of the GNU General Public License version 2 as | ||
| 7 | * published by the Free Software Foundation. | ||
| 8 | * | ||
| 9 | * This program is distributed in the hope that it will be useful, | ||
| 10 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
| 11 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
| 12 | * GNU General Public License for more details. | ||
| 13 | * | ||
| 14 | * You should have received a copy of the GNU General Public License | ||
| 15 | * along with this program; if not, write to the Free Software | ||
| 16 | * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. | ||
| 17 | */ | ||
| 18 | |||
| 19 | /* Supports: | ||
| 20 | * Xilinx IIC | ||
| 21 | */ | ||
| 22 | |||
| 23 | #ifndef _LINUX_I2C_XIIC_H | ||
| 24 | #define _LINUX_I2C_XIIC_H | ||
| 25 | |||
| 26 | /** | ||
| 27 | * struct xiic_i2c_platform_data - Platform data of the Xilinx I2C driver | ||
| 28 | * @num_devices: Number of devices that shall be added when the driver | ||
| 29 | * is probed. | ||
| 30 | * @devices: The actuall devices to add. | ||
| 31 | * | ||
| 32 | * This purpose of this platform data struct is to be able to provide a number | ||
| 33 | * of devices that should be added to the I2C bus. The reason is that sometimes | ||
| 34 | * the I2C board info is not enough, a new PCI board can for instance be | ||
| 35 | * plugged into a standard PC, and the bus number might be unknown at | ||
| 36 | * early init time. | ||
| 37 | */ | ||
| 38 | struct xiic_i2c_platform_data { | ||
| 39 | u8 num_devices; | ||
| 40 | struct i2c_board_info const *devices; | ||
| 41 | }; | ||
| 42 | |||
| 43 | #endif /* _LINUX_I2C_XIIC_H */ | ||
