Linux-ARM-Kernel Archive on lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] mfd: twl4030-power: fix stale ARM machine ID checks to use the DT
@ 2026-05-09  1:42 Ethan Nelson-Moore
  2026-05-09 16:44 ` Ethan Nelson-Moore
  0 siblings, 1 reply; 2+ messages in thread
From: Ethan Nelson-Moore @ 2026-05-09  1:42 UTC (permalink / raw)
  To: linux-arm-kernel, linux-omap
  Cc: Russell King, Ethan Nelson-Moore, stable, Aaro Koskinen,
	Andreas Kemnade, Kevin Hilman, Roger Quadros, Tony Lindgren,
	Lee Jones, Jon Hunter, Benoit Cousson

The twl4030-power driver contains two checks for ARM machine IDs via
machine_is_*() macros. These checks are incorrect because the two
platforms concerned now support only FDT booting, which does not use
machine IDs, and therefore they will always fail. 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"). To resolve this issue, use
of_machine_is_compatible() instead.

Fixes: 678fac419382 ("ARM: dts: OMAP3: Add support for OMAP3430 SDP board")
Fixes: bd5fc6fa657c ("ARM: dts: Add basic support for omap3 LDP zoom1 labrador")
Cc: stable@vger.kernel.org
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



^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH] mfd: twl4030-power: fix stale ARM machine ID checks to use the DT
  2026-05-09  1:42 [PATCH] mfd: twl4030-power: fix stale ARM machine ID checks to use the DT Ethan Nelson-Moore
@ 2026-05-09 16:44 ` Ethan Nelson-Moore
  0 siblings, 0 replies; 2+ messages in thread
From: Ethan Nelson-Moore @ 2026-05-09 16:44 UTC (permalink / raw)
  To: linux-arm-kernel, linux-omap
  Cc: Russell King, stable, Aaro Koskinen, Andreas Kemnade,
	Kevin Hilman, Roger Quadros, Tony Lindgren, Lee Jones, Jon Hunter,
	Benoit Cousson

On Fri, May 8, 2026 at 6:43 PM Ethan Nelson-Moore
<enelsonmoore@gmail.com> wrote:
> The twl4030-power driver contains two checks for ARM machine IDs via
> machine_is_*() macros. These checks are incorrect because the two
> platforms concerned now support only FDT booting, which does not use
> machine IDs, and therefore they will always fail.

I have been informed that this is not correct and the kernel still
considers the machine ID when booting with FDT, though there is still
value in updating the check because it allows removing the machine IDs
from mach-types. I will resend this patch with a fixed commit message
after the 24-hour deadline.


^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2026-05-09 16:45 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-05-09  1:42 [PATCH] mfd: twl4030-power: fix stale ARM machine ID checks to use the DT Ethan Nelson-Moore
2026-05-09 16:44 ` Ethan Nelson-Moore

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox