From nobody Sun Dec 14 19:31:39 2025 Received: from mail-wm1-f52.google.com (mail-wm1-f52.google.com [209.85.128.52]) (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 3C6181C0076 for ; Tue, 2 Jul 2024 17:34:11 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.128.52 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1719941654; cv=none; b=Sdt7C6br9v4t8/ghnJAcLRUQUoP59G7q0P8N7bMmf8m6Bv0htk6ZCCMh49R0QDUwj5MjeVFqSuOc8+MVLCnrClwek1FI6RyEPPLAqK19QdcItmm9mAqT7zvhAeRkI4klCBoKGYfRZ3rkSOTgCe2uzSqF3HB9BYdt+8h8yIjC46s= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1719941654; c=relaxed/simple; bh=/LA/tVbUGREpux3rwFNrtFexWvYIFIQqHifGylYOE7Y=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=RPjmzcjhXHS1U1Peu4k5+cWZJpH0L5HKm6QXRkjIewiCxn+uOcyqyBdEqwtIzsOA1si+wr7ztRNpvl64QjnGk8an7/QlfCJZGNU+pPHtRTK4Ae27gBGQ7y74cvbgSrFvkbVCQ5Ja2ATKkxxeAZ5oujw78d/uvVSwvAaR7/+Vd78= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=baylibre.com; spf=pass smtp.mailfrom=baylibre.com; dkim=pass (2048-bit key) header.d=baylibre-com.20230601.gappssmtp.com header.i=@baylibre-com.20230601.gappssmtp.com header.b=Tb2/hbh2; arc=none smtp.client-ip=209.85.128.52 Authentication-Results: smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=baylibre.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=baylibre.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=baylibre-com.20230601.gappssmtp.com header.i=@baylibre-com.20230601.gappssmtp.com header.b="Tb2/hbh2" Received: by mail-wm1-f52.google.com with SMTP id 5b1f17b1804b1-425814992aeso17037455e9.1 for ; Tue, 02 Jul 2024 10:34:10 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=baylibre-com.20230601.gappssmtp.com; s=20230601; t=1719941649; x=1720546449; darn=vger.kernel.org; h=cc:to:in-reply-to:references:message-id:content-transfer-encoding :mime-version:subject:date:from:from:to:cc:subject:date:message-id :reply-to; bh=OlOMVM0Oi/I1G5ABSh4CvVIoiZHYlhaelZAr8Gl3RX4=; b=Tb2/hbh25bo/t5+n3AURyKbt8RCGLirlj9Dzhx3WRbY6Rf+9SPAc3FH73mXmDXjc0r oecveLKmgKuQw/9hNnyGi3S8L3W5Pl1wLMFYIssGi0QiqdTx/Sd2nib8Fx1In2mmZEsX sTf/I2R1uYfqUD5y8rktm73lE4yBU30TQmo7sEO8s5TYZH1Uwb4+5dzNJ8sMd4RwXGcq l9+7mQd1CAiNBGxZjte/NKmjepAXvKOk6Zv2biaaN7SQyReGZnQENMVNFAWySePshDyN GC7BBHxwts+6IJ5bqdtKCMMLLyNhx3yziQS5JJQ/Qk5WIGRSX6YvxjfehsrHOQ5BqcMW VatQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1719941649; x=1720546449; h=cc:to:in-reply-to:references:message-id:content-transfer-encoding :mime-version:subject:date:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=OlOMVM0Oi/I1G5ABSh4CvVIoiZHYlhaelZAr8Gl3RX4=; b=bOgNd5bcQ+yQsM8NRZHWNIh7ZGgfRKDLj1uTBCjQYeGu7P0mAKCySb930I2Mmq/9U1 3SV4lHYBaVb4vwWXyx9UwDVb7+XCkDDAKQkSzgKOR1mq0mpSpKr/YsDq/7m1D70cu03R UhPGec3wG95pbs23pr4Fll71np08aXWXa2uOdSyfBhyuISdj8u8bIYA5KpgICaj8hW64 SLhHRlcDrv36GLVzEKehfZ4h4Oky3P5vlb3cQV3O+hx13rTqjUsoq1QK0uSajpc4iSME A0ff3V60z+zvJusV5xZE31pGSQMajqvCoOLiX8CY40zGF65GV9imuB9pR0SiXtn1qUvW hyig== X-Forwarded-Encrypted: i=1; AJvYcCUSPj1QFq5n+jmdOwq4FTp8Qe6eOPlLntqVycfvxET+etGRCAEHngiY1D9pg9QjC5Lx6LqwmgtGnxy94OwbM23qM2WeFHmB3dnzv2Ax X-Gm-Message-State: AOJu0YyRhRaNbzdYDzePjgVjIKx5fcrt+OITm4uz+Ej2/xH8llA6SDR3 Nvpi/IDckMGOWKp5048nK1sBsIacSScJJPdF9OvqUMzfqML5CA4RXDOR8u8awAI= X-Google-Smtp-Source: AGHT+IE7S6mRIdq/pwCzKBcD26Jq2dW/C6XfGEiQgs8D7NweKQh0I45uV18IHCqTsOFz+vvMfcxK8A== X-Received: by 2002:a05:600c:3542:b0:425:77ad:93cb with SMTP id 5b1f17b1804b1-4257a009c1cmr61212815e9.2.1719941649375; Tue, 02 Jul 2024 10:34:09 -0700 (PDT) Received: from [127.0.1.1] (frhb82016ds.ikexpress.com. [185.246.87.17]) by smtp.gmail.com with ESMTPSA id 5b1f17b1804b1-4256af59732sm207594485e9.11.2024.07.02.10.34.08 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 02 Jul 2024 10:34:09 -0700 (PDT) From: Guillaume Stols Date: Tue, 02 Jul 2024 17:34:09 +0000 Subject: [PATCH v3 5/8] dt-bindings: iio: adc: adi,ad7606: add conditions Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Message-Id: <20240702-cleanup-ad7606-v3-5-57fd02a4e2aa@baylibre.com> References: <20240702-cleanup-ad7606-v3-0-57fd02a4e2aa@baylibre.com> In-Reply-To: <20240702-cleanup-ad7606-v3-0-57fd02a4e2aa@baylibre.com> To: Lars-Peter Clausen , Michael Hennerich , Jonathan Cameron , Rob Herring , Krzysztof Kozlowski , Conor Dooley Cc: linux-iio@vger.kernel.org, linux-kernel@vger.kernel.org, Michael Hennerich , linux-fbdev@vger.kernel.org, devicetree@vger.kernel.org, Jonathan Cameron , Guillaume Stols , jstephan@baylibre.com, dlechner@baylibre.com, Conor Dooley X-Mailer: b4 0.14.0 Since the driver supports several parts that present differences in their layout and behaviour, it is necessary to describe the differences from one chip to another. Reviewed-by: Conor Dooley Signed-off-by: Guillaume Stols --- .../devicetree/bindings/iio/adc/adi,ad7606.yaml | 60 ++++++++++++++++++= +--- 1 file changed, 54 insertions(+), 6 deletions(-) diff --git a/Documentation/devicetree/bindings/iio/adc/adi,ad7606.yaml b/Do= cumentation/devicetree/bindings/iio/adc/adi,ad7606.yaml index 499b6ad5525a..69408cae3db9 100644 --- a/Documentation/devicetree/bindings/iio/adc/adi,ad7606.yaml +++ b/Documentation/devicetree/bindings/iio/adc/adi,ad7606.yaml @@ -52,10 +52,11 @@ properties: =20 adi,conversion-start-gpios: description: - Must be the device tree identifier of the CONVST pin. This logic inp= ut is - used to initiate conversions on the analog input channels. As the li= ne is - active high, it should be marked GPIO_ACTIVE_HIGH. - maxItems: 1 + Must be the device tree identifier of the CONVST pin(s). This logic = input + is used to initiate conversions on the analog input channels. As the= line + is active high, it should be marked GPIO_ACTIVE_HIGH. + minItems: 1 + maxItems: 2 =20 reset-gpios: description: @@ -88,8 +89,11 @@ properties: is tied to a logic high, the analog input range is =C2=B110V for all= channels. On the AD760X, if this pin is tied to a logic low, the analog input = range is =C2=B15V for all channels. As the line is active high, it should = be marked - GPIO_ACTIVE_HIGH. - maxItems: 1 + GPIO_ACTIVE_HIGH. On the AD7616, there are 2 pins, and if the 2 pins= are + tied to a logic high, software mode is enabled, otherwise one of the= 3 + possible range values is selected. + minItems: 1 + maxItems: 2 =20 adi,oversampling-ratio-gpios: description: @@ -122,6 +126,50 @@ required: allOf: - $ref: /schemas/spi/spi-peripheral-props.yaml# =20 + - if: + properties: + compatible: + contains: + const: adi,ad7616 + then: + properties: + adi,first-data-gpios: false + standby-gpios: false + adi,range-gpios: + maxItems: 2 + else: + properties: + adi,range-gpios: + maxItems: 1 + + - if: + properties: + compatible: + contains: + enum: + - adi,ad7605-4 + - adi,ad7616 + then: + properties: + adi,oversampling-ratio-gpios: false + + - if: + properties: + compatible: + contains: + enum: + - adi,ad7605-4 + - adi,ad7606-4 + - adi,ad7606-6 + - adi,ad7606-8 + then: + properties: + adi,sw-mode: false + else: + properties: + adi,conversion-start-gpios: + maxItems: 1 + unevaluatedProperties: false =20 examples: --=20 2.34.1