History

Merge branch 'i2c/for-current' of git://git.kernel.org/pub/scm/linux/kernel/git/wsa/linux

Pull i2c fixes from Wolfram Sang: "A core fix for ACPI matching and two driver bugfixes" * 'i2c/for-current' of git://git.kernel.org/pub/scm/linux/kernel/git/wsa/linux: i2c: iproc: Fix shifting 31 bits i2c: rcar: in slave mode, clear NACK earlier i2c: acpi: Remove dead code, i.e. i2c_acpi_match_device() i2c: core: Don't fail PRP0001 enumeration when no ID table exist

Linus Torvalds committed 6 years ago

Commit e77aee12 parents 1b46b92 02040815 files · +4 −22Browse files

Unified · Split

5 files
  1. drivers/i2c/busses/i2c-bcm-iproc.c +2 −2
  2. drivers/i2c/busses/i2c-rcar.c +1 −0
  3. drivers/i2c/i2c-core-acpi.c +0 −10
  4. drivers/i2c/i2c-core-base.c +1 −1
  5. drivers/i2c/i2c-core.h +0 −9
drivers/i2c/busses/i2c-bcm-iproc.c+2−2
@@ -720,7 +720,7 @@ static int bcm_iproc_i2c_xfer_internal(struct bcm_iproc_i2c_dev *iproc_i2c, · 719 unmodified lines
720 720
721 /* mark the last byte */721 /* mark the last byte */
722 if (!process_call && (i == msg->len - 1))722 if (!process_call && (i == msg->len - 1))
723 val |= 1 << M_TX_WR_STATUS_SHIFT;723 val |= BIT(M_TX_WR_STATUS_SHIFT);
724 724
725 iproc_i2c_wr_reg(iproc_i2c, M_TX_OFFSET, val);725 iproc_i2c_wr_reg(iproc_i2c, M_TX_OFFSET, val);
726 }726 }
@@ -738,7 +738,7 @@ static int bcm_iproc_i2c_xfer_internal(struct bcm_iproc_i2c_dev *iproc_i2c, · 11 unmodified lines
738 */738 */
739 addr = i2c_8bit_addr_from_msg(msg);739 addr = i2c_8bit_addr_from_msg(msg);
740 /* mark it the last byte out */740 /* mark it the last byte out */
741 val = addr | (1 << M_TX_WR_STATUS_SHIFT);741 val = addr | BIT(M_TX_WR_STATUS_SHIFT);
742 iproc_i2c_wr_reg(iproc_i2c, M_TX_OFFSET, val);742 iproc_i2c_wr_reg(iproc_i2c, M_TX_OFFSET, val);
743 }743 }
744 744
drivers/i2c/busses/i2c-rcar.c+1−0
@@ -590,6 +590,7 @@ static bool rcar_i2c_slave_irq(struct rcar_i2c_priv *priv) · 589 unmodified lines
590 /* master sent stop */590 /* master sent stop */
591 if (ssr_filtered & SSR) {591 if (ssr_filtered & SSR) {
592 i2c_slave_event(priv->slave, I2C_SLAVE_STOP, &value);592 i2c_slave_event(priv->slave, I2C_SLAVE_STOP, &value);
593 rcar_i2c_write(priv, ICSCR, SIE | SDBS); /* clear our NACK */
593 rcar_i2c_write(priv, ICSIER, SAR);594 rcar_i2c_write(priv, ICSIER, SAR);
594 rcar_i2c_write(priv, ICSSR, ~SSR & 0xff);595 rcar_i2c_write(priv, ICSSR, ~SSR & 0xff);
595 }596 }
drivers/i2c/i2c-core-acpi.c+0−10
@@ -276,16 +276,6 @@ void i2c_acpi_register_devices(struct i2c_adapter *adap) · 275 unmodified lines
276 dev_warn(&adap->dev, "failed to enumerate I2C slaves\n");276 dev_warn(&adap->dev, "failed to enumerate I2C slaves\n");
277}277}
278 278
279const struct acpi_device_id *
280i2c_acpi_match_device(const struct acpi_device_id *matches,
281 struct i2c_client *client)
282{
283 if (!(client && matches))
284 return NULL;
285
286 return acpi_match_device(matches, &client->dev);
287}
288
289static const struct acpi_device_id i2c_acpi_force_400khz_device_ids[] = {279static const struct acpi_device_id i2c_acpi_force_400khz_device_ids[] = {
290 /*280 /*
291 * These Silead touchscreen controllers only work at 400KHz, for281 * These Silead touchscreen controllers only work at 400KHz, for
drivers/i2c/i2c-core-base.c+1−1
@@ -480,7 +480,7 @@ static int i2c_device_probe(struct device *dev) · 479 unmodified lines
480 * or ACPI ID table is supplied for the probing device.480 * or ACPI ID table is supplied for the probing device.
481 */481 */
482 if (!driver->id_table &&482 if (!driver->id_table &&
483 !i2c_acpi_match_device(dev->driver->acpi_match_table, client) &&483 !acpi_driver_match_device(dev, dev->driver) &&
484 !i2c_of_match_device(dev->driver->of_match_table, client)) {484 !i2c_of_match_device(dev->driver->of_match_table, client)) {
485 status = -ENODEV;485 status = -ENODEV;
486 goto put_sync_adapter;486 goto put_sync_adapter;
drivers/i2c/i2c-core.h+0−9
@@ -59,20 +59,11 @@ static inline int __i2c_check_suspended(struct i2c_adapter *adap) · 58 unmodified lines
59}59}
60 60
61#ifdef CONFIG_ACPI61#ifdef CONFIG_ACPI
62const struct acpi_device_id *
63i2c_acpi_match_device(const struct acpi_device_id *matches,
64 struct i2c_client *client);
65void i2c_acpi_register_devices(struct i2c_adapter *adap);62void i2c_acpi_register_devices(struct i2c_adapter *adap);
66 63
67int i2c_acpi_get_irq(struct i2c_client *client);64int i2c_acpi_get_irq(struct i2c_client *client);
68#else /* CONFIG_ACPI */65#else /* CONFIG_ACPI */
69static inline void i2c_acpi_register_devices(struct i2c_adapter *adap) { }66static inline void i2c_acpi_register_devices(struct i2c_adapter *adap) { }
70static inline const struct acpi_device_id *
71i2c_acpi_match_device(const struct acpi_device_id *matches,
72 struct i2c_client *client)
73{
74 return NULL;
75}
76 67
77static inline int i2c_acpi_get_irq(struct i2c_client *client)68static inline int i2c_acpi_get_irq(struct i2c_client *client)
78{69{

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