Linux IIO development
 help / color / mirror / Atom feed
From: David Lechner <dlechner@baylibre.com>
To: Andy Shevchenko <andy.shevchenko@gmail.com>
Cc: "Jonathan Cameron" <jic23@kernel.org>,
	"Dumitru Ceclan" <mitrutzceclan@gmail.com>,
	"Michael Hennerich" <Michael.Hennerich@analog.com>,
	"Nuno Sa" <nuno.sa@analog.com>,
	"Michael Walle" <michael@walle.cc>,
	"Andy Shevchenko" <andy@kernel.org>,
	linux-iio@vger.kernel.org, linux-kernel@vger.kernel.org,
	"Uwe Kleine-König" <u.kleine-koenig@baylibre.com>,
	"Guillaume Ranquet" <granquet@baylibre.com>
Subject: Re: [PATCH v2 2/3] iio: adc: ad7173: remove special handling for irq number
Date: Fri, 29 Nov 2024 08:53:37 -0600	[thread overview]
Message-ID: <4d26fff0-d5db-40b7-bd5f-14cebc96abc3@baylibre.com> (raw)
In-Reply-To: <CAHp75Vc9BGu5FnUTcRkNuNSjtS5+tqXwOm-BND72v2_C2Fm8FQ@mail.gmail.com>

On 11/28/24 12:47 AM, Andy Shevchenko wrote:
> On Wed, Nov 27, 2024 at 10:02 PM David Lechner <dlechner@baylibre.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.
> 

I did compile test each commit, but it looks like I might have
squashed a fix into the wrong patch. :-(

  reply	other threads:[~2024-11-29 14:53 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-11-27 20:01 [PATCH v2 0/3] iio: adc: ad7173: fix non-const info struct David Lechner
2024-11-27 20:01 ` [PATCH v2 1/3] iio: adc: ad7173: fix using shared static " David Lechner
2024-11-27 20:01 ` [PATCH v2 2/3] iio: adc: ad7173: remove special handling for irq number David Lechner
2024-11-28  6:47   ` Andy Shevchenko
2024-11-29 14:53     ` David Lechner [this message]
2024-11-27 20:01 ` [PATCH v2 3/3] iio: adc: ad7173: don't make copy of ad_sigma_delta_info struct David Lechner
2024-11-28  6:40   ` Andy Shevchenko
2024-11-28 10:42 ` [PATCH v2 0/3] iio: adc: ad7173: fix non-const info struct Guillaume Ranquet
2024-11-30 18:43 ` Jonathan Cameron
2024-11-30 18:50   ` David Lechner
2024-12-01 13:33     ` Jonathan Cameron

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=4d26fff0-d5db-40b7-bd5f-14cebc96abc3@baylibre.com \
    --to=dlechner@baylibre.com \
    --cc=Michael.Hennerich@analog.com \
    --cc=andy.shevchenko@gmail.com \
    --cc=andy@kernel.org \
    --cc=granquet@baylibre.com \
    --cc=jic23@kernel.org \
    --cc=linux-iio@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=michael@walle.cc \
    --cc=mitrutzceclan@gmail.com \
    --cc=nuno.sa@analog.com \
    --cc=u.kleine-koenig@baylibre.com \
    /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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox