[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <Y+rKOEV/3PnrB/Dl@surfacebook>
Date: Tue, 14 Feb 2023 01:39:36 +0200
From: andy.shevchenko@...il.com
To: Asmaa Mnebhi <asmaa@...dia.com>
Cc: Andy Shevchenko <andriy.shevchenko@...el.com>,
"linus.walleij@...aro.org" <linus.walleij@...aro.org>,
"linux-gpio@...r.kernel.org" <linux-gpio@...r.kernel.org>,
"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
"linux-acpi@...r.kernel.org" <linux-acpi@...r.kernel.org>
Subject: Re: [PATCH v3 1/2] Support NVIDIA BlueField-3 GPIO controller
Mon, Feb 13, 2023 at 11:14:06PM +0000, Asmaa Mnebhi kirjoitti:
> Thanks Andy for the feedback! Will address your comment in v4.
>
> > + generic_handle_irq(irq_find_mapping(gc->irq.domain, level));
>
> There is a helper that unites these two calls together.
>
> I didn't find any helper in v6.2. Could you please point me to it?
It's available even longer than just in v6.2:
generic_handle_domain_irq().
...
> > +static int mlxbf3_gpio_init_valid_mask(struct gpio_chip *gc,
> > + unsigned long *valid_mask,
> > + unsigned int ngpios)
> > +{
> > + struct mlxbf3_gpio_context *gs = gpiochip_get_data(gc);
> > +
> > + *valid_mask = gs->valid_mask;
> > +
> > + return 0;
> > +}
>
> Why do you need this?
>
> Since we only use ACPI tables and we want user space (libgpiod tool) or possibly (in the future)
> other kernel drivers to have access to certain GPIO pins, we use this valid_mask to do so.
> Linus previously explained that if we ask for a GPIO then it will be muxed in using .gpio_request_enable().
> And so we would use .valid_mask to restrict the use of certain gpios.
So, why you can't use gpio-reserved-ranges property?
--
With Best Regards,
Andy Shevchenko
Powered by blists - more mailing lists