Merge branch 'i2c/for-5.3' of git://git.kernel.org/pub/scm/linux/kernel/git/wsa/linux
Pull i2c updates from Wolfram Sang: "New stuff from the I2C world: - in the core, getting irqs from ACPI is now similar to OF - new driver for MediaTek MT7621/7628/7688 SoCs - bcm2835, i801, and tegra drivers got some more attention - GPIO API cleanups - cleanups in the core headers - lots of usual driver updates" * 'i2c/for-5.3' of git://git.kernel.org/pub/scm/linux/kernel/git/wsa/linux: (74 commits) i2c: mt7621: Fix platform_no_drv_owner.cocci warnings i2c: cpm: remove casting dma_alloc dt-bindings: i2c: sun6i-p2wi: Fix the binding example dt-bindings: i2c: mv64xxx: Fix the example compatible i2c: i801: Documentation update i2c: i801: Add support for Intel Tiger Lake i2c: i801: Fix PCI ID sorting dt-bindings: i2c-stm32: document optional dmas i2c: i2c-stm32f7: Add I2C_SMBUS_I2C_BLOCK_DATA support i2c: core: Tidy up handling of init_irq i2c: core: Move ACPI gpio IRQ handling into i2c_acpi_get_irq i2c: core: Move ACPI IRQ handling to probe time i2c: acpi: Factor out getting the IRQ from ACPI i2c: acpi: Use available IRQ helper functions i2c: core: Allow whole core to use i2c_dev_irq_from_resources eeprom: at24: modify a comment referring to platform data dt-bindings: i2c: omap: Add new compatible for J721E SoCs dt-bindings: i2c: mv64xxx: Add YAML schemas dt-bindings: i2c: sun6i-p2wi: Add YAML schemas i2c: mt7621: Add MediaTek MT7621/7628/7688 I2C driver ...
This commit is contained in:
@ -314,6 +314,8 @@ static int i2c_device_probe(struct device *dev)
|
||||
|
||||
driver = to_i2c_driver(dev->driver);
|
||||
|
||||
client->irq = client->init_irq;
|
||||
|
||||
if (!client->irq && !driver->disable_i2c_core_irq_mapping) {
|
||||
int irq = -ENOENT;
|
||||
|
||||
@ -327,7 +329,7 @@ static int i2c_device_probe(struct device *dev)
|
||||
if (irq == -EINVAL || irq == -ENODATA)
|
||||
irq = of_irq_get(dev->of_node, 0);
|
||||
} else if (ACPI_COMPANION(dev)) {
|
||||
irq = acpi_dev_gpio_irq_get(ACPI_COMPANION(dev), 0);
|
||||
irq = i2c_acpi_get_irq(client);
|
||||
}
|
||||
if (irq == -EPROBE_DEFER)
|
||||
return irq;
|
||||
@ -424,7 +426,7 @@ static int i2c_device_remove(struct device *dev)
|
||||
dev_pm_clear_wake_irq(&client->dev);
|
||||
device_init_wakeup(&client->dev, false);
|
||||
|
||||
client->irq = client->init_irq;
|
||||
client->irq = 0;
|
||||
if (client->flags & I2C_CLIENT_HOST_NOTIFY)
|
||||
pm_runtime_put(&client->adapter->dev);
|
||||
|
||||
@ -679,8 +681,8 @@ static void i2c_dev_set_name(struct i2c_adapter *adap,
|
||||
i2c_encode_flags_to_addr(client));
|
||||
}
|
||||
|
||||
static int i2c_dev_irq_from_resources(const struct resource *resources,
|
||||
unsigned int num_resources)
|
||||
int i2c_dev_irq_from_resources(const struct resource *resources,
|
||||
unsigned int num_resources)
|
||||
{
|
||||
struct irq_data *irqd;
|
||||
int i;
|
||||
@ -721,7 +723,7 @@ static int i2c_dev_irq_from_resources(const struct resource *resources,
|
||||
* This returns the new i2c client, which may be saved for later use with
|
||||
* i2c_unregister_device(); or an ERR_PTR to describe the error.
|
||||
*/
|
||||
static struct i2c_client *
|
||||
struct i2c_client *
|
||||
i2c_new_client_device(struct i2c_adapter *adap, struct i2c_board_info const *info)
|
||||
{
|
||||
struct i2c_client *client;
|
||||
@ -741,7 +743,6 @@ i2c_new_client_device(struct i2c_adapter *adap, struct i2c_board_info const *inf
|
||||
if (!client->init_irq)
|
||||
client->init_irq = i2c_dev_irq_from_resources(info->resources,
|
||||
info->num_resources);
|
||||
client->irq = client->init_irq;
|
||||
|
||||
strlcpy(client->name, info->type, sizeof(client->name));
|
||||
|
||||
@ -887,8 +888,7 @@ static struct i2c_driver dummy_driver = {
|
||||
* This returns the new i2c client, which should be saved for later use with
|
||||
* i2c_unregister_device(); or an ERR_PTR to describe the error.
|
||||
*/
|
||||
static struct i2c_client *
|
||||
i2c_new_dummy_device(struct i2c_adapter *adapter, u16 address)
|
||||
struct i2c_client *i2c_new_dummy_device(struct i2c_adapter *adapter, u16 address)
|
||||
{
|
||||
struct i2c_board_info info = {
|
||||
I2C_BOARD_INFO("dummy", address),
|
||||
@ -1663,7 +1663,7 @@ EXPORT_SYMBOL_GPL(i2c_parse_fw_timings);
|
||||
|
||||
/* ------------------------------------------------------------------------- */
|
||||
|
||||
int i2c_for_each_dev(void *data, int (*fn)(struct device *, void *))
|
||||
int i2c_for_each_dev(void *data, int (*fn)(struct device *dev, void *data))
|
||||
{
|
||||
int res;
|
||||
|
||||
@ -2276,7 +2276,7 @@ struct i2c_client *
|
||||
i2c_new_probed_device(struct i2c_adapter *adap,
|
||||
struct i2c_board_info *info,
|
||||
unsigned short const *addr_list,
|
||||
int (*probe)(struct i2c_adapter *, unsigned short addr))
|
||||
int (*probe)(struct i2c_adapter *adap, unsigned short addr))
|
||||
{
|
||||
int i;
|
||||
|
||||
|
Reference in New Issue
Block a user