From patchwork Sat Jan 9 23:11:42 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Alexandre Belloni X-Patchwork-Id: 12008785 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=-12.0 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 66831C433DB for ; Sat, 9 Jan 2021 23:17:06 +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 2C9AA23998 for ; Sat, 9 Jan 2021 23:17:06 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 2C9AA23998 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=IfUVU8SelV7VYQVlcxsNZ+8DBGnfrszQPBexobKgFVg=; b=Cof/TuII7eoQtlsjCWrVqXaBD7 3slBJKJF3sZWzQM8ppkXr2u+RP7PrJsjaB4GCKmMbLVLl+8o54jXHYtHpHQYWwWSmijATqVwC0jEB cIQaLQywsextQmgbG486glzoFmqEdLVuZ4hgk3V4hh9JvLg9Ll9JrqBIUIh1AHSeLw7Veiqg/rEwk GjZxt7xaE4GufQhV39moAbLkfpe6LO4PI+tflQB0wlhZCrUA9/coSIZYKA3SIIR13yBHaLbP1iL/D bCMTz4ylWjkvhw9JQdwUuJBP15zYwxvma/brocCpWcwECCD5spAyElMJFcp/FPeaIUSDoLmZhnY3D rUHYraFA==; Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1kyNRt-0007qn-F7; Sat, 09 Jan 2021 23:15:09 +0000 Received: from relay2-d.mail.gandi.net ([217.70.183.194]) by merlin.infradead.org with esmtps (Exim 4.92.3 #3 (Red Hat Linux)) id 1kyNPW-0006aC-3f for linux-arm-kernel@lists.infradead.org; Sat, 09 Jan 2021 23:12:43 +0000 X-Originating-IP: 86.202.109.140 Received: from localhost (lfbn-lyo-1-13-140.w86-202.abo.wanadoo.fr [86.202.109.140]) (Authenticated sender: alexandre.belloni@bootlin.com) by relay2-d.mail.gandi.net (Postfix) with ESMTPSA id B0CC840009; Sat, 9 Jan 2021 23:12:35 +0000 (UTC) From: Alexandre Belloni To: Jonathan Cameron Subject: [PATCH v2 0/6] iio:pressure:ms5637: add ms5803 support Date: Sun, 10 Jan 2021 00:11:42 +0100 Message-Id: <20210109231148.1168104-1-alexandre.belloni@bootlin.com> X-Mailer: git-send-email 2.29.2 MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20210109_181242_432470_9CB2EEBB X-CRM114-Status: UNSURE ( 8.95 ) 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 layout and sample frequencies, adding support is trivial. Changes in v2: - Dropped "iio:pressure:ms5637: switch to probe_new" to keep the i2c_device_id table. - Reorder trivial-devices.yaml Alexandre Belloni (6): dt-bindings: trivial-devices: reorder memsic devices 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 | 10 ++- .../iio/common/ms_sensors/ms_sensors_i2c.c | 76 ++++++++++++++---- .../iio/common/ms_sensors/ms_sensors_i2c.h | 15 +++- drivers/iio/pressure/ms5637.c | 77 +++++++++++++++---- 4 files changed, 143 insertions(+), 35 deletions(-)