mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Jinseob Kim <kimjinseob88@gmail.com>
To: Jonathan Cameron <jic23@kernel.org>, linux-iio@vger.kernel.org
Cc: David Lechner <dlechner@baylibre.com>,
	Nuno Sa <nuno.sa@analog.com>, Andy Shevchenko <andy@kernel.org>,
	Rob Herring <robh@kernel.org>,
	Krzysztof Kozlowski <krzk+dt@kernel.org>,
	Conor Dooley <conor+dt@kernel.org>,
	devicetree@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: [PATCH RFC v3 0/6] iio: add Open Sensor Fusion OSF0 UART driver
Date: Fri, 29 May 2026 21:09:59 +0900	[thread overview]
Message-ID: <20260529121005.1470-1-kimjinseob88@gmail.com> (raw)

This RFC series adds an Industrial I/O driver for Open Sensor Fusion
OSF0 UART devices.

Open Sensor Fusion is an open hardware project for sensor aggregation
devices and Linux IIO host support. OSF0 is not a general standard; it is
the current wire format used by this project and by the RFC driver in this
series. The first concrete hardware target is OSF GREEN, an STM32F405-based
sensor aggregation board that streams sensor samples to a Linux host.

Project links:
https://www.opensensorfusion.org/
https://github.com/opensensorfusion
https://github.com/opensensorfusion/opensensorfusion-linux

The driver receives OSF0 frames over a serdev UART, validates the stream,
decodes capability and sample frames, and registers IIO devices for the
supported sensor types. The current RFC driver covers the device-to-host
path used for accelerometer, gyroscope, magnetometer, and temperature
samples.

Changes since v2:

* Reworked the binding around the concrete OSF GREEN hardware target.
* Changed the compatible from opensensorfusion,osf-uart to
  opensensorfusion,osf-green.
* Renamed the binding file to opensensorfusion,osf-green.yaml.
* Updated the example node name to generic sensor.
* Added serial-peripheral-props.yaml and unevaluatedProperties: false.
* Added public project links and clarified that OSF0 is not a general
  standard.
* Separated the OSF0 wire format from the subset currently supported by
  this RFC driver.
* Clarified SENSOR_SAMPLE as a 16-byte payload header followed by
  4 * channel_count bytes of s32 channel data.
* Clarified device-side timestamp limitations.
* Spelled out Attitude and Heading Reference System (AHRS).
* Added sensor_type, sample_format, channel_count, reserved-field, and
  payload length overflow validation.
* Changed reserved fields to validate-only handling.
* Fixed IIO_BUFFER / IIO_KFIFO_BUF dependency handling.
* Added channel_count checks before pushing samples to IIO buffers.
* Added locking for cached latest samples.
* Removed explicit linux-iio and devicetree list entries from
  MAINTAINERS.
* Folded MAINTAINERS updates into the patches that add the corresponding
  files.
* Addressed Sashiko feedback from v2.

The runtime smoke test used for the previous revision was performed with an
OSF GREEN prototype connected to a Raspberry Pi 4 over UART/serdev. This v3
series was also checked with dt_binding_check, checkpatch, and a W=1 target
build in the local full-tree environment.


Jinseob Kim (6):
  dt-bindings: iio: add OSF GREEN sensor aggregation device
  Documentation: iio: add Open Sensor Fusion protocol v0 reference
  iio: osf: add protocol v0 decoding
  iio: osf: add stream parser
  iio: osf: add UART serdev transport
  iio: osf: register IIO devices from capabilities

 .../iio/imu/opensensorfusion,osf-green.yaml   |  43 +++
 .../devicetree/bindings/vendor-prefixes.yaml  |   2 +
 .../iio/open-sensor-fusion-protocol-v0.rst    | 308 ++++++++++++++++++
 MAINTAINERS                                   |  13 +
 drivers/iio/Kconfig                           |   1 +
 drivers/iio/Makefile                          |   1 +
 drivers/iio/opensensorfusion/Kconfig          |  14 +
 drivers/iio/opensensorfusion/Makefile         |   6 +
 drivers/iio/opensensorfusion/osf_core.c       | 305 +++++++++++++++++
 drivers/iio/opensensorfusion/osf_core.h       |  70 ++++
 drivers/iio/opensensorfusion/osf_iio.c        | 285 ++++++++++++++++
 drivers/iio/opensensorfusion/osf_iio.h        |  22 ++
 drivers/iio/opensensorfusion/osf_protocol.c   | 247 ++++++++++++++
 drivers/iio/opensensorfusion/osf_protocol.h   |  95 ++++++
 drivers/iio/opensensorfusion/osf_serdev.c     | 111 +++++++
 drivers/iio/opensensorfusion/osf_stream.c     | 207 ++++++++++++
 drivers/iio/opensensorfusion/osf_stream.h     |  31 ++
 17 files changed, 1761 insertions(+)
 create mode 100644 Documentation/devicetree/bindings/iio/imu/opensensorfusion,osf-green.yaml
 create mode 100644 Documentation/iio/open-sensor-fusion-protocol-v0.rst
 create mode 100644 drivers/iio/opensensorfusion/Kconfig
 create mode 100644 drivers/iio/opensensorfusion/Makefile
 create mode 100644 drivers/iio/opensensorfusion/osf_core.c
 create mode 100644 drivers/iio/opensensorfusion/osf_core.h
 create mode 100644 drivers/iio/opensensorfusion/osf_iio.c
 create mode 100644 drivers/iio/opensensorfusion/osf_iio.h
 create mode 100644 drivers/iio/opensensorfusion/osf_protocol.c
 create mode 100644 drivers/iio/opensensorfusion/osf_protocol.h
 create mode 100644 drivers/iio/opensensorfusion/osf_serdev.c
 create mode 100644 drivers/iio/opensensorfusion/osf_stream.c
 create mode 100644 drivers/iio/opensensorfusion/osf_stream.h

-- 
2.43.0


             reply	other threads:[~2026-05-29 12:10 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-05-29 12:09 Jinseob Kim [this message]
2026-05-29 12:10 ` [PATCH RFC v3 1/6] dt-bindings: iio: add OSF GREEN sensor aggregation device Jinseob Kim
2026-05-29 16:31   ` Conor Dooley
2026-05-29 17:14     ` Jonathan Cameron
2026-05-29 12:10 ` [PATCH RFC v3 2/6] Documentation: iio: add Open Sensor Fusion protocol v0 reference Jinseob Kim
2026-05-31 10:35   ` Jonathan Cameron
2026-05-29 12:10 ` [PATCH RFC v3 3/6] iio: osf: add protocol v0 decoding Jinseob Kim
2026-05-31 10:56   ` Jonathan Cameron
2026-06-02 23:07   ` Andy Shevchenko
2026-05-29 12:10 ` [PATCH RFC v3 4/6] iio: osf: add stream parser Jinseob Kim
2026-05-29 12:10 ` [PATCH RFC v3 5/6] iio: osf: add UART serdev transport Jinseob Kim
2026-05-31 11:23   ` Jonathan Cameron
2026-05-29 12:10 ` [PATCH RFC v3 6/6] iio: osf: register IIO devices from capabilities Jinseob Kim
2026-05-31 11:42   ` Jonathan Cameron
2026-05-31 10:25 ` [PATCH RFC v3 0/6] iio: add Open Sensor Fusion OSF0 UART driver Jonathan Cameron

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=20260529121005.1470-1-kimjinseob88@gmail.com \
    --to=kimjinseob88@gmail.com \
    --cc=andy@kernel.org \
    --cc=conor+dt@kernel.org \
    --cc=devicetree@vger.kernel.org \
    --cc=dlechner@baylibre.com \
    --cc=jic23@kernel.org \
    --cc=krzk+dt@kernel.org \
    --cc=linux-iio@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=nuno.sa@analog.com \
    --cc=robh@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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®