lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <bfaa7ed4-6acf-3941-0de6-f139eed7cf99@ti.com>
Date:   Mon, 9 Dec 2019 10:45:34 +0530
From:   Vignesh Raghavendra <vigneshr@...com>
To:     Grygorii Strashko <grygorii.strashko@...com>,
        Linus Walleij <linus.walleij@...aro.org>,
        Bartosz Golaszewski <bgolaszewski@...libre.com>
CC:     <linux-gpio@...r.kernel.org>, <linux-omap@...r.kernel.org>,
        <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH] gpio: pca953x: Read irq trigger type from DT

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

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ