diff options
author | 2024-11-01 23:11:39 +0100 | |
---|---|---|
committer | 2025-01-03 13:22:54 +0100 | |
commit | 3cfe39b3a845593a485ab1c716615979004ef9f6 (patch) | |
tree | 6fe18038b976002ff79c3021d416ab826a001703 /include/linux/i2c.h | |
parent | i2c: Replace list-based mechanism for handling auto-detected clients (diff) | |
download | wireguard-linux-3cfe39b3a845593a485ab1c716615979004ef9f6.tar.xz wireguard-linux-3cfe39b3a845593a485ab1c716615979004ef9f6.zip |
i2c: Replace list-based mechanism for handling userspace-created clients
Similar to the list of auto-detected clients, we can also replace the
list of userspace-created clients with flagging such client devices.
Signed-off-by: Heiner Kallweit <hkallweit1@gmail.com>
[wsa: fixed description of the new flag; reordered new code in
'device_store' to have single exit point; fixed whitespace errors;
folded cleanup patch into this one]
Signed-off-by: Wolfram Sang <wsa+renesas@sang-engineering.com>
Diffstat (limited to 'include/linux/i2c.h')
-rw-r--r-- | include/linux/i2c.h | 7 |
1 files changed, 1 insertions, 6 deletions
diff --git a/include/linux/i2c.h b/include/linux/i2c.h index 072a62244e14..66fb3d6cf686 100644 --- a/include/linux/i2c.h +++ b/include/linux/i2c.h @@ -313,8 +313,6 @@ 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 @@ -333,6 +331,7 @@ struct i2c_client { #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 */ @@ -344,7 +343,6 @@ 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 @@ -750,9 +748,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; |