From mboxrd@z Thu Jan 1 00:00:00 1970 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=-16.7 required=3.0 tests=BAYES_00, HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER,INCLUDES_PATCH, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED,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 90AD5C433FE for ; Wed, 9 Dec 2020 23:50:40 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 63D3823B77 for ; Wed, 9 Dec 2020 23:50:40 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1733302AbgLIXuM (ORCPT ); Wed, 9 Dec 2020 18:50:12 -0500 Received: from relay6-d.mail.gandi.net ([217.70.183.198]:39019 "EHLO relay6-d.mail.gandi.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1732738AbgLIXt4 (ORCPT ); Wed, 9 Dec 2020 18:49:56 -0500 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 relay6-d.mail.gandi.net (Postfix) with ESMTPSA id 122A2C0008; Wed, 9 Dec 2020 23:49:08 +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 , Rob Herring Subject: [PATCH 6/6] iio:pressure:ms5637: add ms5803 support Date: Thu, 10 Dec 2020 00:48:57 +0100 Message-Id: <20201209234857.1521453-7-alexandre.belloni@bootlin.com> X-Mailer: git-send-email 2.28.0 In-Reply-To: <20201209234857.1521453-1-alexandre.belloni@bootlin.com> References: <20201209234857.1521453-1-alexandre.belloni@bootlin.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org The ms5803 is very similar to the ms5805 but has less resolution options and has the 128bit PROM layout. Cc: Rob Herring Signed-off-by: Alexandre Belloni --- Documentation/devicetree/bindings/trivial-devices.yaml | 2 ++ drivers/iio/pressure/ms5637.c | 8 ++++++++ 2 files changed, 10 insertions(+) diff --git a/Documentation/devicetree/bindings/trivial-devices.yaml b/Documentation/devicetree/bindings/trivial-devices.yaml index ab623ba930d5..84b0e44235c1 100644 --- a/Documentation/devicetree/bindings/trivial-devices.yaml +++ b/Documentation/devicetree/bindings/trivial-devices.yaml @@ -132,6 +132,8 @@ properties: - mcube,mc3230 # MEMSIC 2-axis 8-bit digital accelerometer - memsic,mxc6225 + # Measurement Specialities I2C pressure and temperature sensor + - meas,ms5803 # Microchip differential I2C ADC, 1 Channel, 18 bit - microchip,mcp3421 # Microchip differential I2C ADC, 2 Channel, 18 bit diff --git a/drivers/iio/pressure/ms5637.c b/drivers/iio/pressure/ms5637.c index 2943b88734b3..39830a51ca78 100644 --- a/drivers/iio/pressure/ms5637.c +++ b/drivers/iio/pressure/ms5637.c @@ -192,8 +192,15 @@ static const struct ms_tp_hw_data ms5637_hw_data = { .max_res_index = 5 }; +static const struct ms_tp_hw_data ms5803_hw_data = { + .prom_len = 8, + .max_res_index = 4 +}; + static const struct ms_tp_data ms5637_data = { .name = "ms5637", .hw = &ms5637_hw_data }; +static const struct ms_tp_data ms5803_data = { .name = "ms5803", .hw = &ms5803_hw_data }; + static const struct ms_tp_data ms5805_data = { .name = "ms5805", .hw = &ms5637_hw_data }; static const struct ms_tp_data ms5837_data = { .name = "ms5837", .hw = &ms5637_hw_data }; @@ -205,6 +212,7 @@ static const struct ms_tp_data ms8607_data = { static const struct of_device_id ms5637_of_match[] = { { .compatible = "meas,ms5637", .data = &ms5637_data }, + { .compatible = "meas,ms5803", .data = &ms5803_data }, { .compatible = "meas,ms5805", .data = &ms5805_data }, { .compatible = "meas,ms5837", .data = &ms5837_data }, { .compatible = "meas,ms8607-temppressure", .data = &ms8607_data }, -- 2.28.0 From mboxrd@z Thu Jan 1 00:00:00 1970 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=-16.8 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER, INCLUDES_PATCH,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED, 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 0E291C4361B for ; Wed, 9 Dec 2020 23:50:51 +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 BD70D23B51 for ; Wed, 9 Dec 2020 23:50:50 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org BD70D23B51 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:References:In-Reply-To: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:List-Owner; bh=wTkke53AUUo8FFOiLgwJbnJSHTVkGZnpLkEH7RGoVds=; b=TYxgDLTBl6HOc+TveQIC46RBx w8o/d5oY24D7UVTUdWRpyD5soFfgZqnAQYkDCXPGFibJWwNgr4fOolUxY+jV8d1tWu5kokDQ8vVEv mF4Un0m+nJ+TSBb72UgL1ag3yRe2FdqlGH59OpK3wHuU3osTJ6DDwfmY4U1qUl/UTd0Y+rL4C+yvD rymEpqTKLjbesvezMIkT4Pg+J5RbzTb321Owwpy4uxxqOpsinI5Luv5/+1RhyVJqMxWqOdlecl3fF 0RHrE/iX+qnDx4tMx9zAcWflB50iYymqvnD3Vhr9+t1tOaBL2M4wMRV7WZnl4KSPBsCnSFA4j/X5m k4ZhW8dzA==; Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1kn9D7-0000Of-AB; Wed, 09 Dec 2020 23:49:29 +0000 Received: from relay6-d.mail.gandi.net ([217.70.183.198]) by merlin.infradead.org with esmtps (Exim 4.92.3 #3 (Red Hat Linux)) id 1kn9Cq-0000Mj-Jn for linux-arm-kernel@lists.infradead.org; Wed, 09 Dec 2020 23:49:13 +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 relay6-d.mail.gandi.net (Postfix) with ESMTPSA id 122A2C0008; Wed, 9 Dec 2020 23:49:08 +0000 (UTC) From: Alexandre Belloni To: Jonathan Cameron Subject: [PATCH 6/6] iio:pressure:ms5637: add ms5803 support Date: Thu, 10 Dec 2020 00:48:57 +0100 Message-Id: <20201209234857.1521453-7-alexandre.belloni@bootlin.com> X-Mailer: git-send-email 2.28.0 In-Reply-To: <20201209234857.1521453-1-alexandre.belloni@bootlin.com> References: <20201209234857.1521453-1-alexandre.belloni@bootlin.com> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20201209_184912_798570_FC699737 X-CRM114-Status: GOOD ( 12.59 ) 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, Rob Herring , Peter Meerwald-Stadler , linux-arm-kernel@lists.infradead.org Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org The ms5803 is very similar to the ms5805 but has less resolution options and has the 128bit PROM layout. Cc: Rob Herring Signed-off-by: Alexandre Belloni --- Documentation/devicetree/bindings/trivial-devices.yaml | 2 ++ drivers/iio/pressure/ms5637.c | 8 ++++++++ 2 files changed, 10 insertions(+) diff --git a/Documentation/devicetree/bindings/trivial-devices.yaml b/Documentation/devicetree/bindings/trivial-devices.yaml index ab623ba930d5..84b0e44235c1 100644 --- a/Documentation/devicetree/bindings/trivial-devices.yaml +++ b/Documentation/devicetree/bindings/trivial-devices.yaml @@ -132,6 +132,8 @@ properties: - mcube,mc3230 # MEMSIC 2-axis 8-bit digital accelerometer - memsic,mxc6225 + # Measurement Specialities I2C pressure and temperature sensor + - meas,ms5803 # Microchip differential I2C ADC, 1 Channel, 18 bit - microchip,mcp3421 # Microchip differential I2C ADC, 2 Channel, 18 bit diff --git a/drivers/iio/pressure/ms5637.c b/drivers/iio/pressure/ms5637.c index 2943b88734b3..39830a51ca78 100644 --- a/drivers/iio/pressure/ms5637.c +++ b/drivers/iio/pressure/ms5637.c @@ -192,8 +192,15 @@ static const struct ms_tp_hw_data ms5637_hw_data = { .max_res_index = 5 }; +static const struct ms_tp_hw_data ms5803_hw_data = { + .prom_len = 8, + .max_res_index = 4 +}; + static const struct ms_tp_data ms5637_data = { .name = "ms5637", .hw = &ms5637_hw_data }; +static const struct ms_tp_data ms5803_data = { .name = "ms5803", .hw = &ms5803_hw_data }; + static const struct ms_tp_data ms5805_data = { .name = "ms5805", .hw = &ms5637_hw_data }; static const struct ms_tp_data ms5837_data = { .name = "ms5837", .hw = &ms5637_hw_data }; @@ -205,6 +212,7 @@ static const struct ms_tp_data ms8607_data = { static const struct of_device_id ms5637_of_match[] = { { .compatible = "meas,ms5637", .data = &ms5637_data }, + { .compatible = "meas,ms5803", .data = &ms5803_data }, { .compatible = "meas,ms5805", .data = &ms5805_data }, { .compatible = "meas,ms5837", .data = &ms5837_data }, { .compatible = "meas,ms8607-temppressure", .data = &ms8607_data }, -- 2.28.0 _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel