Received: by 2002:a89:d88:0:b0:1fa:5c73:8e2d with SMTP id eb8csp2102299lqb; Mon, 27 May 2024 07:59:21 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCUznmog8ANJaLqhspZwk75bG2wT/9pjJvJ/UVwHPJhk3CFS7F5JCH5eXI1ZltD+OCsyMSZY/l8qZPhq4QbZyirawJPmM7tu1elvtRvz1Q== X-Google-Smtp-Source: AGHT+IFun3z7ywoTwPXjDkTDLeV5bEDL6OrRJtfBjXO/6aVJifJP3Cb/ym1nA98QWwtpkHyG6Y4P X-Received: by 2002:a05:6830:e8d:b0:6f0:e6e2:83b2 with SMTP id 46e09a7af769-6f8d0b9fa97mr9723020a34.34.1716821960777; Mon, 27 May 2024 07:59:20 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1716821960; cv=pass; d=google.com; s=arc-20160816; b=eemuKyg5gWHMsEtmQxYbVLdjOMerv2q1X1XaPwh90C50muw7vCvm/I3jQPpTMPFasS RtUHInvzHoLE1OTwIXKhSBz4CmRcO6d7rwADL5Wsga8F6t4CT/DDoVpL6Jl9BnsW9XFb Wmo326ySKLg1HRpJBFyxX8RPf1Cq+LuAJIyhX0AP+e9AS1IRuZ5ajMdB3aovOTuJaZYp z5EZ/EMaImajLzL+MC2P0Udzf0kQPyopxj1bxN0S6A6uQEndM2eo4rMuFlpHtEpQ+vwC bo98cS0uQDBRyEPxaEZEGKlufOXQ5CXg6DcchUkmD+IlM0lr3c4IBKPtn/nEyrgp9ndT +EZg== 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=rLBPCtGNQH5vxOhd0p8t0N68VsqXEcl2qo1StfzuSGE=; fh=O9WMiy96XXfGihj5bp7qN0wC7aeN68hvs0vBF72liCY=; b=bk+k6QB3zGbueW2s7Q/1CU1c4T9MYb0Zz4dnyDn1DDHVjwehUMOTuH6gcEjCpQ9TeA lgfpH0zdH+V1peTp1l+PJvop1QyTEenMQ2A6FfQmhyMHK8+z1HyreLEP1N1gomCPpu4E d6kUk7uaW3GxcMlA+P2SXohuiebtIjsiVXdSnwzckCbOFrWsqFGjmM5ll0tZA5Keo3YO QJbrLxLvDD9IUEGhzCOehexWxeQ/LAvEGh/oouxVrlsqS/K2URfVVwU0gQVGkbTfsRAD WE5ZZeUGFxEM0Z8VBLHaD3zP+CriZTch8udWkDptM8f1DeWVrJAY9cqfqG/qGgtvfFag OSLQ==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@gmail.com header.s=20230601 header.b=fSRRspQ8; 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-190970-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-190970-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from ny.mirrors.kernel.org (ny.mirrors.kernel.org. [2604:1380:45d1:ec00::1]) by mx.google.com with ESMTPS id d75a77b69052e-43fb18b2c19si83437491cf.448.2024.05.27.07.59.20 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 27 May 2024 07:59:20 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-190970-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) client-ip=2604:1380:45d1:ec00::1; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20230601 header.b=fSRRspQ8; 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-190970-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-190970-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 ny.mirrors.kernel.org (Postfix) with ESMTPS id 7C4221C2174F for ; Mon, 27 May 2024 14:59:20 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 6356C175550; Mon, 27 May 2024 14:26:33 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="fSRRspQ8" Received: from mail-wr1-f50.google.com (mail-wr1-f50.google.com [209.85.221.50]) (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 0DA1E173359; Mon, 27 May 2024 14:26:30 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.221.50 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1716819992; cv=none; b=iYc4RTRzq9v9Z7khGOxG9D0mzi9OqSze0GK6JaCpgoCnQogxInqfp4beONmHe1yESYVMx8j40zvVMEAU2d6v/wvR58HWAKHiCdeb8mpAwo4nOWJ+3pG+nMJItGjSmnz6+8UyCGQQOly4foZJ3LWm4KJxcB2G2qZdrwRC9X8cggs= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1716819992; c=relaxed/simple; bh=ZHKWRbyO0u3fo/zl7IQIsbBN+w8JSGzIA/CdJqdKDUw=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: MIME-Version; b=CuZERGEP8RYh+KCOdnJSCsP5DjPHR1aB9tZ7tga/aNGgZyjMi+op/W7CUSW5VG0RfI8n3q5IfXoWHUk3jdc+UXZVIkHQLC9teS+8CVeOAeBOFF4psFVhWmBALpRbDhYrNn5L/DHj9+sISnksZP6/UMhA7oi7aT84h/mU3V0DIug= 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=fSRRspQ8; arc=none smtp.client-ip=209.85.221.50 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-f50.google.com with SMTP id ffacd0b85a97d-351d309bbecso8400831f8f.2; Mon, 27 May 2024 07:26:30 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1716819989; x=1717424789; 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=rLBPCtGNQH5vxOhd0p8t0N68VsqXEcl2qo1StfzuSGE=; b=fSRRspQ8crTTUfsnVEGplHzZsZlHzDRqdbT8CSTK+XdC0KKRekYJhFTIMi8enyUOnT Hy4FSw2rgF++Z4x2kmEIaqHEmtuMWLxr1GoRiJxo05MeL5KNqdW9LP51hw4ertouGTd/ tG8daYsbF8k3tZMGta2sEMqJov+ZKrSMhGUMnGNzQDMkgPjI4WNDW+xNVlqZkxWF+F9o dNHWe9SHuuYFyDv05IuO7bq+eXR9S5KLG6h+nzQza93agQohht4w0xqF2JUp8Dqae9P2 nP4ET9x2XxhObJ04GSzi46WNQkfiogPCupx7Hax6JS3iQg2dNW/LywtYXpHZ3QEkDQJq DtGg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1716819989; x=1717424789; 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=rLBPCtGNQH5vxOhd0p8t0N68VsqXEcl2qo1StfzuSGE=; b=tJYTCLsoY+O696YsrUglI4JsoYtLWeTGxK2sCCzOw3WC1u5fExCF1DULzPmHpxHCUn BF7cmUXSm0HqByVrJUAGp+sw2zBFIBpzd6HDOBqgb5zrCno9xPQ5aflcfJSym3UnbgeE JJKFgHIV1TCtKoM8zclrk2pYfbWaEpMfyNLi0um6LWyP/sNL6Cmvs1xYfncytoLNqFeT FptMDEaeheK52v3uQFr3G434ASLbfdtlIqXLJkUzKyVf5YY+a/7JFMBg5UhLrtzPSxIF lR6TpK2VcwOIU7j0dIzWN9pFgl+ssAXIGTxm0nvHuXpe9eYFBIzgotroB1jJD/twsEBe /C6Q== X-Forwarded-Encrypted: i=1; AJvYcCXc451avLXQoEGawVcYTmhhUY772vplQ2C+MshS46v79rpONf3gKB+QM8vw3bna9jXMzjiGAqvTZt/t6MtkIobdwhDor5nwac2yesSqTj/QtOjlKuZq6ST1N5F55FYvxym31X2XKg== X-Gm-Message-State: AOJu0Yzh+mydsDqoJPCBQNLqZ3ykAYAZFcg1X/+a84IE3q2oszIO3V8w RLe0Km/IKhtqWFA2CgDPpmiYiF3gu5v/izHyNeu7B+ZvX1jVzbsNUxY5LJKhN3Y= X-Received: by 2002:a5d:4fc6:0:b0:351:b2ff:63a8 with SMTP id ffacd0b85a97d-3552f4fe4bdmr8224920f8f.16.1716819988964; Mon, 27 May 2024 07:26:28 -0700 (PDT) Received: from rbolboac.. ([2a02:2f0e:350b:4500:9c9:f6ef:e79b:45ce]) by smtp.gmail.com with ESMTPSA id 5b1f17b1804b1-421089ae976sm110537875e9.38.2024.05.27.07.26.27 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 27 May 2024 07:26:28 -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 v5 4/9] iio: imu: adis16475: Create push single sample API Date: Mon, 27 May 2024 17:26:13 +0300 Message-Id: <20240527142618.275897-5-ramona.bolboaca13@gmail.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20240527142618.275897-1-ramona.bolboaca13@gmail.com> References: <20240527142618.275897-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. Reviewed-by: Nuno Sa Signed-off-by: Ramona Gradinariu --- no changes in v5 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 53872b716f4a..64c8bdaba4c5 100644 --- a/drivers/iio/imu/adis16475.c +++ b/drivers/iio/imu/adis16475.c @@ -1207,9 +1207,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; @@ -1298,6 +1297,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