lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <7d8201bf-b05e-6235-7eb0-54b1a393f99f@redhat.com>
Date:   Fri, 30 Jun 2017 19:37:34 +0200
From:   Hans de Goede <hdegoede@...hat.com>
To:     Andy Shevchenko <andy.shevchenko@...il.com>,
        Benjamin Tissoires <benjamin.tissoires@...hat.com>
Cc:     Bastien Nocera <hadess@...ess.net>,
        Stephen Just <stephenjust@...il.com>,
        Sebastian Reichel <sre@...nel.org>,
        "Rafael J . Wysocki" <rafael.j.wysocki@...el.com>,
        Len Brown <lenb@...nel.org>,
        Robert Moore <robert.moore@...el.com>,
        Lv Zheng <lv.zheng@...el.com>,
        Mika Westerberg <mika.westerberg@...ux.intel.com>,
        "linux-acpi@...r.kernel.org" <linux-acpi@...r.kernel.org>,
        devel@...ica.org,
        "linux-pm@...r.kernel.org" <linux-pm@...r.kernel.org>,
        "linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH v2] ACPI: surface3_power: MSHW0011 rev-eng implementation

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

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ