Re: [PATCH v2 5/6] gpio: max77759: add Maxim MAX77759 gpio driver

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi André,

thanks for your patch!

mostly looks fine, given the MFD design is accepted.
Nitpicks below:

On Wed, Feb 26, 2025 at 6:51 PM André Draszik <andre.draszik@xxxxxxxxxx> wrote:

> +static irqreturn_t max77759_gpio_irqhandler(int irq, void *data)
> +{
> +       int handled = 0;

bool handled = false;

(...)
> +               for_each_set_bit(offset, &pending, MAX77759_N_GPIOS) {
> +                       unsigned int virq;

I usually just call this "irq", as it's not any more virtual than any other
Linux magic number, and it can confuse people working with
actual virtualization when we call things virtual like this.

> +
> +                       /*
> +                        * ACK interrupt by writing 1 to bit 'offset', all
> +                        * others need to be written as 0. This needs to be
> +                        * done unconditionally hence regmap_set_bits() is
> +                        * inappropriate here.
> +                        */
> +                       regmap_write(chip->map, MAX77759_MAXQ_REG_UIC_INT1,
> +                                    BIT(offset));
> +
> +                       virq = irq_find_mapping(gc->irq.domain, offset);
> +                       handle_nested_irq(virq);
> +
> +                       handled = 1;

handled = true;

> +       chip->gc.base = -1;
> +       chip->gc.label = dev_name(&pdev->dev);
> +       chip->gc.parent = &pdev->dev;
> +       chip->gc.owner = THIS_MODULE;

The core already assigns THIS_MODULE so you can leave it
unassigned.

Yours,
Linus Walleij





[Index of Archives]     [Device Tree Compilter]     [Device Tree Spec]     [Linux Driver Backports]     [Video for Linux]     [Linux USB Devel]     [Linux PCI Devel]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [XFree86]     [Yosemite Backpacking]


  Powered by Linux