mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: David Lechner <dlechner@baylibre.com>
To: "Miclaus, Antoniu" <Antoniu.Miclaus@analog.com>,
	"jic23@kernel.org" <jic23@kernel.org>,
	"robh@kernel.org" <robh@kernel.org>,
	"conor+dt@kernel.org" <conor+dt@kernel.org>,
	"linux-iio@vger.kernel.org" <linux-iio@vger.kernel.org>,
	"devicetree@vger.kernel.org" <devicetree@vger.kernel.org>,
	"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
	"linux-pwm@vger.kernel.org" <linux-pwm@vger.kernel.org>
Subject: Re: [PATCH v11 8/8] iio: adc: ad4851: add ad485x driver
Date: Thu, 6 Feb 2025 10:22:58 -0600	[thread overview]
Message-ID: <b06f6457-4be3-4404-8c41-618bad0c7099@baylibre.com> (raw)
In-Reply-To: <CY4PR03MB3399B389972E92742EA3060D9BF62@CY4PR03MB3399.namprd03.prod.outlook.com>

On 2/6/25 4:00 AM, Miclaus, Antoniu wrote:
>> On 1/27/25 4:57 AM, Antoniu Miclaus wrote:
>>> Add support for the AD485X a fully buffered, 8-channel simultaneous
>>> sampling, 16/20-bit, 1 MSPS data acquisition system (DAS) with
>>> differential, wide common-mode range inputs.
>>>
>>> Signed-off-by: Antoniu Miclaus <antoniu.miclaus@analog.com>
>>> ---
>>
>> I think we have the important bits sorted now (i.e. userspace-facing stuff).
>> Just noticed a few minor things in the latest revision.
>>
>>
>>> +static int ad4851_setup(struct ad4851_state *st)
>>> +{
>>> +	unsigned int product_id;
>>> +	int ret;
>>> +
>>> +	if (st->pd_gpio) {
>>> +		/* To initiate a global reset, bring the PD pin high twice */
>>> +		gpiod_set_value(st->pd_gpio, 1);
>>> +		fsleep(1);
>>> +		gpiod_set_value(st->pd_gpio, 0);
>>> +		fsleep(1);
>>> +		gpiod_set_value(st->pd_gpio, 1);
>>> +		fsleep(1);
>>> +		gpiod_set_value(st->pd_gpio, 0);
>>> +		fsleep(1000);
>>> +	} else {
>>> +		ret = regmap_set_bits(st->regmap,
>> AD4851_REG_INTERFACE_CONFIG_A,
>>> +				      AD4851_SW_RESET);
>>> +		if (ret)
>>> +			return ret;
>>
>> Do we also need fsleep() after software reset?
> The datasheet doesn't mention any delay required after performing Software Reset.
> Should I add something just as a safety measure?

I guess it is probably OK if the datasheet doesn't say it needs a delay.

      reply	other threads:[~2025-02-06 16:23 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-01-27 10:57 [PATCH v11 0/8] Add support for AD485x DAS Family Antoniu Miclaus
2025-01-27 10:57 ` [PATCH v11 1/8] iio: backend: add API for interface get Antoniu Miclaus
2025-01-27 10:57 ` [PATCH v11 2/8] iio: backend: add support for data size set Antoniu Miclaus
2025-01-27 10:57 ` [PATCH v11 3/8] iio: backend: add API for oversampling Antoniu Miclaus
2025-01-27 10:57 ` [PATCH v11 4/8] iio: adc: adi-axi-adc: add interface type Antoniu Miclaus
2025-01-27 10:57 ` [PATCH v11 5/8] iio: adc: adi-axi-adc: set data format Antoniu Miclaus
2025-01-28 16:16   ` David Lechner
2025-02-03 11:02     ` Miclaus, Antoniu
2025-02-03 15:25       ` Jonathan Cameron
2025-02-03 17:13         ` Angelo Dureghello
2025-02-10 16:16         ` Angelo Dureghello
2025-01-27 10:57 ` [PATCH v11 6/8] iio: adc: adi-axi-adc: add oversampling Antoniu Miclaus
2025-01-27 10:57 ` [PATCH v11 7/8] dt-bindings: iio: adc: add ad4851 Antoniu Miclaus
2025-01-27 10:57 ` [PATCH v11 8/8] iio: adc: ad4851: add ad485x driver Antoniu Miclaus
2025-02-01 16:19   ` Jonathan Cameron
2025-02-03 22:42   ` David Lechner
2025-02-06 10:00     ` Miclaus, Antoniu
2025-02-06 16:22       ` David Lechner [this message]

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=b06f6457-4be3-4404-8c41-618bad0c7099@baylibre.com \
    --to=dlechner@baylibre.com \
    --cc=Antoniu.Miclaus@analog.com \
    --cc=conor+dt@kernel.org \
    --cc=devicetree@vger.kernel.org \
    --cc=jic23@kernel.org \
    --cc=linux-iio@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-pwm@vger.kernel.org \
    --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

all inboxes | Powered by JetHome®