RE: [PATCH] gpio: mmio: do not calculate bgpio_bits via "ngpios"

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

 



> > >I believe we should use only a single source for what we need. If we
> > >rely on ngpios, the bgpio_bits should be recalculated based on it.
> > >The expression doing this is very simple. Something like
> > >round_up(ngpios, 8);
> >
> 
> Right, mistakes happen. Also I don't want to blame anyone, because it
> happens to work fine on little endian systems, and big endian systems are so
> rare it's easy to forget that they exist ;-)
> 
> >  Now, if we want to not modify bgpio_bits, we could go back to my v3 patch.
> > ngpio is the number of gpio pins supported while bgpio_bits is the register
> access bit type. These are 2 different entities.
> 
> Exactly. And AFAICT this patch does exactly this, restoring the code to the
> state of v3.
> 
LGTM then 😊. Thanks!




[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