mail archive of the barebox mailing list
 help / color / mirror / Atom feed
From: Ahmad Fatoum <a.fatoum@barebox.org>
To: barebox@lists.infradead.org
Cc: Ahmad Fatoum <a.fatoum@barebox.org>
Subject: [PATCH 1/3] regulator: bcm2835: register only on Raspberry Pi
Date: Mon, 12 Jan 2026 09:56:04 +0100	[thread overview]
Message-ID: <20260112085617.2952747-1-a.fatoum@barebox.org> (raw)

The device was registered whenever the driver was compiled, including in
multi-platform builds. Guard behind raspberrypi,bcm2835-firmware, until
this is turned into a "real" driver one day.

Signed-off-by: Ahmad Fatoum <a.fatoum@barebox.org>
---
 drivers/regulator/bcm2835.c | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)

diff --git a/drivers/regulator/bcm2835.c b/drivers/regulator/bcm2835.c
index fa9fc47207b4..9d2803baca24 100644
--- a/drivers/regulator/bcm2835.c
+++ b/drivers/regulator/bcm2835.c
@@ -138,8 +138,10 @@ postcore_platform_driver(regulator_bcm2835_driver);
 
 static int regulator_bcm2835_init(void)
 {
-	add_generic_device("regulator-bcm2835", DEVICE_ID_SINGLE, NULL,
-			   0, 0, 0, NULL);
+	if (of_get_compatible_child(of_get_root_node(),
+				    "raspberrypi,bcm2835-firmware"))
+		add_generic_device("regulator-bcm2835", DEVICE_ID_SINGLE, NULL,
+				   0, 0, 0, NULL);
 
 	return 0;
 }
-- 
2.47.3




             reply	other threads:[~2026-01-12  8:56 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-01-12  8:56 Ahmad Fatoum [this message]
2026-01-12  8:56 ` [PATCH 2/3] commands: md: fix OOB read when mmapping Ahmad Fatoum
2026-01-12  8:56 ` [PATCH 3/3] pbl: decomp: report errors on PBL console as well Ahmad Fatoum

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=20260112085617.2952747-1-a.fatoum@barebox.org \
    --to=a.fatoum@barebox.org \
    --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