lkml.org 
[lkml]   [2014]   [Jan]   [14]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH/RFC] spi: core: Fix logic mismatch in spi_master.set_cs()
On Tue, Jan 14, 2014 at 03:44:43PM +0100, Geert Uytterhoeven wrote:
> On Tue, Jan 14, 2014 at 2:45 PM, Mark Brown <broonie@kernel.org> wrote:

> > If we're manually setting /CS it really makes no difference what the
> > chip thinks the polarity is - something that is controlling /CS
> > autonomously can't implement this operation and something that can just
> > set it at any time doesn't need to worry if the chip thinks it's
> > asserted or not.

> Doh, so I'm the only one where it does matter, as RSPI has separate
> Slave Select Signal Polarity (high/low) and Slave Select Output Setting
> (enable/disable)...

I'm sure there's other hardware out there which has such control, it's
just that there's no value in actually using the polarity select if
we have manual control over the enable. All you're doing is adding
complexity in drivers.

> >> > when calling set_cs() is probably OK though.

> >> Just flipping the sense of enable still needs a documentation update.

> > Huh? Why were you updating the code then...

> "true to assert" in the documentation means that enable is true when
> enabling the chip select.
> Currently the value of enable depends on SPI_CS_HIGH. Just "flipping
> the sense of enable" doesn't change that dependency.

Oh, so the code update was purely about factoring that out of the core?
[unhandled content-type:application/pgp-signature]
\
 
 \ /
  Last update: 2014-01-14 17:01    [W:0.056 / U:0.644 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site