[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <3239d539-a2da-b913-b644-83766c6cabfd@fi.rohmeurope.com>
Date: Mon, 22 Nov 2021 12:44:25 +0000
From: "Vaittinen, Matti" <Matti.Vaittinen@...rohmeurope.com>
To: Andy Shevchenko <andriy.shevchenko@...ux.intel.com>
CC: Matti Vaittinen <mazziesaccount@...il.com>,
Liam Girdwood <lgirdwood@...il.com>,
Mark Brown <broonie@...nel.org>,
Jiri Kosina <trivial@...nel.org>,
Andrew Morton <akpm@...ux-foundation.org>,
Yury Norov <yury.norov@...il.com>,
Kumar Kartikeya Dwivedi <memxor@...il.com>,
Rasmus Villemoes <linux@...musvillemoes.dk>,
Geert Uytterhoeven <geert+renesas@...der.be>,
"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH 3/4] regulators: irq_helper: Provide helper for trivial
IRQ notifications
On 11/22/21 13:48, Andy Shevchenko wrote:
> On Mon, Nov 22, 2021 at 01:04:12PM +0200, Matti Vaittinen wrote:
>> Provide a generic map_event helper for regulators which have a notification
>> IRQ with single, well defined purpose. Eg, IRQ always indicates exactly one
>> event for exactly one regulator device. For such IRQs the mapping is
>> trivial.
>
> ...
>
>> + int err = rid->states[0].possible_errs;
>
> I would rather make it unsigned, but anyway...
>
>> + !single_bit_set(err, sizeof(err) * 8)))
>
> hweight32() seems suitable here.
Thanks Andy,
I\ll see how it works out and respin. I agree this use/case probably
does not warrant adding the single_bit_set().
Best Regards
-- Matti Vaittinen
--
The Linux Kernel guy at ROHM Semiconductors
Matti Vaittinen, Linux device drivers
ROHM Semiconductors, Finland SWDC
Kiviharjunlenkki 1E
90220 OULU
FINLAND
~~ this year is the year of a signature writers block ~~
Powered by blists - more mailing lists