Received: by 2002:a05:7412:d1aa:b0:fc:a2b0:25d7 with SMTP id ba42csp960014rdb; Tue, 30 Jan 2024 04:06:15 -0800 (PST) X-Google-Smtp-Source: AGHT+IHJd76a+yRJEtPJZ3N92KrkIJt2jmyC1mLyJxdd7OZ1gH8I0ejDR/JKBLJFn+DFTbWiREqw X-Received: by 2002:a17:906:684c:b0:a35:a4ca:111b with SMTP id a12-20020a170906684c00b00a35a4ca111bmr4346244ejs.33.1706616374902; Tue, 30 Jan 2024 04:06:14 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1706616374; cv=pass; d=google.com; s=arc-20160816; b=JzJl0rezgdEJw4lEY+CCf6lUATBmUK1zxwhgwb7YbLkx7G5hozLADavdB7krGBUFNn Ivl81tvlYBySsW2v3zfyunetYfVaOLZCetkjxEMqTW7VqecS9hvD1603PXMTSyblhHbn MWkXOcO7xwBUBoFJyQ7rHaxYzD2x/ciG9stUEvwjcbAhT8lwe1tCpG4RtRc03OiY1c6e wtzqSv3w7jN3ToVO81qFubmdSB07h3uIFZYrPhvq0LtXXAqec9yHtwN7iu3+R0BUYJZr vgRUGWMow0gwaXO0vcjMAiYB03DlcC5kfCZMlw05mqJUmO1++I6zN9FEac2cHl/s3Kdl T5cA== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:message-id:date:subject:cc:to :from:dkim-signature; bh=3UEGIekdyazfqo3T299WapeO9DNQtaZe4LTOdPjlFiU=; fh=IEjZ9w17WZpRC98xB7qDyUMQqzvac4vOEVeuv6ejdCI=; b=ob6+Fm26Qvb9lGvKUEq58riLB93qXoTN/g7EiM5SS7IuLFXtNjFAuYTNaG2IapGLAr o9zunXBHR7UpbYhdiu6929xfSPKZ4eUhD2MXFvB4yeFGkBkdvMFNNrWxX99v/bqBDbjY Kxj55RwVC0lxuyl9M33GITg2CT5Hq3emP5lgfksfj8ZxeRql1MJZRyQt9N/TL8x68IY2 PYflJoejsY0scun/w3uALFjAUbf7rRQk8UigceMozf3IDVOc3yU95ikIuPZr+ewDE0vf 6e9VVMTXZYi4ORfXFqczi5WGnauevfFyxORu8/s85mJFEP7USeSiRzkPglT93hx298B3 HNWQ== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@9elements.com header.s=google header.b=Ro76OJuV; arc=pass (i=1 spf=pass spfdomain=9elements.com dkim=pass dkdomain=9elements.com dmarc=pass fromdomain=9elements.com); spf=pass (google.com: domain of linux-kernel+bounces-44560-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) smtp.mailfrom="linux-kernel+bounces-44560-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=9elements.com Return-Path: Received: from am.mirrors.kernel.org (am.mirrors.kernel.org. [147.75.80.249]) by mx.google.com with ESMTPS id a2-20020a170906368200b00a356a7554e0si2805548ejc.559.2024.01.30.04.06.14 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 30 Jan 2024 04:06:14 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-44560-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) client-ip=147.75.80.249; Authentication-Results: mx.google.com; dkim=pass header.i=@9elements.com header.s=google header.b=Ro76OJuV; arc=pass (i=1 spf=pass spfdomain=9elements.com dkim=pass dkdomain=9elements.com dmarc=pass fromdomain=9elements.com); spf=pass (google.com: domain of linux-kernel+bounces-44560-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) smtp.mailfrom="linux-kernel+bounces-44560-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=9elements.com Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by am.mirrors.kernel.org (Postfix) with ESMTPS id A23701F2DA7B for ; Tue, 30 Jan 2024 11:57:14 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id ADA92679FB; Tue, 30 Jan 2024 11:57:01 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=9elements.com header.i=@9elements.com header.b="Ro76OJuV" Received: from mail-ej1-f54.google.com (mail-ej1-f54.google.com [209.85.218.54]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 397C0679EC for ; Tue, 30 Jan 2024 11:56:58 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.218.54 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1706615820; cv=none; b=IlspI1NWAn0r3q1M2Zhq1retBiqTAcyob3fXw4vkgBWxHKkPHhoN5pbL38xSbstEawx+CzzhGRyxwfOZGxqZnRvzkZv/3C+nH/OnPEy39Rm+fL8w3N9eNhDWcrNaqoKn+SDEqz7N3wSwBx2g9owyOhel11Wq6W+9htcnTbKHnD4= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1706615820; c=relaxed/simple; bh=5BNuu1x/bXsqnfMaHPtVjp+t6R/LjBZtMNHFrzbKhFM=; h=From:To:Cc:Subject:Date:Message-ID:MIME-Version; b=AYGeNGtvoZ12aSkudJIMKbxnYYpWgRNYfihHZRyaPy7h4M3143JT99JS/uDJcmTCsQNUIuAViPy3NSqDN8SPUw4Jir5r5GX68ya6b4hEn3d+jF5OvmJizzhic3SEoX95Pk7PVIMkyq7kdvv0Lp36nCoQgixp3cUjMppTdiepplk= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=9elements.com; spf=pass smtp.mailfrom=9elements.com; dkim=pass (2048-bit key) header.d=9elements.com header.i=@9elements.com header.b=Ro76OJuV; arc=none smtp.client-ip=209.85.218.54 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=9elements.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=9elements.com Received: by mail-ej1-f54.google.com with SMTP id a640c23a62f3a-a28fb463a28so454127166b.3 for ; Tue, 30 Jan 2024 03:56:58 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=9elements.com; s=google; t=1706615817; x=1707220617; darn=vger.kernel.org; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:from:to:cc:subject:date:message-id:reply-to; bh=3UEGIekdyazfqo3T299WapeO9DNQtaZe4LTOdPjlFiU=; b=Ro76OJuVzL7y/JZv3h/GVERlwMXQI2C1KqybMRAn5ru8BbOG4gLzTuWjTTtbk0YIQ3 MDIA1BUWK3T7Ep35GxdQXvsJaYD2CL9qCvVhaPOgDpxadCLT5I3+FgV6yH3wPa2jVJqb WzCwAzET2UmIzyZNRfVsAs+1iyYYaYZ8yhjv+KOCY2/yPDY9QheYCk2wXIhU6IiX6Ow9 hMfWbvY1MvyiJT+yz4tR+sQQsrTLWH/Gv8IfG6j9f9FmWGN5rY+RSdUZrufRfaFoB2Ve rbZASFgS2GroqggKNugTBDGrkahJHHTEW+WjK6rbWTWTh6A8cgnr3Q3AguQhMojPEAsq frlA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1706615817; x=1707220617; 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=3UEGIekdyazfqo3T299WapeO9DNQtaZe4LTOdPjlFiU=; b=S6dOHsStp5ahu/rQm3ZaS+z4zFpmjkgnmEGxKmHPYRcqJNuWz9E/yqwvfZmtPGSN3W un8Qnob4IqtyXEV9uCI2PZIFYm74MSuAPjsnvbMAjx390tYrTnZhJYdLvvS3XMRDoRHg pPAxmgYgsfablsHEbCJO2Je/hVfHys3sSNpP4KPFXvYc6Nwo7JM4HAt+usnSzkgiSgGI SMwo6jfXko07L9Mu/RdZqnwGmy3K+Qqu9wrdf/0y+bRCt1ZhKtEtEVmGn2LgSDb6N3BV /kO9XWNRDgKanioLFoA8gijYTlaIvhhso0vygV/Fwbo8+f6nUPYer/WIS4N8iEWRlyyZ /V1w== X-Gm-Message-State: AOJu0YzhdGPGuS3k48oVqOemmQwPhP/eJwJo2UpzwRSlspX8eNvG3IPw eFAlX4n11BprniPzCJzsaGBfP0T9M2sfK8V6hx64axJCSIODquHBkNSqiGZ4QKAt81aitjOAuih xpWg= X-Received: by 2002:a17:906:b846:b0:a36:4cb1:da77 with SMTP id ga6-20020a170906b84600b00a364cb1da77mr6163ejb.4.1706615817020; Tue, 30 Jan 2024 03:56:57 -0800 (PST) X-Forwarded-Encrypted: i=0; AJvYcCUcaKChEB2aRD4siN6rXcukPfd3nJzIXUuUSm9rdm9/ggYWDvMvxsLIUWlF/DDOJ0d/MIvZ72c+1A2erHOcqgmqAn9cr60DqaVsoNxayeTimhKui/aOuVODf9YXUBsS3BhlRvTuHXBAXzsxbhc0RHby98kvle7PMCcsyZGCrcC6Nqq5Yk/FAyiJ2x0v80qrm7D5ZLYr81HKhABXsjXXVT+zGd4+2h2Cncl6Ic+S9aGIHiDBJ5UuVMJVxBAAAPqR7MP2aQVwQzpZrrkmI8bnCDDYcX6RtoJpYIyzm9nYr7AWT/XQUyleXjQVBUpuplF0WxYIwJWlg7jYr9ltWpc1RnnwHENfvqP/0gxN2f9JZRgKaw== Received: from stroh80.sec.9e.network (ip-078-094-000-051.um19.pools.vodafone-ip.de. [78.94.0.51]) by smtp.gmail.com with ESMTPSA id tl19-20020a170907c31300b00a352a99b974sm4201641ejc.167.2024.01.30.03.56.56 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 30 Jan 2024 03:56:56 -0800 (PST) From: Naresh Solanki To: Peter Rosin , Jonathan Cameron , Lars-Peter Clausen , Rob Herring , Krzysztof Kozlowski , Conor Dooley Cc: mazziesaccount@gmail.com, Naresh Solanki , linux-iio@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH v3] dt-bindings: iio: afe: voltage-divider: Add io-channel-cells Date: Tue, 30 Jan 2024 17:26:50 +0530 Message-ID: <20240130115651.457800-1-naresh.solanki@9elements.com> X-Mailer: git-send-email 2.42.0 Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit voltage-divider is always an iio consumer at the same time it is optionally an iio provider. Hence add #io-channel-cells Also update example. Signed-off-by: Naresh Solanki --- .../bindings/iio/afe/voltage-divider.yaml | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) diff --git a/Documentation/devicetree/bindings/iio/afe/voltage-divider.yaml b/Documentation/devicetree/bindings/iio/afe/voltage-divider.yaml index dddf97b50549..98fec8548cc3 100644 --- a/Documentation/devicetree/bindings/iio/afe/voltage-divider.yaml +++ b/Documentation/devicetree/bindings/iio/afe/voltage-divider.yaml @@ -39,6 +39,13 @@ properties: description: | Channel node of a voltage io-channel. + '#io-channel-cells': + description: + In addition to consuming the measurement services of a voltage output + channel the voltage divider can act as a provider of measurement + services to other devices. + const: 1 + output-ohms: description: Resistance Rout over which the output voltage is measured. See full-ohms. @@ -75,12 +82,17 @@ examples: spi-max-frequency = <1000000>; }; }; - sysv { + p12v_vd: sysv { compatible = "voltage-divider"; io-channels = <&maxadc 1>; + #io-channel-cells = <1>; /* Scale the system voltage by 22/222 to fit the ADC range. */ output-ohms = <22>; full-ohms = <222>; /* 200 + 22 */ }; + iio-hwmon { + compatible = "iio-hwmon"; + io-channels = <&p12v_vd 0>; + }; ... base-commit: 861c0981648f5b64c86fd028ee622096eb7af05a -- 2.42.0