lkml.org 
[lkml]   [2013]   [Apr]   [1]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH V3 4/5] spi: s3c64xx: Added provision for dedicated cs pin
On Wed, Mar 13, 2013 at 12:13:33PM +0530, Girish K S wrote:
> From: Girish K S <girishks2000@gmail.com>
>
> The existing driver supports gpio based /cs signal.
> For controller's that have one device per controller,
> the slave device's /cs signal might be internally controlled
> by the chip select bit of slave select register. They are not
> externally asserted/deasserted using gpio pin.

Applying this patch breaks my S3C64xx based system (Cragganmore, a
non-DT platform). It'll break all existing non-DT platforms since...

> + * @cs_gpio: CS line status, 'true' if CS line is asserted by gpio.
> + * 'false' if asserted by internal dedicated pin.
> * @line: Custom 'identity' of the CS line.
> *
> * This is per SPI-Slave Chipselect information.
> @@ -25,6 +27,7 @@ struct platform_device;
> */
> struct s3c64xx_spi_csinfo {
> u8 fb_delay;
> + bool cs_gpio;
> unsigned line;
> };

...you've added this new cs_gpio field to the platform data but not
updated any of the existing users (including Cragganmore). It would
seem better to make the default behaviour stay as per the current
default and make the new behaviour optional but at a minimum all
existing in-tree users need to be updated.

It's also a bit odd that we end up checking cs_gpio and then using line
in the code, it'd be more idiomatic if cs_gpio were the GPIO number.
[unhandled content-type:application/pgp-signature]
\
 
 \ /
  Last update: 2013-04-01 15:41    [W:0.135 / U:0.152 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site