All of lore.kernel.org
 help / color / mirror / Atom feed
From: Alexandre Belloni <alexandre.belloni@bootlin.com>
To: Jonathan Cameron <jic23@kernel.org>
Cc: Lars-Peter Clausen <lars@metafoo.de>,
	Peter Meerwald-Stadler <pmeerw@pmeerw.net>,
	linux-iio@vger.kernel.org, devicetree@vger.kernel.org,
	linux-arm-kernel@lists.infradead.org,
	linux-kernel@vger.kernel.org,
	Alexandre Belloni <alexandre.belloni@bootlin.com>,
	Rob Herring <robh+dt@kernel.org>
Subject: [PATCH 6/6] iio:pressure:ms5637: add ms5803 support
Date: Thu, 10 Dec 2020 00:48:57 +0100	[thread overview]
Message-ID: <20201209234857.1521453-7-alexandre.belloni@bootlin.com> (raw)
In-Reply-To: <20201209234857.1521453-1-alexandre.belloni@bootlin.com>

The ms5803 is very similar to the ms5805 but has less resolution options
and has the 128bit PROM layout.

Cc: Rob Herring <robh+dt@kernel.org>
Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com>
---
 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


WARNING: multiple messages have this Message-ID (diff)
From: Alexandre Belloni <alexandre.belloni@bootlin.com>
To: Jonathan Cameron <jic23@kernel.org>
Cc: devicetree@vger.kernel.org,
	Alexandre Belloni <alexandre.belloni@bootlin.com>,
	Lars-Peter Clausen <lars@metafoo.de>,
	linux-iio@vger.kernel.org, linux-kernel@vger.kernel.org,
	Rob Herring <robh+dt@kernel.org>,
	Peter Meerwald-Stadler <pmeerw@pmeerw.net>,
	linux-arm-kernel@lists.infradead.org
Subject: [PATCH 6/6] iio:pressure:ms5637: add ms5803 support
Date: Thu, 10 Dec 2020 00:48:57 +0100	[thread overview]
Message-ID: <20201209234857.1521453-7-alexandre.belloni@bootlin.com> (raw)
In-Reply-To: <20201209234857.1521453-1-alexandre.belloni@bootlin.com>

The ms5803 is very similar to the ms5805 but has less resolution options
and has the 128bit PROM layout.

Cc: Rob Herring <robh+dt@kernel.org>
Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com>
---
 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

  parent reply	other threads:[~2020-12-09 23:50 UTC|newest]

Thread overview: 34+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-12-09 23:48 [PATCH 0/6] iio:pressure:ms5637: add ms5803 support Alexandre Belloni
2020-12-09 23:48 ` Alexandre Belloni
2020-12-09 23:48 ` [PATCH 1/6] iio:pressure:ms5637: switch to probe_new Alexandre Belloni
2020-12-09 23:48   ` Alexandre Belloni
2020-12-12 13:26   ` Andy Shevchenko
2020-12-12 13:26     ` Andy Shevchenko
2020-12-13 17:04     ` Jonathan Cameron
2020-12-13 17:04       ` Jonathan Cameron
2020-12-09 23:48 ` [PATCH 2/6] iio:pressure:ms5637: introduce hardware differentiation Alexandre Belloni
2020-12-09 23:48   ` Alexandre Belloni
2020-12-13 17:12   ` Jonathan Cameron
2020-12-13 17:12     ` Jonathan Cameron
2020-12-13 19:51     ` Alexandre Belloni
2020-12-13 19:51       ` Alexandre Belloni
2020-12-09 23:48 ` [PATCH 3/6] iio:pressure:ms5637: limit available sample frequencies Alexandre Belloni
2020-12-09 23:48   ` Alexandre Belloni
2020-12-12 18:26   ` Andy Shevchenko
2020-12-12 18:26     ` Andy Shevchenko
2020-12-13 17:17     ` Jonathan Cameron
2020-12-13 17:17       ` Jonathan Cameron
2020-12-09 23:48 ` [PATCH 4/6] iio:common:ms_sensors:ms_sensors_i2c: rework CRC calculation helper Alexandre Belloni
2020-12-09 23:48   ` Alexandre Belloni
2020-12-09 23:48 ` [PATCH 5/6] iio:common:ms_sensors:ms_sensors_i2c: add support for alternative PROM layout Alexandre Belloni
2020-12-09 23:48   ` Alexandre Belloni
2020-12-13 17:20   ` Jonathan Cameron
2020-12-13 17:20     ` Jonathan Cameron
2020-12-13 19:34     ` Alexandre Belloni
2020-12-13 19:34       ` Alexandre Belloni
2020-12-09 23:48 ` Alexandre Belloni [this message]
2020-12-09 23:48   ` [PATCH 6/6] iio:pressure:ms5637: add ms5803 support Alexandre Belloni
2020-12-11  3:34   ` Rob Herring
2020-12-11  3:34     ` Rob Herring
2020-12-11  8:08     ` Alexandre Belloni
2020-12-11  8:08       ` Alexandre Belloni

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20201209234857.1521453-7-alexandre.belloni@bootlin.com \
    --to=alexandre.belloni@bootlin.com \
    --cc=devicetree@vger.kernel.org \
    --cc=jic23@kernel.org \
    --cc=lars@metafoo.de \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-iio@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=pmeerw@pmeerw.net \
    --cc=robh+dt@kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.