Received: by 2002:a05:7412:98c1:b0:fa:551:50a7 with SMTP id kc1csp1764814rdb; Mon, 8 Jan 2024 09:26:03 -0800 (PST) X-Google-Smtp-Source: AGHT+IFILE+0f+58yYLnbDEIGMdxwcLVnDerPCEYeTwUeEnD86Tf6j9P0Fgt55jMeXWT64CD78Qs X-Received: by 2002:a50:d55b:0:b0:557:6401:e7c with SMTP id f27-20020a50d55b000000b0055764010e7cmr2198952edj.18.1704734763391; Mon, 08 Jan 2024 09:26:03 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1704734763; cv=none; d=google.com; s=arc-20160816; b=bRqIhdy4Hpd1+7DRoD0eaOFN/+NV58kiOVXmYbOCQsrfGAUF1Y9NBa34+VqVjtq5ZM bjb12RFteWnT5KKqXILKjpRUix9zQNKTOUpsHbofxf9PhiXuG8en9D8iG4asLiUEI4qu aM0yog5jefLX1b9IZOgUybOZkoSbxSN/yMqE/nZA2TAlU6f4bbR534TgvDyg7SUwfKmw 5qBX/7t9mUCMLH4vHTwwUEQv/ajbF6EYYbw5kEB+1AK3wYHRklphndJn4TnRwGO09iS3 ZBuUZZ2d2+JevVRWiTOu6lNxaErCODQ0L2xcCFuHsI17Tgw8Sc9DE8irXDBd21F8dL3N OuNQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=in-reply-to:content-disposition:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:references:message-id:subject:cc :to:from:date:dkim-signature; bh=WpCOTIlqbuft57aTYAHETU0NJnJb1485dKEn5DsMcpQ=; fh=wT9Q6l4w0nN9BZc2VSxa7kC4ae7opG8tVDMNxCIfbBM=; b=LGKefkXCOXoEXBGrWK33kmze0hQQqPi1mLrVGB7NqadngvUroSepGYGrSMigWJiDYN 16mjXRCaLr5oRjRua7PfOkmJul6a1GTS0ZqNsufCVPkR1TD2T6vyu51ArWwdiXKn+EnL 7LUudRi9GyzVrsZtDSr84eDr32vDRU5uOoIxgMEJbRcMTueOoK1tpJtpW9LmhzTcxuAt E/nuLd+AbLpMeXkSMjTgy7+H8GdYEbmsTXCnMsp0iJQk8iMYZDemjSh1jy4CMLOYNI5G AM1r9BTeFrqGnOL8EFgSoQ5tupdH494y1V8vPY5m6KD1uUozMNIe636lHEkDZOxPQd91 5I6A== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=n6ydorXT; spf=pass (google.com: domain of linux-kernel+bounces-19892-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) smtp.mailfrom="linux-kernel+bounces-19892-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from am.mirrors.kernel.org (am.mirrors.kernel.org. [2604:1380:4601:e00::3]) by mx.google.com with ESMTPS id dh20-20020a0564021d3400b00557c568dc16si53374edb.170.2024.01.08.09.26.03 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 08 Jan 2024 09:26:03 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-19892-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) client-ip=2604:1380:4601:e00::3; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=n6ydorXT; spf=pass (google.com: domain of linux-kernel+bounces-19892-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) smtp.mailfrom="linux-kernel+bounces-19892-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org 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 am.mirrors.kernel.org (Postfix) with ESMTPS id 7EFF81F22C20 for ; Mon, 8 Jan 2024 17:26:02 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id EC36E5466E; Mon, 8 Jan 2024 17:25:55 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=linaro.org header.i=@linaro.org header.b="n6ydorXT" X-Original-To: linux-kernel@vger.kernel.org Received: from mail-vk1-f174.google.com (mail-vk1-f174.google.com [209.85.221.174]) (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 EA52F5466D for ; Mon, 8 Jan 2024 17:25:52 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linaro.org Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=linaro.org Received: by mail-vk1-f174.google.com with SMTP id 71dfb90a1353d-4b7a3189d47so373820e0c.0 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=vger.kernel.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=n6ydorXTAvgxar2MrPGpC2Nn4EUl5NxCkGda5rbH8sLH4qTibNfYw40BTbFRaLukvU FLJgKCt1gRM4iZrcO4lswzmwDycPHrICCQ7raKyWdC84Iqkedy7Oe/YlPfKKpnNeSd5w f9FWn4jbvDpPiBHTJWmtbg+RIljTKt18Y3j8Yt/9lKe0nVnBRTjoia3XzZOZeGEyoCQg T99yhq06FgClJgeDbKd4L0ZQy362Jd+kPHRIZMj9i6NzkXvtzcxxdxAeVo4XXN7xBJwM 7+R1mSsVpjNWBXqrO8LoEp2AqDKJg2f0ehrDBNkbDrGekrrZwK9SC4LJQ9mN2Suvec58 yxBg== 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=V2Qbv9IdRIQk1SfZSMoqWLAP1nsmTfHWDZ+P4c6+c2zaG5dWVZQ9mmfvjbMCJ0kH3d 3jXr21Y0rb86DkBoJPdng/7WEf4GJY3KDk1fAox2aJy6PwZdw1ivZtjTUoLtp3x3em73 vmT60NUybWqzBijEC9qEeNsRS1SgP/aWKLOWLat3PrtlN9OnbE088Ge+KQCVld3VbJvj PejNLVTnRXyCzxZC+tkHjh3sFPihgPbhB016fVxFnSVFwgUqB66AQVGCFYQ+DsoSaN6X lfqIjYAU0KAnW8HF2SvXM82tfAgAtYc71WE/I4T8Pr9OGanImZaHGg1m8XF6VNj4teS8 xIyg== X-Gm-Message-State: AOJu0YybW4DIbabH378gwEeiwL/UrQayjuwFwQhXQHdhbYanWl7m4EMM /LwYwgk4JbdFI8rh0VyhAVBEqWvlO9bCZg== 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> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="s+ElIGvTpO6OYXT3" Content-Disposition: inline In-Reply-To: <20231220145726.640627-9-fabrice.gasnier@foss.st.com> --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--