devicetree.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 0/3] Support ROHM BM1390 pressure sensor
@ 2023-09-06 12:36 Matti Vaittinen
  2023-09-06 12:37 ` [PATCH 1/3] dt-bindings: Add " Matti Vaittinen
                   ` (2 more replies)
  0 siblings, 3 replies; 24+ messages in thread
From: Matti Vaittinen @ 2023-09-06 12:36 UTC (permalink / raw)
  To: Matti Vaittinen, Matti Vaittinen
  Cc: Jonathan Cameron, Lars-Peter Clausen, Rob Herring,
	Krzysztof Kozlowski, Conor Dooley, Matti Vaittinen,
	Angel Iglesias, Andy Shevchenko, Andreas Klinger, linux-iio,
	devicetree, linux-kernel

[-- Attachment #1: Type: text/plain, Size: 3016 bytes --]

ROHM BM1390 Pressure sensor (BM1390GLV-Z) can measure pressures ranging
from 300 hPa to 1300 hPa with configurable measurement averaging and an
internal FIFO. The sensor does also provide temperature measurements
although, according to the data sheet, sensor performs internal
temperature compensation for the MEMS.

Sensor does also contain IIR filter implemented in HW. The data-sheet
says the IIR filter can be configured to be "weak", "middle" or
"strong". Some RMS noise figures are provided in data sheet but no
accurate maths for the filter configurations is provided.

I actually asked if we can define 3db frequencies corresponding to these
IIR filter settings - and I received values 0.452Hz, 0.167Hz, and 0.047Hz
but I am not at all sure we understood each others with the HW
colleagues... Hence, the IIR filter configuration is not supported by this
driver and the filter is just configured to the "middle" setting.
(at least for now)

It would also be possible to not use IIR filter but just do some simple
averaging. I wonder if it would make sense to implement the OVERSAMPLING
value setting so that if this value is written, IIR filter is disabled and
number of samples to be averaged is set to value requested by
OVERSAMPLING. The data-sheet has a mention that if IIR is used, the
number of averaged samples must be set to a fixed value.

The FIFO measurement mode (in sensor hardware) is only measuring the
pressure and not the temperature. The driver measures temperature when
FIFO is flushed and simply uses the same measured temperature value to
all reported temperatures. This should not be a problem when temperature
is not changing very rapidly (several degrees C / second) but allows users
to get the temperature measurements from sensor without any additional
logic.

This driver has received limited amount of testing this far. It's in a
state 'works on my machine, for my use cases' - and all feedback is
appreciated!

Matti Vaittinen (3):
  dt-bindings: Add ROHM BM1390 pressure sensor
  iio: pressure: Support ROHM BU1390
  MAINTAINERS: Add ROHM BM1390

 .../bindings/iio/pressure/rohm,bm1390.yaml    |  52 +
 MAINTAINERS                                   |   6 +
 drivers/iio/pressure/Kconfig                  |   9 +
 drivers/iio/pressure/Makefile                 |   1 +
 drivers/iio/pressure/rohm-bm1390.c            | 944 ++++++++++++++++++
 5 files changed, 1012 insertions(+)
 create mode 100644 Documentation/devicetree/bindings/iio/pressure/rohm,bm1390.yaml
 create mode 100644 drivers/iio/pressure/rohm-bm1390.c


base-commit: 2dde18cd1d8fac735875f2e4987f11817cc0bc2c
-- 
2.41.0


-- 
Matti Vaittinen, Linux device drivers
ROHM Semiconductors, Finland SWDC
Kiviharjunlenkki 1E
90220 OULU
FINLAND

~~~ "I don't think so," said Rene Descartes. Just then he vanished ~~~
Simon says - in Latin please.
~~~ "non cogito me" dixit Rene Descarte, deinde evanescavit ~~~
Thanks to Simon Glass for the translation =] 

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 488 bytes --]

^ permalink raw reply	[flat|nested] 24+ messages in thread

end of thread, other threads:[~2023-09-18 11:42 UTC | newest]

Thread overview: 24+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-09-06 12:36 [PATCH 0/3] Support ROHM BM1390 pressure sensor Matti Vaittinen
2023-09-06 12:37 ` [PATCH 1/3] dt-bindings: Add " Matti Vaittinen
2023-09-07 10:08   ` Conor Dooley
2023-09-08  5:10     ` Matti Vaittinen
2023-09-08  7:14   ` Benjamin Bara
2023-09-08  7:18     ` Matti Vaittinen
2023-09-06 12:37 ` [PATCH 2/3] iio: pressure: Support ROHM BU1390 Matti Vaittinen
2023-09-06 15:48   ` Andy Shevchenko
2023-09-07  5:57     ` Matti Vaittinen
2023-09-07 13:57       ` Andy Shevchenko
2023-09-08  6:12         ` Matti Vaittinen
2023-09-08 18:44           ` Jonathan Cameron
2023-09-11  5:32             ` Matti Vaittinen
2023-09-08  6:24         ` Matti Vaittinen
2023-09-08 18:33       ` Jonathan Cameron
2023-09-08 18:45   ` Jonathan Cameron
2023-09-11  5:15     ` Matti Vaittinen
2023-09-10 13:22   ` Jonathan Cameron
2023-09-11 10:40     ` Matti Vaittinen
2023-09-12 14:38       ` Jonathan Cameron
2023-09-14 11:47     ` Matti Vaittinen
2023-09-17  9:26       ` Jonathan Cameron
2023-09-18 11:42         ` Matti Vaittinen
2023-09-06 12:40 ` [PATCH 3/3] MAINTAINERS: Add ROHM BM1390 Matti Vaittinen

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).