From: Olof Johansson <olof-nZhT3qVonbNeoWH0uzbU5w@public.gmane.org>
To: Linus Walleij <linus.walleij-QSEj5FYQhm4dnm+yROfE0A@public.gmane.org>
Cc: Mark Brown <broonie-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org>,
linux-spi-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
arm-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org,
Ralf Baechle <ralf-6z/3iImG2C8G8FEW9MqTrA@public.gmane.org>,
Sylwester Nawrocki
<sylvester.nawrocki-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>,
Kukjin Kim <kgene.kim-Sze3O3UU22JBDgjK7y7TUQ@public.gmane.org>,
Ben Dooks <ben-linux-elnMNo+KYs3YtjvyW6yDsg@public.gmane.org>,
Harald Welte <laforge-4Bgg8jF3iZdg9hUCZPvPmw@public.gmane.org>,
Manuel Lauss
<manuel.lauss-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>,
Paul Cercueil <paul-icTtO2rgO2OTuSrc4Mpeew@public.gmane.org>,
Anatolij Gustschin <agust-ynQEQJNshbs@public.gmane.org>
Subject: Re: [PATCH 2/5] spi: spi-gpio: Rewrite to use GPIO descriptors
Date: Thu, 4 Jan 2018 23:34:18 -0800 [thread overview]
Message-ID: <20180105073418.lxaaoxwlyxt7o2yh@localhost> (raw)
In-Reply-To: <20180101133749.29567-3-linus.walleij-QSEj5FYQhm4dnm+yROfE0A@public.gmane.org>
On Mon, Jan 01, 2018 at 02:37:46PM +0100, Linus Walleij wrote:
> This converts the bit-banged GPIO SPI driver to looking up and
> using GPIO descriptors to get a handle on GPIO lines for SCK,
> MOSI, MISO and all CS lines.
>
> All existing board files are converted in one go to keep it all
> consistent. With these conversions I rarely find any interrim
> steps that makes any sense.
>
> Device tree probing and GPIO handling should work like before
> also after this patch.
>
> For board files, we stop using controller data to pass the GPIO
> line for chip select, instead we pass this as a GPIO descriptor
> lookup like everything else.
>
> In some s3c24xx machines the names of the SPI devices were set to
> "spi-gpio" rather than "spi_gpio" which can never have worked, I
> fixed it working (I guess) as part of this patch set. Sometimes
> I wonder how this code got upstream in the first place, it
> obviously is not tested.
>
> mach-s3c64xx/mach-smartq.c has the same problem and additionally
> defines the *same* GPIO line for MOSI and MISO which is not going
> to be accepted by gpiolib. As the lines were number 1,2,2 I assumed
> it was a typo and use lines 1,2,3. A comment gives awat that line 0
> is chip select though no actual SPI device is provided for the LCD
> supposed to be on this bit-banged SPI bus. I left it intact instead
> of just deleting the bus though.
>
> Kill off board file code that try to initialize the SPI lines
> to the same values that they will later be set by the spi_gpio
> driver anyways. Given the huge number of weird things in these
> board files I do not think this code is very tested or put in
> with much afterthought anyways.
>
> Cc: arm-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org # Request ACK
> Cc: Ralf Baechle <ralf-6z/3iImG2C8G8FEW9MqTrA@public.gmane.org> # Request ACK
> Cc: Sylwester Nawrocki <sylvester.nawrocki-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> # S3C stuff
> Cc: Kukjin Kim <kgene.kim-Sze3O3UU22JBDgjK7y7TUQ@public.gmane.org> # S3C stuff
> Cc: Ben Dooks <ben-linux-elnMNo+KYs3YtjvyW6yDsg@public.gmane.org> # S3C Jive
> Cc: Harald Welte <laforge-4Bgg8jF3iZdg9hUCZPvPmw@public.gmane.org> # S3C qt2410
> Cc: Manuel Lauss <manuel.lauss-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> # MIPS db1000
> Cc: Paul Cercueil <paul-icTtO2rgO2OTuSrc4Mpeew@public.gmane.org> # JZ4740
> Cc: Anatolij Gustschin <agust-ynQEQJNshbs@public.gmane.org> # EEPROM hack
> Signed-off-by: Linus Walleij <linus.walleij-QSEj5FYQhm4dnm+yROfE0A@public.gmane.org>
Acked-by: Olof Johansson <olof-nZhT3qVonbNeoWH0uzbU5w@public.gmane.org>
-Olof
--
To unsubscribe from this list: send the line "unsubscribe linux-spi" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
next prev parent reply other threads:[~2018-01-05 7:34 UTC|newest]
Thread overview: 25+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-01-01 13:37 [PATCH 0/5] Rewrite GPIO SPI to use descriptors Linus Walleij
[not found] ` <20180101133749.29567-1-linus.walleij-QSEj5FYQhm4dnm+yROfE0A@public.gmane.org>
2018-01-01 13:37 ` [PATCH 1/5] gpio: of: Support SPI nonstandard GPIO properties Linus Walleij
[not found] ` <20180101133749.29567-2-linus.walleij-QSEj5FYQhm4dnm+yROfE0A@public.gmane.org>
2018-01-03 15:04 ` Mark Brown
2018-01-03 15:23 ` Rob Herring
[not found] ` <CAL_JsqLH4pqptAkpw2CHPRe=6dR3k1iBPM8g7yMFUHnYmm7L9w-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2018-01-04 20:24 ` Linus Walleij
[not found] ` <CACRpkdZ9yGm9K4iF=jR8bjzZR6cU7vEV8tNz6i7DfcE=Jhp2yw-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2018-01-05 10:21 ` Andy Shevchenko
2018-01-01 13:37 ` [PATCH 2/5] spi: spi-gpio: Rewrite to use GPIO descriptors Linus Walleij
[not found] ` <20180101133749.29567-3-linus.walleij-QSEj5FYQhm4dnm+yROfE0A@public.gmane.org>
2018-01-03 15:55 ` Mark Brown
2018-01-05 7:34 ` Olof Johansson [this message]
2018-01-05 10:33 ` Andy Shevchenko
2018-01-01 13:37 ` [PATCH 3/5] spi: spi-gpio: Augment device tree bindings Linus Walleij
[not found] ` <20180101133749.29567-4-linus.walleij-QSEj5FYQhm4dnm+yROfE0A@public.gmane.org>
2018-02-14 16:28 ` Applied "spi: spi-gpio: Augment device tree bindings" to the spi tree Mark Brown
2018-01-01 13:37 ` [PATCH 4/5] spi: spi-gpio: Make optional chipselect handling more explicit Linus Walleij
[not found] ` <20180101133749.29567-5-linus.walleij-QSEj5FYQhm4dnm+yROfE0A@public.gmane.org>
2018-01-03 8:21 ` Geert Uytterhoeven
[not found] ` <CAMuHMdV5tdm0diunWg2BXxgVsG0FqwTgXXXBD+p9nbOEXcd59Q-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2018-01-03 8:58 ` Linus Walleij
[not found] ` <CACRpkdZaLKUs+9BP_Tp8bhdCur+CHaTK1RsS=i2na4Edqz1VGw-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2018-01-03 9:17 ` Geert Uytterhoeven
[not found] ` <CAMuHMdVeTQOxRMJaohGFtw6LUtwQb6H46rsrf1fRFno9KBQXXA-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2018-01-03 9:40 ` Linus Walleij
[not found] ` <CACRpkdaEyKcWPY543CZz0grepAhVijefh_+FCsPd3g+83hv2Fg-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2018-01-03 16:05 ` Mark Brown
2018-01-01 13:37 ` [PATCH 5/5] spi: spi-gpio: Delete references to non-GENERIC_BITBANG Linus Walleij
[not found] ` <20180101133749.29567-6-linus.walleij-QSEj5FYQhm4dnm+yROfE0A@public.gmane.org>
2018-01-03 16:10 ` Mark Brown
2018-01-02 8:15 ` [PATCH 0/5] Rewrite GPIO SPI to use descriptors Linus Walleij
2018-01-02 18:42 ` Trent Piepho
[not found] ` <1514918569.26695.151.camel-cgc2CodaaHDQT0dZR+AlfA@public.gmane.org>
2018-01-02 23:17 ` Linus Walleij
[not found] ` <CACRpkdYRJ=jR4B2Ko2P1axwGMKob2vHkY2h8cMc9t9Qi7n52sQ-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2018-01-03 16:24 ` Mark Brown
[not found] ` <20180103162449.GG28713-GFdadSzt00ze9xe1eoZjHA@public.gmane.org>
2018-01-06 23:18 ` Linus Walleij
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20180105073418.lxaaoxwlyxt7o2yh@localhost \
--to=olof-nzht3qvonbneowh0uzbu5w@public.gmane.org \
--cc=agust-ynQEQJNshbs@public.gmane.org \
--cc=arm-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org \
--cc=ben-linux-elnMNo+KYs3YtjvyW6yDsg@public.gmane.org \
--cc=broonie-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org \
--cc=kgene.kim-Sze3O3UU22JBDgjK7y7TUQ@public.gmane.org \
--cc=laforge-4Bgg8jF3iZdg9hUCZPvPmw@public.gmane.org \
--cc=linus.walleij-QSEj5FYQhm4dnm+yROfE0A@public.gmane.org \
--cc=linux-spi-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
--cc=manuel.lauss-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org \
--cc=paul-icTtO2rgO2OTuSrc4Mpeew@public.gmane.org \
--cc=ralf-6z/3iImG2C8G8FEW9MqTrA@public.gmane.org \
--cc=sylvester.nawrocki-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox