From: "Rafael V. Volkmer" <rafael.v.volkmer@gmail.com>
To: wbg@kernel.org
Cc: david@lechnology.com, linux-iio@vger.kernel.org,
linux-kernel@vger.kernel.org, rafael.v.volkmer@gmail.com
Subject: Re: [PATCH] Add COUNTER_FUNCTION_DISABLE to the counter API
Date: Wed, 27 Nov 2024 18:48:34 -0300 [thread overview]
Message-ID: <20241127214834.1709-1-rafael.v.volkmer@gmail.com> (raw)
In-Reply-To: <Z0eAg9HRlYlCy25H@ishi>
On Mon, Nov 25, 2024 at 05:26 PM, William Breathitt Gray wrote:
> Hello Rafael,
>
> I wonder whether a new enum option is actually needed in this case.
> Wouldn't the Count "enable" extension already provide a way for users to
> stop the counting? I imagine the driver would determine implicitly that
> the device can enter a power-saving state in that scenario when counting
> has been disabled by the user.
>
> William Breathitt Gray
Hello, William!
Thanks a lot for the feedback! You raised an important point.
I would like to explain my reasoning behind the implementation
so you can see if it makes sense or if I misunderstood. Basically,
Texas drivers are described as user-operated through the sysfs file
system, echoing some directories in /dev/.
The requirement of my application was to communicate at the kernel
space level with another driver, and to do so, I retrieved the pdev
with platform_get_drvdata(), which was allocated with platform_set_drvdata
in the texas driver probe. To apply the required settings, I used the pdev
I retrieved pointing to the fops, such as ti_eqep_function_write(). I made
this small change in the module for this enum value and a patch in the ti
eqep driver to handle this in order to establish a safe shutdown.
In my application it worked perfectly, and so I had the idea of applying
a patch to kernel.org to see if my changes could contribute something to
the Texas driver infrastructure.
Best regards
prev parent reply other threads:[~2024-11-27 21:49 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-11-25 23:02 [PATCH] counter: add COUNTER_FUNCTION_DISABLE for energy saving Rafael V. Volkmer
2024-11-27 14:36 ` David Lechner
2024-11-27 21:54 ` [PATCH] Add COUNTER_FUNCTION_DISABLE to the counter API Rafael V. Volkmer
2024-11-27 22:49 ` David Lechner
2024-11-27 20:26 ` [PATCH] counter: add COUNTER_FUNCTION_DISABLE for energy saving William Breathitt Gray
2024-11-27 21:46 ` [PATCH] Add COUNTER_FUNCTION_DISABLE to the counter API Rafael V. Volkmer
2024-11-27 21:48 ` Rafael V. Volkmer [this message]
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=20241127214834.1709-1-rafael.v.volkmer@gmail.com \
--to=rafael.v.volkmer@gmail.com \
--cc=david@lechnology.com \
--cc=linux-iio@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=wbg@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