Re: [PATCH v2 09/22] arm64: dts: qcom: pmk8350: allow overriding the label

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 02/04/2023 00:07, Dmitry Baryshkov wrote:
> sc8280xp-pmics.dtsi incorporates a copy of pmk8350, but the dts files
> use labels following the markings found in the schematics. Allow
> overriding the labels in pmk8350.dtsi.
> 
> Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@xxxxxxxxxx>
> ---
>  arch/arm64/boot/dts/qcom/pmic-dyn-footer.dtsi | 13 +++++++++
>  arch/arm64/boot/dts/qcom/pmic-dyn-header.dtsi | 14 ++++++++++
>  arch/arm64/boot/dts/qcom/pmk8350.dtsi         | 28 +++++++++++--------
>  3 files changed, 44 insertions(+), 11 deletions(-)
>  create mode 100644 arch/arm64/boot/dts/qcom/pmic-dyn-footer.dtsi
>  create mode 100644 arch/arm64/boot/dts/qcom/pmic-dyn-header.dtsi
> 
> diff --git a/arch/arm64/boot/dts/qcom/pmic-dyn-footer.dtsi b/arch/arm64/boot/dts/qcom/pmic-dyn-footer.dtsi
> new file mode 100644
> index 000000000000..1c81269f0783
> --- /dev/null
> +++ b/arch/arm64/boot/dts/qcom/pmic-dyn-footer.dtsi
> @@ -0,0 +1,13 @@
> +// SPDX-License-Identifier: BSD-3-Clause
> +/*
> + * Copyright (c) 2023, Linaro Limited
> + */
> +
> +/* cleanly revert the effects pmic-dyn-header.dtsi */
> +
> +#undef LABEL
> +#undef _LABEL
> +#undef __LABEL

That makes the code less readable.

> +
> +#undef PMIC_SID
> +#undef PMIC_LABEL

And it keeps growing and confusing.

> diff --git a/arch/arm64/boot/dts/qcom/pmic-dyn-header.dtsi b/arch/arm64/boot/dts/qcom/pmic-dyn-header.dtsi
> new file mode 100644
> index 000000000000..75f0448568bd
> --- /dev/null
> +++ b/arch/arm64/boot/dts/qcom/pmic-dyn-header.dtsi
> @@ -0,0 +1,14 @@
> +// SPDX-License-Identifier: BSD-3-Clause
> +/*
> + * Copyright (c) 2023, Linaro Limited
> + */
> +
> +/*
> + * Preprocessor symbols to assist in describing PMICs which have configurable
> + * SID. All effects of this header (or its parameters) must be reverted in
> + * pmic-dyn-footer.dtsi.
> + */
> +
> +#define LABEL(name) _LABEL(PMIC_LABEL, name)
> +#define _LABEL(pmic, name) __LABEL(pmic, name)
> +#define __LABEL(pmic, name) pmic ## _ ## name

No, defines in DTS should be simple. This makes it ungrepable.



Best regards,
Krzysztof




[Index of Archives]     [Device Tree Compilter]     [Device Tree Spec]     [Linux Driver Backports]     [Video for Linux]     [Linux USB Devel]     [Linux PCI Devel]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [XFree86]     [Yosemite Backpacking]


  Powered by Linux