Received: by 2002:a05:6a10:f347:0:0:0:0 with SMTP id d7csp4381408pxu; Wed, 9 Dec 2020 16:03:29 -0800 (PST) X-Google-Smtp-Source: ABdhPJzJ2Yw9UyWOw5NBAJ0FKZbQcKtUYwqnGuDW8LCtpobm80rYamNfXGVscTjcYP1i9sw0YAa5 X-Received: by 2002:a17:906:eb8d:: with SMTP id mh13mr4021812ejb.299.1607558609021; Wed, 09 Dec 2020 16:03:29 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1607558609; cv=none; d=google.com; s=arc-20160816; b=Ak16vob8wq197Qaq9OgzXlDeF5K8r1Jmyehmeb1JVmnrY3td6fMVPvmiUa8EzwrEcj RGPUOg/gGWtmof8oOMqWJmeEMJXhS55G8Qx30GH/L3bCEE3yf1U1kAcv6FEvPvAxgUUi aJ+cd3hDx6Zu0qNch8bjzUYFmcnhL4JY3Xx4ALeXAnwz4FAmj13SaS/XYk+0/+MfPlc9 a77j/tC2Zb0rzkeGZfoWaflvDYjhkIkhU1iMIivnxsCM/8nVw8vAJU9xfgPM1GdKwTpS gnO6d2sqjaeYTaF/1VensNTN4bUn6XgcuQQ35yXoSez37JSKHsE/qRsjtG584GR5i4eK /ijA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from; bh=sR2XRCqRDg/5S0kU+dyH21d8n8cCfW0vTwlPtsSqABU=; b=YhPWSyVkdpymETCzdl5Wynq7hML6L91gaEXHngwvkhrysp8HB6wrXbzqcEJ+xh/kG5 g0Z6AZgH4OnEpOdMHJSk7FUsXR4C0RK3rK2YEDMmjqhkZVasPWlMyBlkrvD7AORwJDuy y7YCUtJWpDO9lsm+KweRmFYiBaEf+rQiXIpzs3pGCcuJ+e6FUA8taDZtcH1UdTEttw0k kYTeLIsyVMRpNmUttIHBKLzBYxVZrLh6xyK33HVHf1ygzJRkRPj3pMnEkFfalwqqg3hg yf9pcXoUuHOBUJmVqlJBNHLe7HMrXmOVkUmHHtYxOw8ixkmG9jvWlWXCxVSSWjcxoalv LUow== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id r12si1565548ejs.382.2020.12.09.16.03.06; Wed, 09 Dec 2020 16:03:29 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1733284AbgLIXuM (ORCPT + 99 others); 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