mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
synced 2026-05-13 12:59:33 -04:00
Revert "i2c: Replace list-based mechanism for handling userspace-created clients"
This reverts commit 3cfe39b3a8. Mux
handling is not sufficiently implemented. It needs more time.
Signed-off-by: Wolfram Sang <wsa+renesas@sang-engineering.com>
This commit is contained in:
@@ -313,6 +313,8 @@ 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,7 +335,6 @@ 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 */
|
||||
|
||||
@@ -345,6 +346,7 @@ 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
|
||||
@@ -751,6 +753,9 @@ 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;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user