On Mon, Mar 23, 2026 at 1:32 PM Sai Krishna Potthuri
[off-list ref] wrote:
quoted
-----Original Message-----
From: Andy Shevchenko <redacted>
Sent: Monday, March 23, 2026 4:22 PM
On Mon, Mar 23, 2026 at 01:15:04PM +0530, Sai Krishna Potthuri wrote:
...
quoted
quoted
int xadc_write_samplerate(struct xadc *xadc, int val) {
- unsigned long clk_rate = xadc_get_dclk_rate(xadc);
+ unsigned long clk_rate;
unsigned int div;
+ if (!xadc->ops->get_dclk_rate)
+ return -EOPNOTSUPP;
quoted
+ clk_rate = xadc_get_dclk_rate(xadc);
+
Unneeded blank line.
Also, don't you asked for options?
This callback is defined for all other platforms except I2C.
Currently for I2c interface we are not supporting any configuration, it
is used only to read the channels.
If the callback defined you should use its value and not hardcoded one, right?
quoted
quoted
if (!clk_rate)
return -EINVAL;
--
With Best Regards,
Andy Shevchenko