From: William Breathitt Gray <william.gray@linaro.org>
To: Fabrice Gasnier <fabrice.gasnier@foss.st.com>
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
Date: Mon, 8 Jan 2024 17:25:48 +0000 [thread overview]
Message-ID: <ZZwwHBS224JXn2Hf@ubuntu-server-vm-macos> (raw)
In-Reply-To: <20231220145726.640627-9-fabrice.gasnier@foss.st.com>
[-- Attachment #1: Type: text/plain, Size: 1421 bytes --]
On Wed, Dec 20, 2023 at 03:57:24PM +0100, Fabrice Gasnier wrote:
> Probe the number of capture compare channels, by writing CCER register bits
> and read them back. Take care to restore the register original value.
>
> This is a precursor patch to support capture channels.
>
> Signed-off-by: Fabrice Gasnier <fabrice.gasnier@foss.st.com>
> ---
> 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(+)
>
> diff --git a/drivers/counter/stm32-timer-cnt.c b/drivers/counter/stm32-timer-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;
> };
>
> static const enum counter_function stm32_count_functions[] = {
> @@ -417,6 +418,20 @@ static struct counter_count stm32_counts = {
> .num_ext = ARRAY_SIZE(stm32_count_ext)
> };
>
> +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
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 228 bytes --]
WARNING: multiple messages have this Message-ID (diff)
From: William Breathitt Gray <william.gray@linaro.org>
To: Fabrice Gasnier <fabrice.gasnier@foss.st.com>
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
Date: Mon, 8 Jan 2024 17:25:48 +0000 [thread overview]
Message-ID: <ZZwwHBS224JXn2Hf@ubuntu-server-vm-macos> (raw)
In-Reply-To: <20231220145726.640627-9-fabrice.gasnier@foss.st.com>
[-- Attachment #1.1: Type: text/plain, Size: 1421 bytes --]
On Wed, Dec 20, 2023 at 03:57:24PM +0100, Fabrice Gasnier wrote:
> Probe the number of capture compare channels, by writing CCER register bits
> and read them back. Take care to restore the register original value.
>
> This is a precursor patch to support capture channels.
>
> Signed-off-by: Fabrice Gasnier <fabrice.gasnier@foss.st.com>
> ---
> 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(+)
>
> diff --git a/drivers/counter/stm32-timer-cnt.c b/drivers/counter/stm32-timer-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;
> };
>
> static const enum counter_function stm32_count_functions[] = {
> @@ -417,6 +418,20 @@ static struct counter_count stm32_counts = {
> .num_ext = ARRAY_SIZE(stm32_count_ext)
> };
>
> +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
[-- Attachment #1.2: signature.asc --]
[-- Type: application/pgp-signature, Size: 228 bytes --]
[-- Attachment #2: Type: text/plain, Size: 176 bytes --]
_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
next prev parent reply other threads:[~2024-01-08 17:25 UTC|newest]
Thread overview: 52+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-12-20 14:57 [PATCH v3 00/10] counter: Add stm32 timer events support Fabrice Gasnier
2023-12-20 14:57 ` Fabrice Gasnier
2023-12-20 14:57 ` [PATCH v3 01/10] counter: stm32-timer-cnt: rename quadrature signal Fabrice Gasnier
2023-12-20 14:57 ` Fabrice Gasnier
2024-01-08 16:33 ` William Breathitt Gray
2024-01-08 16:33 ` William Breathitt Gray
2023-12-20 14:57 ` [PATCH v3 02/10] counter: stm32-timer-cnt: rename counter Fabrice Gasnier
2023-12-20 14:57 ` Fabrice Gasnier
2024-01-08 16:34 ` William Breathitt Gray
2024-01-08 16:34 ` William Breathitt Gray
2023-12-20 14:57 ` [PATCH v3 03/10] counter: stm32-timer-cnt: adopt signal definitions Fabrice Gasnier
2023-12-20 14:57 ` Fabrice Gasnier
2024-01-08 16:34 ` William Breathitt Gray
2024-01-08 16:34 ` William Breathitt Gray
2023-12-20 14:57 ` [PATCH v3 04/10] counter: stm32-timer-cnt: introduce clock signal Fabrice Gasnier
2023-12-20 14:57 ` Fabrice Gasnier
2024-01-08 16:46 ` William Breathitt Gray
2024-01-08 16:46 ` William Breathitt Gray
2024-02-27 17:43 ` Fabrice Gasnier
2024-02-27 17:43 ` Fabrice Gasnier
2024-02-29 18:58 ` William Breathitt Gray
2024-02-29 18:58 ` William Breathitt Gray
2023-12-20 14:57 ` [PATCH v3 05/10] counter: stm32-timer-cnt: add counter prescaler extension Fabrice Gasnier
2023-12-20 14:57 ` Fabrice Gasnier
2024-01-08 16:48 ` William Breathitt Gray
2024-01-08 16:48 ` William Breathitt Gray
2023-12-20 14:57 ` [PATCH v3 06/10] counter: stm32-timer-cnt: add checks on quadrature encoder capability Fabrice Gasnier
2023-12-20 14:57 ` Fabrice Gasnier
2024-01-08 16:59 ` William Breathitt Gray
2024-01-08 16:59 ` William Breathitt Gray
2023-12-20 14:57 ` [PATCH v3 07/10] counter: stm32-timer-cnt: introduce channels Fabrice Gasnier
2023-12-20 14:57 ` Fabrice Gasnier
2024-01-08 17:21 ` William Breathitt Gray
2024-01-08 17:21 ` William Breathitt Gray
2023-12-20 14:57 ` [PATCH v3 08/10] counter: stm32-timer-cnt: probe number of channels from registers Fabrice Gasnier
2023-12-20 14:57 ` Fabrice Gasnier
2024-01-08 17:25 ` William Breathitt Gray [this message]
2024-01-08 17:25 ` William Breathitt Gray
2023-12-20 14:57 ` [PATCH v3 09/10] counter: stm32-timer-cnt: add support for overflow events Fabrice Gasnier
2023-12-20 14:57 ` Fabrice Gasnier
2024-01-08 21:00 ` William Breathitt Gray
2024-01-08 21:00 ` William Breathitt Gray
2024-02-27 17:43 ` Fabrice Gasnier
2024-02-27 17:43 ` Fabrice Gasnier
2024-01-08 21:06 ` William Breathitt Gray
2024-01-08 21:06 ` William Breathitt Gray
2023-12-20 14:57 ` [PATCH v3 10/10] counter: stm32-timer-cnt: add support for capture events Fabrice Gasnier
2023-12-20 14:57 ` Fabrice Gasnier
2024-01-08 22:07 ` William Breathitt Gray
2024-01-08 22:07 ` William Breathitt Gray
2024-02-27 17:43 ` Fabrice Gasnier
2024-02-27 17:43 ` Fabrice Gasnier
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=ZZwwHBS224JXn2Hf@ubuntu-server-vm-macos \
--to=william.gray@linaro.org \
--cc=alexandre.torgue@foss.st.com \
--cc=fabrice.gasnier@foss.st.com \
--cc=lee@kernel.org \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-iio@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-stm32@st-md-mailman.stormreply.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.