Linux ACPI
 help / color / mirror / Atom feed
From: Hans de Goede <hdegoede@redhat.com>
To: Andy Shevchenko <andy.shevchenko@gmail.com>,
	Benjamin Tissoires <benjamin.tissoires@redhat.com>
Cc: Bastien Nocera <hadess@hadess.net>,
	Stephen Just <stephenjust@gmail.com>,
	Sebastian Reichel <sre@kernel.org>,
	"Rafael J . Wysocki" <rafael.j.wysocki@intel.com>,
	Len Brown <lenb@kernel.org>,
	Robert Moore <robert.moore@intel.com>,
	Lv Zheng <lv.zheng@intel.com>,
	Mika Westerberg <mika.westerberg@linux.intel.com>,
	"linux-acpi@vger.kernel.org" <linux-acpi@vger.kernel.org>,
	devel@acpica.org,
	"linux-pm@vger.kernel.org" <linux-pm@vger.kernel.org>,
	"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH v2] ACPI: surface3_power: MSHW0011 rev-eng implementation
Date: Fri, 30 Jun 2017 19:37:34 +0200	[thread overview]
Message-ID: <7d8201bf-b05e-6235-7eb0-54b1a393f99f@redhat.com> (raw)
In-Reply-To: <CAHp75VdLU57x2YuDH+SkB1jR3rSpqcVNszhq5fDUVZZt+sqxyQ@mail.gmail.com>

Hi,

On 30-06-17 18:37, Andy Shevchenko wrote:
> On Fri, Jun 30, 2017 at 6:57 PM, Benjamin Tissoires

<snip>

>>>> +static const struct i2c_device_id mshw0011_id[] = {
>>>> +       { }
>>>> +};
>>>> +MODULE_DEVICE_TABLE(i2c, mshw0011_id);
>>>
>>> ->probe_new(), please.
>>
>> Correct
>>
>>>
>>> If I2C framework is _still_ broken we need to fix that part.
>>
>> I haven't check, so let's see for v3.
> 
> Cc: Wolfram for v3 and ask him directly. Last time I checked it looks
> like I2C core doesn't care about ACPI when ->probe_new() is used.

ACPI i2c drivers still need an empty i2c_device_id table I've
fixing this on my TODO but it has been buried in other stuff.

Benjamin if (not saying you should, but if) you want to take a look at
this, fixing the need for the empty table for ACPI devices should be
easy. The problem is these lines in drivers/i2c/i2c-core.c:
i2c_device_probe():

         /*
          * An I2C ID table is not mandatory, if and only if, a suitable Device
          * Tree match table entry is supplied for the probing device.
          */
         if (!driver->id_table &&
             !i2c_of_match_device(dev->driver->of_match_table, client))
                 return -ENODEV;

Which needs to be extended to also check for an ACPI match AFAIK
you can NOT just replace this with i2c_device_match because that would
break manually binding a driver through sysfs.

Regards,

Hans


  reply	other threads:[~2017-06-30 17:37 UTC|newest]

Thread overview: 19+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-06-29 12:10 [PATCH v2] ACPI: surface3_power: MSHW0011 rev-eng implementation Benjamin Tissoires
2017-06-29 14:22 ` Andy Shevchenko
2017-06-29 20:22   ` Rafael J. Wysocki
2017-06-30 15:24     ` Benjamin Tissoires
2017-06-30 15:42       ` Hans de Goede
2017-06-30 12:49   ` Hans de Goede
2017-06-30 15:26     ` Benjamin Tissoires
2017-06-30 15:43       ` Hans de Goede
2017-06-30 15:57   ` Benjamin Tissoires
2017-06-30 16:37     ` Andy Shevchenko
2017-06-30 17:37       ` Hans de Goede [this message]
2017-06-30 17:40         ` Andy Shevchenko
2017-06-30 17:42           ` Hans de Goede
2017-06-30 17:55             ` Andy Shevchenko
2017-06-30 17:58               ` Andy Shevchenko
2018-08-31 14:54       ` Benjamin Tissoires
2018-09-06 14:43         ` Moore, Robert
2017-07-01  0:47 ` Sebastian Reichel
2017-07-01 19:53   ` Julia Lawall

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=7d8201bf-b05e-6235-7eb0-54b1a393f99f@redhat.com \
    --to=hdegoede@redhat.com \
    --cc=andy.shevchenko@gmail.com \
    --cc=benjamin.tissoires@redhat.com \
    --cc=devel@acpica.org \
    --cc=hadess@hadess.net \
    --cc=lenb@kernel.org \
    --cc=linux-acpi@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-pm@vger.kernel.org \
    --cc=lv.zheng@intel.com \
    --cc=mika.westerberg@linux.intel.com \
    --cc=rafael.j.wysocki@intel.com \
    --cc=robert.moore@intel.com \
    --cc=sre@kernel.org \
    --cc=stephenjust@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox