mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Vignesh Raghavendra <vigneshr@ti.com>
To: Grygorii Strashko <grygorii.strashko@ti.com>,
	Linus Walleij <linus.walleij@linaro.org>,
	Bartosz Golaszewski <bgolaszewski@baylibre.com>
Cc: <linux-gpio@vger.kernel.org>, <linux-omap@vger.kernel.org>,
	<linux-kernel@vger.kernel.org>
Subject: Re: [PATCH] gpio: pca953x: Read irq trigger type from DT
Date: Mon, 9 Dec 2019 10:45:34 +0530	[thread overview]
Message-ID: <bfaa7ed4-6acf-3941-0de6-f139eed7cf99@ti.com> (raw)
In-Reply-To: <5837a37d-479d-5c33-45b5-c1b32b0cdc52@ti.com>

Hi Grygorii,

On 05/12/19 8:31 pm, Grygorii Strashko wrote:
> 
> 
> On 05/12/2019 16:45, Vignesh Raghavendra wrote:
[...]

>> @@ -768,10 +769,14 @@ static int pca953x_irq_setup(struct pca953x_chip
>> *chip, int irq_base)
>>       bitmap_and(chip->irq_stat, irq_stat, reg_direction,
>> chip->gpio_chip.ngpio);
>>       mutex_init(&chip->irq_lock);
>>   +    irqflags = irq_get_trigger_type(client->irq);
>> +    if (irqflags == IRQF_TRIGGER_NONE)
>> +        irqflags = IRQF_TRIGGER_LOW;
> 
> I think you can just drop IRQF_TRIGGER_LOW:
> - for paltform code it will be set from resources in
> platform_get_irq_optional()
> - for DT code it will be set in __setup_irq()
> 

Ok, will drop setting IRQF_TRIGGER_LOW in v2.

Thanks for the review!

>> +    irqflags |= IRQF_ONESHOT | IRQF_SHARED;
>> +
>>       ret = devm_request_threaded_irq(&client->dev, client->irq,
>>                       NULL, pca953x_irq_handler,
>> -                    IRQF_TRIGGER_LOW | IRQF_ONESHOT |
>> -                    IRQF_SHARED,
>> +                    irqflags,
>>                       dev_name(&client->dev), chip);
>>       if (ret) {
>>           dev_err(&client->dev, "failed to request irq %d\n",
>>
> 

-- 
Regards
Vignesh

      reply	other threads:[~2019-12-09  5:15 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-12-05 14:45 Vignesh Raghavendra
2019-12-05 15:01 ` Grygorii Strashko
2019-12-09  5:15   ` Vignesh Raghavendra [this message]

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=bfaa7ed4-6acf-3941-0de6-f139eed7cf99@ti.com \
    --to=vigneshr@ti.com \
    --cc=bgolaszewski@baylibre.com \
    --cc=grygorii.strashko@ti.com \
    --cc=linus.walleij@linaro.org \
    --cc=linux-gpio@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-omap@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

all inboxes | Powered by JetHome®