Devicetree
 help / color / mirror / Atom feed
From: David Lechner <dlechner@baylibre.com>
To: Kyle Hsieh <kylehsieh1995@gmail.com>
Cc: "Jonathan Cameron" <jic23@kernel.org>,
	"Nuno Sá" <nuno.sa@analog.com>,
	"Andy Shevchenko" <andy@kernel.org>,
	"Rob Herring" <robh@kernel.org>,
	"Krzysztof Kozlowski" <krzk+dt@kernel.org>,
	"Conor Dooley" <conor+dt@kernel.org>,
	"Liam Girdwood" <lgirdwood@gmail.com>,
	"Mark Brown" <broonie@kernel.org>,
	linux-iio@vger.kernel.org, devicetree@vger.kernel.org,
	linux-kernel@vger.kernel.org
Subject: Re: [PATCH v4 2/2] iio: adc: ti-ads112c04: Add support for TI ADS112C04
Date: Wed, 12 Aug 2026 08:26:12 -0500	[thread overview]
Message-ID: <7156c902-2bcd-445d-a00c-a5085b63c95e@baylibre.com> (raw)
In-Reply-To: <CAF7HswPcqzqMUtkLkfd3zmVHN6DX-Kz+tysG8t5x=+JAH8V2aQ@mail.gmail.com>

On 8/11/26 10:38 PM, Kyle Hsieh wrote:
> On Tue, Aug 11, 2026 at 10:18 PM David Lechner <dlechner@baylibre.com> wrote:
>>
>> On 8/10/26 9:48 PM, Kyle Hsieh wrote:
>>> Add IIO driver support for the Texas Instruments ADS112C04 (16-bit)
>>> delta-sigma ADCs.
>>>

...

>>> +
>>> +     /* Power-On Reset (POR) delay */
>>> +     fsleep(50 * USEC_PER_MSEC);
>>> +
>>> +     /* Requesting OUT_HIGH asserts the active-low reset pin immediately */
>>> +     reset_gpio = devm_gpiod_get_optional(dev, "reset", GPIOD_OUT_HIGH);
>>> +     if (IS_ERR(reset_gpio))
>>> +             return PTR_ERR(reset_gpio);
>>> +
>>> +     if (reset_gpio) {
>>> +             fsleep(1000);
>>> +             gpiod_set_value_cansleep(reset_gpio, 0);
>>> +     } else {
>>> +             ret = ads112c04_write_cmd(client, ADS112C04_CMD_RESET);
>>> +             if (ret < 0)
>>> +                     return ret;
>>> +     }
>>> +
>>> +     fsleep(1000);
>>> +
>>> +     /* Bypass PGA for now to allow full-scale single-ended measurements */
>>> +     st->config0 = ADS112C04_CONFIG0_PGA_BYPASS;
>>> +     ret = ads112c04_write_reg(client, ADS112C04_REG_CONFIG0, st->config0);
>>> +     if (ret)
>>> +             return ret;
>>> +
>>> +     ret = ads112c04_write_reg(client, ADS112C04_REG_CONFIG1, st->config1);
>>> +     if (ret)
>>> +             return ret;
>>> +
>>> +     if (client->irq > 0) {
>>> +             ret = devm_request_irq(dev, client->irq,
>>> +                                    ads112c04_irq_handler,
>>> +                                    0,
>>
>> I think I've asked twice now to move this 0 on the previous line.
>> If you don't agree with that, it is fine, but we just ask that you
>> reply to the suggestion with an explanation to state your reasoning.
>> Otherwise, it comes across as carelessness that you continue to
>> ignore suggestions. This is not the only suggestoin that has been
>> silently ignored. You might want to go back to the previous revisions
>> and see if you missed anything else.
> Clarifications on my previous mail.
> 
> IRQ: I will use devm_request_threaded_irq() with a NULL primary handler and
> IRQF_ONESHOT. disable_irq_nosync() is gone and the handler only calls
> complete(). This also removes the bare `0` you asked about on v2 and v3,
> with the arguments packed rather than one per line:
> 
> ret = devm_request_threaded_irq(dev, client->irq, NULL,
> ads112c04_irq_handler,
> IRQF_ONESHOT, indio_dev->name,
> indio_dev);
> 
> I left out the DRDY status read for now, since conversions are
> single-shot under the mutex. Happy to add it if you prefer.
>>

Completing the completion is safe in a normal IRQ handler. So if
we aren't disabling the interrupt and we aren't reading the status
bit in the IRQ handler, then we don't need a threaded interrupt
yet.

>>> +                                    indio_dev->name, indio_dev);
>>> +             if (ret)
>>> +                     return ret;
>>> +     }
>>> +
>>> +     return devm_iio_device_register(dev, indio_dev);
>>> +}
>>> +


  reply	other threads:[~2026-08-12 13:26 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-08-11  2:48 [PATCH v4 0/2] iio: adc: Add support for Texas Instruments ADS112C04 Kyle Hsieh
2026-08-11  2:48 ` [PATCH v4 1/2] dt-bindings: iio: adc: ti,ads112c04: Add binding for ADS112C04 Kyle Hsieh
2026-08-11 14:23   ` David Lechner
2026-08-11 16:56   ` Conor Dooley
2026-08-12  2:53     ` Kyle Hsieh
2026-08-12  4:11       ` Jonathan Cameron
2026-08-12 16:03         ` Conor Dooley
2026-08-11  2:48 ` [PATCH v4 2/2] iio: adc: ti-ads112c04: Add support for TI ADS112C04 Kyle Hsieh
2026-08-11  9:39   ` Andy Shevchenko
2026-08-12  2:58     ` Kyle Hsieh
2026-08-12  7:30       ` Andy Shevchenko
2026-08-12  8:51         ` Kyle Hsieh
2026-08-11 14:18   ` David Lechner
2026-08-12  1:25     ` Kyle Hsieh
2026-08-12  3:38     ` Kyle Hsieh
2026-08-12 13:26       ` David Lechner [this message]
2026-08-12  4:29   ` 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=7156c902-2bcd-445d-a00c-a5085b63c95e@baylibre.com \
    --to=dlechner@baylibre.com \
    --cc=andy@kernel.org \
    --cc=broonie@kernel.org \
    --cc=conor+dt@kernel.org \
    --cc=devicetree@vger.kernel.org \
    --cc=jic23@kernel.org \
    --cc=krzk+dt@kernel.org \
    --cc=kylehsieh1995@gmail.com \
    --cc=lgirdwood@gmail.com \
    --cc=linux-iio@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=nuno.sa@analog.com \
    --cc=robh@kernel.org \
    /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