From patchwork Mon Jan 16 22:09:04 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Marijn Suijten X-Patchwork-Id: 13103763 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 01F5AC67871 for ; Mon, 16 Jan 2023 22:10:39 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S235079AbjAPWKg (ORCPT ); Mon, 16 Jan 2023 17:10:36 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:49154 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S235036AbjAPWKH (ORCPT ); Mon, 16 Jan 2023 17:10:07 -0500 X-Greylist: delayed 3072 seconds by postgrey-1.37 at lindbergh.monkeyblade.net; Mon, 16 Jan 2023 14:10:01 PST Received: from relay08.th.seeweb.it (relay08.th.seeweb.it [IPv6:2001:4b7a:2000:18::169]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 10D6A2A15C for ; Mon, 16 Jan 2023 14:10:01 -0800 (PST) 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 1EF3D3F251; Mon, 16 Jan 2023 23:09:58 +0100 (CET) From: Marijn Suijten To: phone-devel@vger.kernel.org, Andy Gross , Bjorn Andersson , Jonathan Cameron Cc: ~postmarketos/upstreaming@lists.sr.ht, AngeloGioacchino Del Regno , Konrad Dybcio , Martin Botka , Jami Kettunen , Marijn Suijten , Lars-Peter Clausen , linux-arm-msm@vger.kernel.org, linux-iio@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [RFC PATCH v2 0/5] iio: adc: qcom-spmi-vadc: Propagate fw node label to userspace Date: Mon, 16 Jan 2023 23:09:04 +0100 Message-Id: <20230116220909.196926-1-marijn.suijten@somainline.org> X-Mailer: git-send-email 2.39.0 MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: linux-iio@vger.kernel.org Implement read_label in qcom-spmi-vadc to see DT-specified label names in userspace. At the same time clear up some documentation around extend_name to promote read_label, and normalize similar code in qcom-spmi-adc5. Changes since v1: - qcom-spmi-vadc: Use read_label instead of extend_name; New since v1: - core: Point users of extend_name field to read_label callback - qcom-spmi-adc5: Use datasheet_name string literal for iio_chan_spec::datasheet_name; - qcom-spmi-adc5: Fall back to datasheet_name instead of fwnode_get_name() for iio_chan_spec::extend_name (gets rid of @xx in sysfs filenames and labels); - qcom-spmi-adc5: Remove unnecessary datasheet_name NULL check. v1: https://lore.kernel.org/linux-arm-msm/20221106193018.270106-1-marijn.suijten@somainline.org/ Marijn Suijten (5): iio: core: Point users of extend_name field to read_label callback iio: adc: qcom-spmi-adc5: Use driver datasheet_name instead of DT label iio: adc: qcom-spmi-adc5: Fall back to datasheet_name instead of fwnode name iio: adc: qcom-spmi-adc5: Remove unnecessary datasheet_name NULL check iio: adc: qcom-spmi-vadc: Propagate fw node label to userspace drivers/iio/adc/qcom-spmi-adc5.c | 15 +++++++-------- drivers/iio/adc/qcom-spmi-vadc.c | 19 ++++++++++++++++++- include/linux/iio/iio.h | 3 +++ 3 files changed, 28 insertions(+), 9 deletions(-) --- 2.39.0