From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-9.8 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_PATCH, MAILING_LIST_MULTI,SIGNED_OFF_BY,SPF_HELO_NONE,SPF_PASS autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id D0B44C2D0E4 for ; Sun, 15 Nov 2020 15:24:45 +0000 (UTC) Received: from merlin.infradead.org (merlin.infradead.org [205.233.59.134]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 7BEAB223C7 for ; Sun, 15 Nov 2020 15:24:45 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="bEU3sUCZ" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 7BEAB223C7 Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=bootlin.com Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=merlin.20170209; h=Sender:Content-Transfer-Encoding: Content-Type:Cc:List-Subscribe:List-Help:List-Post:List-Archive: List-Unsubscribe:List-Id:In-Reply-To:MIME-Version:References:Message-ID: Subject:To:From:Date:Reply-To:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=3I+Jbgw4Zyp4kdPNj4a3UeiFCOZ+ZSMpHMA8DAshSls=; b=bEU3sUCZUmDJpe0wN7hdh52Y1 vZ+5Bs0JAPNGr945k5Xu8y3eXNYYqUCv/UXU609p2pS/pZFxquLVtWOR7SS0W6NmiyWl7PA5lXnYq UNQBP2RiHo0CisI6Jw6ID70eLzAXn7lAfd1t/Fww3m1LV0poyj7q/8REurbdUBk3CObR0ySBf47j6 djakzNr3Juy7gIPQijmTnj53H49YaGBSyKqaO2hVn6fQ0B1nakXOO9kM58A8hJ6WjkqUFdcYGM84H qALmqjmIfI4CBwNWEQtQL+6g0qlNLAX6DgM6h3em+AQgsRck4eRpqii3n2R46r27A1x5nGchK88Dz ku9nyVD+A==; Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1keJsl-0001hg-GM; Sun, 15 Nov 2020 15:23:59 +0000 Received: from relay1-d.mail.gandi.net ([217.70.183.193]) by merlin.infradead.org with esmtps (Exim 4.92.3 #3 (Red Hat Linux)) id 1keJsi-0001hJ-4K for linux-arm-kernel@lists.infradead.org; Sun, 15 Nov 2020 15:23:57 +0000 X-Originating-IP: 78.193.40.249 Received: from kb-xps (unknown [78.193.40.249]) (Authenticated sender: kamel.bouhara@bootlin.com) by relay1-d.mail.gandi.net (Postfix) with ESMTPSA id 34C82240004; Sun, 15 Nov 2020 15:23:51 +0000 (UTC) Date: Sun, 15 Nov 2020 16:23:49 +0100 From: Kamel Bouhara To: William Breathitt Gray Subject: Re: [PATCH] counter: microchip-tcb-capture: Fix CMR value check Message-ID: <20201115152349.GA2233@kb-xps> References: <20201111163807.10201-1-vilhelm.gray@gmail.com> <20201114224827.GQ4556@piout.net> <20201114225113.GR4556@piout.net> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20201115_102356_281278_D4EE4CDA X-CRM114-Status: GOOD ( 23.39 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Alexandre Belloni , linux-iio@vger.kernel.org, linux-kernel@vger.kernel.org, robh+dt@kernel.org, jic23@kernel.org, linux-arm-kernel@lists.infradead.org Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org On Sat, Nov 14, 2020 at 05:58:28PM -0500, William Breathitt Gray wrote: > On Sat, Nov 14, 2020 at 11:51:13PM +0100, Alexandre Belloni wrote: > > On 14/11/2020 23:48:28+0100, Alexandre Belloni wrote: > > > On 11/11/2020 11:38:07-0500, William Breathitt Gray wrote: > > > > The ATMEL_TC_ETRGEDG_* defines are not masks but rather possible values > > > > for CMR. This patch fixes the action_get() callback to properly check > > > > for these values rather than mask them. > > > > > > > > Fixes: 106b104137fd ("counter: Add microchip TCB capture counter") > > > > Cc: Kamel Bouhara > > > > Signed-off-by: William Breathitt Gray > > > Acked-by: Alexandre Belloni > > > > > > > --- > > > > drivers/counter/microchip-tcb-capture.c | 16 ++++++++++------ > > > > 1 file changed, 10 insertions(+), 6 deletions(-) > > > > > > > > diff --git a/drivers/counter/microchip-tcb-capture.c b/drivers/counter/microchip-tcb-capture.c > > > > index 039c54a78aa5..142b389fc9db 100644 > > > > --- a/drivers/counter/microchip-tcb-capture.c > > > > +++ b/drivers/counter/microchip-tcb-capture.c > > > > @@ -183,16 +183,20 @@ static int mchp_tc_count_action_get(struct counter_device *counter, > > > > > > > > regmap_read(priv->regmap, ATMEL_TC_REG(priv->channel[0], CMR), &cmr); > > > > > > > > - *action = MCHP_TC_SYNAPSE_ACTION_NONE; > > > > - > > > > - if (cmr & ATMEL_TC_ETRGEDG_NONE) > > > > + switch (cmr & ATMEL_TC_ETRGEDG_BOTH) { > > > > BTW, this could be simply ATMEL_TC_ETRGEDG which is the mask. > > You're right, let me resubmit this patch with that change since it'll be > much clearer. > > By the way, microchip-tcb-capture.c is missing a MAINTAINERS entry. Is > Kamel the maintainer of this driver? I'd like to get a proper entry > added so we have a point of contact in case of future bugs and changes. > Hello William, Thanks for the patch, indeed Im the maintainer of this driver. Regards, Kamel > Thanks, > > William Breathitt Gray -- Kamel Bouhara, Bootlin Embedded Linux and kernel engineering https://bootlin.com _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel