From: Pavel Machek <pavel@ucw.cz>
To: Oleh Kravchenko <oleg@kaa.org.ua>
Cc: linux-leds@vger.kernel.org
Subject: Re: [PATCH] leds: add LED driver for CR0014114 board
Date: Sat, 12 Aug 2017 21:13:00 +0200 [thread overview]
Message-ID: <20170812191300.GA23619@amd> (raw)
In-Reply-To: <00efd6b5-494f-0f8d-d32b-321236ed8aaa@kaa.org.ua>
[-- Attachment #1: Type: text/plain, Size: 1656 bytes --]
Hi!
> > Hmm. Well, this works if you can't provide better names. Still "board"
> > is somehow generic, andsomeone else might want to use it. "board" ->
> > "crms"?
>
> It's specified in device tree by defining label.
> In my examples:
> board@0 {
> compatible = "ccs,cr0014114";
> reg = <0>;
> spi-max-frequency = <50000>;
> spi-cpha;
> label = "board0";
> };
>
> board@1 {
> compatible = "ccs,cr0014114";
> reg = <1>;
> spi-max-frequency = <50000>;
> spi-cpha;
> label = "board1";
> };
Ok, makes sense. How does the board look?
> >>>>>> + while (i--)
> >>>>>> + led_classdev_unregister(&priv->leds[i].ldev);
> >>>>>
> >>>>> Can devm_* be used to simplify this?
> >>>>
> >>>> I think no, because it will cause race condition.
> >>>
> >>> Please take a look at devm_led_classdev_register() and friends. It
> >>> should be possible to simplify code without races.
> >>
> >> I don't understand how I can call destroy_workqueue() after calling unregister leds.
> >
> > Do you actually need the workqueues? It should be possible to avoid
> > them, using workqueue support in the core.
>
> The delay between data sends to SPI board should be at least 10 ms
> I think it will be bad idea to use shared workqueue from kernel,
> so I create separate single threaded work queue :)
If workqueue support in led core can not take 10 msec wait, we should
fix it, not add hacks around...
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:[~2017-08-12 19:13 UTC|newest]
Thread overview: 56+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-08-12 9:09 [PATCH] leds: add LED driver for CR0014114 board Oleh Kravchenko
2017-08-12 9:30 ` Pavel Machek
2017-08-12 10:28 ` Oleh Kravchenko
2017-08-12 10:56 ` Pavel Machek
2017-08-12 11:34 ` Oleh Kravchenko
2017-08-12 17:46 ` Pavel Machek
2017-08-12 18:50 ` Oleh Kravchenko
2017-08-12 19:13 ` Pavel Machek [this message]
2017-08-12 19:39 ` Oleh Kravchenko
2017-09-28 15:24 ` Pavel Machek
2018-03-12 15:33 ` Oleh Kravchenko
2018-03-12 15:45 ` Peter Meerwald-Stadler
2018-03-12 15:54 ` Oleh Kravchenko
2018-03-17 8:19 ` Jacek Anaszewski
2018-03-12 15:58 ` [PATCH v2] " Oleh Kravchenko
2018-03-13 12:45 ` [PATCH v3] " Oleh Kravchenko
2018-03-16 21:14 ` Pavel Machek
2018-03-16 21:29 ` Oleh Kravchenko
2018-03-16 21:33 ` Pavel Machek
2018-03-16 21:40 ` Oleh Kravchenko
2018-03-16 22:10 ` Pavel Machek
2018-03-26 12:15 ` [PATCH v4 1/2] dt-bindings: Add vendor prefix and docs for CR0014114 Oleh Kravchenko
2018-03-26 12:15 ` [PATCH v4 2/2] leds: add LED driver for CR0014114 board Oleh Kravchenko
2018-03-27 16:14 ` [PATCH v4 1/2] dt-bindings: Add vendor prefix and docs for CR0014114 Rob Herring
2018-03-27 16:49 ` [PATCH " Oleh Kravchenko
2018-03-27 16:49 ` [PATCH 2/2] leds: add LED driver for CR0014114 board Oleh Kravchenko
2018-03-27 20:58 ` Jacek Anaszewski
2018-03-28 6:53 ` [PATCH v6 1/2] dt-bindings: Add vendor prefix and docs for CR0014114 Oleh Kravchenko
2018-03-28 6:53 ` [PATCH v6 2/2] leds: add LED driver for CR0014114 board Oleh Kravchenko
2018-03-28 15:43 ` [PATCH v6 1/2] dt-bindings: Add vendor prefix and docs for CR0014114 Rob Herring
2018-03-28 18:56 ` [PATCH v7 " Oleh Kravchenko
2018-03-28 18:56 ` [PATCH v7 2/2] leds: add LED driver for CR0014114 board Oleh Kravchenko
2018-04-02 12:53 ` [PATCH v8 1/2] dt-bindings: Add vendor prefix and docs for CR0014114 Oleh Kravchenko
2018-04-02 12:53 ` [PATCH v8 2/2] leds: add LED driver for CR0014114 board Oleh Kravchenko
2018-04-03 10:48 ` Pavel Machek
2018-04-10 18:59 ` Jacek Anaszewski
2018-04-10 20:24 ` Oleh Kravchenko
2018-04-09 19:18 ` [PATCH v8 1/2] dt-bindings: Add vendor prefix and docs for CR0014114 Jacek Anaszewski
2018-04-09 21:10 ` Rob Herring
2018-03-27 20:58 ` [PATCH " Jacek Anaszewski
2018-03-28 6:36 ` Oleh Kravchenko
2018-03-28 19:21 ` Jacek Anaszewski
2018-03-28 19:48 ` Oleh Kravchenko
2018-03-28 20:23 ` Jacek Anaszewski
2018-03-29 18:56 ` Oleh Kravchenko
2018-03-30 10:10 ` Jacek Anaszewski
2018-03-18 12:49 ` [PATCH v3] leds: add LED driver for CR0014114 board Rob Herring
2018-03-18 20:03 ` Jacek Anaszewski
2018-03-18 23:38 ` Rob Herring
2018-03-19 21:18 ` Standardized LED function names [was: Re: [PATCH v3] leds: add LED driver for CR0014114 board] Jacek Anaszewski
2018-03-27 15:31 ` Rob Herring
2018-03-30 10:53 ` Jacek Anaszewski
2018-03-30 20:59 ` Rob Herring
2018-04-15 16:15 ` Pavel Machek
2018-04-15 18:30 ` Jacek Anaszewski
2018-04-15 16:15 ` Pavel Machek
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=20170812191300.GA23619@amd \
--to=pavel@ucw.cz \
--cc=linux-leds@vger.kernel.org \
--cc=oleg@kaa.org.ua \
/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.