From patchwork Sat Apr 1 22:07:56 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Dmitry Baryshkov X-Patchwork-Id: 669648 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id E85B3C77B76 for ; Sat, 1 Apr 2023 22:08:25 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230249AbjDAWIY (ORCPT ); Sat, 1 Apr 2023 18:08:24 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:40816 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230229AbjDAWIU (ORCPT ); Sat, 1 Apr 2023 18:08:20 -0400 Received: from mail-lj1-x231.google.com (mail-lj1-x231.google.com [IPv6:2a00:1450:4864:20::231]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 868FB2659A for ; Sat, 1 Apr 2023 15:08:18 -0700 (PDT) Received: by mail-lj1-x231.google.com with SMTP id x20so26622966ljq.9 for ; Sat, 01 Apr 2023 15:08:18 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1680386896; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=dbYMjr8axBk3951HCSojoBjEFzExGGWWF+tXKuXtXzw=; b=rByn2aOlbs4CijcEPk7eFC1228R7hF2TZ22PmjQlvQRWcukEy4FoPbjCOAO0tdSnBV 0FroMWOe9kcKSqzHDnl3IInbCZNv9hQeP+XSqdnUr66L9M3bujkpmWz37RQHYULjdlOs 7oNP6J5SAG8WPuD+xFGcKQOT0kVwuXZHcKLv5VMpusHkouOWK5mnGj0Cb5vvcbAcATgD DlldJ3iO+UzIPJ3VfuRFwZod4Iwt0+DDSi1/VnLzSJQwUQ6GlemqxqH+pX3eDI4Bj1LY kLTEHvvRlA0zEu02E/rZVOQ0m+3OUYfRwdyyHzfGGdJilktdtSHoweM4OBzFBdqqUs3D WpJw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; t=1680386896; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=dbYMjr8axBk3951HCSojoBjEFzExGGWWF+tXKuXtXzw=; b=Rte3aUgK6+4Bd9fdha8nGbnFbCCwVqKutGym9gk01jtMCnfc4X3LJrcyl7B7Y3jG8h ncKI5VqHN4s1WExhXxpmaePf1gJLa+VNQeURDvGbSMco4SiZxq8enR34DyInLV7NuHJW jWPEGKQ1jh27LGxNb4gbP9FSwpxofEBPBJBuEFyS0tAwouxlVk/9v3E4TgLDcp/Z7Igm 38Ttuk1c3W5GFI5hbIS+lK+ZwYp1MpXwHYeFqA/DfJLv+Y8/+l329wTRpDquMpqSaedV 2It/kFRuc1AAcMGw1HGfPcv1rC17c1ldQgqZc7VFqe1ljYEi39mteLOECCsu+FJZbDUO UymA== X-Gm-Message-State: AAQBX9cg+o3qomDsPrmPMygjked1Tg8Hj40UPGq/fsJnARMW1ljVFrR5 DlmLwt3gy8xQRDKcLkaJ7TORiQ== X-Google-Smtp-Source: AKy350acBpKROXD/B0ZV4u66ffLJMowqKcRArGgeLknsFWg1GCMr+JKspSwRwwMRd52TO4gwGxQavw== X-Received: by 2002:a2e:8543:0:b0:298:aa76:2fb8 with SMTP id u3-20020a2e8543000000b00298aa762fb8mr9700370ljj.12.1680386896681; Sat, 01 Apr 2023 15:08:16 -0700 (PDT) Received: from umbar.unikie.fi ([192.130.178.91]) by smtp.gmail.com with ESMTPSA id k17-20020a2e9211000000b0029bd4d0d3f2sm997590ljg.33.2023.04.01.15.08.16 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 01 Apr 2023 15:08:16 -0700 (PDT) From: Dmitry Baryshkov To: Andy Gross , Bjorn Andersson , Konrad Dybcio , Rob Herring , Krzysztof Kozlowski Cc: linux-arm-msm@vger.kernel.org, devicetree@vger.kernel.org, Johan Hovold , Jonathan Cameron , Lars-Peter Clausen , linux-iio@vger.kernel.org Subject: [PATCH v2 08/22] arm64: dts: qcom: pmk8350: rename PMK8350_SID to PMIC_SID Date: Sun, 2 Apr 2023 01:07:56 +0300 Message-Id: <20230401220810.3563708-9-dmitry.baryshkov@linaro.org> X-Mailer: git-send-email 2.30.2 In-Reply-To: <20230401220810.3563708-1-dmitry.baryshkov@linaro.org> References: <20230401220810.3563708-1-dmitry.baryshkov@linaro.org> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: linux-arm-msm@vger.kernel.org Several next patches are going to introduce flexibility into several other PMICs in order to support variable SID and node labels. This will result in close duplication of several similar preprocessor constructions. Having a per-PMIC defines would be error prone and can result in hard-to-notices mistakes. Thus rename PMK8350_SID to a generic PMIC_SID. Signed-off-by: Dmitry Baryshkov Reviewed-by: Konrad Dybcio --- arch/arm64/boot/dts/qcom/pmk8350.dtsi | 20 ++++++++++--------- .../qcom/sm6375-sony-xperia-murray-pdx225.dts | 7 ++++--- .../boot/dts/qcom/sm7225-fairphone-fp4.dts | 6 +++--- 3 files changed, 18 insertions(+), 15 deletions(-) diff --git a/arch/arm64/boot/dts/qcom/pmk8350.dtsi b/arch/arm64/boot/dts/qcom/pmk8350.dtsi index 26e40dbfc173..02e7518ab57b 100644 --- a/arch/arm64/boot/dts/qcom/pmk8350.dtsi +++ b/arch/arm64/boot/dts/qcom/pmk8350.dtsi @@ -9,14 +9,14 @@ #include /* (Sadly) this PMIC can be configured to be at different SIDs */ -#ifndef PMK8350_SID - #define PMK8350_SID 0 +#ifndef PMIC_SID + #define PMIC_SID 0 #endif &spmi_bus { - pmk8350: pmic@PMK8350_SID { + pmk8350: pmic@PMIC_SID { compatible = "qcom,pmk8350", "qcom,spmi-pmic"; - reg = ; + reg = ; #address-cells = <1>; #size-cells = <0>; @@ -27,14 +27,14 @@ pmk8350_pon: pon@1300 { pmk8350_pon_pwrkey: pwrkey { compatible = "qcom,pmk8350-pwrkey"; - interrupts = ; + interrupts = ; linux,code = ; status = "disabled"; }; pmk8350_pon_resin: resin { compatible = "qcom,pmk8350-resin"; - interrupts = ; + interrupts = ; status = "disabled"; }; }; @@ -44,14 +44,14 @@ pmk8350_vadc: adc@3100 { reg = <0x3100>; #address-cells = <1>; #size-cells = <0>; - interrupts = ; + interrupts = ; #io-channel-cells = <1>; }; pmk8350_adc_tm: adc-tm@3400 { compatible = "qcom,adc-tm7"; reg = <0x3400>; - interrupts = ; + interrupts = ; #address-cells = <1>; #size-cells = <0>; #thermal-sensor-cells = <1>; @@ -62,7 +62,7 @@ pmk8350_rtc: rtc@6100 { compatible = "qcom,pmk8350-rtc"; reg = <0x6100>, <0x6200>; reg-names = "rtc", "alarm"; - interrupts = ; + interrupts = ; status = "disabled"; }; @@ -86,3 +86,5 @@ pmk8350_gpios: gpio@b000 { }; }; }; + +#undef PMIC_SID diff --git a/arch/arm64/boot/dts/qcom/sm6375-sony-xperia-murray-pdx225.dts b/arch/arm64/boot/dts/qcom/sm6375-sony-xperia-murray-pdx225.dts index b691c3834b6b..863fc1f4b0b6 100644 --- a/arch/arm64/boot/dts/qcom/sm6375-sony-xperia-murray-pdx225.dts +++ b/arch/arm64/boot/dts/qcom/sm6375-sony-xperia-murray-pdx225.dts @@ -5,13 +5,14 @@ /dts-v1/; -/* PMK8350 is configured to use SID6 instead of 0 */ -#define PMK8350_SID 6 - #include #include "sm6375.dtsi" #include "pm6125.dtsi" + +/* PMK8350 is configured to use SID6 instead of 0 */ +#define PMIC_SID 6 #include "pmk8350.dtsi" + #include "pmr735a.dtsi" /* PM6125 PON is used and we can't have duplicate labels */ diff --git a/arch/arm64/boot/dts/qcom/sm7225-fairphone-fp4.dts b/arch/arm64/boot/dts/qcom/sm7225-fairphone-fp4.dts index af6cf4fbddc7..965b37245007 100644 --- a/arch/arm64/boot/dts/qcom/sm7225-fairphone-fp4.dts +++ b/arch/arm64/boot/dts/qcom/sm7225-fairphone-fp4.dts @@ -5,9 +5,6 @@ /dts-v1/; -/* PMK8350 (in reality a PMK8003) is configured to use SID6 instead of 0 */ -#define PMK8350_SID 6 - #include #include #include @@ -18,6 +15,9 @@ #include "pm6150l.dtsi" #include "pm6350.dtsi" #include "pm7250b.dtsi" + +/* PMK8350 (in reality a PMK8003) is configured to use SID6 instead of 0 */ +#define PMIC_SID 6 #include "pmk8350.dtsi" / {