diff mbox

[v2] ACPI: surface3_power: MSHW0011 rev-eng implementation

Message ID CAHp75VdLkt4VJE_M51E66y3rhWtD0ALhorV3Kq=Y_Z_9GTbVLw@mail.gmail.com (mailing list archive)
State Not Applicable, archived
Headers show

Commit Message

Andy Shevchenko June 30, 2017, 5:55 p.m. UTC
On Fri, Jun 30, 2017 at 8:42 PM, Hans de Goede <hdegoede@redhat.com> wrote:
> On 30-06-17 19:40, Andy Shevchenko wrote:
>> On Fri, Jun 30, 2017 at 8:37 PM, Hans de Goede <hdegoede@redhat.com>
>> wrote:
>>> On 30-06-17 18:37, Andy Shevchenko wrote:
>>>> On Fri, Jun 30, 2017 at 6:57 PM, Benjamin Tissoires

> Care to share that? Between me and Benjamin one of us can hopefully
> find the time to test / finish it (should be trivial really).

Not tested at all.

Comments

Andy Shevchenko June 30, 2017, 5:58 p.m. UTC | #1
On Fri, Jun 30, 2017 at 8:55 PM, Andy Shevchenko
<andy.shevchenko@gmail.com> wrote:
> On Fri, Jun 30, 2017 at 8:42 PM, Hans de Goede <hdegoede@redhat.com> wrote:
>> On 30-06-17 19:40, Andy Shevchenko wrote:
>>> On Fri, Jun 30, 2017 at 8:37 PM, Hans de Goede <hdegoede@redhat.com>
>>> wrote:
>>>> On 30-06-17 18:37, Andy Shevchenko wrote:
>>>>> On Fri, Jun 30, 2017 at 6:57 PM, Benjamin Tissoires
>
>> Care to share that? Between me and Benjamin one of us can hopefully
>> find the time to test / finish it (should be trivial really).
>
> Not tested at all.

Should have

Fixes: da10c06a044b ("i2c: Make I2C ID tables non-mandatory for DT'ed devices")

also.
diff mbox

Patch

From ea8aa2823410393bbf67a1182339aea439d8f81d Mon Sep 17 00:00:00 2001
From: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Date: Fri, 30 Jun 2017 20:53:00 +0300
Subject: [PATCH 1/1] i2c: core: Allow empty id_table in ACPI case as well

For now empty ID table is not allowed with ACPI and prevents driver to be
probed.

Add a check to allow empty ID table.

Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
---
 drivers/i2c/i2c-core-base.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/drivers/i2c/i2c-core-base.c b/drivers/i2c/i2c-core-base.c
index c89dac7fd2e7..45231d2257ad 100644
--- a/drivers/i2c/i2c-core-base.c
+++ b/drivers/i2c/i2c-core-base.c
@@ -354,9 +354,10 @@  static int i2c_device_probe(struct device *dev)
 
 	/*
 	 * An I2C ID table is not mandatory, if and only if, a suitable Device
-	 * Tree match table entry is supplied for the probing device.
+	 * Tree or ACPI match table entry is supplied for the probing device.
 	 */
 	if (!driver->id_table &&
+	    !acpi_match_device(dev->driver->acpi_match_table, &client->dev) &&
 	    !i2c_of_match_device(dev->driver->of_match_table, client))
 		return -ENODEV;
 
-- 
2.11.0