[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20241127214834.1709-1-rafael.v.volkmer@gmail.com>
Date: Wed, 27 Nov 2024 18:48:34 -0300
From: "Rafael V. Volkmer" <rafael.v.volkmer@...il.com>
To: wbg@...nel.org
Cc: david@...hnology.com,
linux-iio@...r.kernel.org,
linux-kernel@...r.kernel.org,
rafael.v.volkmer@...il.com
Subject: Re: [PATCH] Add COUNTER_FUNCTION_DISABLE to the counter API
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
Powered by blists - more mailing lists