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: 12008803 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, HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_PATCH,MAILING_LIST_MULTI,SPF_HELO_NONE, SPF_PASS,USER_AGENT_GIT autolearn=unavailable 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 D8173C4160E for ; Sat, 9 Jan 2021 23:14:01 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id AE0AB23975 for ; Sat, 9 Jan 2021 23:14:01 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726379AbhAIXNT (ORCPT ); Sat, 9 Jan 2021 18:13:19 -0500 Received: from relay2-d.mail.gandi.net ([217.70.183.194]:60701 "EHLO relay2-d.mail.gandi.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726080AbhAIXNT (ORCPT ); Sat, 9 Jan 2021 18:13:19 -0500 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 Cc: Lars-Peter Clausen , Peter Meerwald-Stadler , linux-iio@vger.kernel.org, devicetree@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, Alexandre Belloni 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 Precedence: bulk List-ID: X-Mailing-List: linux-iio@vger.kernel.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(-)