Elyes Haouas has submitted this change. ( https://review.coreboot.org/c/coreboot/+/73810 )
Change subject: ec/lenovo/pmh7/chip.h: Use 'bool' instead of 'int' ......................................................................
ec/lenovo/pmh7/chip.h: Use 'bool' instead of 'int'
This to fix following error using Clang-16.0.0: /cb-build/coreboot-toolchain.0/clang/LENOVO_W500/mainboard/lenovo/t400/static.c:135:22: error: implicit truncation from 'int' to a one-bit wide bit-field changes value from 1 to -1 [-Werror,-Wsingle-bit-bitfield-constant-conversion] .backlight_enable = 0x01, ^~~~ /cb-build/coreboot-toolchain.0/clang/LENOVO_W500/mainboard/lenovo/t400/static.c:136:23: error: implicit truncation from 'int' to a one-bit wide bit-field changes value from 1 to -1 [-Werror,-Wsingle-bit-bitfield-constant-conversion] .dock_event_enable = 0x01, ^~~~
Change-Id: Icd35224877fee355e1bbb8a8e838cb047604babb Signed-off-by: Elyes Haouas ehaouas@noos.fr Reviewed-on: https://review.coreboot.org/c/coreboot/+/73810 Tested-by: build bot (Jenkins) no-reply@coreboot.org Reviewed-by: Felix Singer felixsinger@posteo.net --- M src/ec/lenovo/pmh7/chip.h M src/mainboard/lenovo/haswell/variants/t440p/devicetree.cb M src/mainboard/lenovo/haswell/variants/w541/devicetree.cb M src/mainboard/lenovo/l520/devicetree.cb M src/mainboard/lenovo/t400/devicetree.cb M src/mainboard/lenovo/t410/devicetree.cb M src/mainboard/lenovo/t420/devicetree.cb M src/mainboard/lenovo/t420s/devicetree.cb M src/mainboard/lenovo/t430/devicetree.cb M src/mainboard/lenovo/t430s/devicetree.cb M src/mainboard/lenovo/t520/devicetree.cb M src/mainboard/lenovo/t530/devicetree.cb M src/mainboard/lenovo/t60/devicetree.cb M src/mainboard/lenovo/x1_carbon_gen1/devicetree.cb M src/mainboard/lenovo/x200/devicetree.cb M src/mainboard/lenovo/x200/variants/x200/overridetree.cb M src/mainboard/lenovo/x201/devicetree.cb M src/mainboard/lenovo/x220/devicetree.cb M src/mainboard/lenovo/x230/devicetree.cb M src/mainboard/lenovo/x60/devicetree.cb M util/autoport/ec_lenovo.go 21 files changed, 63 insertions(+), 40 deletions(-)
Approvals: build bot (Jenkins): Verified Felix Singer: Looks good to me, approved
diff --git a/src/ec/lenovo/pmh7/chip.h b/src/ec/lenovo/pmh7/chip.h index 1302139..896578f 100644 --- a/src/ec/lenovo/pmh7/chip.h +++ b/src/ec/lenovo/pmh7/chip.h @@ -3,9 +3,11 @@ #ifndef EC_LENOVO_PMH7_CHIP_H #define EC_LENOVO_PMH7_CHIP_H
+#include <stdbool.h> + struct ec_lenovo_pmh7_config { - int backlight_enable:1; - int dock_event_enable:1; + bool backlight_enable; + bool dock_event_enable; };
#endif /* EC_LENOVO_PMH7_CHIP_H */ diff --git a/src/mainboard/lenovo/haswell/variants/t440p/devicetree.cb b/src/mainboard/lenovo/haswell/variants/t440p/devicetree.cb index fb05027..f8467c7 100644 --- a/src/mainboard/lenovo/haswell/variants/t440p/devicetree.cb +++ b/src/mainboard/lenovo/haswell/variants/t440p/devicetree.cb @@ -55,8 +55,8 @@ device pci 1d.0 on end # USB2 EHCI #1 device pci 1f.0 on # LPC bridge chip ec/lenovo/pmh7 - register "backlight_enable" = "0x01" - register "dock_event_enable" = "0x01" + register "backlight_enable" = "true" + register "dock_event_enable" = "true" device pnp ff.1 on end # dummy end chip ec/lenovo/h8 diff --git a/src/mainboard/lenovo/haswell/variants/w541/devicetree.cb b/src/mainboard/lenovo/haswell/variants/w541/devicetree.cb index 292a30d..0d705fb 100644 --- a/src/mainboard/lenovo/haswell/variants/w541/devicetree.cb +++ b/src/mainboard/lenovo/haswell/variants/w541/devicetree.cb @@ -54,8 +54,8 @@ device pci 1d.0 on end # USB2 EHCI #1 device pci 1f.0 on # LPC bridge chip ec/lenovo/pmh7 - register "backlight_enable" = "0x01" - register "dock_event_enable" = "0x01" + register "backlight_enable" = "true" + register "dock_event_enable" = "true" device pnp ff.1 on end # dummy end chip ec/lenovo/h8 # FIXME: has_power_management_beeps, has_uwb diff --git a/src/mainboard/lenovo/l520/devicetree.cb b/src/mainboard/lenovo/l520/devicetree.cb index a012741..dd431df 100644 --- a/src/mainboard/lenovo/l520/devicetree.cb +++ b/src/mainboard/lenovo/l520/devicetree.cb @@ -54,8 +54,8 @@ device ref pci_bridge off end # PCI bridge device ref lpc on # LPC bridge PCI-LPC bridge chip ec/lenovo/pmh7 - register "backlight_enable" = "0x01" - register "dock_event_enable" = "0x01" + register "backlight_enable" = "true" + register "dock_event_enable" = "true" device pnp ff.1 on end # dummy end chip ec/lenovo/h8 diff --git a/src/mainboard/lenovo/t400/devicetree.cb b/src/mainboard/lenovo/t400/devicetree.cb index 1df350a..259c3e1 100644 --- a/src/mainboard/lenovo/t400/devicetree.cb +++ b/src/mainboard/lenovo/t400/devicetree.cb @@ -120,8 +120,8 @@
chip ec/lenovo/pmh7 device pnp ff.1 on end # dummy - register "backlight_enable" = "0x01" - register "dock_event_enable" = "0x01" + register "backlight_enable" = "true" + register "dock_event_enable" = "true" end
chip ec/lenovo/h8 diff --git a/src/mainboard/lenovo/t410/devicetree.cb b/src/mainboard/lenovo/t410/devicetree.cb index 200cabb..8d4ab5f 100644 --- a/src/mainboard/lenovo/t410/devicetree.cb +++ b/src/mainboard/lenovo/t410/devicetree.cb @@ -99,8 +99,8 @@ end chip ec/lenovo/pmh7 device pnp ff.1 on end # dummy - register "backlight_enable" = "0x01" - register "dock_event_enable" = "0x01" + register "backlight_enable" = "true" + register "dock_event_enable" = "true" end chip ec/lenovo/h8 device pnp ff.2 on # dummy diff --git a/src/mainboard/lenovo/t420/devicetree.cb b/src/mainboard/lenovo/t420/devicetree.cb index 33070eb..953044a 100644 --- a/src/mainboard/lenovo/t420/devicetree.cb +++ b/src/mainboard/lenovo/t420/devicetree.cb @@ -77,8 +77,8 @@ device ref lpc on chip ec/lenovo/pmh7 device pnp ff.1 on end # dummy - register "backlight_enable" = "0x01" - register "dock_event_enable" = "0x01" + register "backlight_enable" = "true" + register "dock_event_enable" = "true" end
chip drivers/pc80/tpm diff --git a/src/mainboard/lenovo/t420s/devicetree.cb b/src/mainboard/lenovo/t420s/devicetree.cb index b5576b2..fc3b12c 100644 --- a/src/mainboard/lenovo/t420s/devicetree.cb +++ b/src/mainboard/lenovo/t420s/devicetree.cb @@ -75,8 +75,8 @@ device ref lpc on chip ec/lenovo/pmh7 device pnp ff.1 on end # dummy - register "backlight_enable" = "0x01" - register "dock_event_enable" = "0x01" + register "backlight_enable" = "true" + register "dock_event_enable" = "true" end
chip drivers/pc80/tpm diff --git a/src/mainboard/lenovo/t430/devicetree.cb b/src/mainboard/lenovo/t430/devicetree.cb index 7e54383..35c23b8 100644 --- a/src/mainboard/lenovo/t430/devicetree.cb +++ b/src/mainboard/lenovo/t430/devicetree.cb @@ -64,8 +64,8 @@ device ref pci_bridge off end # PCI bridge device ref lpc on # LPC bridge PCI-LPC bridge chip ec/lenovo/pmh7 - register "backlight_enable" = "0x01" - register "dock_event_enable" = "0x01" + register "backlight_enable" = "true" + register "dock_event_enable" = "true" device pnp ff.1 on end # dummy end chip ec/lenovo/h8 diff --git a/src/mainboard/lenovo/t430s/devicetree.cb b/src/mainboard/lenovo/t430s/devicetree.cb index 175a5c8..23a41d6 100644 --- a/src/mainboard/lenovo/t430s/devicetree.cb +++ b/src/mainboard/lenovo/t430s/devicetree.cb @@ -77,8 +77,8 @@ device ref lpc on chip ec/lenovo/pmh7 device pnp ff.1 on end # dummy - register "backlight_enable" = "0x01" - register "dock_event_enable" = "0x01" + register "backlight_enable" = "true" + register "dock_event_enable" = "true" end
chip drivers/pc80/tpm diff --git a/src/mainboard/lenovo/t520/devicetree.cb b/src/mainboard/lenovo/t520/devicetree.cb index 7ef12ba2..3cb18b4 100644 --- a/src/mainboard/lenovo/t520/devicetree.cb +++ b/src/mainboard/lenovo/t520/devicetree.cb @@ -73,8 +73,8 @@ device ref lpc on #LPC bridge chip ec/lenovo/pmh7 device pnp ff.1 on end # dummy - register "backlight_enable" = "0x01" - register "dock_event_enable" = "0x01" + register "backlight_enable" = "true" + register "dock_event_enable" = "true" end
chip drivers/pc80/tpm diff --git a/src/mainboard/lenovo/t530/devicetree.cb b/src/mainboard/lenovo/t530/devicetree.cb index d47acda..becc357 100644 --- a/src/mainboard/lenovo/t530/devicetree.cb +++ b/src/mainboard/lenovo/t530/devicetree.cb @@ -78,8 +78,8 @@ device ref lpc on # PCI-LPC bridge chip ec/lenovo/pmh7 device pnp ff.1 on end # dummy - register "backlight_enable" = "0x01" - register "dock_event_enable" = "0x01" + register "backlight_enable" = "true" + register "dock_event_enable" = "true" end
chip drivers/pc80/tpm diff --git a/src/mainboard/lenovo/t60/devicetree.cb b/src/mainboard/lenovo/t60/devicetree.cb index f72b2e9..25782e97 100644 --- a/src/mainboard/lenovo/t60/devicetree.cb +++ b/src/mainboard/lenovo/t60/devicetree.cb @@ -109,8 +109,8 @@ subsystemid 0x17aa 0x2009 chip ec/lenovo/pmh7 device pnp ff.1 on end # dummy - register "backlight_enable" = "0x01" - register "dock_event_enable" = "0x01" + register "backlight_enable" = "true" + register "dock_event_enable" = "true" end chip ec/lenovo/h8 device pnp ff.2 on # dummy diff --git a/src/mainboard/lenovo/x1_carbon_gen1/devicetree.cb b/src/mainboard/lenovo/x1_carbon_gen1/devicetree.cb index 704a410..a423246 100644 --- a/src/mainboard/lenovo/x1_carbon_gen1/devicetree.cb +++ b/src/mainboard/lenovo/x1_carbon_gen1/devicetree.cb @@ -77,8 +77,8 @@ device ref lpc on #LPC bridge chip ec/lenovo/pmh7 device pnp ff.1 on end # dummy - register "backlight_enable" = "0x01" - register "dock_event_enable" = "0x01" + register "backlight_enable" = "true" + register "dock_event_enable" = "true" end
chip drivers/pc80/tpm diff --git a/src/mainboard/lenovo/x200/devicetree.cb b/src/mainboard/lenovo/x200/devicetree.cb index 6ddd090..7871cfd 100644 --- a/src/mainboard/lenovo/x200/devicetree.cb +++ b/src/mainboard/lenovo/x200/devicetree.cb @@ -110,7 +110,7 @@
chip ec/lenovo/pmh7 device pnp ff.1 on end # dummy - register "backlight_enable" = "0x01" + register "backlight_enable" = "true" end
chip ec/lenovo/h8 diff --git a/src/mainboard/lenovo/x200/variants/x200/overridetree.cb b/src/mainboard/lenovo/x200/variants/x200/overridetree.cb index 51beecc..cd69e2e 100644 --- a/src/mainboard/lenovo/x200/variants/x200/overridetree.cb +++ b/src/mainboard/lenovo/x200/variants/x200/overridetree.cb @@ -17,7 +17,7 @@ device pci 1f.0 on # LPC bridge chip ec/lenovo/pmh7 device pnp ff.1 on end # dummy - register "dock_event_enable" = "0x01" + register "dock_event_enable" = "true" end chip superio/nsc/pc87382 device pnp 164e.3 on # Digitizer diff --git a/src/mainboard/lenovo/x201/devicetree.cb b/src/mainboard/lenovo/x201/devicetree.cb index fc7c470..6c27f53 100644 --- a/src/mainboard/lenovo/x201/devicetree.cb +++ b/src/mainboard/lenovo/x201/devicetree.cb @@ -106,8 +106,8 @@
chip ec/lenovo/pmh7 device pnp ff.1 on end # dummy - register "backlight_enable" = "0x01" - register "dock_event_enable" = "0x01" + register "backlight_enable" = "true" + register "dock_event_enable" = "true" end
chip ec/lenovo/h8 diff --git a/src/mainboard/lenovo/x220/devicetree.cb b/src/mainboard/lenovo/x220/devicetree.cb index eb79baa..7a99599 100644 --- a/src/mainboard/lenovo/x220/devicetree.cb +++ b/src/mainboard/lenovo/x220/devicetree.cb @@ -78,8 +78,8 @@ device ref lpc on #LPC bridge chip ec/lenovo/pmh7 device pnp ff.1 on end # dummy - register "backlight_enable" = "0x01" - register "dock_event_enable" = "0x01" + register "backlight_enable" = "true" + register "dock_event_enable" = "true" end
chip drivers/pc80/tpm diff --git a/src/mainboard/lenovo/x230/devicetree.cb b/src/mainboard/lenovo/x230/devicetree.cb index 490f837..fdd5059 100644 --- a/src/mainboard/lenovo/x230/devicetree.cb +++ b/src/mainboard/lenovo/x230/devicetree.cb @@ -80,8 +80,8 @@ device ref lpc on #LPC bridge chip ec/lenovo/pmh7 device pnp ff.1 on end # dummy - register "backlight_enable" = "0x01" - register "dock_event_enable" = "0x01" + register "backlight_enable" = "true" + register "dock_event_enable" = "true" end
chip drivers/pc80/tpm diff --git a/src/mainboard/lenovo/x60/devicetree.cb b/src/mainboard/lenovo/x60/devicetree.cb index f63acf7..0e1e5fc 100644 --- a/src/mainboard/lenovo/x60/devicetree.cb +++ b/src/mainboard/lenovo/x60/devicetree.cb @@ -97,8 +97,8 @@ subsystemid 0x17aa 0x2009 chip ec/lenovo/pmh7 device pnp ff.1 on end # dummy - register "backlight_enable" = "0x01" - register "dock_event_enable" = "0x01" + register "backlight_enable" = "true" + register "dock_event_enable" = "true" end chip ec/lenovo/h8 device pnp ff.2 on # dummy diff --git a/util/autoport/ec_lenovo.go b/util/autoport/ec_lenovo.go index 9a02ac3..a34960f 100644 --- a/util/autoport/ec_lenovo.go +++ b/util/autoport/ec_lenovo.go @@ -155,8 +155,8 @@ pmh := DevTreeNode{ Chip: "ec/lenovo/pmh7", Registers: map[string]string{ - "backlight_enable": "0x01", - "dock_event_enable": "0x01", + "backlight_enable": "true", + "dock_event_enable": "true", }, Children: []DevTreeNode{ DevTreeNode{