Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1657328

Re: [PATCH v8] mfd: Add Cherry Trail Whiskey Cove PMIC driver

From Lee Jones <lee.jones@linaro.org>
Newsgroups linux.kernel
Subject Re: [PATCH v8] mfd: Add Cherry Trail Whiskey Cove PMIC driver
Date 2017-06-05 09:50 +0200
Message-ID <tOUVY-8qA-9@gated-at.bofh.it> (permalink)
References (1 earlier) <tMLk6-5mP-19@gated-at.bofh.it> <tMMSR-6dU-17@gated-at.bofh.it> <tMOrE-7i1-13@gated-at.bofh.it> <tMP4m-7N5-29@gated-at.bofh.it> <tODip-5cy-19@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


On Sun, 04 Jun 2017, Hans de Goede wrote:

> Hi,
> 
> On 30-05-17 15:05, Andy Shevchenko wrote:
> > On Tue, 2017-05-30 at 13:20 +0100, Lee Jones wrote:
> > > On Tue, 30 May 2017, Andy Shevchenko wrote:
> > > 
> > > > On Tue, May 30, 2017 at 12:02 PM, Lee Jones <lee.jones@linaro.org>
> > > > wrote:
> > > > > On Tue, 23 May 2017, Hans de Goede wrote:
> > > > > > +static const struct i2c_device_id cht_wc_i2c_id[] = {
> > > > > > +     { }
> > > > > > +};
> > > > > 
> > > > > What's the point in this empty table?
> > > > 
> > > > This is artifact of I2C framework, otherwise if will be not
> > > > enumerated.
> > > > 
> > > > +Wolfram.
> > > > 
> > > > Wolfram, can we fix this? (In case we have either ACPI table or OF
> > > > table there is no need to oblige providing empty legacy table)
> > > 
> > > I think I fixed this already.
> > > 
> > > Hint: `git grep probe_new -- drivers/i2c` >
> > Indeed.
> > Thanks for a hint!
> 
> Unfortunately switching to probe_new (which I've done for
> the upcoming v9 of the MFD CHT Whiskey Cove driver) is not enough,
> as i2c_device_probe() (from drivers/i2c/i2c-core) still has:
> 
>         /*
>          * 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;
> 
> So before we can remove the empty id tables from various ACPI
> drivers we first need to extend this check to also work with
> ACPI device matching.

I remember writing some ACPI support (see: i2c_device_match()), but
you're right, it needs a more complete implementation.  None of the
devices I work(ed) on support ACPI, so it wasn't a requirement for me.
Perhaps you can extend the support.


-- 
Lee Jones
Linaro STMicroelectronics Landing Team Lead
Linaro.org │ Open source software for ARM SoCs
Follow Linaro: Facebook | Twitter | Blog

Back to linux.kernel | Previous | NextPrevious in thread | Find similar | Unroll thread


Thread

Re: [PATCH v8] mfd: Add Cherry Trail Whiskey Cove PMIC driver Lee Jones <lee.jones@linaro.org> - 2017-05-30 11:10 +0200
  Re: [PATCH v8] mfd: Add Cherry Trail Whiskey Cove PMIC driver Andy Shevchenko <andy.shevchenko@gmail.com> - 2017-05-30 12:50 +0200
    Re: [PATCH v8] mfd: Add Cherry Trail Whiskey Cove PMIC driver Lee Jones <lee.jones@linaro.org> - 2017-05-30 14:30 +0200
      Re: [PATCH v8] mfd: Add Cherry Trail Whiskey Cove PMIC driver Andy Shevchenko <andriy.shevchenko@linux.intel.com> - 2017-05-30 15:10 +0200
        Re: [PATCH v8] mfd: Add Cherry Trail Whiskey Cove PMIC driver Hans de Goede <hdegoede@redhat.com> - 2017-06-04 15:00 +0200
          Re: [PATCH v8] mfd: Add Cherry Trail Whiskey Cove PMIC driver Lee Jones <lee.jones@linaro.org> - 2017-06-05 09:50 +0200

csiph-web