From: Geert Uytterhoeven <geert@linux-m68k.org>
To: "Rafał Miłecki" <zajec5@gmail.com>
Cc: Brian Norris <computersforpeace@gmail.com>,
"linux-mtd@lists.infradead.org" <linux-mtd@lists.infradead.org>,
"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
Stephen Warren <swarren@wwwdotorg.org>,
Marek Vasut <marex@denx.de>,
linux-spi <linux-spi@vger.kernel.org>
Subject: Re: [PATCH] Documentation: dt: mtd: replace "nor-jedec" binding with "jedec,spi-nor"
Date: Thu, 21 May 2015 11:39:08 +0200 [thread overview]
Message-ID: <CAMuHMdVfoF-qJBNDtzqt4+caikGax-LHfacfsG1B356XH+UcSw@mail.gmail.com> (raw)
In-Reply-To: <CACna6rwmhtLhU4+aCazmkrxUpF=JC37mvs1SJVR2zetfj8oPjA@mail.gmail.com>
Hi Rafal,
On Thu, May 21, 2015 at 11:31 AM, Rafał Miłecki <zajec5@gmail.com> wrote:
> On 21 May 2015 at 10:58, Geert Uytterhoeven <geert@linux-m68k.org> wrote:
>> On Thu, May 21, 2015 at 10:50 AM, Rafał Miłecki <zajec5@gmail.com> wrote:
>>>>>> I think your comments suggest that I shouldn't be removing "spi-nor"
>>>>>> from m25p_ids[] nor from this block:
>>>>>>
>>>>>> if (data && data->type)
>>>>>> flash_name = data->type;
>>>>>> else if (!strcmp(spi->modalias, "spi-nor"))
>>>>>> flash_name = NULL; /* auto-detect */
>>>>>> else
>>>>>> flash_name = spi->modalias;
>>>>>>
>>>>>> So it stays in both m25p_ids[] and .of_match_table.
>>>>>>
>>>>>> I suppose that can work. It then allows people to do weird stuff like:
>>>>>>
>>>>>> compatible = "idontknowwhatimdoing,spi-nor";
>>>>>>
>>>>>> in their device tree. But other than that, there's not much downside I don't
>>>>>> think.
>>>>>
>>>>> It sounds like a reasonable solution. I guess there isn't a perfect
>>>>> one. Even if we decide to go for sth like "jedec-spi-nor", there
>>>>> always will be a chance of someone using
>>>>> compatible = "idontknowwhatimdoing,jedec-spi-nor";
>>>>> So if you rework your patch to leave "spi-nor" support in m25p_ids and
>>>>> conditions block, it should be OK.
>>>>
>>>> Typically platform devices just use the driver's name. Hence IMHO there's
>>>> no need to add a shiny new spi-nor device name.
>>>>
>>>> So what's wrong with using "m25p80", and treating that as auto-detect iff
>>>> !spi->dev.of_node?
>>>
>>> Treating "m25p80" as auto-detect triggering string won't allow
>>> platform to *force* "m25p80" flash type if there ever appears to be
>>> needed. Maybe it's unlikely, but it still sounds like a bit bad design
>>> for me.
>>
>> To force m25p80 flash, you set flash_platform_data.type to "m25p80"?
>
> Oh, I think I got lost in the way m25p80 is probed. Is it handled by
> spi_board_info and its "modalias"?
Indeed.
> Could I leave flash_platform_data.type set to NULL and still have m25p80 probed?
Yes, that case is the final "else" branch above.
Gr{oetje,eeting}s,
Geert
--
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@linux-m68k.org
In personal conversations with technical people, I call myself a hacker. But
when I'm talking to journalists I just say "programmer" or something like that.
-- Linus Torvalds
next prev parent reply other threads:[~2015-05-21 9:39 UTC|newest]
Thread overview: 18+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <1431624773-4165-1-git-send-email-computersforpeace@gmail.com>
[not found] ` <20150515195541.GL11598@ld-irv-0074>
[not found] ` <20150518104501.GD3551@leverpostej>
2015-05-18 18:34 ` [PATCH] Documentation: dt: mtd: replace "nor-jedec" binding with "jedec,spi-nor" Brian Norris
2015-05-18 18:51 ` Geert Uytterhoeven
2015-05-19 1:34 ` Brian Norris
2015-05-19 7:27 ` Rafał Miłecki
[not found] ` <CACna6rzpxoXEJbeRyxaR0wiPpWc_MmgvnqoW-dSw4fF-=EMM_g-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2015-05-20 21:35 ` Brian Norris
2015-05-21 7:12 ` Rafał Miłecki
2015-05-21 7:25 ` Brian Norris
2015-05-21 8:01 ` Rafał Miłecki
[not found] ` <CACna6rz6O2XRt0OBmf9stLvM1xh4v4aKTD=MR2EbCKFPV1SOpA-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2015-05-21 8:15 ` Brian Norris
2015-05-21 8:25 ` Rafał Miłecki
[not found] ` <CACna6rweJuyqZ-sVe-DT7yaX4pPLXt8H++BdsZ7+EyzSzoeRoQ-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2015-05-21 8:39 ` Geert Uytterhoeven
[not found] ` <CAMuHMdVr37hUxCJL+9WGX7BZtMpAaDyXrAb=i=xovUn6AyxfxA-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2015-05-21 8:50 ` Rafał Miłecki
[not found] ` <CACna6ryXarbqAoE2W7GMmXr-Dycgrq1bQc98bwex6T4rUg_AGA-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2015-05-21 8:58 ` Geert Uytterhoeven
2015-05-21 9:31 ` Rafał Miłecki
2015-05-21 9:39 ` Geert Uytterhoeven [this message]
[not found] ` <CAMuHMdVfoF-qJBNDtzqt4+caikGax-LHfacfsG1B356XH+UcSw-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2015-05-21 9:47 ` Rafał Miłecki
2015-05-21 9:57 ` Rafał Miłecki
2015-07-21 16:57 ` Brian Norris
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=CAMuHMdVfoF-qJBNDtzqt4+caikGax-LHfacfsG1B356XH+UcSw@mail.gmail.com \
--to=geert@linux-m68k.org \
--cc=computersforpeace@gmail.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mtd@lists.infradead.org \
--cc=linux-spi@vger.kernel.org \
--cc=marex@denx.de \
--cc=swarren@wwwdotorg.org \
--cc=zajec5@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;
as well as URLs for NNTP newsgroup(s).