devicetree.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Geert Uytterhoeven <geert@linux-m68k.org>
To: Javier Martinez Canillas <javier@dowhile0.org>
Cc: "Wolfram Sang" <wsa@the-dreams.de>,
	"Linux Kernel" <linux-kernel@vger.kernel.org>,
	"Rob Herring" <robh@kernel.org>, "Florian Larysch" <fl@n621.de>,
	"David Lechner" <david@lechnology.com>,
	"Rob Herring" <robh+dt@kernel.org>,
	"Andy Shevchenko" <andy.shevchenko@gmail.com>,
	"Catalin Marinas" <catalin.marinas@arm.com>,
	"Sören Brinkmann" <soren.brinkmann@xilinx.com>,
	"Simon Horman" <horms@verge.net.au>,
	"Michal Simek" <michal.simek@xilinx.com>,
	"Dinh Nguyen" <dinguyen@kernel.org>,
	"Russell King" <linux@armlinux.org.uk>,
	"Will Deacon" <will.deacon@arm.com>,
	"devicetree@vger.kernel.org" <devicetree@vger.kernel.org>,
	"Sekhar Nori" <nsekhar@ti.com>, "Scott Wood" <oss@buserror.net>,
	"Benjamin Herrenschmidt" <benh@kernel.crashing.org>,
	"Joachim Eastwood" <manabian@gmail.com>
Subject: Re: [RESEND PATCH v5 00/16] eeprom: at24: Add OF device ID table
Date: Wed, 30 Aug 2017 22:15:45 +0200	[thread overview]
Message-ID: <CAMuHMdXRVnHsvCNfRqRgTusdyhOYcV7bWconD99OgXmVcHT8yw@mail.gmail.com> (raw)
In-Reply-To: <CABxcv==JFm0H_kB8LRyRpZNbajcO3UkxYOepkk=YUAaT1UH1gg@mail.gmail.com>

Hi Javier,

On Wed, Aug 30, 2017 at 9:57 PM, Javier Martinez Canillas
<javier@dowhile0.org> wrote:
>> I think we should talk about the same case: Let me repeat what I did:
>>
>> 1) I added your patch "eeprom: at24: Add OF device ID table"
>> 2) I added an EEPROM node to an I2C
>>
>> +       eeprom@50 {
>> +               compatible = "renesas,24c01";
>> +               reg = <0x50>;
>> +       };
>>
>> -> no at24 binding to the device
>>
>> 3) I revert your patch
>>
>> -> at24 binding to the device
>>
>
> I've tested this and you are right, it fails...
>
> The problem is that the patch also changes how the driver obtains the
> EEPROM parameters (the magic value in the entry's data field).
>
> So even when module autoload and device / driver matching works, the
> driver probe function fails because if (client->dev.of_node) the
> driver attempts to get the entry data using
> of_device_get_match_data(), which is obviously wrong since the
> compatible string in the dev node isn't present in the OF table.
>
> The id->driver_data from the I2C table should be used instead since
> that's the table that matches in this case.
>
> One option is to fallback to id->driver_data if
> of_device_get_match_data() fails, but that's just an (ugly)
> workaround. So I agree with you that the best option is to wait for
> the DTS patches to land first.

Which means new kernels won't work with old DTBs. Oops...
I'm afraid that needs to be fixed.  People care about DTB backward
compatibility on many platforms.

Gr{oetje,eeting}s,

                        Geert

  reply	other threads:[~2017-08-30 20:15 UTC|newest]

Thread overview: 48+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-06-15 18:54 [RESEND PATCH v5 00/16] eeprom: at24: Add OF device ID table Javier Martinez Canillas
2017-06-15 18:54 ` [RESEND PATCH v5 01/16] dt-bindings: i2c: eeprom: Document vendor to be used and deprecated ones Javier Martinez Canillas
     [not found]   ` <20170615185418.13980-2-javier-0uQlZySMnqxg9hUCZPvPmw@public.gmane.org>
2017-06-23 18:17     ` Rob Herring
2017-08-28 16:02   ` Wolfram Sang
     [not found] ` <20170615185418.13980-1-javier-0uQlZySMnqxg9hUCZPvPmw@public.gmane.org>
2017-06-15 18:54   ` [RESEND PATCH v5 03/16] ARM: dts: efm32: Add generic compatible string for I2C EEPROM Javier Martinez Canillas
     [not found]     ` <20170615185418.13980-4-javier-0uQlZySMnqxg9hUCZPvPmw@public.gmane.org>
2017-08-16 14:21       ` Javier Martinez Canillas
2017-06-15 18:54   ` [RESEND PATCH v5 04/16] ARM: dts: keystone: " Javier Martinez Canillas
2017-06-15 18:54   ` [RESEND PATCH v5 07/16] ARM: dts: koelsch: " Javier Martinez Canillas
2017-06-16 13:36     ` Simon Horman
2017-06-15 18:54   ` [RESEND PATCH v5 08/16] ARM: dts: socfpga: " Javier Martinez Canillas
     [not found]     ` <20170615185418.13980-9-javier-0uQlZySMnqxg9hUCZPvPmw@public.gmane.org>
2017-11-07  8:20       ` Javier Martinez Canillas
2017-06-15 18:54   ` [RESEND PATCH v5 10/16] ARM: dts: zynq: " Javier Martinez Canillas
     [not found]     ` <20170615185418.13980-11-javier-0uQlZySMnqxg9hUCZPvPmw@public.gmane.org>
2017-06-21 11:43       ` Michal Simek
     [not found]         ` <b22a7db6-7daf-b5c1-3978-cdc699723e30-gjFFaj9aHVfQT0dZR+AlfA@public.gmane.org>
2017-08-23 14:28           ` Javier Martinez Canillas
2017-08-24 13:44             ` Michal Simek
     [not found]               ` <67a9d32a-0a20-f101-4660-0d5aa5ad8a8a-gjFFaj9aHVfQT0dZR+AlfA@public.gmane.org>
2017-09-21  9:41                 ` Javier Martinez Canillas
2017-09-25  8:06                   ` Michal Simek
     [not found]                     ` <e6006c90-99a2-c8f5-cff2-5c729ada8cd1-gjFFaj9aHVfQT0dZR+AlfA@public.gmane.org>
2017-09-26  8:00                       ` Javier Martinez Canillas
2017-06-15 18:54   ` [RESEND PATCH v5 11/16] arm64: zynqmp: " Javier Martinez Canillas
     [not found]     ` <20170615185418.13980-12-javier-0uQlZySMnqxg9hUCZPvPmw@public.gmane.org>
2017-06-21 11:43       ` Michal Simek
2017-08-21 11:27         ` Javier Martinez Canillas
2017-08-21 12:04           ` Michal Simek
2017-08-21 12:58             ` Javier Martinez Canillas
2017-06-15 18:54 ` [RESEND PATCH v5 05/16] ARM: dts: lpc18xx: " Javier Martinez Canillas
2017-06-15 18:54 ` [RESEND PATCH v5 06/16] ARM: dts: r7s72100: " Javier Martinez Canillas
2017-06-16 13:36   ` Simon Horman
2017-06-15 18:54 ` [RESEND PATCH v5 09/16] ARM: dts: uniphier: " Javier Martinez Canillas
2017-06-15 18:54 ` [RESEND PATCH v5 12/16] powerpc/5200: " Javier Martinez Canillas
     [not found]   ` <20170615185418.13980-13-javier-0uQlZySMnqxg9hUCZPvPmw@public.gmane.org>
2017-06-29 12:21     ` [RESEND, v5, " Michael Ellerman
2017-06-15 18:54 ` [RESEND PATCH v5 13/16] powerpc/fsl: " Javier Martinez Canillas
2017-06-29 12:21   ` [RESEND, v5, " Michael Ellerman
2017-06-15 18:54 ` [RESEND PATCH v5 14/16] powerpc/512x: " Javier Martinez Canillas
     [not found]   ` <20170615185418.13980-15-javier-0uQlZySMnqxg9hUCZPvPmw@public.gmane.org>
2017-06-29 12:21     ` [RESEND, v5, " Michael Ellerman
2017-06-15 18:54 ` [RESEND PATCH v5 15/16] powerpc/83xx: " Javier Martinez Canillas
     [not found]   ` <20170615185418.13980-16-javier-0uQlZySMnqxg9hUCZPvPmw@public.gmane.org>
2017-06-29 12:21     ` [RESEND, v5, " Michael Ellerman
2017-06-15 18:54 ` [RESEND PATCH v5 16/16] powerpc/44x: " Javier Martinez Canillas
2017-06-29 12:21   ` [RESEND, v5, " Michael Ellerman
2017-07-10  7:47 ` [RESEND PATCH v5 00/16] eeprom: at24: Add OF device ID table Javier Martinez Canillas
2017-07-31 15:30 ` Wolfram Sang
2017-07-31 16:17   ` Javier Martinez Canillas
     [not found]     ` <CABxcv=mdbE0QGjoi3aLzxRqM3-MbkQ_Ai6fShcGVUGSNNqqrqw-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2017-08-28 16:01       ` Wolfram Sang
2017-08-29  8:44         ` Javier Martinez Canillas
2017-08-29  8:48           ` Wolfram Sang
2017-08-30 16:19             ` Javier Martinez Canillas
2017-08-30 17:42               ` Wolfram Sang
2017-08-30 19:57                 ` Javier Martinez Canillas
2017-08-30 20:15                   ` Geert Uytterhoeven [this message]
2017-08-30 20:59                     ` Javier Martinez Canillas

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=CAMuHMdXRVnHsvCNfRqRgTusdyhOYcV7bWconD99OgXmVcHT8yw@mail.gmail.com \
    --to=geert@linux-m68k.org \
    --cc=andy.shevchenko@gmail.com \
    --cc=benh@kernel.crashing.org \
    --cc=catalin.marinas@arm.com \
    --cc=david@lechnology.com \
    --cc=devicetree@vger.kernel.org \
    --cc=dinguyen@kernel.org \
    --cc=fl@n621.de \
    --cc=horms@verge.net.au \
    --cc=javier@dowhile0.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux@armlinux.org.uk \
    --cc=manabian@gmail.com \
    --cc=michal.simek@xilinx.com \
    --cc=nsekhar@ti.com \
    --cc=oss@buserror.net \
    --cc=robh+dt@kernel.org \
    --cc=robh@kernel.org \
    --cc=soren.brinkmann@xilinx.com \
    --cc=will.deacon@arm.com \
    --cc=wsa@the-dreams.de \
    /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;
as well as URLs for NNTP newsgroup(s).