[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CAMuHMdVhmtA0ogEqu-jj8Kvii5CwV8qfHn+GzgQ9uFKzH7Ua6w@mail.gmail.com>
Date: Tue, 14 Jan 2014 16:18:06 +0100
From: Geert Uytterhoeven <geert@...ux-m68k.org>
To: Mark Brown <broonie@...nel.org>
Cc: linux-spi@...r.kernel.org,
"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
Geert Uytterhoeven <geert+renesas@...ux-m68k.org>
Subject: Re: [PATCH/RFC] spi: core: Fix logic mismatch in spi_master.set_cs()
Hi Mark,
On Tue, Jan 14, 2014 at 3:50 PM, Mark Brown <broonie@...nel.org> wrote:
> 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@...nel.org> wrote:
>> >> > 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?
No, it was about fixing the mismatch between code and documentation.
There are two ways to correct the mismatch:
1. Make the code match the documentation.
That's what I did, as it avoids a double conditional inversion on RSPI.
2. Make the documentation match the code.
It seems this is what you prefer?
So "assert or deassert chip select, true to assert" has to be replaced by
"Set the logical level of the chip select line"? Or do you have a better
suggestion?
Thanks!
Gr{oetje,eeting}s,
Geert
--
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@...ux-m68k.org
In personal conversations with technical people, I call myself a hacker. But
when I'm talking to journalists I just say "programmer" or something like that.
-- Linus Torvalds
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists