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 ...
This commit is contained in:
@@ -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 */
|
||||
@@ -0,0 +1,43 @@
|
||||
/*
|
||||
* i2c-mux-gpio interface to platform code
|
||||
*
|
||||
* Peter Korsgaard <peter.korsgaard@barco.com>
|
||||
*
|
||||
* 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_MUX_GPIO_H
|
||||
#define _LINUX_I2C_MUX_GPIO_H
|
||||
|
||||
/* MUX has no specific idle mode */
|
||||
#define I2C_MUX_GPIO_NO_IDLE ((unsigned)-1)
|
||||
|
||||
/**
|
||||
* struct i2c_mux_gpio_platform_data - Platform-dependent data for i2c-mux-gpio
|
||||
* @parent: Parent I2C bus adapter number
|
||||
* @base_nr: Base I2C bus number to number adapters from or zero for dynamic
|
||||
* @values: Array of bitmasks of GPIO settings (low/high) for each
|
||||
* position
|
||||
* @n_values: Number of multiplexer positions (busses to instantiate)
|
||||
* @classes: Optional I2C auto-detection classes
|
||||
* @gpio_chip: Optional GPIO chip name; if set, GPIO pin numbers are given
|
||||
* relative to the base GPIO number of that chip
|
||||
* @gpios: Array of GPIO numbers used to control MUX
|
||||
* @n_gpios: Number of GPIOs used to control MUX
|
||||
* @idle: Bitmask to write to MUX when idle or GPIO_I2CMUX_NO_IDLE if not used
|
||||
*/
|
||||
struct i2c_mux_gpio_platform_data {
|
||||
int parent;
|
||||
int base_nr;
|
||||
const unsigned *values;
|
||||
int n_values;
|
||||
const unsigned *classes;
|
||||
char *gpio_chip;
|
||||
const unsigned *gpios;
|
||||
int n_gpios;
|
||||
unsigned idle;
|
||||
};
|
||||
|
||||
#endif /* _LINUX_I2C_MUX_GPIO_H */
|
||||
@@ -0,0 +1,23 @@
|
||||
/*
|
||||
* i2c-ocores.h - definitions for the i2c-ocores interface
|
||||
*
|
||||
* Peter Korsgaard <jacmet@sunsite.dk>
|
||||
*
|
||||
* This file is licensed under the terms of the GNU General Public License
|
||||
* version 2. This program is licensed "as is" without any warranty of any
|
||||
* kind, whether express or implied.
|
||||
*/
|
||||
|
||||
#ifndef _LINUX_I2C_OCORES_H
|
||||
#define _LINUX_I2C_OCORES_H
|
||||
|
||||
struct ocores_i2c_platform_data {
|
||||
u32 reg_shift; /* register offset shift value */
|
||||
u32 reg_io_width; /* register io read/write width */
|
||||
u32 clock_khz; /* input clock in kHz */
|
||||
bool big_endian; /* registers are big endian */
|
||||
u8 num_devices; /* number of devices in the devices list */
|
||||
struct i2c_board_info const *devices; /* devices connected to the bus */
|
||||
};
|
||||
|
||||
#endif /* _LINUX_I2C_OCORES_H */
|
||||
@@ -0,0 +1,39 @@
|
||||
/* SPDX-License-Identifier: GPL-2.0 */
|
||||
#ifndef __I2C_OMAP_H__
|
||||
#define __I2C_OMAP_H__
|
||||
|
||||
#include <linux/platform_device.h>
|
||||
|
||||
/*
|
||||
* Version 2 of the I2C peripheral unit has a different register
|
||||
* layout and extra registers. The ID register in the V2 peripheral
|
||||
* unit on the OMAP4430 reports the same ID as the V1 peripheral
|
||||
* unit on the OMAP3530, so we must inform the driver which IP
|
||||
* version we know it is running on from platform / cpu-specific
|
||||
* code using these constants in the hwmod class definition.
|
||||
*/
|
||||
|
||||
#define OMAP_I2C_IP_VERSION_1 1
|
||||
#define OMAP_I2C_IP_VERSION_2 2
|
||||
|
||||
/* struct omap_i2c_bus_platform_data .flags meanings */
|
||||
|
||||
#define OMAP_I2C_FLAG_NO_FIFO BIT(0)
|
||||
#define OMAP_I2C_FLAG_SIMPLE_CLOCK BIT(1)
|
||||
#define OMAP_I2C_FLAG_16BIT_DATA_REG BIT(2)
|
||||
#define OMAP_I2C_FLAG_ALWAYS_ARMXOR_CLK BIT(5)
|
||||
#define OMAP_I2C_FLAG_FORCE_19200_INT_CLK BIT(6)
|
||||
/* how the CPU address bus must be translated for I2C unit access */
|
||||
#define OMAP_I2C_FLAG_BUS_SHIFT_NONE 0
|
||||
#define OMAP_I2C_FLAG_BUS_SHIFT_1 BIT(7)
|
||||
#define OMAP_I2C_FLAG_BUS_SHIFT_2 BIT(8)
|
||||
#define OMAP_I2C_FLAG_BUS_SHIFT__SHIFT 7
|
||||
|
||||
struct omap_i2c_bus_platform_data {
|
||||
u32 clkrate;
|
||||
u32 rev;
|
||||
u32 flags;
|
||||
void (*set_mpu_wkup_lat)(struct device *dev, long set);
|
||||
};
|
||||
|
||||
#endif
|
||||
@@ -0,0 +1,10 @@
|
||||
/* SPDX-License-Identifier: GPL-2.0 */
|
||||
#ifndef I2C_PCA9564_PLATFORM_H
|
||||
#define I2C_PCA9564_PLATFORM_H
|
||||
|
||||
struct i2c_pca9564_pf_platform_data {
|
||||
int i2c_clock_speed; /* values are defined in linux/i2c-algo-pca.h */
|
||||
int timeout; /* timeout in jiffies */
|
||||
};
|
||||
|
||||
#endif /* I2C_PCA9564_PLATFORM_H */
|
||||
@@ -0,0 +1,43 @@
|
||||
/*
|
||||
* i2c-xiic.h
|
||||
* Copyright (c) 2009 Intel 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.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program; if not, write to the Free Software
|
||||
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
|
||||
*/
|
||||
|
||||
/* Supports:
|
||||
* Xilinx IIC
|
||||
*/
|
||||
|
||||
#ifndef _LINUX_I2C_XIIC_H
|
||||
#define _LINUX_I2C_XIIC_H
|
||||
|
||||
/**
|
||||
* struct xiic_i2c_platform_data - Platform data of the Xilinx I2C driver
|
||||
* @num_devices: Number of devices that shall be added when the driver
|
||||
* is probed.
|
||||
* @devices: The actuall devices to add.
|
||||
*
|
||||
* This purpose of this platform data struct is to be able to provide a number
|
||||
* of devices that should be added to the I2C bus. The reason is that sometimes
|
||||
* the I2C board info is not enough, a new PCI board can for instance be
|
||||
* plugged into a standard PC, and the bus number might be unknown at
|
||||
* early init time.
|
||||
*/
|
||||
struct xiic_i2c_platform_data {
|
||||
u8 num_devices;
|
||||
struct i2c_board_info const *devices;
|
||||
};
|
||||
|
||||
#endif /* _LINUX_I2C_XIIC_H */
|
||||
Reference in New Issue
Block a user