Received: by 2002:ab2:6816:0:b0:1f9:5764:f03e with SMTP id t22csp777563lqo; Fri, 17 May 2024 00:49:11 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCUw4//UVjs9QvuBVqCMsJbV29zQ4oT9f7LwbCr+GhDAvUrvwzMgY/tzxqySPEplFksy5oDVI5beAlX77xlgL5761iHGRhxY+JjDh58J6w== X-Google-Smtp-Source: AGHT+IGC2csL1jYcGM7qhK2vbP56LkvUULszFlibpbyJtsHmEYxRSQWbdZXH4VYnmhBL+h6DxUmq X-Received: by 2002:a17:902:6546:b0:1ea:cb6f:ee5b with SMTP id d9443c01a7336-1ef43e2796fmr213596195ad.38.1715932151138; Fri, 17 May 2024 00:49:11 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1715932151; cv=pass; d=google.com; s=arc-20160816; b=KK1dXZTxvI2QfjHH1bMRXPM+ne9E/ExrIGrvSO3cCHNjJ5UFqL0TzynuljOAlS6lh9 TdH8HAhqJIyhdBo3ON+25ZASwcX8IFLa/W/MGdp1khzpTDG6j83q96RMJsXmGPEsrsyd G2DbJ1hdMcAh42HNWtL2v3Z9JjNi/aUXwv7Et8qVeLp8nDaeVyR3sujgWm4dqLhM1AiG PbksLNZMoyrPRVWVIVbgOgeQguLR+qXM2q5SzbQL2HzMyrLabWK8vQSuIyqBoTQTHkEq WtQZKX5h7QQVDAAp50wi2gE+3CNCNktDpkskjbs1tKAWeQqvd+3J893OhCBXMI5TZoVn STeQ== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:references:in-reply-to:message-id :date:subject:cc:to:from:dkim-signature; bh=a5wQI4nX6MfOWodw/xXO0mHWCjHUeVC+qZ8h/QLV1ho=; fh=Q0Q9FcEvIl4bIqFrFkkWhj/VeGcJNm/+XXwbgVluKOM=; b=TtiDDH+67culRwM++4FG9DYEDVNshs72fjZLpPhoN35omGk3l3lm0NhiA0KthKX6qO rAzA9GaOpzyAQRB6kPtjmrTH3G2q3e+0sd+aGaZmp6MkgiBqgCmIOlpbWBwdpyjAA8O7 tA9pnCoky/8r3yk9Qz/YcSN2C4BBfFyt2z96zdUkgBLAbVzL0WYu3MChIK94q5hbx2C2 UQBtWKAkoBf5dV2oBsoX5wgTta6vQzfbBoSX0DvvIZGmB7UdMCP2sjipYBPZY9ia06MR 7u43nWu4Wv8tEFuX/92vUxn0ssaOHDHZodJEmRGRyg+OYkhXAyiMnQgfiSWOAgyu8IRT SjCg==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@gmail.com header.s=20230601 header.b=HXTCEK1m; arc=pass (i=1 spf=pass spfdomain=gmail.com dkim=pass dkdomain=gmail.com dmarc=pass fromdomain=gmail.com); spf=pass (google.com: domain of linux-kernel+bounces-181811-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) smtp.mailfrom="linux-kernel+bounces-181811-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from sv.mirrors.kernel.org (sv.mirrors.kernel.org. [139.178.88.99]) by mx.google.com with ESMTPS id d9443c01a7336-1ef0b9ccda5si21702955ad.108.2024.05.17.00.49.10 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 17 May 2024 00:49:11 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-181811-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) client-ip=139.178.88.99; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20230601 header.b=HXTCEK1m; arc=pass (i=1 spf=pass spfdomain=gmail.com dkim=pass dkdomain=gmail.com dmarc=pass fromdomain=gmail.com); spf=pass (google.com: domain of linux-kernel+bounces-181811-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) smtp.mailfrom="linux-kernel+bounces-181811-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by sv.mirrors.kernel.org (Postfix) with ESMTPS id AD19628240F for ; Fri, 17 May 2024 07:49:10 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 375332C68F; Fri, 17 May 2024 07:48:04 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="HXTCEK1m" Received: from mail-wr1-f51.google.com (mail-wr1-f51.google.com [209.85.221.51]) (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 C616B25778; Fri, 17 May 2024 07:48:01 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.221.51 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1715932083; cv=none; b=serylWZvOlbHJKnMOm334G3HMe5nUWKmCuESzY+A8AgXzurthx5Hs6BFim73qucyXLZb6/WubHDNRoUdfWyukwgNFgK0Wx9CcS46ErfRXhRVo2xmrvaZ6tYNNg7jLDolM71EbqpKHxVCRKy3PNHoJVRCvbd6rSfZn+kl7d2tf0U= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1715932083; c=relaxed/simple; bh=ZTTCD8M8R84jpBAsx4XNBxqCHS8a9HHR7R8VmytZ3to=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: MIME-Version; b=FO5VxXVycgU2BwSb0sKJbc6YwAbzsM72INhtTEwbbdW3BFOXRAX8+zPdBeHVs3VaccEvomNavoAHUC/erw7FUGP+sT+AbSwU7uoDjLKK4dsyjcKZJVJMjhzGNAUgisrYrO/TrSVekHh63RgipRmISl71mumrI2xqAYNbnJQ7Fns= 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=HXTCEK1m; arc=none smtp.client-ip=209.85.221.51 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 Received: by mail-wr1-f51.google.com with SMTP id ffacd0b85a97d-34d9c9f2cf0so7571896f8f.3; Fri, 17 May 2024 00:48:01 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1715932080; x=1716536880; darn=vger.kernel.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=a5wQI4nX6MfOWodw/xXO0mHWCjHUeVC+qZ8h/QLV1ho=; b=HXTCEK1mYjQ7HcwCdjCEM4CcA1QoAZpVWEVo1xtcRIaeL6MnNYoEqMc7337lTyDqqW MQ24pvlk7fjd9LkNkhk1mJ6C8E5c+omlndRWKXKBvmhEW4ROO8aBHzFZR6cNTij15Wz7 +nXLNJpbdMj+8gTvYgS+2uUwBYT660iri2RYDiyzSlaremeJBZAC3/t4pl21Gh+XOSg9 3fbRMAYUM/N0rZ/SnQTMBfi7lsY41/nmfElmno5G73dVcAAS7bRsXqNHfiFXz6e4Nzfm +8olbt1CWj/qUrdK2cdDT6XW2408WLyauSQ1qH5KC5xWcQq8Lhn2Zgo7swAg7yYNnO6G ktNg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1715932080; x=1716536880; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=a5wQI4nX6MfOWodw/xXO0mHWCjHUeVC+qZ8h/QLV1ho=; b=gL4EW99uoFu04OjTrTmWT1UZYYRsDw7xlTtje9YzNU187X2BGo/mnRj2g98cIPbbNx wF03NzTNlOLY7tKT0lvui619KSV65K6qr8r87ptfxrRB7dZ2crTbt9USR7iJrAC48sgX puzI3fg06OQBgg0pUGXwkA7PeyEyeP7b2VhGtO22hxDF3i/qDgY6dfqCWIaHmI5Yy4y4 MO74NJ+Jk8AM66vQCe8nYrRPn9edtK506br4A+7XCeacdVkfhIX0LLpuwJlZr7NjBg/l nNFuSMd+9QNksAm1kbFl5s54n/5ZbU1pmkQMRp/fFHvpUEtAMlrZrlrBUZSQWYPucSyU a9Rw== X-Forwarded-Encrypted: i=1; AJvYcCWWrgKOkNB6C1Sz5m8mjwkUxl53kU/IuIsWBKt0PkXLbQ3b+fuyCfUfbNZ/steuSZflOwGCOFFczhRhe5kc2yzVIkwG024hDJvryqwLWX8sWtKu5MTrot5L+U9v3iGd+yCO9qVETQ== X-Gm-Message-State: AOJu0YyH8dQMu78meSdsakMpV7qDtd11tRSpLtMfSNMFovg/5Dv7RkTh nsg110bldGfdfajN+St7K5GXC6tYzPHMPg7Gw1EX9/OrwmPObEgUczG3ODoRUtI= X-Received: by 2002:adf:fd0b:0:b0:346:1443:27ea with SMTP id ffacd0b85a97d-3504aa6886dmr16881806f8f.68.1715932079921; Fri, 17 May 2024 00:47:59 -0700 (PDT) Received: from rbolboac.. ([2a02:2f0e:350b:4500:569e:359d:dfe4:922e]) by smtp.gmail.com with ESMTPSA id ffacd0b85a97d-3502baacef2sm21104207f8f.85.2024.05.17.00.47.59 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 17 May 2024 00:47:59 -0700 (PDT) From: Ramona Gradinariu To: linux-kernel@vger.kernel.org, jic23@kernel.org, linux-iio@vger.kernel.org, devicetree@vger.kernel.org, conor+dt@kernel.org, krzysztof.kozlowski+dt@linaro.org, robh@kernel.org, nuno.sa@analog.com Cc: Ramona Gradinariu Subject: [PATCH v3 5/9] iio: imu: adis16475: Create push single sample API Date: Fri, 17 May 2024 10:47:46 +0300 Message-Id: <20240517074750.87376-6-ramona.bolboaca13@gmail.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20240517074750.87376-1-ramona.bolboaca13@gmail.com> References: <20240517074750.87376-1-ramona.bolboaca13@gmail.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Create push single sample API reposnsible for pushing a single sample into the buffer. This is a preparation patch for FIFO support where more than one sample has to be pushed in the trigger handler. Signed-off-by: Ramona Gradinariu --- no changes in v3 drivers/iio/imu/adis16475.c | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/drivers/iio/imu/adis16475.c b/drivers/iio/imu/adis16475.c index f9455ecb348c..ab955efdad92 100644 --- a/drivers/iio/imu/adis16475.c +++ b/drivers/iio/imu/adis16475.c @@ -1249,9 +1249,8 @@ static void adis16475_burst32_check(struct adis16475 *st) } } -static irqreturn_t adis16475_trigger_handler(int irq, void *p) +static int adis16475_push_single_sample(struct iio_poll_func *pf) { - struct iio_poll_func *pf = p; struct iio_dev *indio_dev = pf->indio_dev; struct adis16475 *st = iio_priv(indio_dev); struct adis *adis = &st->adis; @@ -1340,6 +1339,15 @@ static irqreturn_t adis16475_trigger_handler(int irq, void *p) * array. */ adis16475_burst32_check(st); + return ret; +} + +static irqreturn_t adis16475_trigger_handler(int irq, void *p) +{ + struct iio_poll_func *pf = p; + struct iio_dev *indio_dev = pf->indio_dev; + + adis16475_push_single_sample(pf); iio_trigger_notify_done(indio_dev->trig); return IRQ_HANDLED; -- 2.34.1