mirror of
https://github.com/torvalds/linux.git
synced 2026-09-24 06:24:02 +02:00
dt-bindings: samsung: exynos-pmu: Narrow allowed reboot modes
syscon-reboot-mode schema allows arbitrary "mode-.* properties but only a subset actually makes sense and is valid. Provide negative look-ahead pattern to disallow any modes not supported by the device, which tightens the binding. Most of Android-based Exynos devices share the bootloader or its parts, thus reboot modes are most likely the same, however only a few upstream DTS define them, so add restrictions only for these. Google GS101 has on the other hand quite different bootloader with many known reboot modes. Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@oss.qualcomm.com> Reviewed-by: Peter Griffin <peter.griffin@linaro.org> Acked-by: Rob Herring (Arm) <robh@kernel.org> Link: https://patch.msgid.link/20260701105731.196618-4-krzysztof.kozlowski@oss.qualcomm.com Signed-off-by: Krzysztof Kozlowski <krzk@kernel.org>
This commit is contained in:
parent
3527091de0
commit
e131ca83da
|
|
@ -176,6 +176,20 @@ allOf:
|
|||
properties:
|
||||
dp-phy: false
|
||||
|
||||
- if:
|
||||
properties:
|
||||
compatible:
|
||||
contains:
|
||||
enum:
|
||||
- samsung,exynos7-pmu
|
||||
then:
|
||||
properties:
|
||||
reboot-mode:
|
||||
patternProperties:
|
||||
# Negative look-ahead to disallow unsupported modes. The '$' has to be
|
||||
# part of lookahead group to work, instead of trailing outside of ().
|
||||
"^mode-(?!(bootloader$|download$|fastboot$|recovery$))": false
|
||||
|
||||
- if:
|
||||
properties:
|
||||
compatible:
|
||||
|
|
@ -183,6 +197,13 @@ allOf:
|
|||
enum:
|
||||
- google,gs101-pmu
|
||||
then:
|
||||
properties:
|
||||
reboot-mode:
|
||||
patternProperties:
|
||||
# Negative look-ahead to disallow unsupported modes. The '$' has to be
|
||||
# part of lookahead group to work, instead of trailing outside of ().
|
||||
"^mode-(?!(bootloader$|charge$|dm-verity-device-corrupted$|fastboot$|reboot-ab-update$|recovery$)|rescue$|shutdown-thermal$|shutdown-thermal-battery$)": false
|
||||
|
||||
required:
|
||||
- google,pmu-intr-gen-syscon
|
||||
else:
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user