linux-mtd.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
From: Michael Walle <mwalle@kernel.org>
To: Tudor Ambarus <tudor.ambarus@linaro.org>
Cc: Jaime Liao <jaimeliao.tw@gmail.com>,
	linux-mtd@lists.infradead.org, pratyush@kernel.org,
	miquel.raynal@bootlin.com, leoyu@mxic.com.tw,
	jaimeliao@mxic.com.tw
Subject: Re: [PATCH v2] mtd: spi-nor: core: Discard HW capabilities if no enable function
Date: Wed, 20 Dec 2023 10:02:14 +0100	[thread overview]
Message-ID: <33e303f6e37b14b28f1e1bdb3624fce8@kernel.org> (raw)
In-Reply-To: <ae720ccc-3e37-43f4-94ba-a5441d70f186@linaro.org>

Hi,

>>> and these should have been in the late init hook, and instead discard
>>> them from the params->hwcaps.mask.
>> 
>> Maybe there is a better place to mask these bits. But IMHO the core
>> should do it on itself and we shouldn't need to provide an extra
>> hook function for every driver ourselves. The core knows that there
>> is no .octal_enable op and thus it shouldn't even try to enable
>> this mode.
> 
> I meant in the core, at the end of the late_init_params(). Here:
> https://git.kernel.org/pub/scm/linux/kernel/git/mtd/linux.git/tree/drivers/mtd/spi-nor/core.c?h=spi-nor/next#n2962

Sounds good.

>> No it is for completeness and correctness. At the moment we are always
>> setting a (random) default quad enable op, due to legacy reasons.
>> 
> 
> Still, the commit message shall indicate this. Can't add extra checks
> out of the blue. Especially since nobody is affected.

Ok :)

-michael

______________________________________________________
Linux MTD discussion mailing list
http://lists.infradead.org/mailman/listinfo/linux-mtd/

      reply	other threads:[~2023-12-20  9:02 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-12-19 10:21 [PATCH v2] mtd: spi-nor: core: Discard HW capabilities if no enable function Jaime Liao
2023-12-19 10:21 ` [PATCH v3] mtd: spi-nor: sfdp: Get the 1-1-8 and 1-8-8 protocol from SFDP Jaime Liao
2023-12-19 12:15   ` Michael Walle
2023-12-20  8:42   ` Tudor Ambarus
2023-12-20  8:51   ` Re (subset): " Tudor Ambarus
2023-12-19 12:12 ` [PATCH v2] mtd: spi-nor: core: Discard HW capabilities if no enable function Michael Walle
2023-12-20  8:07 ` Tudor Ambarus
2023-12-20  8:43   ` Michael Walle
2023-12-20  8:20 ` Tudor Ambarus
2023-12-20  8:50   ` Michael Walle
2023-12-20  8:58     ` Tudor Ambarus
2023-12-20  9:02       ` Michael Walle [this message]

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=33e303f6e37b14b28f1e1bdb3624fce8@kernel.org \
    --to=mwalle@kernel.org \
    --cc=jaimeliao.tw@gmail.com \
    --cc=jaimeliao@mxic.com.tw \
    --cc=leoyu@mxic.com.tw \
    --cc=linux-mtd@lists.infradead.org \
    --cc=miquel.raynal@bootlin.com \
    --cc=pratyush@kernel.org \
    --cc=tudor.ambarus@linaro.org \
    /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).