[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <aCsanRq9xYvSIYVR@smile.fi.intel.com>
Date: Mon, 19 May 2025 14:48:45 +0300
From: Andy Shevchenko <andy@...nel.org>
To: Lothar Rubusch <l.rubusch@...il.com>
Cc: jic23@...nel.org, dlechner@...libre.com, nuno.sa@...log.com,
corbet@....net, lucas.p.stankus@...il.com, lars@...afoo.de,
Michael.Hennerich@...log.com, linux-iio@...r.kernel.org,
linux-doc@...r.kernel.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH v1 06/12] iio: accel: adxl313: prepare interrupt handling
On Sun, May 18, 2025 at 11:13:15AM +0000, Lothar Rubusch wrote:
> Evaluate the devicetree property for an optional interrupt line, and
> configure the interrupt mapping accordingly. When no interrupt line
> is defined in the devicetree, keep the FIFO in bypass mode as before.
...
> +#define ADXL313_INT_NONE 0
Hmm... I would rather make it U8_MAX, but it's up to you.
> +#define ADXL313_INT1 1
> +#define ADXL313_INT2 2
...
> + /* FIFO_STREAM mode */
> + regval = int_line == ADXL313_INT2 ? 0xff : 0;
One space too many.
> + ret = regmap_write(data->regmap, ADXL313_REG_INT_MAP, regval);
Don't you want to use regmap_assign_bits() or something like this to have
the above ternary be included?
> + if (ret)
> + return ret;
--
With Best Regards,
Andy Shevchenko
Powered by blists - more mailing lists