From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from sonic.asd.mail.yahoo.com (sonic-asso1-0020.asd.mail.yahoo.com [34.2.90.19]) (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 7D64D43B6CE for ; Sat, 26 Sep 2026 15:41:51 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=34.2.90.19 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1790437313; cv=none; b=Nf4rBIDvDl7izXb2qa2K0tMRINpD1AdOu25S5Dnut8QvNCXgvp1oM/keIUUcRpORwQXVo/AlF0WI4muLmLyso1PNLufMSYzH1QkxEDdEibeImH/MVRl9g+J0N+fX3OWi6Mco91knbINzMRxEwD2MNkEvw+vwJyHe3h+5ZRkAq0Y= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1790437313; c=relaxed/simple; bh=boRhzYo1vp8mJ62ZfBPoq8DB5FEW2n1uhxYfp1n55Rw=; h=From:To:Cc:Subject:Date:Message-ID:MIME-Version:References; b=QlxanQyZYfMKqCPhYpO42iE2MmoPA8foYxdv5CHudYj2E/25D90oI6Tx/aoQBfYF5cwXQjK79EcSJ1j9S0nB4xznpT+5w01mRYzF1LnXp/EMMDKGE/ElSE0X/fvATfDDrgbVDnHE3sZVDL3jbdG2BANZWUmwRfOrKtYSJFBwIEU= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=yahoo.com; spf=pass smtp.mailfrom=yahoo.com; dkim=pass (2048-bit key) header.d=yahoo.com header.i=@yahoo.com header.b=Ws+HnoK6; arc=none smtp.client-ip=34.2.90.19 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=yahoo.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=yahoo.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=yahoo.com header.i=@yahoo.com header.b="Ws+HnoK6" DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yahoo.com; s=s2048; t=1790437308; bh=9qSwSt3Jhiots8IF9hOBrO+8UHsghCYhhmgo8FDqbnQ=; h=From:To:Cc:Subject:Date:References:From:Subject:Reply-To; b=Ws+HnoK6dctAlBcpznW02e/1l65jh8WGafc8v8CdtM+D6AwgsQ2DAm0oVGWjWsj0MKzfzC+9MozzgOZIcoJ+2eA6TPsdjDkYOLgwsiUhQIqT2CCmiRn/hLMKyr01o+l7YFgVTfqCvjm7Vbsh9EVWyWccgjon/ADIln/Aj3tyVV/3l6AC3rzPjtbEtne/0yAZrF87Wew99bFzJEcQm84WJP7HkqdepMbeESArSbJ7cZ3CSlAZXMbqXaBryRfOxA0bzvQJj4/LdKp0oTqipyVzSFXPeXMF0T21NC6U+jjkNWwe4pjU75Gd3s60uQEetdDc9MHaOQ7bAyAuTU7WJNbfhQ== X-SONIC-DKIM-SIGN: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yahoo.com; s=s2048; t=1790437308; bh=b/QLxM1ikxnFXij3bFwPMLzFixCbMlMgwZ/Tci6HkJI=; h=X-Sonic-MF:From:To:Subject:Date:From:Subject; b=q/Y7qH6r1VVW9ior3HPpOTdlJiygMgzohizuE21Pbk+y/U3Rs8c8KPPmrReURD/gRyoVKI1M7SLApqjx0fU1Cs25AtR8ftxcmqVIFuCOGdLhKoOS4Df3Jp/V14FtGgV7t1m2XgyHKyyYLDrw+muQowJ1CWAEYa5J4qtLVlef9cGeOBKjCkz5MMocbMoZg8GbeLdMZJgkFzkVxT1sb4IDd9ix1xB3bAStAv/PZDy5Kk511ROPDaXHtwHP5uwuHXX3Pz6YbrUTDROzlzPmQK3a/NUT5KnfY7Q159MNyqHa9BZVBjtrquFuJFK6/nQCgf7/77Txv9o1mxqacA4dYof3hw== X-YMail-OSG: BGHCT.YVM1lO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.yahoo.com by mail-asdoutdeli-p-cin-asso1-prod-sonicconsumer-svc-102 with HTTP; Sat, 26 Sep 2026 15:41:48 +0000 Received: from dip33.lsn.bf1.yahoo.com ([67.195.177.42]) by hello (SMTP) with SMTP ID 46afa743fbae7daefe6e6367ec9b72bd; Sat, 26 Sep 2026 15:41:44 +0000 (UTC) From: Muhammad Abu Bakar To: Jonathan Cameron , Rob Herring , Krzysztof Kozlowski , Conor Dooley Cc: dlechner@baylibre.com, nuno.sa@analog.com, andy@kernel.org, linux-iio@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, Muhammad Abu Bakar Subject: [PATCH v3 0/2] iio: pressure: add Sensirion SDP31 driver Date: Sat, 26 Sep 2026 20:41:16 +0500 Message-ID: <20260926154118.5471-1-m.abubakar365@yahoo.com> X-Mailer: git-send-email 2.43.0 Precedence: bulk X-Mailing-List: devicetree@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit References: <20260926154118.5471-1-m.abubakar365.ref@yahoo.com> This series adds support for the Sensirion SDP31 differential pressure sensor, an I2C device that also reports temperature. The SDP31 uses a completely different I2C command protocol from the already supported SDP500 (command-triggered measurements with a per-word CRC-8), so extending the sdp500 driver does not make sense. No compatible parts from other vendors were found. Patch 1 adds the device tree binding. Patch 2 adds the IIO driver, which exposes differential pressure and temperature channels and validates each measurement using the sensor's CRC-8 checksum. The driver was developed and tested on an SDP31 wired to the I2C bus of a Raspberry Pi 4. Changes since v2: - Remove leftover development annotation comments from the driver. - Drop the SDP31_TEMP_SCALE define and use the value inline. - In sdp31_send_cmd(), separate the declaration of ret from the call so the call sits next to its error check. - Add blank lines before the trailing return statements. - Wait for the sensor's power-up time (datasheet t_PU) after enabling the regulator, before the first I2C transaction. Changes since v1: - dt-bindings: make vdd-supply required, and enable the regulator in the driver using devm_regulator_get_enable(). - Move the MAINTAINERS entry into the dt-bindings patch; the driver patch only adds its own file. - Populate the CRC-8 table with DO_ONCE() to avoid a race between concurrent probes. - Use devm_mutex_init() and take the lock inside sdp31_measure() using guard(mutex). - Build the command with __be16/cpu_to_be16() and parse the reply with get_unaligned_be16(). - Use a named initializer in the i2c_device_id table. v1: https://lore.kernel.org/linux-iio/20260919223650.13396-1-m.abubakar365@yahoo.com/ v2: https://lore.kernel.org/linux-iio/20260920164533.31988-1-m.abubakar365@yahoo.com/ Muhammad Abu Bakar (2): dt-bindings: iio: pressure: add Sensirion SDP31 iio: pressure: add Sensirion SDP31 driver .../iio/pressure/sensirion,sdp31.yaml | 41 ++++ MAINTAINERS | 6 + drivers/iio/pressure/Kconfig | 11 + drivers/iio/pressure/Makefile | 1 + drivers/iio/pressure/sdp31.c | 213 ++++++++++++++++++ 5 files changed, 272 insertions(+) create mode 100644 Documentation/devicetree/bindings/iio/pressure/sensirion,sdp31.yaml create mode 100644 drivers/iio/pressure/sdp31.c -- 2.43.0