Received: by 2002:a05:6a10:1a4d:0:0:0:0 with SMTP id nk13csp3155177pxb; Fri, 4 Feb 2022 02:30:44 -0800 (PST) X-Google-Smtp-Source: ABdhPJxmRQXSKngKsp78A6n9/BKQcTgIcBL5aehUumuNoRCDdBee35YkCiwTmjrmy5qlnosjEF13 X-Received: by 2002:a17:907:7294:: with SMTP id dt20mr1891046ejc.535.1643970644467; Fri, 04 Feb 2022 02:30:44 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1643970644; cv=none; d=google.com; s=arc-20160816; b=etanAHkfMZmHuyoUBNJ+thyk+zg/RNF4W823rE8tgJZLVfR72PvrUdEL6gyX+rf2uk Gr8lfQDbq1ZtWLwlwI5S9+/uXhjhsEXdb/AbylPrH9NKPctQQfQotP5MAZ/eIAIyaFBx XRAk9IInIyyVu2M84Eb2lcP876kYt+wiGh6SPqBEYH/8FCpp6IGA9gTF5b+72FsSrAt4 FOpYnVfcQt5J1r/DloVv6vfJ2asvsDzrrx2XDZiNudf5oZL9p1sff+SAmSNtT0TzgLxO h6WQlh267kA6hOrqpHh68+SUn23QhlOsqzjEIBUZZBNSAkP+xJOiWMtJWUzv1tblbvFF xL5g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature; bh=a1Z4SsvUtbUIh8RWDNefYqNV9onmdeuXC4gShFMsMqM=; b=j4HAk4yIUWJH+mEFa6Mfx9vNSu24GXwkZea+toSZNcVYObhIFsqpkjPkLCVBgqo4AF DKxBvGfJF+3RlxHEJ+ZijkyeKIj79EBzWZoiT+15uId9OUUCV831bLCF5kQCfequdXlK 0YtZfdMp9a1BEAQyLaGu5L2EFmZuwjR/adfwJOGBWhlKywYW10p7ncO8HBg3ykQ9XqP1 wAsMVEaV3rfKJ2AUBcbbyNQ4r+uny8pCcRXGD6dkBdP0JTNTd+2zYRl7MCRWarD2Ctc2 +CZwAuJjvhWxa4ZyR88xTNX+AAPD6xtipdjYKghbEswIQmMGMpkKYdsV8i5Jv5r5m6rY YCCQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20210112 header.b=XWJ8igcq; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id sd25si865451ejc.815.2022.02.04.02.30.19; Fri, 04 Feb 2022 02:30:44 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20210112 header.b=XWJ8igcq; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1352987AbiBDHfV (ORCPT + 99 others); Fri, 4 Feb 2022 02:35:21 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:36504 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232302AbiBDHfT (ORCPT ); Fri, 4 Feb 2022 02:35:19 -0500 Received: from mail-pf1-x429.google.com (mail-pf1-x429.google.com [IPv6:2607:f8b0:4864:20::429]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id C467DC061714; Thu, 3 Feb 2022 23:35:19 -0800 (PST) Received: by mail-pf1-x429.google.com with SMTP id i65so4380304pfc.9; Thu, 03 Feb 2022 23:35:19 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to; bh=a1Z4SsvUtbUIh8RWDNefYqNV9onmdeuXC4gShFMsMqM=; b=XWJ8igcqJPIKZ7D8uEmrRZVZV1d3cPIZjbuTnvzftsL0G2yoiIh7jjH1AGanq6PIYo EGnbgeWNmr0Xry9ycpamYXRAZ3r0olHcG77aDDBhyZpHW7krUhn+aiLegpW5z8AL9hH3 1gJIT2irlceDxJTPR/FlqreCYJYZTJsPFHxD2SQblKqKnL+uPGuMUlL8cDvj3OF4ftgu Mp08uBp4smwS+x6Oo3OyEwBh/u2FqIs0Y/qQI5RS43xzcRiCFsWjpqrIcAMYp6MOXbUw fDnvimXMUteyPe1NKXG2p9EnApSSf0L4FuKlnC5p2/8LQGpnvZK0jIafl/Gabq0cqayk xCeg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to; bh=a1Z4SsvUtbUIh8RWDNefYqNV9onmdeuXC4gShFMsMqM=; b=kQWcmgZg6H8rTD6IP4uJZUShC87u4ENGJ2mZ1ETy5046SvHlE1R8RmMK8v/Hsmo3QU Ixwgo3RKQ1HSkqovtqcFsnw16Cax0rbeTqgpBkSSl8elTJ4jgsEDNsnh1FsojrblU2wB hUBV4gqobrcMn7OkxUr7DwowBgceXY68vt66HrG8n23dtIiErB1wU3l06Eu31y/obdzc Gd6tdiymv8rxGJ6tsMWZRWrg5Iz2d7E7W9gSd/9lP0rSZPsDlPNJKfL4BplvNfRQTN2I jfSp2eCNvsLz6OmZ03PJqkyZV9H6i7b6IaGSt/N3JPeQ5cVYL1KclInRIzPeOcI8q/+U mt6Q== X-Gm-Message-State: AOAM533Fa4ka7Di81i1N1fmDGWFLwUdwmqavhxH1jIkMoqTYRrUYL6c4 /Y3tjEEcG0hM3iNv5gIa9PQ= X-Received: by 2002:a63:2b49:: with SMTP id r70mr1406472pgr.111.1643960119255; Thu, 03 Feb 2022 23:35:19 -0800 (PST) Received: from shinobu (113x37x72x24.ap113.ftth.ucom.ne.jp. [113.37.72.24]) by smtp.gmail.com with ESMTPSA id a37sm947015pga.3.2022.02.03.23.35.15 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 03 Feb 2022 23:35:18 -0800 (PST) Date: Fri, 4 Feb 2022 16:35:12 +0900 From: William Breathitt Gray To: Oleksij Rempel Cc: linux-kernel@vger.kernel.org, Pengutronix Kernel Team , David Jander , Robin van der Gracht , linux-iio@vger.kernel.org, Jonathan Cameron Subject: Re: [PATCH v2 2/2] counter: interrupt-cnt: add counter_push_event() Message-ID: References: <20220203135727.2374052-1-o.rempel@pengutronix.de> <20220203135727.2374052-3-o.rempel@pengutronix.de> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha512; protocol="application/pgp-signature"; boundary="oRfwSPBWBCinOFIL" Content-Disposition: inline In-Reply-To: <20220203135727.2374052-3-o.rempel@pengutronix.de> Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org --oRfwSPBWBCinOFIL Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Thu, Feb 03, 2022 at 02:57:27PM +0100, Oleksij Rempel wrote: > Add counter_push_event() to notify user space about new pulses >=20 > Signed-off-by: Oleksij Rempel This is a simple solution so if it works for your use-case I'm okay with it; I think future counter devices could make use of this new COUNTER_EVENT_CHANGE_OF_STATE event type too, so that's a plus. I'm going to wait a week to give others time to chime in if they want. Otherwise I'll give a proper approval for this series next week. William Breathitt Gray > --- > drivers/counter/interrupt-cnt.c | 7 +++++-- > 1 file changed, 5 insertions(+), 2 deletions(-) >=20 > diff --git a/drivers/counter/interrupt-cnt.c b/drivers/counter/interrupt-= cnt.c > index 9e99702470c2..3b13f56bbb11 100644 > --- a/drivers/counter/interrupt-cnt.c > +++ b/drivers/counter/interrupt-cnt.c > @@ -26,10 +26,13 @@ struct interrupt_cnt_priv { > =20 > static irqreturn_t interrupt_cnt_isr(int irq, void *dev_id) > { > - struct interrupt_cnt_priv *priv =3D dev_id; > + struct counter_device *counter =3D dev_id; > + struct interrupt_cnt_priv *priv =3D counter_priv(counter); > =20 > atomic_inc(&priv->count); > =20 > + counter_push_event(counter, COUNTER_EVENT_CHANGE_OF_STATE, 0); > + > return IRQ_HANDLED; > } > =20 > @@ -209,7 +212,7 @@ static int interrupt_cnt_probe(struct platform_device= *pdev) > irq_set_status_flags(priv->irq, IRQ_NOAUTOEN); > ret =3D devm_request_irq(dev, priv->irq, interrupt_cnt_isr, > IRQF_TRIGGER_RISING | IRQF_NO_THREAD, > - dev_name(dev), priv); > + dev_name(dev), counter); > if (ret) > return ret; > =20 > --=20 > 2.30.2 >=20 --oRfwSPBWBCinOFIL Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQIzBAABCgAdFiEEk5I4PDJ2w1cDf/bghvpINdm7VJIFAmH81xcACgkQhvpINdm7 VJLwgRAApE1ASfE6RJfspMwz4NrDI5m585lKcwyNy3IUVxt8BAvvwu+AdytC3MIT 4u8q6PIZtocI4C4wQIzkrUWewMqmsbAObPQ59nN9208LwuMtu8mwcENEUiLdmhAW PFQB7qjyUsA04cdWDcxWWVV8Pn/6YO6aFdvOzhbrQZ2sagdhpow49ecXGXvYAC/e ukiQq7EP+y3sCE5nEu0k8+3yz8SdMnTtbKbVwrS2uzN10swkOLmdMCGSb9Wby48s lyyXf9rV6hS4yvNuczDVcARUDvD0bBl3BnWE1aRhw/B4mxpyK7kG9UCrxawIB+b8 A47oCbXj7zVXPm7gQPRlQ8dKviE4gh5hT2TIB1c8dGsDSJ6D7LR7kZu0HSAm92uF iu/xTIgeWhe3ohYzZD4RducAixsJhPRuCkaklVoghlarwLav8He91qEM3qOxYkfv vLoCawc55Cjk8iC32SBpp/eCuuL8to4S1eu1P/rB/ChUCKN7o5u65PtuZSv+wLB6 yrqhvatz/DUFjBJvt9SV1DP9bT+qywMe9Wj5nWMPIrDwHYfpp67C7R/OjuYClII4 VMxamuzJn4/Qv4D0ZaK9ooPWrv13sfkI9RCsQuvphUd8ILR+zDgCRYykqHvlrKaW QUaalux97zf2L+2R2Noh86h5vkHWD2NsUhRHy/+nUbnfb3X/yFc= =1z8E -----END PGP SIGNATURE----- --oRfwSPBWBCinOFIL--