mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
synced 2026-05-09 09:01:36 -04:00
Merge tag 'i2c-for-6.14-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/wsa/linux
Pull i2c updates from Wolfram Sang:
"Core:
- list-based mechanisms for handling auto-detected and userspace
created clients are replaced with a flag-based approach. The
resulting code is much simpler as well as the locking.
- i2c clients now get a default debugfs dir managed by the I2C core.
Drivers don't have to maintain their own directory anymore.
Driver updates:
- xiic: atomic_transfer support
- imx-lpi2c: DMA and target mode support
- riic cleanups
- npcm: better timeout handling and more precise frequency setups
- davinci: remove unused platform_data
- at24: add new compatibles for variants from Giantec and Puya
Semiconductor (together with a new vendor prefix)"
* tag 'i2c-for-6.14-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/wsa/linux: (52 commits)
i2c: add kdoc for the new debugfs entry of clients
i2c: designware: Actually make use of the I2C_DW_COMMON and I2C_DW symbol namespaces
i2c: add core-managed per-client directory in debugfs
i2c: Force ELAN06FA touchpad I2C bus freq to 100KHz
i2c: riic: Add `riic_bus_barrier()` to check bus availability
i2c: riic: Use predefined macro and simplify clock tick calculation
i2c: riic: Mark riic_irqs array as const
i2c: riic: Make use of devres helper to request deasserted reset line
i2c: riic: Use GENMASK() macro for bitmask definitions
i2c: riic: Use BIT macro consistently
i2c: riic: Use local `dev` pointer in `dev_err_probe()`
i2c: riic: Use dev_err_probe in probe and riic_init_hw functions
i2c: riic: Introduce a separate variable for IRQ
i2c: amd756: Remove superfluous TODO
Revert "i2c: amd756: Fix endianness handling for word data"
i2c: i801: Add lis3lv02d for Dell Precision M6800
i2c: i801: Remove unnecessary PCI function call
i2c: core: Allocate temp client on the stack in i2c_detect
i2c: slave-eeprom: Constify 'struct bin_attribute'
i2c: imx-lpi2c: make controller available until the system enters suspend_noirq() and from resume_noirq().
...
This commit is contained in:
@@ -244,7 +244,6 @@ enum i2c_driver_flags {
|
||||
* @id_table: List of I2C devices supported by this driver
|
||||
* @detect: Callback for device detection
|
||||
* @address_list: The I2C addresses to probe (for detect)
|
||||
* @clients: List of detected clients we created (for i2c-core use only)
|
||||
* @flags: A bitmask of flags defined in &enum i2c_driver_flags
|
||||
*
|
||||
* The driver.owner field should be set to the module owner of this driver.
|
||||
@@ -299,7 +298,6 @@ struct i2c_driver {
|
||||
/* Device detection callback for automatic device creation */
|
||||
int (*detect)(struct i2c_client *client, struct i2c_board_info *info);
|
||||
const unsigned short *address_list;
|
||||
struct list_head clients;
|
||||
|
||||
u32 flags;
|
||||
};
|
||||
@@ -315,12 +313,12 @@ struct i2c_driver {
|
||||
* @dev: Driver model device node for the slave.
|
||||
* @init_irq: IRQ that was set at initialization
|
||||
* @irq: indicates the IRQ generated by this device (if any)
|
||||
* @detected: member of an i2c_driver.clients list or i2c-core's
|
||||
* userspace_devices list
|
||||
* @slave_cb: Callback when I2C slave mode of an adapter is used. The adapter
|
||||
* calls it to pass on slave events to the slave driver.
|
||||
* @devres_group_id: id of the devres group that will be created for resources
|
||||
* acquired when probing this device.
|
||||
* @debugfs: pointer to the debugfs subdirectory which the I2C core created
|
||||
* for this client.
|
||||
*
|
||||
* An i2c_client identifies a single device (i.e. chip) connected to an
|
||||
* i2c bus. The behaviour exposed to Linux is defined by the driver
|
||||
@@ -334,6 +332,8 @@ struct i2c_client {
|
||||
#define I2C_CLIENT_SLAVE 0x20 /* we are the slave */
|
||||
#define I2C_CLIENT_HOST_NOTIFY 0x40 /* We want to use I2C host notify */
|
||||
#define I2C_CLIENT_WAKE 0x80 /* for board_info; true iff can wake */
|
||||
#define I2C_CLIENT_AUTO 0x100 /* client was auto-detected */
|
||||
#define I2C_CLIENT_USER 0x200 /* client was userspace-created */
|
||||
#define I2C_CLIENT_SCCB 0x9000 /* Use Omnivision SCCB protocol */
|
||||
/* Must match I2C_M_STOP|IGNORE_NAK */
|
||||
|
||||
@@ -345,11 +345,11 @@ struct i2c_client {
|
||||
struct device dev; /* the device structure */
|
||||
int init_irq; /* irq set at initialization */
|
||||
int irq; /* irq issued by device */
|
||||
struct list_head detected;
|
||||
#if IS_ENABLED(CONFIG_I2C_SLAVE)
|
||||
i2c_slave_cb_t slave_cb; /* callback for slave mode */
|
||||
#endif
|
||||
void *devres_group_id; /* ID of probe devres group */
|
||||
struct dentry *debugfs; /* per-client debugfs dir */
|
||||
};
|
||||
#define to_i2c_client(d) container_of(d, struct i2c_client, dev)
|
||||
|
||||
@@ -751,9 +751,6 @@ struct i2c_adapter {
|
||||
char name[48];
|
||||
struct completion dev_released;
|
||||
|
||||
struct mutex userspace_clients_lock;
|
||||
struct list_head userspace_clients;
|
||||
|
||||
struct i2c_bus_recovery_info *bus_recovery_info;
|
||||
const struct i2c_adapter_quirks *quirks;
|
||||
|
||||
|
||||
@@ -1,26 +0,0 @@
|
||||
/*
|
||||
* DaVinci I2C controller platform_device info
|
||||
*
|
||||
* Author: Vladimir Barinov, MontaVista Software, Inc. <source@mvista.com>
|
||||
*
|
||||
* 2007 (c) MontaVista Software, Inc. 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 __ASM_ARCH_I2C_H
|
||||
#define __ASM_ARCH_I2C_H
|
||||
|
||||
/* All frequencies are expressed in kHz */
|
||||
struct davinci_i2c_platform_data {
|
||||
unsigned int bus_freq; /* standard bus frequency (kHz) */
|
||||
unsigned int bus_delay; /* post-transaction delay (usec) */
|
||||
bool gpio_recovery; /* Use GPIO recovery method */
|
||||
bool has_pfunc; /* Chip has a ICPFUNC register */
|
||||
};
|
||||
|
||||
/* for board setup code */
|
||||
void davinci_init_i2c(struct davinci_i2c_platform_data *);
|
||||
|
||||
#endif /* __ASM_ARCH_I2C_H */
|
||||
Reference in New Issue
Block a user