[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CAHp75Vc9BGu5FnUTcRkNuNSjtS5+tqXwOm-BND72v2_C2Fm8FQ@mail.gmail.com>
Date: Thu, 28 Nov 2024 08:47:04 +0200
From: Andy Shevchenko <andy.shevchenko@...il.com>
To: David Lechner <dlechner@...libre.com>
Cc: Jonathan Cameron <jic23@...nel.org>, Dumitru Ceclan <mitrutzceclan@...il.com>,
Michael Hennerich <Michael.Hennerich@...log.com>, Nuno Sa <nuno.sa@...log.com>,
Michael Walle <michael@...le.cc>, Andy Shevchenko <andy@...nel.org>, linux-iio@...r.kernel.org,
linux-kernel@...r.kernel.org,
Uwe Kleine-König <u.kleine-koenig@...libre.com>,
Guillaume Ranquet <granquet@...libre.com>
Subject: Re: [PATCH v2 2/3] iio: adc: ad7173: remove special handling for irq number
On Wed, Nov 27, 2024 at 10:02 PM David Lechner <dlechner@...libre.com> wrote:
>
> Remove the int irq_line field in struct ad_sigma_delta_info and all code
> that referenced it.
>
> This struct is intended to be used as static const data. Currently, the
> only user that doesn't uses the static const struct directly, namely the
> ad7173 driver is making a copy of this struct to be able to modify the
> irq_line field. However, this field is written and never used due to the
> fact that ad_sd_init() which reads the field is called before
> ad7173_fw_parse_device_config() which writes it.
>
> The runtime behavior does not change since ad_sd_init() was already
> (unintentionally) being called with irq_line = 0. But, even though
> this could be considered a bug, the behavior was still correct. The SPI
> subsystem always uses the first interrupt in the interrupts array from
> the devicetree and the devicetree bindings for this family of chips
> specify that the RDY interrupt is always the first interrupt. Therefore,
> we don't actually need the special call to fwnode_irq_get_byname(), so
> it is removed in this patch instead of moving it to the correct place.
...
> struct ad7173_state {
> struct ad_sigma_delta sd;
> - struct ad_sigma_delta_info sigma_delta_info;
> + struct ad_sigma_delta_chip_info sigma_delta_info;
> const struct ad7173_device_info *info;
> struct ad7173_channel *channels;
> struct regulator_bulk_data regulators[3];
Has this patch been compile-tested? Because I don't understand this
change and how it's going to be compiled.
--
With Best Regards,
Andy Shevchenko
Powered by blists - more mailing lists