mail archive of the barebox mailing list
 help / color / mirror / Atom feed
From: Alexander Shiyan <eagle.alexander923@gmail.com>
To: barebox@lists.infradead.org
Cc: Alexander Shiyan <eagle.alexander923@gmail.com>
Subject: [PATCH] nvmem: fix Kconfig dependency of the Atmel I2C helper
Date: Tue,  1 Dec 2026 12:20:00 +0300	[thread overview]
Message-ID: <20261201092000.162265-1-eagle.alexander923@gmail.com> (raw)

commit 0837819622a2 ("nvmem: add support for Atmel sha204(a)") adds
NVMEM_ATMEL_I2C for atmel-i2c.o, which uses both crc16() and bitrev16(),
but selects them in the wrong symbol: NVMEM_ATMEL_SHA204A selects CRC16
and BITREV while NVMEM_ATMEL_I2C selects BITREVERSE, a symbol that does
not exist in barebox.

Kconfig silently treats an unknown symbol as n, so the dead select is a
no-op. The dependencies only work today because the sole user,
NVMEM_ATMEL_SHA204A, selects CRC16 and BITREV itself; any other user of
NVMEM_ATMEL_I2C would fail to link.

Move CRC16 and BITREV to NVMEM_ATMEL_I2C, which is the symbol that
builds atmel-i2c.o, and drop the non-existent BITREVERSE.

Fixes: 0837819622a2 ("nvmem: add support for Atmel sha204(a)")
Signed-off-by: Alexander Shiyan <eagle.alexander923@gmail.com>
---
 drivers/nvmem/Kconfig | 5 ++---
 1 file changed, 2 insertions(+), 3 deletions(-)

diff --git a/drivers/nvmem/Kconfig b/drivers/nvmem/Kconfig
index b7501798cb..f251e22a5d 100644
--- a/drivers/nvmem/Kconfig
+++ b/drivers/nvmem/Kconfig
@@ -117,8 +117,6 @@ config STARFIVE_OTP
 config NVMEM_ATMEL_SHA204A
 	bool "Support for Microchip / Atmel SHA accelerator OTP support"
 	depends on I2C
-	select CRC16
-	select BITREV
 	select NVMEM_ATMEL_I2C
 	help
 	  Microchip / Atmel SHA accelerator and RNG.
@@ -127,7 +125,8 @@ config NVMEM_ATMEL_SHA204A
 
 config NVMEM_ATMEL_I2C
 	bool
-	select BITREVERSE
+	select CRC16
+	select BITREV
 
 config TI_K3_OTP
 	bool "TI K3 OTP"
-- 
2.54.0




                 reply	other threads:[~2026-12-01  9:35 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

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=20261201092000.162265-1-eagle.alexander923@gmail.com \
    --to=eagle.alexander923@gmail.com \
    --cc=barebox@lists.infradead.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