From patchwork Tue Dec 19 13:02:19 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Petre Rodan X-Patchwork-Id: 18296 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a05:7300:24d3:b0:fb:cd0c:d3e with SMTP id r19csp1923654dyi; Tue, 19 Dec 2023 05:10:09 -0800 (PST) X-Google-Smtp-Source: AGHT+IFC0Dqh1hdf9Qx1NCldmTVa8Dm+x/dW3CjxoDicQK6h5FFVJB6Djir5kl3/kACMSiN/ozTe X-Received: by 2002:a05:6a20:42a5:b0:18c:f9f9:4198 with SMTP id o37-20020a056a2042a500b0018cf9f94198mr1445803pzj.14.1702991408606; Tue, 19 Dec 2023 05:10:08 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1702991408; cv=none; d=google.com; s=arc-20160816; b=xgztbZSBBMXuXWpctGJ5MbJBeJGRqtQgL3DhZvijmvXwijqVNeI1BtKGEyMAFaGcc0 PZBvZVB/E/vAThkcRnOt/hSOXkWuId52+b/9tJ0HIpmheQycZbrIYCL/VAGAySWFOrYw AdQvcKEMH2MSA8tskxjgj4fII3/6WGaVJpGjypaIYp6MJDhDGCgAdzQGtaKYysSHXerG V005aehekJVdgovaDRDPeRZ/VTrU1d+cxwejq+N70dtHzvmEe4ICUSVq3LgmJXWoqHVl 7wiAfvYx5w3/47rmXMokJxQtfKoItcNd+goWVC5T+jvDUzlID/R7feoQAWU6qeYOhR/+ 8yzQ== ARC-Message-Signature: i=1; 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=0wSkzn6S2cQeT4djhiICtSTFReyefp8Sr7ALjcgg+kw=; fh=AMGqaeuH393VCvUVVEty986tGPORpaQpYEyp7am59Yo=; b=UXyBY4fWE0b5iBWp/VcX4DMljmDxcaO1f2fWAqOnTUGgCVobg9Mro213RtfnWm67jd 1j0ZLL6Vd1ZHVfW/9yVmDm3oOi+c9sZL2nPmH18ja3Ehw4Z0rmR1OHjX1T+cJDt7eI4c EK25QLNZfITw+PGJ8/ZW4aO986Vl6pmrH73PcAip3VGm88NVLg6R3orNSSCXaBSttIHH DHrAXZqns0CMD8kcWo5AUlh/H350EGQsvD2R1xEf1YYUuIonMz0ewVyfxbdF2ic/UnLo /F31J910nxDQgNe6xrA9jRF+8wy6u5X7hVpx92WkqjzSIGbk4GQCQ8pGW+zDl5QFHV8S LNlQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@subdimension.ro header.s=skycaves header.b=dgf6C1Gr; spf=pass (google.com: domain of linux-kernel+bounces-5234-ouuuleilei=gmail.com@vger.kernel.org designates 147.75.48.161 as permitted sender) smtp.mailfrom="linux-kernel+bounces-5234-ouuuleilei=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=subdimension.ro Received: from sy.mirrors.kernel.org (sy.mirrors.kernel.org. [147.75.48.161]) by mx.google.com with ESMTPS id a3-20020a654183000000b005b9a1494637si19111631pgq.317.2023.12.19.05.10.08 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 19 Dec 2023 05:10:08 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-5234-ouuuleilei=gmail.com@vger.kernel.org designates 147.75.48.161 as permitted sender) client-ip=147.75.48.161; Authentication-Results: mx.google.com; dkim=pass header.i=@subdimension.ro header.s=skycaves header.b=dgf6C1Gr; spf=pass (google.com: domain of linux-kernel+bounces-5234-ouuuleilei=gmail.com@vger.kernel.org designates 147.75.48.161 as permitted sender) smtp.mailfrom="linux-kernel+bounces-5234-ouuuleilei=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=subdimension.ro 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 sy.mirrors.kernel.org (Postfix) with ESMTPS id 2F16EB247CE for ; Tue, 19 Dec 2023 13:09:12 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 0756F19BDE; Tue, 19 Dec 2023 13:08:35 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=subdimension.ro header.i=@subdimension.ro header.b="dgf6C1Gr" X-Original-To: linux-kernel@vger.kernel.org Received: from mail.subdimension.ro (skycaves.subdimension.ro [172.104.132.142]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id C928B18B1A; Tue, 19 Dec 2023 13:08:30 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=subdimension.ro Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=subdimension.ro Received: from localhost.localdomain (unknown [188.24.94.216]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mail.subdimension.ro (Postfix) with ESMTPSA id AACBE28B50B; Tue, 19 Dec 2023 13:02:39 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=subdimension.ro; s=skycaves; t=1702990960; bh=gJA42YDJdYMWkvXyCpe8XTujDQq2PuvcPW8OK1AOu28=; h=From:To:Cc:Subject:Date; b=dgf6C1GrIrowzN8hRMuQBbwFp2LWllvqbB2odKV+vZDAXZn1iOtMip0aEYEIXrIzP TJMs9JKicPt/YtpLHdJVTQJuwev3fe+X/8Y5euioBJk1S5+UFYK4A0YrBV6Oq5/THq mpBbdWNo5OgeyPWd6qjwvdcO4uDWt+cxkT61m3fk= From: Petre Rodan To: linux-kernel@vger.kernel.org, linux-iio@vger.kernel.org Cc: Petre Rodan , Jonathan Cameron , Lars-Peter Clausen , Andy Shevchenko , Angel Iglesias , Matti Vaittinen , Andreas Klinger , Rob Herring , Krzysztof Kozlowski Subject: [PATCH 0/2] iio: pressure: changes to mprls0025pa Date: Tue, 19 Dec 2023 15:02:19 +0200 Message-ID: <20231219130230.32584-1-petre.rodan@subdimension.ro> X-Mailer: git-send-email 2.41.0 Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1785715919206847724 X-GMAIL-MSGID: 1785715919206847724 ChangeLog - rewrite flow so that driver can use either i2c or spi as communication bus - add spi driver (tested on MPRLS0015PA0000SA) - add pressure-triplet property that automatically sets pmin, pmax - fix transfer-function enum typo based on previous review [1] - fix interrupt example in binding file (FALLING -> RISING edge) - indentation changes based on previous code reviews - renamed mpr_read_pressure to mpr_read_conversion since the sensor is supposed to also provide temperature measuremets (but I think mine is broken since the raw temperature value is always 0x800000 - so temp reading not currently implemented) patch uses device_property_match_property_string() from the 'togreg' branch [1]: https://lore.kernel.org/lkml/20231116-grudge-hankering-b7a71d831b93@squawk/T/ Petre Rodan (2): dt-bindings: iio: pressure: change honeywell,mprls0025pa iio: pressure: change driver for Honeywell MPR series .../iio/pressure/honeywell,mprls0025pa.yaml | 60 ++- MAINTAINERS | 3 +- drivers/iio/pressure/Kconfig | 14 +- drivers/iio/pressure/Makefile | 2 + drivers/iio/pressure/mprls0025pa.c | 353 +++++++++--------- drivers/iio/pressure/mprls0025pa.h | 103 +++++ drivers/iio/pressure/mprls0025pa_i2c.c | 76 ++++ drivers/iio/pressure/mprls0025pa_spi.c | 67 ++++ 8 files changed, 491 insertions(+), 187 deletions(-) create mode 100644 drivers/iio/pressure/mprls0025pa.h create mode 100644 drivers/iio/pressure/mprls0025pa_i2c.c create mode 100644 drivers/iio/pressure/mprls0025pa_spi.c