From: Tzung-Bi Shih <tzungbi@kernel.org>
To: "Uwe Kleine-König" <ukleinek@baylibre.com>
Cc: Benson Leung <bleung@chromium.org>,
Guenter Roeck <groeck@chromium.org>,
linux-pwm@vger.kernel.org, chrome-platform@lists.linux.dev,
linux-kernel@vger.kernel.org
Subject: Re: [PATCH 1/3] pwm: cros-ec: Don't care about consumers in .get_state()
Date: Tue, 11 Jun 2024 08:50:44 +0000 [thread overview]
Message-ID: <ZmgP5NTPEGM0M2Li@google.com> (raw)
In-Reply-To: <20240607084416.897777-6-u.kleine-koenig@baylibre.com>
On Fri, Jun 07, 2024 at 10:44:15AM +0200, Uwe Kleine-König wrote:
> The get_state() callback is never called (in a visible way) after there
> is a consumer for a pwm device. The core handles loosing the information
> about duty_cycle just fine.
ChromeOS EC has no separated "enabled" state, it sees `duty == 0` as
"disabled"[1]. 1db37f9561b2 ("pwm: cros-ec: Cache duty cycle value")
caches the value in kernel side so that it can retrieve the original duty
value even if (struct pwm_state *)->enabled is false.
To make sure I understand, did you mean the original duty value could be less
important because:
- We are less caring as it is in a debug context at [2]?
- At [3], the PWM device is still initializing.
[1]: https://crrev.com/0e16954460a08133b2557150e0897014ea2b9672/common/pwm.c#66
[2]: https://elixir.bootlin.com/linux/v6.10-rc3/source/drivers/pwm/core.c#L52
[3]: https://elixir.bootlin.com/linux/v6.10-rc3/source/drivers/pwm/core.c#L371
next prev parent reply other threads:[~2024-06-11 8:50 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-06-07 8:44 [PATCH 0/3] pwm: cros-ec: Some simplifications Uwe Kleine-König
2024-06-07 8:44 ` [PATCH 1/3] pwm: cros-ec: Don't care about consumers in .get_state() Uwe Kleine-König
2024-06-07 16:43 ` Uwe Kleine-König
2024-06-08 14:24 ` kernel test robot
2024-06-11 8:50 ` Tzung-Bi Shih [this message]
2024-06-11 10:39 ` Uwe Kleine-König
2024-06-12 6:27 ` Tzung-Bi Shih
2024-06-13 6:07 ` Uwe Kleine-König
2024-06-07 8:44 ` [PATCH 2/3] pwm: cros-ec: Simplify device tree xlation Uwe Kleine-König
2024-06-12 6:27 ` Tzung-Bi Shih
2024-06-07 8:44 ` [PATCH 3/3] pwm: Make pwm_request_from_chip() private to the core Uwe Kleine-König
2024-06-12 6:27 ` Tzung-Bi Shih
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=ZmgP5NTPEGM0M2Li@google.com \
--to=tzungbi@kernel.org \
--cc=bleung@chromium.org \
--cc=chrome-platform@lists.linux.dev \
--cc=groeck@chromium.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-pwm@vger.kernel.org \
--cc=ukleinek@baylibre.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox