public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
To: William Breathitt Gray <william.gray@linaro.org>
Cc: linus.walleij@linaro.org, brgl@bgdev.pl, broonie@kernel.org,
	linux-gpio@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH 2/6] gpio: 104-dio-48e: Utilize no_status regmap-irq flag
Date: Fri, 17 Feb 2023 20:58:07 +0200	[thread overview]
Message-ID: <Y+/OP5pj7OBZ9M8g@smile.fi.intel.com> (raw)
In-Reply-To: <0feb25265128808d4487c49238fdd9f3ca3bb725.1675876659.git.william.gray@linaro.org>

On Wed, Feb 08, 2023 at 12:18:17PM -0500, William Breathitt Gray wrote:
> The 104-DIO-48E lacks an IRQ status register. Rather than use the Clear
> Interrupt register as the status register, set the no_status flag to
> true and thus avoid such a hack.

FWIW,
Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>

> Signed-off-by: William Breathitt Gray <william.gray@linaro.org>
> ---
>  drivers/gpio/gpio-104-dio-48e.c | 6 +-----
>  1 file changed, 1 insertion(+), 5 deletions(-)
> 
> diff --git a/drivers/gpio/gpio-104-dio-48e.c b/drivers/gpio/gpio-104-dio-48e.c
> index a3846faf3780..fe3c93bfe4bd 100644
> --- a/drivers/gpio/gpio-104-dio-48e.c
> +++ b/drivers/gpio/gpio-104-dio-48e.c
> @@ -195,13 +195,9 @@ static int dio48e_probe(struct device *dev, unsigned int id)
>  		return -ENOMEM;
>  
>  	chip->name = name;
> -	/* No IRQ status register so use CLEAR_INTERRUPT register instead */
> -	chip->status_base = DIO48E_CLEAR_INTERRUPT;
>  	chip->mask_base = DIO48E_ENABLE_INTERRUPT;
>  	chip->ack_base = DIO48E_CLEAR_INTERRUPT;
> -	/* CLEAR_INTERRUPT doubles as status register so we need it cleared */
> -	chip->clear_ack = true;
> -	chip->status_invert = true;
> +	chip->no_status = true;
>  	chip->num_regs = 1;
>  	chip->irqs = dio48e_regmap_irqs;
>  	chip->num_irqs = ARRAY_SIZE(dio48e_regmap_irqs);
> -- 
> 2.39.1
> 

-- 
With Best Regards,
Andy Shevchenko



  reply	other threads:[~2023-02-17 18:58 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-02-08 17:18 [PATCH 0/6] Migrate IDIO-16 GPIO drivers to regmap API William Breathitt Gray
2023-02-08 17:18 ` [PATCH 1/6] regmap-irq: Add no_status support William Breathitt Gray
2023-02-17 18:57   ` Andy Shevchenko
2023-02-08 17:18 ` [PATCH 2/6] gpio: 104-dio-48e: Utilize no_status regmap-irq flag William Breathitt Gray
2023-02-17 18:58   ` Andy Shevchenko [this message]
2023-02-08 17:18 ` [PATCH 3/6] gpio: idio-16: Migrate to the regmap API William Breathitt Gray
2023-02-17 19:00   ` Andy Shevchenko
2023-02-08 17:18 ` [PATCH 4/6] gpio: 104-idio-16: " William Breathitt Gray
2023-02-17 19:01   ` Andy Shevchenko
2023-02-17 21:08     ` William Breathitt Gray
2023-02-08 17:18 ` [PATCH 5/6] gpio: pci-idio-16: " William Breathitt Gray
2023-02-17 19:04   ` Andy Shevchenko
2023-02-17 19:07     ` Andy Shevchenko
2023-02-08 17:18 ` [PATCH 6/6] gpio: idio-16: Remove unused legacy interface William Breathitt Gray
2023-02-17 19:06   ` Andy Shevchenko

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=Y+/OP5pj7OBZ9M8g@smile.fi.intel.com \
    --to=andriy.shevchenko@linux.intel.com \
    --cc=brgl@bgdev.pl \
    --cc=broonie@kernel.org \
    --cc=linus.walleij@linaro.org \
    --cc=linux-gpio@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=william.gray@linaro.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