From nobody Thu Dec 18 20:36:34 2025 Received: from mail-ot1-f45.google.com (mail-ot1-f45.google.com [209.85.210.45]) (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 3B1931FA150 for ; Mon, 13 Jan 2025 21:01:09 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.210.45 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1736802073; cv=none; b=IFMGTVbf2oONmtFqouwt8dLah6rqy5O35ii05MtPT5Ks50pQ/RvBA/EKR9+X9KZh5WF5jkQRwIhiCvmeyQ9xZcodrlMvfzLgKw95wLghoXF5gVBOccMnJCpVswbj4K9+L36+Fdve6NsNQeP1yw7un2PzI2pwRrfo1r3JeCsf4wY= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1736802073; c=relaxed/simple; bh=NDFiO3U0E1S/5X6Lz//TxxrYJLqr6ccKrjn8lgZTJIQ=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=ujEi5T6DgN1skKbu/93ydE0bTnjqCItV3iyfV1Bk2XHZ/GSA6Elvg7nZE9xTRAB9l8vb5x95dgzlWkkG22z7UrbXr27MtaqPr1MMXETHWqBB4/aLIJAgh6pCAmFoont4vKwA4lzvGuzHiGljoIiOmXUbwyorEuJzc0y24prG7Fw= 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=ZV/MsMD3; arc=none smtp.client-ip=209.85.210.45 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="ZV/MsMD3" Received: by mail-ot1-f45.google.com with SMTP id 46e09a7af769-71fbb0d035dso2749565a34.2 for ; Mon, 13 Jan 2025 13:01:09 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=baylibre-com.20230601.gappssmtp.com; s=20230601; t=1736802067; x=1737406867; 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=8iLwNjuSq2Wrxa12NE4/8IEuSETMFdqrFjSUkFlmHIg=; b=ZV/MsMD3wppfisM/fhyCNo9H9dzZk+QdeAeF0QqZ3cQl3/yIb71SHDweKV01NqAQPb +eqqau2NMGwAipQaX2GvvAHQjMZEuKUejSpUVN52+0b9jtp+LBDd1F2mANmpyBiQd/eZ ZNsYqIXwEQe35cEw5+dqvGGh2XR0xIJUJaQizktFHHJbELNrmhqnSwqujzkrh6MrsbvP I0oqy0nW6aA/SGwD183UP4Maylkr5e0WbYVk2sMDkUhdpa/FtmJt19uuUaC/p10dIpiw YYKQyUcTKo3SgHwNE+x+knwwHleaeRSDfAIShHpGbWh5jFiRjDspJCzX0ZjQ3p4xxUrU Ui8w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1736802067; x=1737406867; 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=8iLwNjuSq2Wrxa12NE4/8IEuSETMFdqrFjSUkFlmHIg=; b=GV2Bg4CWYcBKPnJOHOXm/oqIdr0f/Yu4GDYxWuZFK506Ay8LpPCx5MG4lC945Hzpv+ N2ZJxivVRjT78m7GhHwscDbpiPDBQ01AV92EcFFK7AAmJhLtzf7OZpwrZ0F9U3pNAXMW eJTsYfIuoiauw/gCPvVQycy+HcNu63yAeCAY9tlqCYZ3tURBaKJtTOwJSdwLoetmG4+D 1oP7GhNqbTY8PGdn4chl2BW3/6rG07dCO8vP+L9IrK+W/Mg5Ljtej64gwtUQTll24r+i 0jT7ZrX4ceemPGcSbeldwhAM2WCYsXLY6m426CKWuOAU2sWZJQcNFjhYVgZNMUAjDC7H Mk8w== X-Forwarded-Encrypted: i=1; AJvYcCWWSQh6Zy+u65ZyIe/qGVzK6HoomOIJZFPyptQyXRxixkyry3FagOiGh1nW3r6B6jskLme55koJFo0XX/s=@vger.kernel.org X-Gm-Message-State: AOJu0Yw8hbmo1/NQY/THLAONWMquyPl9ZdDC/IzWjlzvybW1/nXknd5d A1E4+tziJ9S6AvJ6QI+cQ4LtQpMrD6VGy7mEeWZ6LfRyHgOw7CGjIN26nidkkxA= X-Gm-Gg: ASbGnct8vCkwVsbRrGlxWBL4XRh/oBiTPFh2BTbIy/KB/WFMjOOx9q00jsQfBGrOR0w quvzUd5fyXu2YRemJ/otRSpMb09xUR0ZhwHUcDzlvf0ukgW/5U5Si5c4qXqA2u3MJ2qqfuZRKk2 RzoQsnPmhdnvASdDQfrliocTv+w6iMnNaH/HpbrF09asEElqw+l1i+ZPKHQJ40heLayJ5Buv4xT tl0WD8ha9qgaa3FEe/BqvgPatYlp8d2TLCTXiI8jG2DlyV6xh2DrN5x2zqrOtdLlf1nJUJz2GpP m7uo41IsZ5y/ X-Google-Smtp-Source: AGHT+IHwosV+GBI/cwkzwbE4LHyNNp+ADMynEz2WHDKOMWlYl/AymhEUv/oaYtoR3qpdzLxjxkLsHQ== X-Received: by 2002:a05:6830:4414:b0:71d:f762:7f97 with SMTP id 46e09a7af769-721e2e7052fmr14087686a34.17.1736802067684; Mon, 13 Jan 2025 13:01:07 -0800 (PST) Received: from [127.0.1.1] (ip98-183-112-25.ok.ok.cox.net. [98.183.112.25]) by smtp.gmail.com with ESMTPSA id 46e09a7af769-7231855effasm3927744a34.33.2025.01.13.13.01.06 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 13 Jan 2025 13:01:07 -0800 (PST) From: David Lechner Date: Mon, 13 Jan 2025 15:00:18 -0600 Subject: [PATCH v7 13/17] dt-bindings: iio: adc: adi,ad4695: add SPI offload properties 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: <20250113-dlech-mainline-spi-engine-offload-2-v7-13-e0860c81caae@baylibre.com> References: <20250113-dlech-mainline-spi-engine-offload-2-v7-0-e0860c81caae@baylibre.com> In-Reply-To: <20250113-dlech-mainline-spi-engine-offload-2-v7-0-e0860c81caae@baylibre.com> To: Mark Brown , Jonathan Cameron , Rob Herring , Krzysztof Kozlowski , Conor Dooley , =?utf-8?q?Nuno_S=C3=A1?= Cc: =?utf-8?q?Uwe_Kleine-K=C3=B6nig?= , Michael Hennerich , Lars-Peter Clausen , David Jander , Martin Sperl , linux-spi@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, linux-iio@vger.kernel.org, linux-pwm@vger.kernel.org, Jonathan Cameron , David Lechner X-Mailer: b4 0.14.2 Add a pwms property to the adi,ad4695 binding to specify an optional PWM output connected to the CNV pin on the ADC. Also add #trigger-source-cells property to allow the BUSY output to be used as a SPI offload trigger source to indicate when a sample is ready to be read. Macros are added to adi,ad4695.h for the cell values to help with readability since they are arbitrary values. Reviewed-by: Jonathan Cameron Reviewed-by: Rob Herring (Arm) Signed-off-by: David Lechner --- v7 changes: none v6 changes: * Drop $ref to trigger-source.yaml * Add maxItems to pwms property v5 changes: * Added macros for cell values v4 changes: new patch in v4 --- Documentation/devicetree/bindings/iio/adc/adi,ad4695.yaml | 13 +++++++++++= ++ include/dt-bindings/iio/adc/adi,ad4695.h | 7 +++++++ 2 files changed, 20 insertions(+) diff --git a/Documentation/devicetree/bindings/iio/adc/adi,ad4695.yaml b/Do= cumentation/devicetree/bindings/iio/adc/adi,ad4695.yaml index 7d2229dee4441e20a7bafc9165fe309ac2e9eada..cbde7a0505d2b5df22c54ca4556= 878bf22e9b4b1 100644 --- a/Documentation/devicetree/bindings/iio/adc/adi,ad4695.yaml +++ b/Documentation/devicetree/bindings/iio/adc/adi,ad4695.yaml @@ -84,6 +84,10 @@ properties: description: The Reset Input (RESET). Should be configured GPIO_ACTIVE= _LOW. maxItems: 1 =20 + pwms: + description: PWM signal connected to the CNV pin. + maxItems: 1 + interrupts: minItems: 1 items: @@ -106,6 +110,15 @@ properties: The first cell is the GPn number: 0 to 3. The second cell takes standard GPIO flags. =20 + '#trigger-source-cells': + description: | + First cell indicates the output signal: 0 =3D BUSY, 1 =3D ALERT. + Second cell indicates which GPn pin is used: 0, 2 or 3. + + For convenience, macros for these values are available in + dt-bindings/iio/adc/adi,ad4695.h. + const: 2 + "#address-cells": const: 1 =20 diff --git a/include/dt-bindings/iio/adc/adi,ad4695.h b/include/dt-bindings= /iio/adc/adi,ad4695.h index 9fbef542bf670015c5b34bfbe1336e7e295bf8ab..fea4525d2710cbf58cd4236d327= 6bad4cb318df9 100644 --- a/include/dt-bindings/iio/adc/adi,ad4695.h +++ b/include/dt-bindings/iio/adc/adi,ad4695.h @@ -6,4 +6,11 @@ #define AD4695_COMMON_MODE_REFGND 0xFF #define AD4695_COMMON_MODE_COM 0xFE =20 +#define AD4695_TRIGGER_EVENT_BUSY 0 +#define AD4695_TRIGGER_EVENT_ALERT 1 + +#define AD4695_TRIGGER_PIN_GP0 0 +#define AD4695_TRIGGER_PIN_GP2 2 +#define AD4695_TRIGGER_PIN_GP3 3 + #endif /* _DT_BINDINGS_ADI_AD4695_H */ --=20 2.43.0