History

i2c: Allow recovery of the initial IRQ by an I2C client device.

A previous change allowed I2C client devices to discover new IRQs upon reprobe by clearing the IRQ in i2c_device_remove. However, if an IRQ was assigned in i2c_new_device, that information is lost. For example, the touchscreen and trackpad devices on a Dell Inspiron laptop are I2C devices whose IRQs are defined by ACPI extended IRQ types. The client device structures are initialized during an ACPI walk. After removing the i2c_hid device, modprobe fails. This change caches the initial IRQ value in i2c_new_device and then resets the client device IRQ to the initial value in i2c_device_remove.

Jim Broadus committed 7 years ago

Commit 93b66041 parent 088a8a72 files · +6 −4Browse files

Showing the changes to include/linux (1 of 2 files). Show all

Unified · Split

include/linux/i2c.h+1−0
@@ -333,6 +333,7 @@ struct i2c_client { · 332 unmodified lines
333 char name[I2C_NAME_SIZE];333 char name[I2C_NAME_SIZE];
334 struct i2c_adapter *adapter; /* the adapter we sit on */334 struct i2c_adapter *adapter; /* the adapter we sit on */
335 struct device dev; /* the device structure */335 struct device dev; /* the device structure */
336 int init_irq; /* irq set at initialization */
336 int irq; /* irq issued by device */337 int irq; /* irq issued by device */
337 struct list_head detected;338 struct list_head detected;
338#if IS_ENABLED(CONFIG_I2C_SLAVE)339#if IS_ENABLED(CONFIG_I2C_SLAVE)

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t