linux-spi.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Javier Martinez Canillas <javier.martinez@collabora.co.uk>
To: Mark Brown <broonie@kernel.org>
Cc: Naveen Krishna Chatradhi <ch.naveen@samsung.com>,
	Tomasz Figa <t.figa@samsung.com>,
	Doug Anderson <dianders@chromium.org>,
	Olof Johansson <olof@lixom.net>,
	Kukjin Kim <kgene.kim@samsung.com>,
	Sachin Kamat <sachin.kamat@samsung.com>,
	devicetree@vger.kernel.org, linux-spi@vger.kernel.org,
	linux-samsung-soc@vger.kernel.org,
	linux-arm-kernel@lists.infradead.org,
	Javier Martinez Canillas <javier.martinez@collabora.co.uk>
Subject: [PATCH 0/4] spi: s3c64xx: fix DT binding breakage
Date: Wed, 16 Jul 2014 17:19:06 +0200	[thread overview]
Message-ID: <1405523950-2231-1-git-send-email-javier.martinez@collabora.co.uk> (raw)

Hello Mark,

The s3c64xx SPI driver DT binding is currently broken. Commit
3146bee ("spi: s3c64xx: Added provision for dedicated cs pin")
added a new "cs-gpio" property and made it a requirement in
order to make the driver behave in the same way that it used to.

The motivation of the offending commit was to allow boards that
want to use the native chip select (instead of a GPIO) to work
with the s3c64xx SPI driver. Something that was not possible
before since the driver made it mandatory to specify a GPIO.

Unfortunately the commit also changed the driver defaults since
now besides specifying a GPIO, it makes mandatory to also specify
that a GPIO is used while the default used to be the opposite.

That mean that old FDT are not working anymore after 3146bee
so DT backward compatibility was not ensured by that commit.

This is a follow-up series from a previous one posted by Naveen
Krishna [0] which attempts to solve the issue.

The feedback from Naveen's series was that the patches did not
provide a clear explanation about the rationale and goal of both
the series as a whole and the individual changes [1].

So I tried to take Navee's series and rework them to provide
an easier to understand patch series.

The series is composed of the following patches:

Javier Martinez Canillas (1):
  Revert "spi: s3c64xx: Added provision for dedicated cs pin"

Naveen Krishna Chatradhi (3):
  spi: s3c64xx: use the generic SPI "cs-gpios" property
  spi: samsung: Update binding documentation
  ARM: DTS: fix the chip select gpios definition in the SPI nodes

 .../devicetree/bindings/spi/spi-samsung.txt        |  8 ++--
 arch/arm/boot/dts/exynos4210-smdkv310.dts          |  2 +-
 arch/arm/boot/dts/exynos4412-trats2.dts            |  2 +-
 arch/arm/boot/dts/exynos5250-smdk5250.dts          |  2 +-
 drivers/spi/spi-s3c64xx.c                          | 54 ++++++++++------------
 5 files changed, 30 insertions(+), 38 deletions(-)

Patch 01/04 reverts the offending commit since it not only broke
the DT binding but also introduced a confusing "cs-gpio" property
while the driver already used a property with the same name.

Patch 02/04 fixes the DT binding for good by using the SPI core
"cs-gpios" property to specify the chip select GPIO instead of
using a custom property only used by this driver. This change
breaks backward compatibility but this has been broken for more
than a year and nobody complained so I think it's safe to change
it again in favor of using standard DT binding properties.

A benefit of Patch 02/04 is that it allows DT and legacy boards
that need to use the built-in CS instead of a GPIO to work with
the driver which was the original motivation of the broken commit.

Patch 03/04 updates the driver binding documentation accordingly
and patch 04/04 updates all the DTS board files in mainline.

Best regards,
Javier

[0]: http://www.spinics.net/lists/linux-samsung-soc/msg34163.html
[1]: http://www.spinics.net/lists/linux-samsung-soc/msg34309.html

             reply	other threads:[~2014-07-16 15:19 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-07-16 15:19 Javier Martinez Canillas [this message]
2014-07-16 15:19 ` [PATCH 3/4] spi: samsung: Update binding documentation Javier Martinez Canillas
     [not found]   ` <1405523950-2231-4-git-send-email-javier.martinez-ZGY8ohtN/8pPYcu2f3hruQ@public.gmane.org>
2014-07-17 18:48     ` Mark Brown
2014-07-16 15:19 ` [PATCH 4/4] ARM: DTS: fix the chip select gpios definition in the SPI nodes Javier Martinez Canillas
2014-07-17 18:49   ` Mark Brown
     [not found]     ` <20140717184944.GE17528-GFdadSzt00ze9xe1eoZjHA@public.gmane.org>
2014-07-18 19:16       ` Kukjin Kim
     [not found] ` <1405523950-2231-1-git-send-email-javier.martinez-ZGY8ohtN/8pPYcu2f3hruQ@public.gmane.org>
2014-07-16 15:19   ` [PATCH 1/4] Revert "spi: s3c64xx: Added provision for dedicated cs pin" Javier Martinez Canillas
2014-07-17 18:46     ` Mark Brown
     [not found]       ` <20140717184656.GB17528-GFdadSzt00ze9xe1eoZjHA@public.gmane.org>
2014-07-17 19:33         ` Javier Martinez Canillas
2014-07-16 15:19   ` [PATCH 2/4] spi: s3c64xx: use the generic SPI "cs-gpios" property Javier Martinez Canillas
2014-07-17 18:48     ` Mark Brown
2014-07-16 15:50   ` [PATCH 0/4] spi: s3c64xx: fix DT binding breakage Naveen Krishna Ch
2014-07-16 16:02   ` Mark Brown
     [not found]     ` <20140716160249.GS17528-GFdadSzt00ze9xe1eoZjHA@public.gmane.org>
2014-07-16 16:33       ` Javier Martinez Canillas
2014-07-16 16:47       ` Naveen Krishna Ch

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=1405523950-2231-1-git-send-email-javier.martinez@collabora.co.uk \
    --to=javier.martinez@collabora.co.uk \
    --cc=broonie@kernel.org \
    --cc=ch.naveen@samsung.com \
    --cc=devicetree@vger.kernel.org \
    --cc=dianders@chromium.org \
    --cc=kgene.kim@samsung.com \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-samsung-soc@vger.kernel.org \
    --cc=linux-spi@vger.kernel.org \
    --cc=olof@lixom.net \
    --cc=sachin.kamat@samsung.com \
    --cc=t.figa@samsung.com \
    /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;
as well as URLs for NNTP newsgroup(s).