[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CAHp75VcQ5xZV2eoC93zu3qA2TcE3LyMgZLMX=r0ibzQ1Fg6U0Q@mail.gmail.com>
Date: Tue, 21 Jun 2022 11:25:16 +0200
From: Andy Shevchenko <andy.shevchenko@...il.com>
To: Aidan MacDonald <aidanmacdonald.0x0@...il.com>
Cc: Mark Brown <broonie@...nel.org>, Andy Gross <agross@...nel.org>,
Bjorn Andersson <bjorn.andersson@...aro.org>,
Srinivas Kandagatla <srinivas.kandagatla@...aro.org>,
Banajit Goswami <bgoswami@...eaurora.org>,
Greg Kroah-Hartman <gregkh@...uxfoundation.org>,
"Rafael J. Wysocki" <rafael@...nel.org>,
Chanwoo Choi <cw00.choi@...sung.com>,
Krzysztof Kozlowski <krzysztof.kozlowski@...aro.org>,
Bartlomiej Zolnierkiewicz <b.zolnierkie@...sung.com>,
MyungJoo Ham <myungjoo.ham@...sung.com>,
Michael Walle <michael@...le.cc>,
Linus Walleij <linus.walleij@...aro.org>,
Bartosz Golaszewski <brgl@...ev.pl>,
Thomas Gleixner <tglx@...utronix.de>,
Marc Zyngier <maz@...nel.org>,
Lee Jones <lee.jones@...aro.org>,
Manivannan Sadhasivam <mani@...nel.org>,
Cristian Ciocaltea <cristian.ciocaltea@...il.com>,
Chen-Yu Tsai <wens@...e.org>, tharvey@...eworks.com,
rjones@...eworks.com, Matti Vaittinen <mazziesaccount@...il.com>,
orsonzhai@...il.com, baolin.wang7@...il.com, zhang.lyra@...il.com,
Jernej Skrabec <jernej.skrabec@...il.com>,
Samuel Holland <samuel@...lland.org>,
Liam Girdwood <lgirdwood@...il.com>,
Jaroslav Kysela <perex@...ex.cz>,
Takashi Iwai <tiwai@...e.com>,
Linux Kernel Mailing List <linux-kernel@...r.kernel.org>,
"open list:GPIO SUBSYSTEM" <linux-gpio@...r.kernel.org>,
linux-actions@...ts.infradead.org,
linux-arm-msm <linux-arm-msm@...r.kernel.org>,
linux-arm Mailing List <linux-arm-kernel@...ts.infradead.org>,
linux-sunxi@...ts.linux.dev,
ALSA Development Mailing List <alsa-devel@...a-project.org>
Subject: Re: [PATCH 00/49] regmap-irq cleanups and refactoring
On Mon, Jun 20, 2022 at 10:07 PM Aidan MacDonald
<aidanmacdonald.0x0@...il.com> wrote:
>
> Hi Mark,
>
> Here's a bunch of cleanups for regmap-irq focused on simplifying the API
> and generalizing it a bit. It's broken up into three refactors, focusing
> on one area at a time.
>
> * Patches 01 and 02 are straightforward bugfixes, independent of the
> rest of the series. Neither of the bugs are triggered by in-tree
> drivers but they might be worth picking up early anyhow.
>
> * Patches 03-13 clean up everything related to configuring IRQ types.
>
> * Patches 14-45 deal with mask/unmask registers. First, make unmask
> registers behave more intuitively and usefully, and get rid of the
> mask_invert flag in favor of describing inverted mask registers as
> unmask registers. Second, make the mask_writeonly flag more useful
> and enable it for two chips where it makes sense.
>
> * Patches 46-49 refactor sub_irq_reg() as a get_irq_reg() callback,
> and use that to eliminate the not_fixed_stride flag.
>
> The approach I used when refactoring is pretty simple: (1) introduce new
> functionality in regmap-irq, (2) convert the drivers, and (3) remove any
> old code. Nothing should break in the middle.
>
> The patches can be re-ordered to some extent if that's preferable, but
> it's best to add get_irq_reg() last to avoid having to think about how
> it interacts with features that'll be removed anyway.
>
> I can't test most of the devices affected by this series so a lot of the
> code is only build tested. I've tested on real hardware with my AXP192
> patchset[1], although it only provides limited code coverage.
>
> qcom-pm8008 in particular deserves careful testing - it used all of the
> features touched by the refactors and required the most changes. Other
> drivers only required trivial changes but there are three of them worth
> mentioning: wcd943x, wcd9335, and wcd938x. They have suspicious looking
> IRQ type definitions and I'm pretty sure aren't working properly, but
> I can't fix them myself. The refactor shouldn't affect their behavior
> so how / when / if they get fixed shouldn't be much of an issue.
>
> Oh, and I added the 'mask_writeonly' flag and volatile ranges to the
> stpmic1 driver based on its datasheet[2] as a small optimization. It's
> probably fine but testing would be a good idea.
>
> [1]: https://lore.kernel.org/linux-iio/20220618214009.2178567-1-aidanmacdonald.0x0@gmailcom/
> [2]: https://www.st.com/resource/en/datasheet/stpmic1.pdf
Cool series, thanks for cleaning this up!
--
With Best Regards,
Andy Shevchenko
Powered by blists - more mailing lists