[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20221211131727.24ac49d2@jic23-huawei>
Date: Sun, 11 Dec 2022 13:17:27 +0000
From: Jonathan Cameron <jic23@...nel.org>
To: Andy Shevchenko <andriy.shevchenko@...ux.intel.com>
Cc: linux-kernel@...r.kernel.org, linux-iio@...r.kernel.org,
Lars-Peter Clausen <lars@...afoo.de>,
Ferry Toth <ftoth@...londelft.nl>
Subject: Re: [PATCH v1 03/11] iio: light: tsl2563: Configure INT in one
place
On Wed, 7 Dec 2022 21:03:40 +0200
Andy Shevchenko <andriy.shevchenko@...ux.intel.com> wrote:
> Introduce tsl2563_configure_irq() to configure INT in one place.
>
> While at it, make use of TSL2563_INT_LEVEL and newly introduced
> TSL2563_INT_MASK.
>
> Signed-off-by: Andy Shevchenko <andriy.shevchenko@...ux.intel.com>
> Tested-by: Ferry Toth <ftoth@...londelft.nl>
Trivial note on a further improvement inline.
LGTM
> ---
> drivers/iio/light/tsl2563.c | 42 ++++++++++++++++++++++---------------
> 1 file changed, 25 insertions(+), 17 deletions(-)
>
> diff --git a/drivers/iio/light/tsl2563.c b/drivers/iio/light/tsl2563.c
> index d836c15ba777..d071805239ef 100644
> --- a/drivers/iio/light/tsl2563.c
> +++ b/drivers/iio/light/tsl2563.c
> @@ -69,6 +69,7 @@
>
> #define TSL2563_INT_DISABLED 0x00
> #define TSL2563_INT_LEVEL 0x10
> +#define TSL2563_INT_MASK 0x30
Better to use GENMASK etc, but given age of driver I'm not surprised no one
has made the conversion to that and FIELD_GET/ FIELD_PREP.
Nice follow up if anyone is bored enough ;)
> #define TSL2563_INT_PERSIST(n) ((n) & 0x0F)
>
Powered by blists - more mailing lists