Re: [PATCH 2/5] gpiolib: Initialize the hardware with a callback

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

 



On Thu, Oct 10, 2019 at 10:23:04AM +0300, Andy Shevchenko wrote:
> On Wed, Oct 09, 2019 at 09:44:31PM +0200, Hans de Goede wrote:
> > On 09-10-2019 18:50, Andy Shevchenko wrote:
> > > After changing the drivers to use GPIO core to add an IRQ chip
> > > it appears that some of them requires a hardware initialization
> > > before adding the IRQ chip.
> > > 
> > > Add an optional callback ->init_hw() to allow that drivers
> > > to initialize hardware if needed.
> > > 
> > > This change is a part of the fix NULL pointer dereference
> > > brought to the several drivers recently.
> > > 
> > > Cc: Hans de Goede <hdegoede@xxxxxxxxxx>
> > > Signed-off-by: Andy Shevchenko <andriy.shevchenko@xxxxxxxxxxxxxxx>
> > 
> > Hmm, IIRC Linus Walleij already added a callback for initializing the
> > mask before the irchip gets initialized which is basically intended for
> > what you want this callback for I think ?
> 
> This is not about the mask, it's about hardware to be prepared before enabling.
> Also init_valid_mask() will allocate memory which won't be needed.

If you think this is not a proper approach, we have to revert all three patches
now (*) and think about better solution.

*) They broke the boot on all affected machines.

-- 
With Best Regards,
Andy Shevchenko





[Index of Archives]     [Linux SPI]     [Linux Kernel]     [Linux ARM (vger)]     [Linux ARM MSM]     [Linux Omap]     [Linux Arm]     [Linux Tegra]     [Fedora ARM]     [Linux for Samsung SOC]     [eCos]     [Linux Fastboot]     [Gcc Help]     [Git]     [DCCP]     [IETF Announce]     [Security]     [Linux MIPS]     [Yosemite Campsites]

  Powered by Linux