From: Ethan Nelson-Moore <enelsonmoore@gmail.com>
To: linux-omap@vger.kernel.org
Cc: Ethan Nelson-Moore <enelsonmoore@gmail.com>,
Aaro Koskinen <aaro.koskinen@iki.fi>,
Andreas Kemnade <andreas@kemnade.info>,
Kevin Hilman <khilman@baylibre.com>,
Roger Quadros <rogerq@kernel.org>,
Tony Lindgren <tony@atomide.com>, Lee Jones <lee@kernel.org>
Subject: [PATCH v2] mfd: twl4030-power: update checks for specific boards to use the DT
Date: Sat, 9 May 2026 22:39:36 -0700 [thread overview]
Message-ID: <20260510053939.564314-2-enelsonmoore@gmail.com> (raw)
In-Reply-To: <20260510053939.564314-1-enelsonmoore@gmail.com>
The twl4030-power driver contains two checks for ARM machine IDs via
machine_is_*() macros. The two boards concerned now support only FDT
booting, which does not use machine IDs, and therefore the code should
be updated to check the DT compatible property instead.
The legacy board files for these machines were removed in
commit 1b383f44aabc ("ARM: OMAP2+: Drop board file for 3430sdp") and
commit e92fc4f04a34 ("ARM: OMAP2+: Drop legacy board file for LDP").
The presence of these machine ID checks prevents the removal of machine
IDs no longer used by the kernel from arch/arm/tools/mach-types,
because the machine_is_*() macros are generated from mach-types. To
resolve this issue, use of_machine_is_compatible() instead.
---
Changes from v1: Fix mistake in commit message and remove Fixes tags -
machine ID checks still work with DT booting if the bootloader passes
the ID
Signed-off-by: Ethan Nelson-Moore <enelsonmoore@gmail.com>
---
drivers/mfd/twl4030-power.c | 6 ++----
1 file changed, 2 insertions(+), 4 deletions(-)
diff --git a/drivers/mfd/twl4030-power.c b/drivers/mfd/twl4030-power.c
index 0bca948ab6ba..fc1cf316c236 100644
--- a/drivers/mfd/twl4030-power.c
+++ b/drivers/mfd/twl4030-power.c
@@ -30,8 +30,6 @@
#include <linux/property.h>
#include <linux/of.h>
-#include <asm/mach-types.h>
-
static u8 twl4030_start_script_address = 0x2b;
/* Register bits for P1, P2 and P3_SW_EVENTS */
@@ -294,8 +292,8 @@ twl4030_config_wakeup12_sequence(const struct twl4030_power_data *pdata,
if (err)
goto out;
- if (pdata->ac_charger_quirk || machine_is_omap_3430sdp() ||
- machine_is_omap_ldp()) {
+ if (pdata->ac_charger_quirk || of_machine_is_compatible("ti,omap3430-sdp") ||
+ of_machine_is_compatible("ti,omap3-ldp")) {
/* Disabling AC charger effect on sleep-active transitions */
err = twl_i2c_read_u8(TWL_MODULE_PM_MASTER, &data,
R_CFG_P1_TRANSITION);
--
2.43.0
next parent reply other threads:[~2026-05-10 5:40 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <20260510053939.564314-1-enelsonmoore@gmail.com>
2026-05-10 5:39 ` Ethan Nelson-Moore [this message]
2026-05-10 5:47 ` [PATCH v2] mfd: twl4030-power: update checks for specific boards to use the DT Ethan Nelson-Moore
2026-05-10 5:39 ` [PATCH v2] ASoC: ti: omap3pandora: update board check to use DT compatible Ethan Nelson-Moore
2026-05-10 5:47 ` Ethan Nelson-Moore
2026-05-10 12:23 ` Jarkko Nikula
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=20260510053939.564314-2-enelsonmoore@gmail.com \
--to=enelsonmoore@gmail.com \
--cc=aaro.koskinen@iki.fi \
--cc=andreas@kemnade.info \
--cc=khilman@baylibre.com \
--cc=lee@kernel.org \
--cc=linux-omap@vger.kernel.org \
--cc=rogerq@kernel.org \
--cc=tony@atomide.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