From: Pavel Machek <pavel@ucw.cz>
To: Alexander Dahl <post@lespocky.de>
Cc: linux-leds@vger.kernel.org, devicetree@vger.kernel.org,
Jacek Anaszewski <jacek.anaszewski@gmail.com>,
Dan Murphy <dmurphy@ti.com>, Rob Herring <robh+dt@kernel.org>,
linux-kernel@vger.kernel.org, Alexander Dahl <ada@thorsis.com>
Subject: Re: [PATCH v3 1/2] leds: pwm: Allow automatic labels for DT based devices
Date: Wed, 9 Sep 2020 11:07:36 +0200 [thread overview]
Message-ID: <20200909090736.GE10891@amd> (raw)
In-Reply-To: <20200907043459.2961-2-post@lespocky.de>
[-- Attachment #1: Type: text/plain, Size: 679 bytes --]
Hi!
> pwm_init_state(led_data->pwm, &led_data->pwmstate);
>
> - ret = devm_led_classdev_register(dev, &led_data->cdev);
> + if (fwnode) {
> + init_data.fwnode = fwnode;
> + ret = devm_led_classdev_register_ext(dev, &led_data->cdev,
> + &init_data);
> + } else {
> + ret = devm_led_classdev_register(dev, &led_data->cdev);
> + }
Can you always use _ext version, even with null fwnode? If not, can
you fix the core to accept that? Having that conditional in driver is
ugly.
Best regards,
Pavel
--
(english) http://www.livejournal.com/~pavelmachek
(cesky, pictures) http://atrey.karlin.mff.cuni.cz/~pavel/picture/horses/blog.html
[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 181 bytes --]
next prev parent reply other threads:[~2020-09-09 9:07 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-09-07 4:34 [PATCH v3 0/2] leds: pwm: Make automatic labels work Alexander Dahl
2020-09-07 4:34 ` [PATCH v3 1/2] leds: pwm: Allow automatic labels for DT based devices Alexander Dahl
2020-09-09 9:07 ` Pavel Machek [this message]
2020-09-09 20:29 ` Alexander Dahl
2020-09-09 20:47 ` Jacek Anaszewski
2020-09-09 20:58 ` Pavel Machek
2020-09-07 4:34 ` [PATCH v3 2/2] dt-bindings: leds: Convert pwm to yaml Alexander Dahl
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=20200909090736.GE10891@amd \
--to=pavel@ucw.cz \
--cc=ada@thorsis.com \
--cc=devicetree@vger.kernel.org \
--cc=dmurphy@ti.com \
--cc=jacek.anaszewski@gmail.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-leds@vger.kernel.org \
--cc=post@lespocky.de \
--cc=robh+dt@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 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.