Received: by 2002:a05:6a10:2785:0:0:0:0 with SMTP id ia5csp1308751pxb; Sat, 9 Jan 2021 15:17:34 -0800 (PST) X-Google-Smtp-Source: ABdhPJwNtc8Ow5sYd6ysbS3yiQIfiHrVdFlMsPNQhtOjoEmjMv/sZlCzWfjpN/ExWfvW8P7QTzYp X-Received: by 2002:a05:6402:7d7:: with SMTP id u23mr9473029edy.325.1610234254164; Sat, 09 Jan 2021 15:17:34 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1610234254; cv=none; d=google.com; s=arc-20160816; b=OZgvjMGpAuNOL+dSg6rlmsmgxiqQY6nQw3wzVPP8ys4H1VOqVnDzprebo0BYaQuett aozNKrAZFdRQGizFSBYw1XQrDaOAUFM4K/WcnCCzNUof6Cj/1YhcBZFzAAJwtO2vMD1a GrtQc/MZBOjTHclHWI4S0ONQduJD0BS5U/UVV3VPwIyvEl1whVyCgqYJe7z0r+e/8OIt 8PQM+s+6TKIEqtDlPstTGy37Wq2cAGyjxNArMGCAhLzmQE3uF9k85QbQijrhPI6/TSKh hvaHKb5FsFNXIsaBmCBE0xWoLzvmVF7EdfHS7zDuriOIlGj9fUbGd8sb2BiYD1vMvLBv /gEA== 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=Hh26zODUMP62g1pretDCngJg0Uq65i7hVzYCg0RxM1M=; b=ZpBnvj2P3jwxcdB3djxKSA5nDoo19MQRkJctu7P+Bi19u2oBrrxMg3eOqlVhydh7DQ b0g8hILK5w+qZyXsVT2MUkwlxSUsdsFC1uR6hYSyfpR/JbtlH4gEjrilUYeQAG5alpiV lEd5ZMvzdtMiw6UJ4RZNiWs57PJyTnoDiCYxA56nk42KjCvVWytkwt/Z2Rnlvfav+u5g 8VltqSK47B2mcsDz8Qnr/ceCdRBWmjbWOVLfFAHhP5ED5Uz+nD+jEfimG/FMEzNKlb57 Nn5Wezqnu3b7TOHZGERnPIcuCMYmgEl2E5mpkQ6ARIx8MImrtAVwkyYCDc72P323Mp9q jxDw== 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 r24si4941886eji.211.2021.01.09.15.17.10; Sat, 09 Jan 2021 15:17:34 -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 S1726638AbhAIXNk (ORCPT + 99 others); Sat, 9 Jan 2021 18:13:40 -0500 Received: from relay3-d.mail.gandi.net ([217.70.183.195]:41887 "EHLO relay3-d.mail.gandi.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726454AbhAIXNj (ORCPT ); Sat, 9 Jan 2021 18:13:39 -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 relay3-d.mail.gandi.net (Postfix) with ESMTPSA id 104D960002; Sat, 9 Jan 2021 23:12:52 +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 6/6] iio:pressure:ms5637: add ms5803 support Date: Sun, 10 Jan 2021 00:11:48 +0100 Message-Id: <20210109231148.1168104-7-alexandre.belloni@bootlin.com> X-Mailer: git-send-email 2.29.2 In-Reply-To: <20210109231148.1168104-1-alexandre.belloni@bootlin.com> References: <20210109231148.1168104-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. 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 e9b64be4b91e..a327130d1faa 100644 --- a/Documentation/devicetree/bindings/trivial-devices.yaml +++ b/Documentation/devicetree/bindings/trivial-devices.yaml @@ -153,6 +153,8 @@ properties: # Measurement Specialities I2C pressure and temperature sensor - meas,ms5637 # Measurement Specialities I2C pressure and temperature sensor + - meas,ms5803 + # Measurement Specialities I2C pressure and temperature sensor - meas,ms5805 # Measurement Specialities I2C pressure and temperature sensor - meas,ms5837 diff --git a/drivers/iio/pressure/ms5637.c b/drivers/iio/pressure/ms5637.c index 0a6034342714..81f683321b23 100644 --- a/drivers/iio/pressure/ms5637.c +++ b/drivers/iio/pressure/ms5637.c @@ -200,8 +200,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 }; @@ -222,6 +229,7 @@ MODULE_DEVICE_TABLE(i2c, ms5637_id); 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.29.2