From patchwork Sat Feb 11 05:24:15 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Manivannan Sadhasivam X-Patchwork-Id: 55697 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:adf:eb09:0:0:0:0:0 with SMTP id s9csp1350744wrn; Fri, 10 Feb 2023 21:51:36 -0800 (PST) X-Google-Smtp-Source: AK7set9m8OKQCbECv+oJp8/Ctdf4w8j9SszqhE09tbeBuGQYYPxbAEofBoYEAeBNwRyPVIKw/J46 X-Received: by 2002:a62:5c5:0:b0:5a8:68c0:5607 with SMTP id 188-20020a6205c5000000b005a868c05607mr4705757pff.21.1676094695546; Fri, 10 Feb 2023 21:51:35 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1676094695; cv=none; d=google.com; s=arc-20160816; b=SohdDvBAUKgrn7E7EWBYjmVngdkzmSpJjZuBYN9COWaenjUFvLIReJQ8S0l+gP7bQY VLvyIIjvSOsCapeB7aOy6cIy4MOC+hTIzqEnUvhsPNp5OPNToK4Bxw0OUBw77m9P1ZuJ Z5zdboit8qf5D21/U0DSpGJTRd6xS+x8laZ9xvS6aO4dl0Bdxwfv7jl63oDbyHzgesSx 9CSH5J6svRCNOe/TqFIFkbGcUyP6oXCyafe4UakviAbnLQ+4E+y8l0LBErBV8SxMrm5b Q2QKDTCmaOX5D/zW3cCmSIW03MvBCwh0jjZ2HKxkoSE8+49tXH4RahTyaSGqmouo/lkO KzVA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :message-id:date:subject:cc:to:from:dkim-signature; bh=CzSfqwwM+Nah9broXqJeSo06TrNgs30sEAwsq9T6Ez4=; b=T/M1LQsjpWnupN2tj01N9yGTvc3Z84s7w5LUEdlegxk13iIwwimM1QJ2FcJkml6ffN IL4QFt01j+vDGEvW34DDkM9ge60MbV/+ZpkSkHb4J0mFoyiGXWK40UADScD7tupQbYoB JSYxy2ktu6y6B+A486a6zNtsgyEUOD/qUca/ufGw0JD4/WLxrztD58+cxlXeN/tdss+L FE1NegbhfM+PQZfph4UQ1YjfupXZDGopWvvYIb4BOttgBTwBqWRXA2V6yGnRWExChAGb eI3q/88gJcEWms2kRV4dPNbOsP7N+u/AOADCfIbGMWZcWVbMWdUM5TJZAaWwybNqArcR inxg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=fiw5YEIX; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id f17-20020aa79d91000000b0059072f087b7si6148930pfq.135.2023.02.10.21.51.23; Fri, 10 Feb 2023 21:51:35 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=fiw5YEIX; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229455AbjBKFYa (ORCPT + 99 others); Sat, 11 Feb 2023 00:24:30 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:50746 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229447AbjBKFY3 (ORCPT ); Sat, 11 Feb 2023 00:24:29 -0500 Received: from mail-pl1-x62a.google.com (mail-pl1-x62a.google.com [IPv6:2607:f8b0:4864:20::62a]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id C349E37730 for ; Fri, 10 Feb 2023 21:24:27 -0800 (PST) Received: by mail-pl1-x62a.google.com with SMTP id b5so8764009plz.5 for ; Fri, 10 Feb 2023 21:24:27 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:from:to:cc:subject:date:message-id:reply-to; bh=CzSfqwwM+Nah9broXqJeSo06TrNgs30sEAwsq9T6Ez4=; b=fiw5YEIXybyGAdTiFw90k2VmjeFujbCh36+QCF98rvho32fQxoawaeXsEbRkiKjOg8 I8JynICiTA2Mz7Nj7khlBAr/ouE1dY+ZjgdZ5NjFtRT2xL1VDE6qeDchpfn8A5cSrEbl wCDtzbi2QKHKlrNwh/oVtRjuOO8hTFnOkYcXeBa9RjsIPIzOQFcKN4NKhul+j0Y8jDjM VvSqXJTPFtrvJHuMqnNuw5fdp2SE0irdiXzxcRQJTW3aO78Hv3m0AORgOx1ain4dMYkw e+Fn28jMTlS/PFUKWSGcb8/W3B5xb01Y57lYfePTZbRDjOMuAeaScd1KtZbbLjNQM0j4 emAQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=CzSfqwwM+Nah9broXqJeSo06TrNgs30sEAwsq9T6Ez4=; b=NjEW+IiRx/HWRIr/Hbzy0+uypanWVx9dLRXbj1pZkT9yx0abA69N2vbWpsWgSuqId1 Bp0xbINjZj3wDD31+r6IKnexI52Wnbv875lmteEMD6k8qJqALiM5wl5jgLfMkIT2YPlQ 1IaRBaSYQ6OpB6cZ3oXv3TNWXKVX1V4sSfx+P75qosk+jyeaI2YTtxYr3LKsxLQyGYBa uO3qjyEzz6edVbRoxEZCeWu2TAN3SV6Io0do09b5Rzh5my9aqIiU2nMXqygd3hyhqF+G Idva89ynD0Bg6T7ANwo9UrNZVSEoGsUW0mS4Agtk1qqZeU44UOtRMQzbc2kT3eubFzow ZVsQ== X-Gm-Message-State: AO0yUKX8WLd6BW4BuWeFUASntb6abrmuztj5qo0qBBEOnEWqAarGOvgm iDDl6kSS8AHIsRIz9hh7uiIb X-Received: by 2002:a17:902:e88e:b0:196:7c6d:2aee with SMTP id w14-20020a170902e88e00b001967c6d2aeemr21407701plg.11.1676093067146; Fri, 10 Feb 2023 21:24:27 -0800 (PST) Received: from localhost.localdomain ([117.248.0.82]) by smtp.gmail.com with ESMTPSA id r3-20020a170902be0300b001962858f990sm4169261pls.164.2023.02.10.21.24.23 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 10 Feb 2023 21:24:26 -0800 (PST) From: Manivannan Sadhasivam To: andersson@kernel.org, robh+dt@kernel.org, krzysztof.kozlowski+dt@linaro.org Cc: konrad.dybcio@linaro.org, linux-arm-msm@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, Manivannan Sadhasivam , Steev Klimaszewski Subject: [PATCH] arm64: dts: qcom: sc8280xp: Add label property to vadc channel nodes Date: Sat, 11 Feb 2023 10:54:15 +0530 Message-Id: <20230211052415.14581-1-manivannan.sadhasivam@linaro.org> X-Mailer: git-send-email 2.25.1 MIME-Version: 1.0 X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_NONE, SPF_HELO_NONE,SPF_PASS autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1757512671456838152?= X-GMAIL-MSGID: =?utf-8?q?1757512671456838152?= For uniquely identifying the vadc channels, label property has to be used. The initial commit adding vadc support assumed that the driver will use the unit address along with the node name to identify the channels. But this assumption is now broken by, commit 701c875aded8 ("iio: adc: qcom-spmi-adc5: Fix the channel name") that stripped unit address from channel names. This results in probe failure of the vadc driver: [ 8.380370] iio iio:device0: tried to double register : in_temp_pmic-die-temp_input [ 8.380383] qcom-spmi-adc5 c440000.spmi:pmic@0:adc@3100: Failed to register sysfs interfaces [ 8.380386] qcom-spmi-adc5: probe of c440000.spmi:pmic@0:adc@3100 failed with error -16 Hence, let's get rid of the assumption about drivers and rely on label property to uniquely identify the channels. The labels are derived from the schematics for each PMIC. For internal adc channels such as die and xo, the PMIC names are used as a prefix. Fixes: 7c0151347401 ("arm64: dts: qcom: sc8280xp-x13s: Add PM8280_{1/2} ADC_TM5 channels") Fixes: 9d41cd17394a ("arm64: dts: qcom: sc8280xp-x13s: Add PMR735A VADC channel") Fixes: 3375151a7185 ("arm64: dts: qcom: sc8280xp-x13s: Add PM8280_{1/2} VADC channels") Fixes: 9a6b3042c533 ("arm64: dts: qcom: sc8280xp-x13s: Add PMK8280 VADC channels") Reported-by: Steev Klimaszewski Signed-off-by: Manivannan Sadhasivam --- .../boot/dts/qcom/sc8280xp-lenovo-thinkpad-x13s.dts | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/arch/arm64/boot/dts/qcom/sc8280xp-lenovo-thinkpad-x13s.dts b/arch/arm64/boot/dts/qcom/sc8280xp-lenovo-thinkpad-x13s.dts index 654b6b310bc9..0fc0cffbeed8 100644 --- a/arch/arm64/boot/dts/qcom/sc8280xp-lenovo-thinkpad-x13s.dts +++ b/arch/arm64/boot/dts/qcom/sc8280xp-lenovo-thinkpad-x13s.dts @@ -636,75 +636,88 @@ &pmk8280_vadc { pmic-die-temp@3 { reg = ; qcom,pre-scaling = <1 1>; + label = "pmk8350_die_temp"; }; xo-therm@44 { reg = ; qcom,hw-settle-time = <200>; qcom,ratiometric; + label = "pmk8350_xo_therm"; }; pmic-die-temp@103 { reg = ; qcom,pre-scaling = <1 1>; + label = "pmc8280_1_die_temp"; }; sys-therm@144 { reg = ; qcom,hw-settle-time = <200>; qcom,ratiometric; + label = "sys_therm1"; }; sys-therm@145 { reg = ; qcom,hw-settle-time = <200>; qcom,ratiometric; + label = "sys_therm2"; }; sys-therm@146 { reg = ; qcom,hw-settle-time = <200>; qcom,ratiometric; + label = "sys_therm3"; }; sys-therm@147 { reg = ; qcom,hw-settle-time = <200>; qcom,ratiometric; + label = "sys_therm4"; }; pmic-die-temp@303 { reg = ; qcom,pre-scaling = <1 1>; + label = "pmc8280_2_die_temp"; }; sys-therm@344 { reg = ; qcom,hw-settle-time = <200>; qcom,ratiometric; + label = "sys_therm5"; }; sys-therm@345 { reg = ; qcom,hw-settle-time = <200>; qcom,ratiometric; + label = "sys_therm6"; }; sys-therm@346 { reg = ; qcom,hw-settle-time = <200>; qcom,ratiometric; + label = "sys_therm7"; }; sys-therm@347 { reg = ; qcom,hw-settle-time = <200>; qcom,ratiometric; + label = "sys_therm8"; }; pmic-die-temp@403 { reg = ; qcom,pre-scaling = <1 1>; + label = "pmr735a_die_temp"; }; };