Linux IIO development
 help / color / mirror / Atom feed
From: David Lechner <david@lechnology.com>
To: "Rafael V. Volkmer" <rafael.v.volkmer@gmail.com>
Cc: linux-iio@vger.kernel.org, linux-kernel@vger.kernel.org, wbg@kernel.org
Subject: Re: [PATCH] Add COUNTER_FUNCTION_DISABLE to the counter API
Date: Wed, 27 Nov 2024 16:49:52 -0600	[thread overview]
Message-ID: <538f5d83-1a16-4df5-8dbe-4c6d556e1058@lechnology.com> (raw)
In-Reply-To: <20241127215404.915-1-rafael.v.volkmer@gmail.com>

On 11/27/24 3:54 PM, Rafael V. Volkmer wrote:
> On 11/25/24 11:36 AM, David Lechner wrote:
>> How does this work without an additional patch to modify the TI eQEP
>> counter driver to handle this new enum value? For example, I would
>> expect that this enum value would be added to ti_eqep_position_functions
>> and case statements added in ti_eqep_function_read(),
>> ti_eqep_function_write() and ti_eqep_action_read() to handle the new
>> option.
> 
> Hi, David!
> 
> Yes, the intention is to have a second path where the eQEP driver handles 
> this within these file operations functions.
> 
> Best regards

OK, so please send those patches too so that we can see the whole picture.

Based on your discussion with William, it sounds like there are 2 things
that need to be resolved.

1. Should a power saving mode actually be a counter function or should it
   be controlled by the counter enable attribute or something else, like
   more general Linux power management stuff?
2. If there are going to be in-kernel users calling these functions, then
   we will likely want to introduce some new APIs in the kernel for this.
   Using platform_get_drvdata() from one driver to another is a bit
   fragile. Likely we will want some devicetree bindings for counter
   consumers and providers and some kernel APIs like a counter_get() that
   takes an index or string ID to get the counter provider assigned to a
   counter consumer. Then we will probably want some wrappers around the
   counter ops pointers so that consumer drivers don't have to depend on
   the internal implementation of the counter subsystem.


  reply	other threads:[~2024-11-27 22: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 [this message]
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

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=538f5d83-1a16-4df5-8dbe-4c6d556e1058@lechnology.com \
    --to=david@lechnology.com \
    --cc=linux-iio@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=rafael.v.volkmer@gmail.com \
    --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