devicetree.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH v5 2/2] iio: adc: ti-ads1298: Add driver
@ 2024-02-16 15:53 Andy Shevchenko
       [not found] ` <fb7d41fc-328a-4ce1-88ad-5ce22ee158e4@topic.nl>
  0 siblings, 1 reply; 6+ messages in thread
From: Andy Shevchenko @ 2024-02-16 15:53 UTC (permalink / raw)
  To: Mike Looijmans, devicetree, linux-iio
  Cc: Mike Looijmans, Arnd Bergmann, Jonathan Cameron,
	Lars-Peter Clausen, Liam Beguin, Liam Girdwood, Maksim Kiselev,
	Marcus Folkesson, Marius Cristea, Mark Brown, Niklas Schnelle,
	Okan Sahin, linux-kernel

...

+	if (reset_gpio) {
+		/*
+		 * Deassert reset now that clock and power are active.
+		 * Minimum reset pulsewidth is 2 clock cycles.
+		 */
+		udelay(ADS1298_CLOCKS_TO_USECS(2));

This is sleeping context and you are calling unsleeping function. I haven't
checked the macro implementation and I have no idea what is the maximum it may
give, but making code robust just use fsleep() call.

+		gpiod_set_value_cansleep(reset_gpio, 0);
+	} else {
+		ret = ads1298_write_cmd(priv, ADS1298_CMD_RESET);
+		if (ret)
+			return dev_err_probe(dev, ret, "RESET failed\n");
+	}
+	/* Wait 18 clock cycles for reset command to complete */
+	udelay(ADS1298_CLOCKS_TO_USECS(18));

Ditto.

...

If it's the only issue I think Jonathan can modify when applying
(no new patch version would be needed).

-- 
With Best Regards,
Andy Shevchenko



^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2024-02-19  6:56 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
     [not found] <1b153bce-a66a-45ee-a5c6-963ea6fb1c82.949ef384-8293-46b8-903f-40a477c056ae.70c52742-e0f9-4db1-8f1b-864f11c71a24@emailsignatures365.codetwo.com>
2024-02-16 15:30 ` [PATCH v5 1/2] dt-bindings: iio: adc: ti-ads1298: Add bindings Mike Looijmans
     [not found]   ` <1b153bce-a66a-45ee-a5c6-963ea6fb1c82.949ef384-8293-46b8-903f-40a477c056ae.52058f93-4994-4138-8075-7b04acaef74b@emailsignatures365.codetwo.com>
2024-02-16 15:30     ` [PATCH v5 2/2] iio: adc: ti-ads1298: Add driver Mike Looijmans
2024-02-16 17:01       ` Jonathan Cameron
2024-02-16 15:53 Andy Shevchenko
     [not found] ` <fb7d41fc-328a-4ce1-88ad-5ce22ee158e4@topic.nl>
2024-02-16 17:19   ` Jonathan Cameron
2024-02-19  6:56     ` Mike Looijmans

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).