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 2/3] pwm: cros-ec: Simplify device tree xlation
Date: Wed, 12 Jun 2024 06:27:26 +0000 [thread overview]
Message-ID: <Zmk_zmlyulWRejc7@google.com> (raw)
In-Reply-To: <20240607084416.897777-7-u.kleine-koenig@baylibre.com>
On Fri, Jun 07, 2024 at 10:44:16AM +0200, Uwe Kleine-König wrote:
> The cros-ec device tree binding only uses #pwm-cells = <1>, and so there
> is no period provided in the device tree. Up to now this was handled by
> hardcoding the period to the only supported value in the custom xlate
> callback. Apart from that, the default xlate callback (i.e.
> of_pwm_xlate_with_flags()) handles this just fine (and better, e.g. by
> checking args->args_count >= 1 before accessing args->args[0]).
>
> To simplify make use of of_pwm_xlate_with_flags(), drop the custom
> callback and provide the default period in .probe() already.
>
> Apart from simplifying the driver this also drops the last non-core user
> of pwm_request_from_chip() and so makes further simplifications
> possible.
>
> Signed-off-by: Uwe Kleine-König <u.kleine-koenig@baylibre.com>
Reviewed-by: Tzung-Bi Shih <tzungbi@kernel.org>
next prev parent reply other threads:[~2024-06-12 6:27 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
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 [this message]
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=Zmk_zmlyulWRejc7@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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.