From: Jonathan Cameron <jic23@kernel.org>
To: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Cc: linux-kernel@vger.kernel.org, linux-iio@vger.kernel.org,
Lars-Peter Clausen <lars@metafoo.de>,
Ferry Toth <ftoth@exalondelft.nl>
Subject: Re: [PATCH v1 03/11] iio: light: tsl2563: Configure INT in one place
Date: Sun, 11 Dec 2022 13:17:27 +0000 [thread overview]
Message-ID: <20221211131727.24ac49d2@jic23-huawei> (raw)
In-Reply-To: <20221207190348.9347-3-andriy.shevchenko@linux.intel.com>
On Wed, 7 Dec 2022 21:03:40 +0200
Andy Shevchenko <andriy.shevchenko@linux.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@linux.intel.com>
> Tested-by: Ferry Toth <ftoth@exalondelft.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)
>
next prev parent reply other threads:[~2022-12-11 13:04 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-12-07 19:03 [PATCH v1 01/11] iio: light: tsl2563: Do not hardcode interrupt trigger type Andy Shevchenko
2022-12-07 19:03 ` [PATCH v1 02/11] iio: light: tsl2563: Use i2c_smbus_write_word_data() in tsl2563_configure() Andy Shevchenko
2022-12-07 19:03 ` [PATCH v1 03/11] iio: light: tsl2563: Configure INT in one place Andy Shevchenko
2022-12-11 13:17 ` Jonathan Cameron [this message]
2022-12-07 19:03 ` [PATCH v1 04/11] iio: light: tsl2563: Make use of the macros from bits.h Andy Shevchenko
2022-12-11 13:19 ` Jonathan Cameron
2022-12-07 19:03 ` [PATCH v1 05/11] iio: light: tsl2563: Drop unused defintion(s) Andy Shevchenko
2022-12-07 19:03 ` [PATCH v1 06/11] iio: light: tsl2563: Simplify with dev_err_probe Andy Shevchenko
2022-12-07 19:03 ` [PATCH v1 07/11] iio: light: tsl2563: Drop legacy platform data code Andy Shevchenko
2022-12-07 19:03 ` [PATCH v1 08/11] iio: light: tsl2563: Utilise temporary variable for struct device Andy Shevchenko
2022-12-07 19:03 ` [PATCH v1 09/11] iio: light: tsl2563: Use dev_get_drvdata() directly in PM callbacks Andy Shevchenko
2022-12-07 19:03 ` [PATCH v1 10/11] iio: light: tsl2563: sort header inclusion alphabetically Andy Shevchenko
2022-12-07 19:03 ` [PATCH v1 11/11] iio: light: tsl2563: Keep Makefile sorted by module name Andy Shevchenko
2022-12-11 13:26 ` [PATCH v1 01/11] iio: light: tsl2563: Do not hardcode interrupt trigger type Jonathan Cameron
2022-12-11 17:14 ` Ferry Toth
2022-12-12 10:59 ` Jonathan Cameron
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20221211131727.24ac49d2@jic23-huawei \
--to=jic23@kernel.org \
--cc=andriy.shevchenko@linux.intel.com \
--cc=ftoth@exalondelft.nl \
--cc=lars@metafoo.de \
--cc=linux-iio@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox