From: Miquel Raynal <miquel.raynal@bootlin.com>
To: Pengpeng Hou <pengpeng@iscas.ac.cn>
Cc: Richard Weinberger <richard@nod.at>,
Vignesh Raghavendra <vigneshr@ti.com>,
linux-mtd@lists.infradead.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] mtd: mchp23k256: Use SPI match data for chip caps
Date: Wed, 24 Jun 2026 09:22:47 +0200 [thread overview]
Message-ID: <87bjd0mmgo.fsf@bootlin.com> (raw)
In-Reply-To: <20260624055440.35226-1-pengpeng@iscas.ac.cn> (Pengpeng Hou's message of "Wed, 24 Jun 2026 13:54:40 +0800")
On 24/06/2026 at 13:54:40 +08, Pengpeng Hou <pengpeng@iscas.ac.cn> wrote:
> The driver stores chip capacity information in both the OF match table
> and the SPI id table. Probe currently uses of_device_get_match_data(),
> so a non-OF SPI modalias match falls back to mchp23k256_caps even when
> the SPI id table selected a different part.
>
> Use spi_get_device_match_data() so SPI id-table driver_data is consumed
> when OF match data is absent. This keeps the existing default fallback
> while avoiding the wrong MTD geometry for id-table-only matches.
>
> Signed-off-by: Pengpeng Hou <pengpeng@iscas.ac.cn>
> ---
I am not sure the default makes a lot of sense as there are only two
possible hits and both have private data attached. Nevertheless, the fix
looks correct.
Thanks,
Miquèl
WARNING: multiple messages have this Message-ID (diff)
From: Miquel Raynal <miquel.raynal@bootlin.com>
To: Pengpeng Hou <pengpeng@iscas.ac.cn>
Cc: Richard Weinberger <richard@nod.at>,
Vignesh Raghavendra <vigneshr@ti.com>,
linux-mtd@lists.infradead.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] mtd: mchp23k256: Use SPI match data for chip caps
Date: Wed, 24 Jun 2026 09:22:47 +0200 [thread overview]
Message-ID: <87bjd0mmgo.fsf@bootlin.com> (raw)
In-Reply-To: <20260624055440.35226-1-pengpeng@iscas.ac.cn> (Pengpeng Hou's message of "Wed, 24 Jun 2026 13:54:40 +0800")
On 24/06/2026 at 13:54:40 +08, Pengpeng Hou <pengpeng@iscas.ac.cn> wrote:
> The driver stores chip capacity information in both the OF match table
> and the SPI id table. Probe currently uses of_device_get_match_data(),
> so a non-OF SPI modalias match falls back to mchp23k256_caps even when
> the SPI id table selected a different part.
>
> Use spi_get_device_match_data() so SPI id-table driver_data is consumed
> when OF match data is absent. This keeps the existing default fallback
> while avoiding the wrong MTD geometry for id-table-only matches.
>
> Signed-off-by: Pengpeng Hou <pengpeng@iscas.ac.cn>
> ---
I am not sure the default makes a lot of sense as there are only two
possible hits and both have private data attached. Nevertheless, the fix
looks correct.
Thanks,
Miquèl
______________________________________________________
Linux MTD discussion mailing list
http://lists.infradead.org/mailman/listinfo/linux-mtd/
next prev parent reply other threads:[~2026-06-24 7:22 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-06-24 5:54 [PATCH] mtd: mchp23k256: Use SPI match data for chip caps Pengpeng Hou
2026-06-24 5:54 ` Pengpeng Hou
2026-06-24 7:22 ` Miquel Raynal [this message]
2026-06-24 7:22 ` Miquel Raynal
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=87bjd0mmgo.fsf@bootlin.com \
--to=miquel.raynal@bootlin.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mtd@lists.infradead.org \
--cc=pengpeng@iscas.ac.cn \
--cc=richard@nod.at \
--cc=vigneshr@ti.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.