lkml.org 
[lkml]   [2022]   [Jun]   [23]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
Date
SubjectRe: [PATCH 04/10] iio: adc: mcp3911: add support for interrupts
On Thu, Jun 23, 2022 at 7:40 PM Marcus Folkesson
<marcus.folkesson@gmail.com> wrote:
>
> Make it possible to read values upon interrupts.
> Configure Data Ready Signal Output Pin to either HiZ or push-pull and
> use it as interrupt source.

...

> }
>
> +

Unwanted blank line.

> +static int mcp3911_set_trigger_state(struct iio_trigger *trig, bool enable)
> +{

> + bool dr_hiz;

As far as I can see you don't need this variable, just call if
(device_property_...(...)).

> + dr_hiz = device_property_read_bool(&adc->spi->dev, "microchip,data-ready-hiz");
> + if (dr_hiz)
> + ret = mcp3911_update(adc, MCP3911_REG_STATUSCOM, MCP3911_STATUSCOM_DRHIZ,
> + 0, 2);
> + else
> + ret = mcp3911_update(adc, MCP3911_REG_STATUSCOM, MCP3911_STATUSCOM_DRHIZ,
> + MCP3911_STATUSCOM_DRHIZ, 2);

> +

Unneeded blank line.

> + if (ret < 0)
> + goto clk_disable;


--
With Best Regards,
Andy Shevchenko

\
 
 \ /
  Last update: 2022-06-23 21:33    [W:0.236 / U:1.620 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site