From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail-pj1-f49.google.com (mail-pj1-f49.google.com [209.85.216.49]) (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 0FB5D41D131 for ; Sat, 15 Aug 2026 17:57:36 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.216.49 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1786816658; cv=none; b=PJGqrux3+DPkHQG5TwPUgVLCOJtXWK8c2PiTXdG3R59rdD38MVjueAU0sEn4LLkcHJrOuKxNd96Uff9k/IKjpg8K23ij+AuVuYJH3C9q3hKhw1H/jmaelxeiI+MMI+6KGvqJ7rotEusNBKz42v2dDd+f4Rza1C6QWHsz2e39mLM= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1786816658; c=relaxed/simple; bh=AeUWK9KTNL9iOk0hdKtVrjRhS3S61rLqS2g0KoG6Huo=; h=From:To:Cc:Subject:Date:Message-ID:MIME-Version; b=Xl/mHpIUKTcBjFQNKPc47VIh5HvwCc/QAlGmmuq17+NPfdZVZ1suGdl4qcRpOQdR9CNL/87CibV+QsmllvBVGzM5E+Z8DvphnOPxYLIaJRcdNwvJYbXxYYlo6qvpoqn9r564zV9VkRa62mc3DZR5i/H9vsdsRETTrPgcoluOUIo= 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=ss+uj1FT; arc=none smtp.client-ip=209.85.216.49 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="ss+uj1FT" Received: by mail-pj1-f49.google.com with SMTP id 98e67ed59e1d1-383b4a3755fso2123424a91.3 for ; Sat, 15 Aug 2026 10:57:36 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20251104; t=1786816656; x=1787421456; 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:content-type; bh=AehCQZa2iclY84/hbLMAU5UmVBAWJJzCqw3aMGV9CYw=; b=ss+uj1FTONunp6+ppJv6wowJWG6DVtFZcfwPeAA/WW4I8jFFu1XN+xgrcWYWE7ptxO 8uV0lu+hh2YIfnIW/3gad8S/xBhgmngyCmeM/HT6xgJ1oaH+PSFM+PWM3oOjAqwQUfri iL/sv4TQxuiMInYqC396IyENK3UT8/MXg5/7pKdkAnJ6J5nG0XrwAHL8W6Rt8ChzFzlP BrU8kT22zMOsCsRcCwBPieJbyxPbdgQ5Y0YZ1a+YlivQdcoZX195X28VcyEj48Km/gwN n8VMmS1PjK4ZFsx6Celh+02jTWuYuJMVWKubJgo6xSOkq0fXCe/hpflithTt4dirkFMo Ou1g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1786816656; x=1787421456; 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:content-type; bh=AehCQZa2iclY84/hbLMAU5UmVBAWJJzCqw3aMGV9CYw=; b=MLvkbIU+2F6N8e1Jorc/NmdIjaL7XA9Vpo5RXbYIDme0r56yBEFP8ch3sf2m/87ttf or2kZvRYnYSakDQTd4X8K5LTSGwYJ/rM1PCfBxBguJHaAsBot7hdo/N45k6I5daFosDK pWNOhf6TPBYVJ/4DaEoUYDehttPKYGed+tg/vijqpk4CaSPq+r7X/T+AmChHamSowZz3 V3nLpm8KZmSpZmZPIJSp7FP73aL2igkJnz/ZStH9AEi2wWsNZr7rHN59NfKN8o+2TYJq /86Au285c5GHQWjZ3IXJ+a7ZQgpdmcVG72HL++zmEAVxf/0nF1jmjXtuVsFhRh3Be8l9 ixfA== X-Forwarded-Encrypted: i=1; AHgh+RpMJnVbY4b17FKK5GowF3xxocVOA4BX/MJR2IsISD4EP42ZX00Vyznyq3h72GIyLtx1PcsmsldMtjN97Fg=@vger.kernel.org X-Gm-Message-State: AOJu0Yzwk6+QOuRurq3sofB/akYoVIY22WpxALMOWoR076wTX4iC6wJp mcQH+vEyHwcp9aDLZreh+xgy+MYs8vVl1FKAysj81C4ZBWQagUuaUDwR X-Gm-Gg: AR+sD12VuGgSZpNep8U6QVBBugY7rp3+r5PJD+1gEyDaI9NJyJKWwRVUpipxmW4c5DT YdFM5sKdZNPTFu0NGaF27cq2vrwHPX9qpDHZZ5Tj+QLaVJNht7k/+UACHLU27FtdWXT7fH4FNNV pRRTckIRy6gCswQdAG+KAg77PUBYO0jSz9zS7J954G5odeJBhZJ9sO562FSR6Lbt5zaH7G/fjwn l/RHyOihfZp2bSvGWItoRUT+DDnkekWroYyRmrWbqejyxLy510pDr0UNh8XuY9sw4f9k4RqBzFN 6V4ZGryz6YZAlDuj7telbGcHpY1kzU3mkFZXtAq+yffEsQHEtfh/3xkR0U2KuoEbuu1b4+3YqiU 2MQvIZn/KW36qJwaKRUWo9ju2JhMfonYV3VoW+dyfCxsZqn2n13S7141+XxiJggkdt2949AzHX9 Pm+TEKnr1DbWU46iSfqTiyJqt3sJBxGoaSUAN6lmmzJGNpfvwocdorhKo7waQaRrhw0exXTaC4/ OZ34DZf X-Received: by 2002:a17:90b:1c0a:b0:38a:c3f:3b87 with SMTP id 98e67ed59e1d1-3933b8721acmr13531166a91.12.1786816656373; Sat, 15 Aug 2026 10:57:36 -0700 (PDT) Received: from yash-Bravo-15-B5DD.. ([2409:40d4:1248:1816:fcb7:1765:17f9:b9a5]) by smtp.gmail.com with ESMTPSA id 5a478bee46e88-320ea2fcfb8sm17305163eec.21.2026.08.15.10.57.30 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 15 Aug 2026 10:57:36 -0700 (PDT) From: Yash Suthar To: jic23@kernel.org Cc: dlechner@baylibre.com, nuno.sa@analog.com, andy@kernel.org, andriy.shevchenko@intel.com, yashsuthar983@gmail.com, grondon@gmail.com, linusw@kernel.org, hexlabsecurity@proton.me, sakari.ailus@linux.intel.com, srinivas.pandruvada@linux.intel.com, linux-iio@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH v2 0/3] iio: accel: bmc150: DMA-safe buffers and use iio_push_to_buffers_with_ts() Date: Sat, 15 Aug 2026 23:27:25 +0530 Message-ID: <20260815175728.99541-1-yashsuthar983@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 The trigger path used a plain s16 buffer while the FIFO path already had a properly typed scan member (__le16 + aligned timestamp). Those two buffers did the same job, and s16 does not represent little-endian data. Drop the duplicate, keep scan at the end of struct bmc150_accel_data with IIO_DMA_MINALIGN, and use it for both the trigger and FIFO paths. The FIFO and read_raw buffers are passed to regmap bulk/raw reads, which is not DMA-safe. Move them into struct bmc150_accel_data after scan and aligned to IIO_DMA_MINALIGN. Finally, replace the deprecated iio_push_to_buffers_with_timestamp() with iio_push_to_buffers_with_ts() so the push sites pass an explicit buffer size. This supersedes the earlier standalone patches: Link: https://lore.kernel.org/linux-iio/20260808220236.421832-1-yashsuthar983@gmail.com/ Link: https://lore.kernel.org/linux-iio/20260809111303.496393-1-yashsuthar983@gmail.com/ Link to v1: https://lore.kernel.org/all/20260814101845.301769-1-yashsuthar983@gmail.com/ Changes in v2: - patch 1: restore early error check flow - patch 2: keep fifo_buff declaration in one line Yash Suthar (3): iio: accel: bmc150: use aligned scan buffer for both trigger and fifo iio: accel: bmc150: use DMA-safe buffers for regmap bulk reads iio: accel: bmc150: use iio_push_to_buffers_with_ts() drivers/iio/accel/bmc150-accel-core.c | 24 +++++++++++------------- drivers/iio/accel/bmc150-accel.h | 19 ++++++++++--------- 2 files changed, 21 insertions(+), 22 deletions(-) -- 2.43.0