From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail-pf1-f171.google.com (mail-pf1-f171.google.com [209.85.210.171]) (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 3F0EB1DD877 for ; Tue, 7 Jul 2026 01:46:00 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.210.171 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1783388761; cv=none; b=ElaNNCKYpF77c7wOsbOsM3DHVdYfWec1m/nosQQ+jhp7VFoIML/HZmNxRvdGmyFVIlNbWCngGbdZOSgG84THW0uDBBQ1szA8PJ/nFfutxY+cBNqv5Qh577nX3e6FZDDOPpmbSK56s1PU/Pa6MO8iiUA2LMgKCc5YSs2zval0+aU= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1783388761; c=relaxed/simple; bh=1WbiRvGwyZgI3p7Cq5tzLhqkz+2SDn51l3e2tAXChBQ=; h=From:To:Cc:Subject:Date:Message-ID:MIME-Version; b=a3k3t+ATVsBtbuGRRjw/yWrdLFGggWYSj1VOyEtf2n0xBLs3MmqwMywu+nYhJg9+XZjw8qMD6hehypMuL4r0wZpaF2FS4oh9a2PX83Rz29VFY5MM0oR56QhvNmNMnuiIsGxA+EHKh2Au9H1PbfRRLDKGOs5glqC6QC8xgiYawF0= 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=Ce3G3lj1; arc=none smtp.client-ip=209.85.210.171 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="Ce3G3lj1" Received: by mail-pf1-f171.google.com with SMTP id d2e1a72fcca58-847a52edeb2so2760711b3a.0 for ; Mon, 06 Jul 2026 18:46:00 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20251104; t=1783388759; x=1783993559; 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=ZusTVEKPqv6I6o1eJ+PWE9GvkUB2pmeD6248aHzWvcg=; b=Ce3G3lj1pr8Er04OG04zSRrK4Y8jFkdRlnxSWBXA5mTO7NWNOpyA7fK2eRfNMkyr/x A77JDbvAnxoqqRZAxZZmh0BEwCuGcS5f6w1DYCFT6v2S0c/dZZQK2cUK0rsaqeJT68y1 h7VW6607aPVZCXTn0mqIN0v4PFXiiFAwH/kFrv3T3SszSf1nQWyuGNjwk8tG/WEhXKVR meQXo25scv/h12F5MGzknHRxLUFE34wFW8zcXraPpTYdyafVB6VbY8FiiUwLJRBDTncB DfSwROnxgCwmAvFoM6I9qVthEJ3dIPv7drgqCeBFXtChzhvpB20e9orIpLVcicke0xFT JAuQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1783388759; x=1783993559; 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=ZusTVEKPqv6I6o1eJ+PWE9GvkUB2pmeD6248aHzWvcg=; b=GkGjolkz0K4WA0tjtyVILm8ezGvvJShyUtur81jPkM7pugUUTM0QFkjG+lZA51AKcE /YEhOBQ2CFRjzunOMDHBviv2DeF/LbUfZt3JhlS8BGdprXMNvx+inMC1ezitxMHelk0n VACVXM6kqmBhDdhhBCy1fyXLSg3bvjKJmpxq5nLjXHn5Ee6PVztYT/FIM8TW6ZvlGIqt UY4ReIH/nw6W4oH3r/A9pfH4tv28H5NBT1C3lVs7vECvbTu/OY1lMmwy62zQqlmRs5D0 3Si0cLCX/T0zV8G676qFLd5nUS91ggUM8GwNm77lCKD3ctDOiLeE4WqnR+MqIw4HqIbg 7ysg== X-Forwarded-Encrypted: i=1; AHgh+RorNljieM1scawRdck9otW67EpQ9syimNKJvQ/1hkEAxOBAPLbnxDgp7CxU8QVOblWXKjs5Bjs3FKyPCMU=@vger.kernel.org X-Gm-Message-State: AOJu0Yz9iu0YClZ6N0zoJM+42uERIgCUmc7z3GkHM0xEEQ2UC+RNp0Me UD5/5XEhSMJiMbr1OyEleCE41+cixwY17HXfCmjCLboezLfIUs6USjul X-Gm-Gg: AfdE7cmQnWX2MPz84UCThj25CyQtxOwfIAyj7iPY2aACjgCpl2fDSypO5tFhgrYLo0q Eb0SSd1SHXtFGZt+WY3PrlZindI7eunYZHXiekcRatQZJd99+sUTg4pAG49qKH/KvwyQrJyQ06E oHcEiGqE0BAQo92FlSnuFbeBCOWiDa7ED0UBRUdVM1kvh7saQMZzUJqoEv4xuVcuDXihd/1Ebu2 EAtGGGh8S5pQ2eXx0LJy0MnDlSk/7+78Tzm2Hms7II9gZZoDcmpxha8YPy/YFwnT7KsSrhQ8qVK OEIRl11y6be+mXFEFBsq2pVnR1crYXmA9o/i5frrAkI2EtDedAGPI6GAWnF48My/uwdM4uIkQPC kGDiruTcMhWZrdTBoMkFBzIYM29iq0Z/AyzdqM8jnrbJ3qS1BkNFrq19LJgkfrA8/mIfRrMm/Km rg5H8kepEVYLa8c+fh4CHGtX6WAdp1yoJFKWl5wBHfhlAl5jIBHVmshfqg3V3xIyplAGz4Qy324 a8YdGbKRiLf59RZkPKQsElR24VdGFvO+/8lBMU= X-Received: by 2002:a05:6a00:348b:b0:846:7507:4e07 with SMTP id d2e1a72fcca58-84826df3cbcmr2955880b3a.39.1783388759380; Mon, 06 Jul 2026 18:45:59 -0700 (PDT) Received: from DESKTOP-G3E0OSP.localdomain ([112.172.255.242]) by smtp.gmail.com with ESMTPSA id d2e1a72fcca58-847f6d4e741sm4645653b3a.28.2026.07.06.18.45.56 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 06 Jul 2026 18:45:58 -0700 (PDT) From: Jinseob Kim To: Jonathan Cameron , Rob Herring , Krzysztof Kozlowski , Conor Dooley Cc: David Lechner , Nuno Sa , Andy Shevchenko , Andy Shevchenko , Jonathan Corbet , Shuah Khan , Jinseob Kim , linux-iio@vger.kernel.org, devicetree@vger.kernel.org, linux-doc@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH v7 0/5] iio: add Open Sensor Fusion IIO driver Date: Tue, 7 Jul 2026 10:45:20 +0900 Message-ID: <20260707014525.1015-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 This series adds a Linux IIO driver for Open Sensor Fusion devices exposed over a UART/serdev host interface. The driver parses OSF frames and creates IIO devices at runtime from capability reports. Expected IIO devices are accel, gyro, magnetometer, and temperature when those capabilities are reported. The binding, supported protocol subset, runtime discovery model, and driver-facing ABI remain review-relevant, but this revision drops the RFC tag because there are no specific open questions being asked in the cover letter. v7 was prepared after auditing earlier review comments and either addressing them in code/docs or answering them on-list. Previous versions: v1: https://lore.kernel.org/r/20260520072843.3593-1-kimjinseob88@gmail.com v2: https://lore.kernel.org/r/20260524085312.15369-1-kimjinseob88@gmail.com v3: https://lore.kernel.org/r/20260529121005.1470-1-kimjinseob88@gmail.com v4: https://lore.kernel.org/r/20260607234343.22109-1-kimjinseob88@gmail.com v5: https://lore.kernel.org/r/20260616072242.3942-1-kimjinseob88@gmail.com v6: https://lore.kernel.org/r/20260628191337.937-1-kimjinseob88@gmail.com Changes in v7: - Dropped the RFC tag; no specific open questions remain in the cover letter. - Added previous-version lore links. - Removed the confusing compatible/OSF GREEN/OSF0 explanatory sentence from the binding. - Removed "initial" wording from the IIO documentation. - Reused the common OSF_FRAME_MAGIC definition in the stream parser. - Fixed OSF_FRAME_MAGIC comment wording. - Removed dead overflow checks for u16 protocol counts. - Removed the unused partial_frames statistic. - Fixed remaining loop-local variable issues. - Reworked the stream/core contract so CRC-valid/authenticated frames are consumed as full frames even when ignored or rejected at application level. - Preserved one-byte resync only for unauthenticated/framing failures. - Preserved IIO buffer synchronization and zeroed scan storage. - Removed the duplicate IIO dependency from the OSF Kconfig entry. Validation: - git diff --check: pass. - checkpatch --strict: pass, 0 errors, 0 warnings, 0 checks. - dt_binding_check: pass with dtschema 2026.4. - GCC W=1 module build: pass, no OSF compiler warnings. - clang W=1 module build with LLVM=1 external build: pass, no OSF compiler warnings. - local stream parser semantic tests: pass, including CRC-valid bad protocol_major and nonzero reserved frames with embedded OSF frames. - static IIO scan layout/padding checks: pass. Jinseob Kim (5): dt-bindings: iio: add Open Sensor Fusion device Documentation: iio: add Open Sensor Fusion driver overview iio: osf: add protocol decoding iio: osf: add authenticated stream parser iio: osf: add UART IIO driver .../bindings/iio/opensensorfusion,osf.yaml | 52 +++ .../devicetree/bindings/vendor-prefixes.yaml | 2 + Documentation/iio/index.rst | 1 + Documentation/iio/open-sensor-fusion.rst | 72 ++++ MAINTAINERS | 14 + drivers/iio/Kconfig | 1 + drivers/iio/Makefile | 1 + drivers/iio/opensensorfusion/Kconfig | 15 + drivers/iio/opensensorfusion/Makefile | 6 + drivers/iio/opensensorfusion/osf_core.c | 320 ++++++++++++++++++ drivers/iio/opensensorfusion/osf_core.h | 70 ++++ drivers/iio/opensensorfusion/osf_iio.c | 308 +++++++++++++++++ drivers/iio/opensensorfusion/osf_iio.h | 22 ++ drivers/iio/opensensorfusion/osf_protocol.c | 242 +++++++++++++ drivers/iio/opensensorfusion/osf_protocol.h | 100 ++++++ drivers/iio/opensensorfusion/osf_serdev.c | 114 +++++++ drivers/iio/opensensorfusion/osf_stream.c | 189 +++++++++++ drivers/iio/opensensorfusion/osf_stream.h | 30 ++ 18 files changed, 1559 insertions(+) base-commit: ab5fce87a778cb780a05984a2ca448f2b41aafbf -- 2.43.0