From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail-lf1-f46.google.com (mail-lf1-f46.google.com [209.85.167.46]) (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 22D8F43B3FF for ; Fri, 10 Jul 2026 16:00:16 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.167.46 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1783699223; cv=none; b=NB9lpQo4+9NK8XiGb5jaH0OJ5xYJya0uNnjbFkYO/0TAWeuk+bf9843wHTgPaPPlxHWtimEWeovv0/2u4hFPf6oYf5eNgCaqc7HkvjCfE+ktNs14yCmITgaY5CpALAOQCF36PeHl/K9XXg0sYL2yOj3qACqTYZZhVGjUc5DnXqw= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1783699223; c=relaxed/simple; bh=2kx7pUx9tfhx0zv+z3s5tqYIU5nastRIq2hdNkClcbQ=; h=From:To:Cc:Subject:Date:Message-ID:MIME-Version; b=F815/j93XRrhZjZ48lnMo1mRlQOBSVbrRQr9JQV+7Qwli2UN1ZVq6ojyKWes9mZ0Jok0RsUUDMj9Bn75T8ICTWbqSZ/DiiUE8EtTCY6xW6FP3/XmGjeQaDQGE9M+7vVjZrwfiSdlCK6jXZoNAJdf+osb7+M6LvhAXU2aSqFyw8s= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com; spf=pass smtp.mailfrom=gmail.com; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b=NdUQ00It; arc=none smtp.client-ip=209.85.167.46 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=gmail.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="NdUQ00It" Received: by mail-lf1-f46.google.com with SMTP id 2adb3069b0e04-5b014810feeso127475e87.1 for ; Fri, 10 Jul 2026 09:00:16 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20251104; t=1783699214; x=1784304014; 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:content-type; bh=ck1r2NVwZBaaF90kGpS5I0sjGQcOnMc2dil2XeQuca4=; b=NdUQ00ItTJFLoQvMVM4cKyEK+fN/QABVZxmNwwvr5aHx3TTErJ5rCAxwLILQ1muanx 0opF1pbL+tbVAGc/qe/kG/iGRGeVxjb8e+EvnknAl8RmjZ9sLcC1s8AWdwLwiDVIen2D qG99ztVyZTBpex+/vO/pQp4dosYHWDgTvtYpoy1Zzxb6PuMzdOA5Xjtw99k7jAZX4grX cDE040Sr5TREm5nrJruygC/4DrXKTCoj7qyQO0FlHPIYpWdlLhslQB5d3koi2UVplxVF lyhjoOLUY+Rj6qX9VYPjrFCwQ99l5l4uNfd/QTF3XZNh6Ne4+r1kw6KEe7EBc8sHeSuF /RVA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1783699214; x=1784304014; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:x-gm-gg:x-gm-message-state:from:to:cc:subject:date :message-id:reply-to:content-type; bh=ck1r2NVwZBaaF90kGpS5I0sjGQcOnMc2dil2XeQuca4=; b=hp5lDhCGAE/bp9FtJE5k9IgxNieLWNwE03+jtf5p+PRHjsuK2etEyjpOS62kjm2Xpf ips/WNaoqv5MF1hrRxBT2lVaCfFC7NI7HYbJOxmewZF7zlx4VBueY0ZaQq7s+8ae93Wh XoL+2pe9Yif7rCNsskgHh4/Cs+pMGAVGJA7lZ3grB7eDPNbMLxUkbXizx8Zi/BTbNKuQ ClgvRzJodglwV0G9i8Y+qFaWZ2SWkA3Do5yBNcY3wb3Psx8vjUYgqPSdkkDBpCqYq8BP ZzKwJT+sH2FAm1QiSwXG1JAARPGK5MPI1g4H0pXmAQ3KnFG8BY3m0Kwt44iYRyPa3/QH vgnQ== X-Forwarded-Encrypted: i=1; AHgh+RqgtR68kjEyq0v+JCCpqVHjHCwH8+hy4WCjOEf2upV/B28cQmOLYnXgEBhiqS9X8eZWidpN95Wto3Q4b4U=@vger.kernel.org X-Gm-Message-State: AOJu0YxR3eo4hZjhlNR0DKKEjzO5W+LqIa6kcBuFUC/RumG1BunLl2yj hjUd3D8SCBhF0julMTf1GMaEcH++pxnjlkz2lT5SwcTSDFUxgqt7GgoUVJhedoPf X-Gm-Gg: AfdE7cmCvzq51YoXv2r6cUnMH14TTqrd3e6ZAUxI3zzpl9grgLII5C1WPzeTJhuNup2 IoY/0v43nTdUNmXf5iGXvTW4ItgtixHnY7rtNx4YJPXlraergUbfzW3AybigGbogLYUJmgI21Lg AZsrMtKLOKFsIcNCv5QEeMVDijuJ81cFMypCF+EKfr6yeGAMf2JlvFXOrsisPc6ZINXCVzjPsKN ZSm2967IuDPY2LPA4YaNDPQq8QlRRHIt6U2sz5pTeb5LQfg6MgCkjDU+ZkGvDIS3q6hbAPRtvjt GGMFBnZUB2IaKHXy94oH8QfhmarYC+kjB2/4+vYKiKyn/Gl19LLW+aJcjxxuxaAKLBJ2J3GfG8W vZkjFuU9s/7rEQ1/YTwkI4az/cx8oJFPGP85pt2h4FjMJsvKBZbCsO3KjJJ8AAPH0O1W2hXsCU6 yMZvTd0PYipJnlTD8tZVaFyDI4 X-Received: by 2002:a05:6512:12cd:b0:5ae:bce5:70f2 with SMTP id 2adb3069b0e04-5b0115af09amr1756207e87.4.1783699213314; Fri, 10 Jul 2026 09:00:13 -0700 (PDT) Received: from localhost ([5.250.49.195]) by smtp.gmail.com with ESMTPSA id 2adb3069b0e04-5b01ca54fddsm708567e87.33.2026.07.10.09.00.12 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 10 Jul 2026 09:00:12 -0700 (PDT) From: Taha Narimani To: jic23@kernel.org, lars@metafoo.de, Michael.Hennerich@analog.com, gregkh@linuxfoundation.org Cc: dlechner@baylibre.com, nuno.sa@analog.com, andy@kernel.org, linux-iio@vger.kernel.org, linux-staging@lists.linux.dev, linux-kernel@vger.kernel.org, Taha Narimani Subject: [PATCH v3 RFC v3] dt-bindings: iio: adc: add ad7816/7/8 digital temperature sensor / ADC Date: Fri, 10 Jul 2026 16:00:00 +0000 Message-ID: <20260710160001.29856-1-tahanarimani3443@gmail.com> X-Mailer: git-send-email 2.53.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 Document the Analog Devices AD7816, AD7817, and AD7818 digital temperature sensor and ADC bindings in YAML format. Please note that the driver for this device is currently in drivers/staging. This patch is sent as an RFC to clean up and standardize the device tree bindings prior to any major driver refactoring. While reviewing the AD7816/7/8 datasheet to correctly document the properties, it was noted that the current staging driver attempts to request a 'busy' GPIO for both AD7816 and AD7817. However, the AD7816 is an 8-pin device and does not possess a BUSY pin (only the 16-pin AD7817 has it). Therefore, in this binding, busy-gpios is strictly limited to adi,ad7817. This resolves the checkpatch.pl warnings regarding undocumented DT compatible strings. Signed-off-by: Taha Narimani --- Changes in v3: - Removed redundant conditional check around gpiod_get_value() as suggested by Andy Shevchenko and Dan Carpenter. - Switched to dev_err_probe() to avoid deferred probe spamming. - Introduced local struct device *dev pointer in probe and kept the GPIO request on a single line for better readability. - Added the missing Fixes tag requested by Jonathan Cameron. .../bindings/iio/adc/adi,ad7816.yaml | 105 ++++++++++++++++++ 1 file changed, 105 insertions(+) create mode 100644 Documentation/devicetree/bindings/iio/adc/adi,ad7816.yaml diff --git a/Documentation/devicetree/bindings/iio/adc/adi,ad7816.yaml b/Documentation/devicetree/bindings/iio/adc/adi,ad7816.yaml new file mode 100644 index 0000000..48563e4 --- /dev/null Changes in v3: - Removed redundant conditional check around gpiod_get_value() as suggested by Andy Shevchenko and Dan Carpenter. - Switched to dev_err_probe() to avoid deferred probe spamming. - Introduced local struct device *dev pointer in probe and kept the GPIO request on a single line for better readability. - Added the missing Fixes tag requested by Jonathan Cameron. +++ b/Documentation/devicetree/bindings/iio/adc/adi,ad7816.yaml @@ -0,0 +1,105 @@ +# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) +%YAML 1.2 +--- +$id: http://devicetree.org/schemas/iio/adc/adi,ad7816.yaml# +$schema: http://devicetree.org/meta-schemas/core.yaml# + +title: Analog Devices AD7816/7/8 digital temperature sensor / ADC + +maintainers: + - Taha Narimani + +description: | + Analog Devices AD7816, AD7817, and AD7818 10-Bit general purpose ADC and + temperature sensor. The device communicates via an SPI interface. + +properties: + compatible: + enum: + - adi,ad7816 + - adi,ad7817 + - adi,ad7818 + + reg: + maxItems: 1 + + spi-max-frequency: + maximum: 12500000 + + vdd-supply: + description: Main power supply. + + vref-supply: + description: | + Optional external reference voltage supply. If not provided, the + internal reference is used. Applicable for AD7816 and AD7817. + + rdwr-gpios: + maxItems: 1 + description: GPIO connected to the RD/WR pin. + + convert-gpios: + maxItems: 1 + description: GPIO connected to the CONVST (Convert Start) pin. + + busy-gpios: + maxItems: 1 + description: GPIO connected to the BUSY pin. Only applicable for AD7817. + + interrupts: + maxItems: 1 + description: OTI (Over Temperature Indicator) interrupt. Active low. + +required: + - compatible + - reg + - vdd-supply + - rdwr-gpios + - convert-gpios + +allOf: + - $ref: /schemas/spi/spi-peripheral-props.yaml# + - if: + properties: + compatible: + contains: + const: adi,ad7817 + then: + required: + - busy-gpios + else: + properties: + busy-gpios: false + - if: + properties: + compatible: + contains: + const: adi,ad7818 + then: + properties: + vref-supply: false + +unevaluatedProperties: false + +examples: + - | + #include + #include + + spi { + #address-cells = <1>; + #size-cells = <0>; + + adc@0 { + compatible = "adi,ad7817"; + reg = <0>; + spi-max-frequency = <1000000>; + vdd-supply = <&vcc>; + vref-supply = <&vref>; + rdwr-gpios = <&gpio 5 GPIO_ACTIVE_HIGH>; + convert-gpios = <&gpio 6 GPIO_ACTIVE_HIGH>; + busy-gpios = <&gpio 7 GPIO_ACTIVE_HIGH>; + interrupts = <20 IRQ_TYPE_LEVEL_LOW>; + interrupt-parent = <&gpio>; + }; + }; -- 2.53.0