Skip to contentSkip to conversation

mfd: twl4030-power: update checks for specific boards to use the DT

PATCH Applied Ethan Nelson-Moore 2 participants 2 messages May 17 – May 27

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH v3 1/1 mfd: twl4030-power: update checks for specific boards to use the DT

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
Changes from v2: Correct changelog formatting (there were two --- sections in v2)

 drivers/mfd/twl4030-power.c | 6 ++----
 1 file changed, 2 insertions(+), 4 deletions(-)
drivers/mfd/twl4030-power.c +2 -4
index 0bca948ab6ba..fc1cf316c236 100644
@@ -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);
Signature · 1 line
2.43.0
maintainer Applied
#1 lore raw

Re: (subset) [PATCH v3] mfd: twl4030-power: update checks for specific boards to use the DT

Quoted 12 lines · Ethan Nelson-Moore

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.

Quoted 1 line

[...]

Applied, thanks!

[1/1] mfd: twl4030-power: update checks for specific boards to use the DT

      commit: 8fb42ee76f0fd5f7b8d4cf5146d8e12df42b19c4

--
Lee Jones [李琼斯]