From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail-pg1-f172.google.com (mail-pg1-f172.google.com [209.85.215.172]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id C3DC7364E9A for ; Wed, 20 May 2026 07:29:01 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.215.172 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1779262143; cv=none; b=htcOyfgWSMTFbOTAUyZ9wJ+QpBZPyO6KlBX/BqwB6wjZcgp74C5C3Zk6UbIyGozsgRUjnoDgKTs+gVNLkMbIdoT1jfWAWX+Y9WZM7pF9iTbRWX0j/y6p0S5J8jj9TfBtFyDMvydrwzH3czsQIg5cjVnTwssRsUtus90nt25o3vI= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1779262143; c=relaxed/simple; bh=mLWIjo5Mf0fC0ZEIMKv/YgqjtFFyvLeeu5kpLLlq2so=; h=From:To:Cc:Subject:Date:Message-ID:MIME-Version; b=RoIWz87lLypsMQZcMbx8EUalqZnmyY4+p3cuzjTiE/EzS1sHw0irVVYWYfbzzsbd2YW1hTh1TIX/DVKN4Bt2Lq5wf2bJCWYYPQUzxVJJjLqCY7+bo7NjiQm80YeB11B52VrjMHfwAqqRdGXfIP4sQRmdpC9KJaYxm5DCSk/jRbo= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com; spf=pass smtp.mailfrom=gmail.com; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b=pHPY3U6K; arc=none smtp.client-ip=209.85.215.172 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=gmail.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="pHPY3U6K" Received: by mail-pg1-f172.google.com with SMTP id 41be03b00d2f7-c822652f82aso3851386a12.3 for ; Wed, 20 May 2026 00:29:01 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20251104; t=1779262141; x=1779866941; darn=vger.kernel.org; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:from:to:cc:subject:date:message-id:reply-to; bh=zj0vx40UntDsD2TYK6nD+GW3q6EMQAvEH6QbIchZOP0=; b=pHPY3U6KVdXA/bd/wnZOJdGdxIpK857/62PPrjOBDf7aYPitGEoc/+KuZi0bwgRt4F N1f/lbSzG5ofFM8RJjfjI+kQPxNBhruWqTSaKaNyHpByN5doQX7HzNntfQwbcJyuxMDH q9e905dPlohTmaXW7iyOw97Jx6mQALAn+9VFJefBy0o8QQnsf/2GFptU7ziXn8E3gDcH x/U7Ikf3yGQMgUm0A5tkFC69w8KnLkjWV2RsZtrSz0iu8CR+lmSZAchtYhuhBWq/gHOW xhOckvU1CDI08FzCyrDNjRddiMJ9vLaMXEvtPS5TLOL2i9pddvJAqsH4p0s8ZYf7TF+3 Mpgg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1779262141; x=1779866941; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:x-gm-gg:x-gm-message-state:from:to:cc:subject:date :message-id:reply-to; bh=zj0vx40UntDsD2TYK6nD+GW3q6EMQAvEH6QbIchZOP0=; b=Q4/c46HGfpDrVaRQbIX/q7sL6BCw4YL+Ky5o++Ho/ho0yoKm/QciInVT3CQmOMcj2Q 9gHvL16gQKN8g7QU7073Ph06aKJ5A2a7Qseae6iYWeDvZrikjo14JAV+GEhWvIXdiSyi +NvZshd/MdDrQ1AxJhMPq/gRLoi2E5bWvi82kFDiRW3DvacIoSqJ8lnzkeAaPujBU9mp 0kvYpAMPXngow381aUcCn2uth7+UiNSz4cw5bpfegAqqCmmHN3XBq8N+ZhYrtVpAfWCM 83idmy7e9gu8I4lCInIclzYrsePhO2p896wDSNF0++gY7qNn56EwQtwNHzJTS1aBR0os 2UOw== X-Forwarded-Encrypted: i=1; AFNElJ/4oLWoup2NVWG75rPtpCXvBIWVpnR+wUqjNNPfXbidqyldnWR9k+Z9TRoCIRZlNG2+hFJir7LEThgLgZ8=@vger.kernel.org X-Gm-Message-State: AOJu0Yy8xd6J33EJnK/CGn/T0vf8d21EhIh/BZU0tZPBzuWQTAh+TNvB 6KSDAGhxvgzuEMQ7jHL7ZYotkVzi/I6n0JJeOsbytOkOnGQlJTfNm/qH X-Gm-Gg: Acq92OE2Rs54GprSP7djNvY7dHap6Z/PHwrd9Yzu30g6o71+JKBMkvCbDpxqfMUVkB7 J3ezGHuCBj08N/ssgJ12ngx7dE4CRUMCJDslry0FiU9tDhEG5y4UPAmXWMAsOL307MibB5mGd54 A/uoV/vQK+Id278Hk0ddvhAkz3iIYHsJbbSwYsIR7KRvF5QnenV0X6Z9BMHMS5xdFDBLDXtsAT5 7Xoen9v0XJ/hQgt1096j8k3uN8dUn0M60M7F5KTSP50TeEqZdtl6+mEPUOpdMpTZuaU6Ijook4n BSW3PCSkgnTQMAQnqQ04bFxH3fZpwqvT3ymniI1cMzj3/Tvxi5+4rwo93o8p4pTZbUChaXrv6Lu 1Sr2oSofJc+VEhJjj0KTERkdEc8t8SaFlyiyeg4sdpH/UrxGi48U7r9mgDoBoido/h8lTlhVqLP /kVp5YUnuuvkl+Q4XP94vVuM1DhO2MX2hl7H6lW4qD63Da4Hly6EIeiyGSfr0NToEmjcG9k4A9i 5hSfk6aBPcnNbBsKYxSx0IUow9tu0aRUXU0cA== X-Received: by 2002:a17:902:7892:b0:2ba:6518:a6d4 with SMTP id d9443c01a7336-2bd7e87d577mr181963515ad.20.1779262141029; Wed, 20 May 2026 00:29:01 -0700 (PDT) Received: from DESKTOP-G3E0OSP.localdomain ([112.172.255.242]) by smtp.gmail.com with ESMTPSA id d9443c01a7336-2bd5c05f27csm206258595ad.25.2026.05.20.00.28.58 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 20 May 2026 00:29:00 -0700 (PDT) From: Jinseob Kim To: Jonathan Cameron , linux-iio@vger.kernel.org Cc: David Lechner , =?UTF-8?q?Nuno=20S=C3=A1?= , Andy Shevchenko , Rob Herring , Krzysztof Kozlowski , Conor Dooley , devicetree@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH RFC 0/3] iio: add Open Sensor Fusion UART driver Date: Wed, 20 May 2026 16:28:40 +0900 Message-ID: <20260520072843.3593-1-kimjinseob88@gmail.com> X-Mailer: git-send-email 2.43.0 Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Open Sensor Fusion is a UART-attached sensor aggregation device. The current prototype sends OSF protocol v0 frames over a host UART link. This RFC adds the first Linux IIO receive path for that UART stream. The first transport is serdev UART. USB, real sensor reads, fusion output, and production timestamp correlation are intentionally left out of this series. The driver code is kept in one patch for the first RFC to avoid intermediate non-buildable states. The internal files are still split by protocol, stream, core, transport, and IIO code. Current validation coverage: - STM32F405 test firmware OSF protocol v0 UART stream at 115200 8N1. - Raspberry Pi 4 serdev probe and receive path to osf_core_receive_frame(). - CAPABILITY_REPORT-driven IIO device registration. - IIO read_raw for accel, gyro, magn, and temp samples. - IIO software kfifo buffer userspace read. - scan decode helper for buffered samples. - dt_binding_check pass for the binding. - checkpatch.pl --strict with ERROR 0, WARNING 0, CHECK 0. - W=1 source compile/link phase clean in the staging kernel tree. - modpost unresolved symbol warnings came from the staging tree missing Module.symvers. Known limits: - The sample source is synthetic stream data, not real ICM-42688-P or MMC5983MA sensor reads. - The IIO timestamp is Linux host receive time. Device time correlation is still open. - Runtime capability removal is not implemented. - The staging layout uses drivers/iio/opensensorfusion/. The final directory is open for review. Review feedback wanted on the IIO device layout, timestamp policy, binding shape, and driver directory. Jinseob Kim (3): dt-bindings: iio: imu: add Open Sensor Fusion UART binding iio: osf: add Open Sensor Fusion UART IIO driver MAINTAINERS: add Open Sensor Fusion IIO driver entry .../iio/imu/opensensorfusion,osf-uart.yaml | 33 ++ MAINTAINERS | 7 + drivers/iio/Kconfig | 1 + drivers/iio/Makefile | 1 + drivers/iio/opensensorfusion/Kconfig | 15 + drivers/iio/opensensorfusion/Makefile | 6 + drivers/iio/opensensorfusion/osf_core.c | 334 +++++++++++++++++ drivers/iio/opensensorfusion/osf_core.h | 81 ++++ drivers/iio/opensensorfusion/osf_iio.c | 268 +++++++++++++ drivers/iio/opensensorfusion/osf_iio.h | 21 ++ drivers/iio/opensensorfusion/osf_protocol.c | 234 ++++++++++++ drivers/iio/opensensorfusion/osf_protocol.h | 100 +++++ drivers/iio/opensensorfusion/osf_serdev.c | 354 ++++++++++++++++++ drivers/iio/opensensorfusion/osf_serdev.h | 8 + drivers/iio/opensensorfusion/osf_stream.c | 212 +++++++++++ drivers/iio/opensensorfusion/osf_stream.h | 31 ++ 16 files changed, 1706 insertions(+) create mode 100644 Documentation/devicetree/bindings/iio/imu/opensensorfusion,osf-uart.yaml 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_serdev.h create mode 100644 drivers/iio/opensensorfusion/osf_stream.c create mode 100644 drivers/iio/opensensorfusion/osf_stream.h -- 2.43.0