From patchwork Wed Dec 9 23:48:51 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Alexandre Belloni X-Patchwork-Id: 11962863 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-11.8 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_PATCH, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED,USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 2484FC4361B for ; Wed, 9 Dec 2020 23:50:54 +0000 (UTC) Received: from merlin.infradead.org (merlin.infradead.org [205.233.59.134]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id DC79023B53 for ; Wed, 9 Dec 2020 23:50:53 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org DC79023B53 Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=bootlin.com Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=merlin.20170209; h=Sender:Content-Transfer-Encoding: Content-Type:Cc:List-Subscribe:List-Help:List-Post:List-Archive: List-Unsubscribe:List-Id:MIME-Version:Message-Id:Date:Subject:To:From: Reply-To:Content-ID:Content-Description:Resent-Date:Resent-From:Resent-Sender :Resent-To:Resent-Cc:Resent-Message-ID:In-Reply-To:References:List-Owner; bh=/Bw3frQcUwHML+28MwSP6drzmCr2qRO/7PhsO3jYijI=; b=WYRLGS8kbkSJHkb5+HDFcbQeVN 6mr+svolRIA1W4J5B56ig7hZjymLNMrR1Y5I67RzPFjBgBFbmZIiUWIYm8oKPFWY2AVttROs4Dfz+ TLqlcSQj5zdqa7TR7PZTn+fWnas8ryWdxbicNg+gBp6hVAzg5aBdMtK1ZNTRLg4XvcKlLZjtW8Mf9 i0iqaThh9sl6Z8KZOil+x7/mbqtLeJ8opolRfoOCtOJ0UUoVd/wTfB1uDofdJtLeHhv0A91tmjf4L y3CY9ChRcL7oMuFvIZtoDpnwF1GWXkQJkITF/mVpIcZC8xsUG4gx1kMVEOOJW+1tLRkwEWepjHc74 de3a7Vyg==; Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1kn9Cp-0000Mi-EY; Wed, 09 Dec 2020 23:49:11 +0000 Received: from relay3-d.mail.gandi.net ([217.70.183.195]) by merlin.infradead.org with esmtps (Exim 4.92.3 #3 (Red Hat Linux)) id 1kn9Cl-0000Ku-Ug for linux-arm-kernel@lists.infradead.org; Wed, 09 Dec 2020 23:49:09 +0000 X-Originating-IP: 86.194.74.19 Received: from localhost (lfbn-lyo-1-997-19.w86-194.abo.wanadoo.fr [86.194.74.19]) (Authenticated sender: alexandre.belloni@bootlin.com) by relay3-d.mail.gandi.net (Postfix) with ESMTPSA id AF16260004; Wed, 9 Dec 2020 23:49:02 +0000 (UTC) From: Alexandre Belloni To: Jonathan Cameron Subject: [PATCH 0/6] iio:pressure:ms5637: add ms5803 support Date: Thu, 10 Dec 2020 00:48:51 +0100 Message-Id: <20201209234857.1521453-1-alexandre.belloni@bootlin.com> X-Mailer: git-send-email 2.28.0 MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20201209_184908_114065_14952507 X-CRM114-Status: UNSURE ( 9.14 ) X-CRM114-Notice: Please train this message. X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: devicetree@vger.kernel.org, Alexandre Belloni , Lars-Peter Clausen , linux-iio@vger.kernel.org, linux-kernel@vger.kernel.org, Peter Meerwald-Stadler , linux-arm-kernel@lists.infradead.org Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org Hello, This series adds support for the Measurement Specialities ms5803. It is very similar to the ms5805 but has a different PROM layout (which I suspect predates the ms5805 PROM layout). Also it supports less frequency sampling options. After a bit of preparatory work in the ms5637 driver and its common library, mainly to handle the PROM layou and sample frequencies, adding support is trivial. Alexandre Belloni (6): iio:pressure:ms5637: switch to probe_new iio:pressure:ms5637: introduce hardware differentiation iio:pressure:ms5637: limit available sample frequencies iio:common:ms_sensors:ms_sensors_i2c: rework CRC calculation helper iio:common:ms_sensors:ms_sensors_i2c: add support for alternative PROM layout iio:pressure:ms5637: add ms5803 support .../devicetree/bindings/trivial-devices.yaml | 2 + .../iio/common/ms_sensors/ms_sensors_i2c.c | 76 +++++++++++++++---- .../iio/common/ms_sensors/ms_sensors_i2c.h | 15 +++- drivers/iio/pressure/ms5637.c | 73 +++++++++++++----- 4 files changed, 128 insertions(+), 38 deletions(-)