From patchwork Mon May 1 23:17:35 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Marijn Suijten X-Patchwork-Id: 89204 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:b0ea:0:b0:3b6:4342:cba0 with SMTP id b10csp239448vqo; Mon, 1 May 2023 16:30:51 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ7BmUnP6vQmn/2Khv82QeBma8vyE8NhEPgOTGDvxyPN2rS4F8Ll6+3C212STzXXu++J8xMP X-Received: by 2002:a05:6a00:1ace:b0:5e0:a86:a76f with SMTP id f14-20020a056a001ace00b005e00a86a76fmr19973079pfv.0.1682983851466; Mon, 01 May 2023 16:30:51 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1682983851; cv=none; d=google.com; s=arc-20160816; b=fErKkHyDsB5MY8az6ilYLAv5Sc+6F6WvWZkJ6JXdeskjlzjEFmPXDOBm1Fac4Vh3yZ p0PeK3o2/y4u76ZA4uBmugsYYi9EySb6/Io/SSAr8KY6hN8ATgrs9N8+Y4Zo6fdVgKE+ gAtCBGE3TN+QwcMPQIrZ7IVsUIKdycKJCeHkvInWnlVVD/LcU0LVLpVTknxQifelNJW5 5RKPO5DIQklngSJT7YsddW1Cbc9N9RlyJEkaxdCKffwkyYVLWBaMoTsyB6XG65XjlJXA nX4XZVlzRx8KpKjuXzPr/JCgngtOFUuBwDCX5P4vgnUi5Xl8a+OPUerixO25PcjMF+EB apog== 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 :references:in-reply-to:message-id:date:subject:cc:to:from; bh=9+Nk9Afe1THb/BLl5kQ2auXObtE6Trc54RgaMX+09S0=; b=dxQmjqbNoS2PwtuzX1EnG06sFyMLx1I4jMhD60Gm0sPcC0B0ho8xcYo4GDsnvrADEf 4Os8OFR0nbFEWVc8piR1fpL+BkBe8plh1Xt9NGDl3Uq9mdcrHNDnW0A5t6NYLEdoi7R3 6yRC/GE9m3H3Ad87+OK7yIXjDaShLjFbirWmDeR+gJq4Jd42C/8Sw4ZcKfC82JD46nTo F0IZJPBsIhZK7kX229kinUGsMGovtfnO4P766cy/6TRj13BW/a7SUMvGKqpr+wCdsddZ VoEpQYHR+KXyf/ZPbcS3i/swE1u/8j/S4sMZcAfrBQPZowGFGvvhwasxP2xdcjxLw++Y b6uw== ARC-Authentication-Results: i=1; mx.google.com; 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 Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id d1-20020aa797a1000000b00639b0f72b5esi29366572pfq.55.2023.05.01.16.30.34; Mon, 01 May 2023 16:30:51 -0700 (PDT) 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; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232267AbjEAXS2 (ORCPT + 99 others); Mon, 1 May 2023 19:18:28 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:49876 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229754AbjEAXSU (ORCPT ); Mon, 1 May 2023 19:18:20 -0400 Received: from relay05.th.seeweb.it (relay05.th.seeweb.it [IPv6:2001:4b7a:2000:18::166]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 2FF903A86; Mon, 1 May 2023 16:18:17 -0700 (PDT) Received: from localhost.localdomain (94-211-6-86.cable.dynamic.v4.ziggo.nl [94.211.6.86]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by m-r2.th.seeweb.it (Postfix) with ESMTPSA id 36F1B40E59; Tue, 2 May 2023 01:18:15 +0200 (CEST) From: Marijn Suijten To: phone-devel@vger.kernel.org, ~postmarketos/upstreaming@lists.sr.ht, AngeloGioacchino Del Regno , Konrad Dybcio , Martin Botka , Jami Kettunen , Jonathan Cameron , Lars-Peter Clausen , Andy Gross , Bjorn Andersson Cc: Marijn Suijten , linux-iio@vger.kernel.org, linux-kernel@vger.kernel.org, linux-arm-msm@vger.kernel.org Subject: [PATCH RESEND v3 3/5] iio: adc: qcom-spmi-adc5: Fall back to datasheet_name instead of fwnode name Date: Tue, 2 May 2023 01:17:35 +0200 Message-Id: <20230502-iio-adc-propagate-fw-node-label-v3-3-6be5db6e6b5a@somainline.org> X-Mailer: git-send-email 2.40.1 In-Reply-To: <20230502-iio-adc-propagate-fw-node-label-v3-0-6be5db6e6b5a@somainline.org> References: <20230502-iio-adc-propagate-fw-node-label-v3-0-6be5db6e6b5a@somainline.org> MIME-Version: 1.0 X-Mailer: b4 0.12.2 X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,SPF_HELO_NONE, SPF_PASS,T_SCC_BODY_TEXT_LINE 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?1764736474572758817?= X-GMAIL-MSGID: =?utf-8?q?1764736474572758817?= Since the migration to fwnode_get_name in commit 4f47a236a23d ("iio: adc: qcom-spmi-adc5: convert to device properties") the resulting adc5_channel_prop::channel_name (renamed from datasheet_name in the previous patch) - which is propagated into iio_chan_spec::extend_name - was containing the DT node name including @xx suffix if a "label" property is not present, while adc5_channels::datasheet_name was thus far set by the macros but always remained unread. Put it to use instead of using a confusing name containing @xx in sysfs filenames (again, when "label" is not set). Signed-off-by: Marijn Suijten Reviewed-by: Dmitry Baryshkov --- drivers/iio/adc/qcom-spmi-adc5.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/iio/adc/qcom-spmi-adc5.c b/drivers/iio/adc/qcom-spmi-adc5.c index 6e4e5cb5cbbb7..fe2000209d97d 100644 --- a/drivers/iio/adc/qcom-spmi-adc5.c +++ b/drivers/iio/adc/qcom-spmi-adc5.c @@ -669,7 +669,7 @@ static int adc5_get_fw_channel_data(struct adc5_chip *adc, ret = fwnode_property_read_string(fwnode, "label", &channel_name); if (ret) - channel_name = name; + channel_name = data->adc_chans[chan].datasheet_name; prop->channel_name = channel_name;