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 Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id F2F39C47073 for ; Mon, 8 Jan 2024 17:26:23 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender:Content-Type: List-Subscribe:List-Help:List-Post:List-Archive:List-Unsubscribe:List-Id: In-Reply-To:MIME-Version:References:Message-ID:Subject:Cc:To:From:Date: Reply-To:Content-Transfer-Encoding:Content-ID:Content-Description:Resent-Date :Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=4IIn60YM0Yoe2tCAt80kcSvKO1jcTJWpVo6X8Fx7pxU=; b=OwgZiwjuERYDpoEbGNXYsJ0uDS Kn58sH4sTGfew/4u7jNOU0GfKLDNqZc07kZA606ntpotPhetUfL/x7Y7v5VRO3XPS7fv9++p2ehs8 Q51PZY77ljEM9ukzfvPmBVe8P8e8cEs7nR6V5KA4da4vL8uvhdC/AC4DhGCkyj6VAooEIuAHWwOpo rf/tKM2ON0as93nKRG+3WhIv6gPFdtVMVczjMi6LrbGoqVFEwyaLi9206frQnNt1EyLJP1R7KlhB8 jmMavbBpI6iFNV6zNCyFShPSUO9UdKY6ZvlFotxHTugUdCRurd/y47kp9kxXo4+sCEmXTWDDmEN6D 1v8qoCpw==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.96 #2 (Red Hat Linux)) id 1rMtNr-005kBE-1N; Mon, 08 Jan 2024 17:25:55 +0000 Received: from mail-vk1-xa2b.google.com ([2607:f8b0:4864:20::a2b]) by bombadil.infradead.org with esmtps (Exim 4.96 #2 (Red Hat Linux)) id 1rMtNo-005kAp-26 for linux-arm-kernel@lists.infradead.org; Mon, 08 Jan 2024 17:25:53 +0000 Received: by mail-vk1-xa2b.google.com with SMTP id 71dfb90a1353d-4b756f2aebeso371061e0c.2 for ; Mon, 08 Jan 2024 09:25:52 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1704734752; x=1705339552; darn=lists.infradead.org; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:from:to:cc:subject:date:message-id:reply-to; bh=WpCOTIlqbuft57aTYAHETU0NJnJb1485dKEn5DsMcpQ=; b=nXLz2Y1StZRNcK8lWrCm090B21JTktQjQfL4YKEGxyVK/cAMxva2rBaHrLc6n4sAH5 3d4WSRXSTFq1a4HFJyLXoS0bkU4QCCBO7WjEoVUHUfz0dUKfiS8Oj6YkehsO9fdz5DHn TWnQFE8rWXPK3x6646uGiQ2uP8cjrQ1Fpl39t0Pq29/KiM+Ke5Xx6j2AZhQdHoF9nLMA uLKkPW7cFmnysY60D0tFPcpX6lhujniRgGjNIUtcKgUJ+ATLHp1+EMeTBZIIOqPPkqKp 1v8mZ2ZBb2GWFMJomPES1XZOtEFLVeRE7IDJP7nxQjM0OIwu6k5F9XipdDy+7PwYfP0P Ptaw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1704734752; x=1705339552; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:x-gm-message-state:from:to:cc:subject:date :message-id:reply-to; bh=WpCOTIlqbuft57aTYAHETU0NJnJb1485dKEn5DsMcpQ=; b=SjEr93BhtGFYRVejLzPScbsuknu5zOFZ52UKrBx6fWhNGabP8c77cAlJMJACXbkVcT G5BTVTqol4l/TrvisKaI6KUXH/yZ4+avSoA3KIY5wdn4AtbZzy6kArKHnCPrh7Gr2POw EnJ/gc+myw054giAYihmVK/a/IcB3K07zJDCISZGddOM67i57sKB2ZP/1//CZbISMNx/ apFUFP2l3RTS1XH91C7jBd5bXbp2SdHtcSHt35yQmGecf/wZDdw///bMICFwGCCHVq/L YSRCxGkWCM7tKIPthgKtZl2S+Pj1o/TwO6xXVMhfIusIJFuQcqZ4qI8XH92vQ4jsak0R VrwQ== X-Gm-Message-State: AOJu0YyWMwF7J+aicTq1rW9gJHICD5JISG6CCz+nuQICOKPshgWAH8Rr n0CUVd2OkLuAD1+ATZieZOQBKHlbFsj6S3G5guJlkLQKl0M= X-Google-Smtp-Source: AGHT+IG2wN30jsYz+KEWDrzc7NDOQ+4R0TmDVrin5hgMKnBcVP6ilXtqIrxu9UxegoJmUGV8ikZUbQ== X-Received: by 2002:ac5:ce15:0:b0:4b7:8196:7715 with SMTP id j21-20020ac5ce15000000b004b781967715mr1264348vki.14.1704734751758; Mon, 08 Jan 2024 09:25:51 -0800 (PST) Received: from ubuntu-server-vm-macos (072-189-067-006.res.spectrum.com. [72.189.67.6]) by smtp.gmail.com with ESMTPSA id eo1-20020a056122388100b004b71620a7d5sm32298vkb.28.2024.01.08.09.25.50 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 08 Jan 2024 09:25:51 -0800 (PST) Date: Mon, 8 Jan 2024 17:25:48 +0000 From: William Breathitt Gray To: Fabrice Gasnier Cc: lee@kernel.org, alexandre.torgue@foss.st.com, linux-iio@vger.kernel.org, linux-stm32@st-md-mailman.stormreply.com, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH v3 08/10] counter: stm32-timer-cnt: probe number of channels from registers Message-ID: References: <20231220145726.640627-1-fabrice.gasnier@foss.st.com> <20231220145726.640627-9-fabrice.gasnier@foss.st.com> MIME-Version: 1.0 In-Reply-To: <20231220145726.640627-9-fabrice.gasnier@foss.st.com> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20240108_092552_691030_94FC8D40 X-CRM114-Status: GOOD ( 20.14 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Type: multipart/mixed; boundary="===============2360658847387454507==" Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org --===============2360658847387454507== Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="s+ElIGvTpO6OYXT3" Content-Disposition: inline --s+ElIGvTpO6OYXT3 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Wed, Dec 20, 2023 at 03:57:24PM +0100, Fabrice Gasnier wrote: > Probe the number of capture compare channels, by writing CCER register bi= ts > and read them back. Take care to restore the register original value. >=20 > This is a precursor patch to support capture channels. >=20 > Signed-off-by: Fabrice Gasnier > --- > Changes in v3: > - New patch split from: > "counter: stm32-timer-cnt: populate capture channels and check encoder" > --- > drivers/counter/stm32-timer-cnt.c | 17 +++++++++++++++++ > 1 file changed, 17 insertions(+) >=20 > diff --git a/drivers/counter/stm32-timer-cnt.c b/drivers/counter/stm32-ti= mer-cnt.c > index 55eb6af34750..b5dc4378fecf 100644 > --- a/drivers/counter/stm32-timer-cnt.c > +++ b/drivers/counter/stm32-timer-cnt.c > @@ -43,6 +43,7 @@ struct stm32_timer_cnt { > struct stm32_timer_regs bak; > bool has_encoder; > u32 idx; > + unsigned int nchannels; > }; > =20 > static const enum counter_function stm32_count_functions[] =3D { > @@ -417,6 +418,20 @@ static struct counter_count stm32_counts =3D { > .num_ext =3D ARRAY_SIZE(stm32_count_ext) > }; > =20 > +static void stm32_timer_cnt_detect_channels(struct platform_device *pdev, Like stm32_timer_cnt_probe_encoder() in one of the previous patches, this function uses 'pdev' only to access 'dev'. Pass a reference to 'dev' directly instead. William Breathitt Gray --s+ElIGvTpO6OYXT3 Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iHUEABYIAB0WIQSNN83d4NIlKPjon7a1SFbKvhIjKwUCZZwwHAAKCRC1SFbKvhIj K+NhAQD7UTpd7xtERic8jhg3U9gZyAlOd7tZl2JFUwCcjokjvgEA9zas8C7NQg1N G9mPHn1XtkZXe31uApBNUsx9M6unJQE= =3UXx -----END PGP SIGNATURE----- --s+ElIGvTpO6OYXT3-- --===============2360658847387454507== Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel --===============2360658847387454507==--