Re: [PATCH net v2] net: phy: spi_ks8995: Do not overwrite SPI mode flags

From: Andrew Lunn
Date: Tue Nov 10 2020 - 17:53:48 EST


On Tue, Nov 10, 2020 at 12:06:37PM -0500, Sven Van Asbroeck wrote:
> PING Jakub
>
> On Tue, Nov 10, 2020 at 11:30 AM Andy Shevchenko
> <andy.shevchenko@xxxxxxxxx> wrote:
> >
> > I see that this is a fix for backporing, but maybe you can send a
> > patches on top of this to:
> > 1) introduce
> > #define SPI_MODE_MASK (SPI_CPHA | SPI_CPOL)
> > spi->mode &= ~SPI_MODE_MASK;
> > > + spi->mode |= SPI_MODE_0;
> >
> Jakub,
>
> Is it possible to merge Andy's suggestion into net?
> Or should this go into net-next?

I would keep with the minimal fix for the moment, it keeps the
dependencies simple.

When you add a helper, it should really be somewhere in the SPI code,
not the net code. So we need both the SPI and the net maintainers to
cooperate to get the helper merged, and then this driver using the
helper.

Andrew