Received: by 2002:a05:6a10:16a7:0:0:0:0 with SMTP id gp39csp2133561pxb; Sat, 14 Nov 2020 15:01:13 -0800 (PST) X-Google-Smtp-Source: ABdhPJxHYw8Jzn+2Qrv/6HQFNx5593YYO6UmfAfpA6/f7o8sLu0X+f4RMdqooXnIFI3oalo21TZ6 X-Received: by 2002:a05:6402:3d9:: with SMTP id t25mr9271141edw.338.1605394872946; Sat, 14 Nov 2020 15:01:12 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1605394872; cv=none; d=google.com; s=arc-20160816; b=teyDlr77GicNMzIKcV6ZBFXnBQtKYw7M4gokRB5zJm4V+hzX3BVHJVEATtftT+ADjt nqrrrBgFuTPs1Eh7PLaLRnaobObAYKGAwyjQLG9zL2RITpX8I8nDM/O12t2He9GW7ZBe 135r6/WbjgBvb6yq8U4HYeJ9YNZy9NqKYDnviq46Tr3YawC9OzOVp6IN29bvtpgpyi3G Hf1AMzqGd7fjc3hUresklLrlTg/jfTpZd9GpPdOMpbxkxJsgAUBvKeJEZ/DE/VTqLhIV HuUoOp2utidfdn13fUERbFf86dYuTLgoAbOs19RbQEo2gdOrKyJ04gmiyydkxrhnqgg3 biIQ== 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=ZJV4itcrkzo0iqqlIyzwiAWmUlMWobk9rPKCYueitq4=; b=uBIhXgeJW8aSwZMyFQuAj125NYCqHlYI7joTRSaybWBGmmaVm0WUwLS1YGfqqe6DaK K+ACh1ek5KGdZq8RHm3hpuTsE3nJPJTtJ4gcjC1uCjy7fFlHrXIN53r6gq7+UtRP2qox 7mNBUmR8A0r39VhZ2WSMHRd/ipYkDJfSdb09m2At+MNK/cvUmNMCupdWAzs/Wv9BtnGj hfOCweBXa/NZhva6h6J1F5tvscWU4KIDuQo7Nx4JIK2tDQiiM9/3Q2tl2RODhi8G2ikK 5fnlDW8LSG/kd/HyA4Oh7gYt2v1MctmciLkai/njw0eVOGznZlOSwQ/7EG52fXl6huK+ ngeQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=NpPw9VlT; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 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 vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id p13si8638230ejx.702.2020.11.14.15.00.50; Sat, 14 Nov 2020 15:01:12 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=NpPw9VlT; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 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 S1726310AbgKNW7L (ORCPT + 99 others); Sat, 14 Nov 2020 17:59:11 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:49212 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726140AbgKNW7L (ORCPT ); Sat, 14 Nov 2020 17:59:11 -0500 Received: from mail-qt1-x844.google.com (mail-qt1-x844.google.com [IPv6:2607:f8b0:4864:20::844]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id D9BB3C0613D1; Sat, 14 Nov 2020 14:59:10 -0800 (PST) Received: by mail-qt1-x844.google.com with SMTP id b16so9839144qtb.6; Sat, 14 Nov 2020 14:59:10 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to; bh=ZJV4itcrkzo0iqqlIyzwiAWmUlMWobk9rPKCYueitq4=; b=NpPw9VlTVt8vCy/GNWXCZV8JbNSV7GH4dGw1Mm1f5Up+kz+oWR564W88dXxqZFN86j GhAJ81Gw7xptZSGp0I9Dy2zqK+iEMFT6VRqYuzBcp4ky+kP6xhXLZRpWM4BzdoDnjBG2 zZ2qta7/baXDQCIbO711u4YQNlM3846FkmJNGcyx6meo8pOGUEQF/mHGQ2N/UBAZz8js FVgb965DXSPc15a/9kYMqBv+czkmfO6KTLmW0ejqcndIMrOPleq9AOyYsc/HWXyhybq8 AnhMxFbeTpnwLYZyvV6oln+zpBTwslGAWMOZsn4SP4FtMZPtWlRbgke0I/uDN9nGvJVa KThQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to; bh=ZJV4itcrkzo0iqqlIyzwiAWmUlMWobk9rPKCYueitq4=; b=mPLCcqwF7Ftqla/+fZKuTvS5N60C4CZs+deUPEBkN2Ofm9LK5hbB94WhESjzTwKpef bl14a6ufbHUbvzV2sLiJ8GpnJ6nvrUH+Y5coq01cKdMDTog/+dntqZi0+hMM1vJgdDAj NO0IH1DeAn9WOJHthzLdiZyhythGXb7H2Q6TD2Q96Fi8UpEHSa20F0PcUFtcNDig0A65 XY/BeAP1c/R1DEd1X8/zFFqgTyFEZQvJyJeY5kHs+1wd4qw/ae6FzE7K39JTaCvYZ/j/ Xt/YFOBuQ5p4YYHm3WPYeNy2wAuQNYNf7TueAFFCVsG0IU2Jn01ocigxDZyim+FP8Zg8 jRng== X-Gm-Message-State: AOAM5327rUimNArt+qgQvUU5aIWfVbwBeNaoVMUhWYud1IjHPqLNMrQK Vq1os56lXq3SxoOf2r9FB8A= X-Received: by 2002:ac8:6c6:: with SMTP id j6mr8304427qth.123.1605394749978; Sat, 14 Nov 2020 14:59:09 -0800 (PST) Received: from shinobu (072-189-064-225.res.spectrum.com. [72.189.64.225]) by smtp.gmail.com with ESMTPSA id 9sm9995356qkm.81.2020.11.14.14.59.08 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 14 Nov 2020 14:59:09 -0800 (PST) Date: Sat, 14 Nov 2020 17:58:28 -0500 From: William Breathitt Gray To: Alexandre Belloni , Kamel Bouhara Cc: jic23@kernel.org, robh+dt@kernel.org, linux-arm-kernel@lists.infradead.org, linux-iio@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH] counter: microchip-tcb-capture: Fix CMR value check Message-ID: References: <20201111163807.10201-1-vilhelm.gray@gmail.com> <20201114224827.GQ4556@piout.net> <20201114225113.GR4556@piout.net> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha512; protocol="application/pgp-signature"; boundary="LF/5iLACl9VFrJcf" Content-Disposition: inline In-Reply-To: <20201114225113.GR4556@piout.net> Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org --LF/5iLACl9VFrJcf Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable 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 valu= es > > > for CMR. This patch fixes the action_get() callback to properly check > > > for these values rather than mask them. > > >=20 > > > Fixes: 106b104137fd ("counter: Add microchip TCB capture counter") > > > Cc: Kamel Bouhara > > > Signed-off-by: William Breathitt Gray > > Acked-by: Alexandre Belloni > >=20 > > > --- > > > drivers/counter/microchip-tcb-capture.c | 16 ++++++++++------ > > > 1 file changed, 10 insertions(+), 6 deletions(-) > > >=20 > > > diff --git a/drivers/counter/microchip-tcb-capture.c b/drivers/counte= r/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 coun= ter_device *counter, > > > =20 > > > regmap_read(priv->regmap, ATMEL_TC_REG(priv->channel[0], CMR), &cmr= ); > > > =20 > > > - *action =3D MCHP_TC_SYNAPSE_ACTION_NONE; > > > - > > > - if (cmr & ATMEL_TC_ETRGEDG_NONE) > > > + switch (cmr & ATMEL_TC_ETRGEDG_BOTH) { >=20 > 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. Thanks, William Breathitt Gray --LF/5iLACl9VFrJcf Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQIzBAABCgAdFiEEk5I4PDJ2w1cDf/bghvpINdm7VJIFAl+wYPUACgkQhvpINdm7 VJJI+hAA6HMTVn7T0kWkHIRa+CGFPliJYVMVECIiMeMVFSzfB8b//RWxSoYUY8Cr Oj1fCgZT/pddPB9kcvLkycgFrUJN1dO3MHvYtChn67moUIK2WdIRYXVKUNlpyOy0 cIzSznULfJYcqHYVROIaIjgBpLtQiBhsG857kqSxCni4UOWMjWHPnNU+XXPAy79U ORp0XAgViBrGpT1cD9z3mXO9TdIP49fm2An2rORC5Eu8UPMk+cpBKekhk+VwURUj H2T3Q61EwxH2iicDHip7rRzSlKQEDvXghIWYCzlLhJ99V+sOBaZD7qbO+FflOjJp T9z0+q3tuXhSrwQ6mWvISLVOddf2q2HcgnW2W45TUO4jyxlVXwIKWpwTsF+PKjBF tMYlrojud53CGe+jqA83baBEUw1k81Fioo5Tr7jjaIu3jRBN/clzIx4ontwU7rY8 et4OidOH/10ozD9ABffQOoOTDz/2jD6Ub+iQGNnCAVcOZJD8l29LjOIr1AldmeM/ 7ssqDXHI6f8FKxZDjjfcKlhFhEGrribZZ8/r1YdpkZgQkZ+35nH4gN9W2WOGZkrP lLd0z1o1ygkkhm/uQ0FDIKes4qoGPzwCV4u4d1BqW+DOTo5JX1pFZhXivqhkbVtw ux5Y7OIEeHjXQ+9xf6IToefeJ30zrGHI4tWgrI8bhnV0nY4geUw= =1W7P -----END PGP SIGNATURE----- --LF/5iLACl9VFrJcf--