From: William Breathitt Gray <wbg@kernel.org>
To: "Csókás Bence" <csokas.bence@prolan.hu>
Cc: Kamel Bouhara <kamel.bouhara@bootlin.com>,
linux-arm-kernel@lists.infradead.org, linux-iio@vger.kernel.org,
linux-kernel@vger.kernel.org
Subject: Re: [PATCH] counter: microchip-tcb-capture: Fix undefined counter channel state on probe
Date: Wed, 5 Mar 2025 20:02:15 +0900 [thread overview]
Message-ID: <Z8gvN1CvcSV8nfVP@ishi> (raw)
In-Reply-To: <93ce1511-53f6-42a3-b1a5-b6732105e87d@prolan.hu>
[-- Attachment #1: Type: text/plain, Size: 1002 bytes --]
On Wed, Mar 05, 2025 at 11:50:27AM +0100, Csókás Bence wrote:
> This duplicates a lot of `mchp_tc_count_function_write()`. I'd much rather
> have this code in a separate function called something like
> `mchp_tc_setup_channels()`, that, depending on `priv->qdec_mode`, sets up
> the BMR, CCR and CMRs, and then have both probe() and function_write() call
> it. Or alternatively, have probe() call function_write() at the end, but
> that's not as nice.
Hi Bence,
I agree, the mchp_tc_count_function_write() could be cleaned up and
divided into separate functions dedicated to configuring each mode
(perhaps regmap_update_bits() could be leveraged too), but that would be
a much more invasive update. For the sake of making backporting easy to
address this particular issue, I've kept the changes here localized to
just the probe() function. Once the fix is merged, someone can try
tackling a more proper refactor of the mchp_tc_count_function_write()
code.
William Breathitt Gray
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 228 bytes --]
next prev parent reply other threads:[~2025-03-05 13:03 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-03-05 10:01 [PATCH] counter: microchip-tcb-capture: Fix undefined counter channel state on probe William Breathitt Gray
2025-03-05 10:31 ` William Breathitt Gray
2025-03-05 10:50 ` Csókás Bence
2025-03-05 11:02 ` William Breathitt Gray [this message]
2025-03-06 14:08 ` William Breathitt Gray
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=Z8gvN1CvcSV8nfVP@ishi \
--to=wbg@kernel.org \
--cc=csokas.bence@prolan.hu \
--cc=kamel.bouhara@bootlin.com \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-iio@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
/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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).