[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <YqDLflKTsYaupArl@sirena.org.uk>
Date: Wed, 8 Jun 2022 17:17:02 +0100
From: Mark Brown <broonie@...nel.org>
To: Aidan MacDonald <aidanmacdonald.0x0@...il.com>
Cc: linus.walleij@...aro.org, brgl@...ev.pl, robh+dt@...nel.org,
krzysztof.kozlowski+dt@...aro.org, wens@...e.org, jic23@...nel.org,
lee.jones@...aro.org, sre@...nel.org, gregkh@...uxfoundation.org,
lgirdwood@...il.com, lars@...afoo.de, rafael@...nel.org,
quic_gurus@...cinc.com, linux-gpio@...r.kernel.org,
devicetree@...r.kernel.org, linux-kernel@...r.kernel.org,
linux-iio@...r.kernel.org, linux-pm@...r.kernel.org
Subject: Re: [PATCH v2 02/17] regmap-irq: Add get_irq_reg to support unusual
register layouts
On Tue, Jun 07, 2022 at 04:53:09PM +0100, Aidan MacDonald wrote:
> - if (!chip->sub_reg_offsets || !chip->not_fixed_stride) {
> + if (chip->get_irq_reg) {
> + reg = chip->get_irq_reg(base_reg, i);
> + } else if (!chip->sub_reg_offsets || !chip->not_fixed_stride) {
It seems like it would be cleaner and clearer to refactor things so that
we always have a get_irq_reg() with standard chips getting given a
default implementation which implements the current behaviour.
Download attachment "signature.asc" of type "application/pgp-signature" (489 bytes)
Powered by blists - more mailing lists