All of lore.kernel.org
 help / color / mirror / Atom feed
From: Grant Likely <grant.likely@secretlab.ca>
To: Thomas Abraham <thomas.abraham@linaro.org>,
	spi-devel-general@lists.sourceforge.net,
	devicetree-discuss@lists.ozlabs.org
Cc: linux-arm-kernel@lists.infradead.org,
	linux-samsung-soc@vger.kernel.org, rob.herring@calxeda.com,
	kgene.kim@samsung.com, jaswinder.singh@linaro.org,
	broonie@opensource.wolfsonmicro.com
Subject: Re: [PATCH v2 5/6] spi: s3c64xx: Remove the 'set_level' callback from controller data
Date: Sat, 19 May 2012 23:07:07 -0600	[thread overview]
Message-ID: <20120520050707.A3B8C3E03B8@localhost> (raw)
In-Reply-To: <1337333613-6216-6-git-send-email-thomas.abraham@linaro.org>

On Fri, 18 May 2012 15:03:32 +0530, Thomas Abraham <thomas.abraham@linaro.org> wrote:
> The set_level callback in the controller data, which is used to configure
> the slave select line, cannot be supported when migrating the driver to
> device tree based discovery. Since all the platforms currently use gpio
> as the slave select line, this callback can be removed from the
> controller data and replaced with call to gpio_set_value in the driver.
> 
> Signed-off-by: Thomas Abraham <thomas.abraham@linaro.org>
> Acked-by: Jaswinder Singh <jaswinder.singh@linaro.org>

Acked-by: Grant Likely <grant.likely@secretlab.ca>

> ---
>  arch/arm/plat-samsung/include/plat/s3c64xx-spi.h |    2 --
>  drivers/spi/spi-s3c64xx.c                        |    8 ++++----
>  2 files changed, 4 insertions(+), 6 deletions(-)
> 
> diff --git a/arch/arm/plat-samsung/include/plat/s3c64xx-spi.h b/arch/arm/plat-samsung/include/plat/s3c64xx-spi.h
> index a733ce9..48a6495 100644
> --- a/arch/arm/plat-samsung/include/plat/s3c64xx-spi.h
> +++ b/arch/arm/plat-samsung/include/plat/s3c64xx-spi.h
> @@ -18,7 +18,6 @@ struct platform_device;
>   * @fb_delay: Slave specific feedback delay.
>   *            Refer to FB_CLK_SEL register definition in SPI chapter.
>   * @line: Custom 'identity' of the CS line.
> - * @set_level: CS line control.
>   *
>   * This is per SPI-Slave Chipselect information.
>   * Allocate and initialize one in machine init code and make the
> @@ -27,7 +26,6 @@ struct platform_device;
>  struct s3c64xx_spi_csinfo {
>  	u8 fb_delay;
>  	unsigned line;
> -	void (*set_level)(unsigned line_id, int lvl);
>  };
>  
>  /**
> diff --git a/drivers/spi/spi-s3c64xx.c b/drivers/spi/spi-s3c64xx.c
> index f6bc0e3..d84ce7f 100644
> --- a/drivers/spi/spi-s3c64xx.c
> +++ b/drivers/spi/spi-s3c64xx.c
> @@ -406,14 +406,14 @@ static inline void enable_cs(struct s3c64xx_spi_driver_data *sdd,
>  		if (sdd->tgl_spi != spi) { /* if last mssg on diff device */
>  			/* Deselect the last toggled device */
>  			cs = sdd->tgl_spi->controller_data;
> -			cs->set_level(cs->line,
> -					spi->mode & SPI_CS_HIGH ? 0 : 1);
> +			gpio_set_value(cs->line,
> +				spi->mode & SPI_CS_HIGH ? 0 : 1);
>  		}
>  		sdd->tgl_spi = NULL;
>  	}
>  
>  	cs = spi->controller_data;
> -	cs->set_level(cs->line, spi->mode & SPI_CS_HIGH ? 1 : 0);
> +	gpio_set_value(cs->line, spi->mode & SPI_CS_HIGH ? 1 : 0);
>  }
>  
>  static int wait_for_xfer(struct s3c64xx_spi_driver_data *sdd,
> @@ -499,7 +499,7 @@ static inline void disable_cs(struct s3c64xx_spi_driver_data *sdd,
>  	if (sdd->tgl_spi == spi)
>  		sdd->tgl_spi = NULL;
>  
> -	cs->set_level(cs->line, spi->mode & SPI_CS_HIGH ? 0 : 1);
> +	gpio_set_value(cs->line, spi->mode & SPI_CS_HIGH ? 0 : 1);
>  }
>  
>  static void s3c64xx_spi_config(struct s3c64xx_spi_driver_data *sdd)
> -- 
> 1.6.6.rc2
> 

-- 
Grant Likely, B.Sc, P.Eng.
Secret Lab Technologies, Ltd.

WARNING: multiple messages have this Message-ID (diff)
From: grant.likely@secretlab.ca (Grant Likely)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH v2 5/6] spi: s3c64xx: Remove the 'set_level' callback from controller data
Date: Sat, 19 May 2012 23:07:07 -0600	[thread overview]
Message-ID: <20120520050707.A3B8C3E03B8@localhost> (raw)
In-Reply-To: <1337333613-6216-6-git-send-email-thomas.abraham@linaro.org>

On Fri, 18 May 2012 15:03:32 +0530, Thomas Abraham <thomas.abraham@linaro.org> wrote:
> The set_level callback in the controller data, which is used to configure
> the slave select line, cannot be supported when migrating the driver to
> device tree based discovery. Since all the platforms currently use gpio
> as the slave select line, this callback can be removed from the
> controller data and replaced with call to gpio_set_value in the driver.
> 
> Signed-off-by: Thomas Abraham <thomas.abraham@linaro.org>
> Acked-by: Jaswinder Singh <jaswinder.singh@linaro.org>

Acked-by: Grant Likely <grant.likely@secretlab.ca>

> ---
>  arch/arm/plat-samsung/include/plat/s3c64xx-spi.h |    2 --
>  drivers/spi/spi-s3c64xx.c                        |    8 ++++----
>  2 files changed, 4 insertions(+), 6 deletions(-)
> 
> diff --git a/arch/arm/plat-samsung/include/plat/s3c64xx-spi.h b/arch/arm/plat-samsung/include/plat/s3c64xx-spi.h
> index a733ce9..48a6495 100644
> --- a/arch/arm/plat-samsung/include/plat/s3c64xx-spi.h
> +++ b/arch/arm/plat-samsung/include/plat/s3c64xx-spi.h
> @@ -18,7 +18,6 @@ struct platform_device;
>   * @fb_delay: Slave specific feedback delay.
>   *            Refer to FB_CLK_SEL register definition in SPI chapter.
>   * @line: Custom 'identity' of the CS line.
> - * @set_level: CS line control.
>   *
>   * This is per SPI-Slave Chipselect information.
>   * Allocate and initialize one in machine init code and make the
> @@ -27,7 +26,6 @@ struct platform_device;
>  struct s3c64xx_spi_csinfo {
>  	u8 fb_delay;
>  	unsigned line;
> -	void (*set_level)(unsigned line_id, int lvl);
>  };
>  
>  /**
> diff --git a/drivers/spi/spi-s3c64xx.c b/drivers/spi/spi-s3c64xx.c
> index f6bc0e3..d84ce7f 100644
> --- a/drivers/spi/spi-s3c64xx.c
> +++ b/drivers/spi/spi-s3c64xx.c
> @@ -406,14 +406,14 @@ static inline void enable_cs(struct s3c64xx_spi_driver_data *sdd,
>  		if (sdd->tgl_spi != spi) { /* if last mssg on diff device */
>  			/* Deselect the last toggled device */
>  			cs = sdd->tgl_spi->controller_data;
> -			cs->set_level(cs->line,
> -					spi->mode & SPI_CS_HIGH ? 0 : 1);
> +			gpio_set_value(cs->line,
> +				spi->mode & SPI_CS_HIGH ? 0 : 1);
>  		}
>  		sdd->tgl_spi = NULL;
>  	}
>  
>  	cs = spi->controller_data;
> -	cs->set_level(cs->line, spi->mode & SPI_CS_HIGH ? 1 : 0);
> +	gpio_set_value(cs->line, spi->mode & SPI_CS_HIGH ? 1 : 0);
>  }
>  
>  static int wait_for_xfer(struct s3c64xx_spi_driver_data *sdd,
> @@ -499,7 +499,7 @@ static inline void disable_cs(struct s3c64xx_spi_driver_data *sdd,
>  	if (sdd->tgl_spi == spi)
>  		sdd->tgl_spi = NULL;
>  
> -	cs->set_level(cs->line, spi->mode & SPI_CS_HIGH ? 0 : 1);
> +	gpio_set_value(cs->line, spi->mode & SPI_CS_HIGH ? 0 : 1);
>  }
>  
>  static void s3c64xx_spi_config(struct s3c64xx_spi_driver_data *sdd)
> -- 
> 1.6.6.rc2
> 

-- 
Grant Likely, B.Sc, P.Eng.
Secret Lab Technologies, Ltd.

  reply	other threads:[~2012-05-20  5:07 UTC|newest]

Thread overview: 50+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-05-18  9:33 [PATCH v2 0/6] spi: s3c64xx: add support for device tree Thomas Abraham
2012-05-18  9:33 ` Thomas Abraham
2012-05-18  9:33 ` [PATCH v2 1/6] spi: s3c64xx: remove unused S3C64XX_SPI_ST_TRLCNTZ macro Thomas Abraham
2012-05-18  9:33   ` Thomas Abraham
2012-05-20  5:03   ` Grant Likely
2012-05-20  5:03     ` Grant Likely
2012-05-18  9:33 ` [PATCH v2 2/6] spi: s3c64xx: move controller information into driver data Thomas Abraham
2012-05-18  9:33   ` Thomas Abraham
2012-05-20  5:06   ` Grant Likely
2012-05-20  5:06     ` Grant Likely
2012-05-24  7:18   ` Kukjin Kim
2012-05-24  7:18     ` Kukjin Kim
2012-05-24  8:43     ` Thomas Abraham
2012-05-24  8:43       ` Thomas Abraham
2012-05-18  9:33 ` [PATCH v2 3/6] ARM: Samsung: Remove pdev pointer paremeter from spi gpio setup functions Thomas Abraham
2012-05-18  9:33   ` Thomas Abraham
2012-05-18  9:33 ` [PATCH v2 4/6] ARM: Samsung: Modify s3c64xx_spi{0|1|2}_set_platdata function Thomas Abraham
2012-05-18  9:33   ` Thomas Abraham
2012-05-20  9:21   ` Mark Brown
2012-05-20  9:21     ` Mark Brown
2012-05-30  7:28     ` Olof Johansson
2012-05-30  7:28       ` Olof Johansson
2012-05-30  7:47       ` Thomas Abraham
2012-05-30  7:47         ` Thomas Abraham
2012-05-30  9:34       ` Mark Brown
2012-05-30  9:34         ` Mark Brown
2012-05-30 10:05         ` Thomas Abraham
2012-05-30 10:05           ` Thomas Abraham
2012-05-30 10:13           ` Mark Brown
2012-05-30 10:13             ` Mark Brown
     [not found]             ` <20120530101326.GF9947-yzvPICuk2AATkU/dhu1WVueM+bqZidxxQQ4Iyu8u01E@public.gmane.org>
2012-05-31  2:05               ` Thomas Abraham
2012-05-31  2:05                 ` Thomas Abraham
2012-05-31 11:36                 ` Mark Brown
2012-05-31 11:36                   ` Mark Brown
     [not found]                   ` <20120531113659.GB2666-yzvPICuk2AATkU/dhu1WVueM+bqZidxxQQ4Iyu8u01E@public.gmane.org>
2012-06-01  2:47                     ` Thomas Abraham
2012-06-01  2:47                       ` Thomas Abraham
2012-06-01 12:39                       ` Mark Brown
2012-06-01 12:39                         ` Mark Brown
2012-06-03  9:29                         ` Thomas Abraham
2012-06-03  9:29                           ` Thomas Abraham
2012-05-18  9:33 ` [PATCH v2 5/6] spi: s3c64xx: Remove the 'set_level' callback from controller data Thomas Abraham
2012-05-18  9:33   ` Thomas Abraham
2012-05-20  5:07   ` Grant Likely [this message]
2012-05-20  5:07     ` Grant Likely
2012-05-18  9:33 ` [PATCH v2 6/6] spi: s3c64xx: add device tree support Thomas Abraham
2012-05-18  9:33   ` Thomas Abraham
2012-05-20  5:10   ` Grant Likely
2012-05-20  5:10     ` Grant Likely
2012-05-20  5:02 ` [PATCH v2 0/6] spi: s3c64xx: add support for device tree Grant Likely
2012-05-20  5:02   ` Grant Likely

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=20120520050707.A3B8C3E03B8@localhost \
    --to=grant.likely@secretlab.ca \
    --cc=broonie@opensource.wolfsonmicro.com \
    --cc=devicetree-discuss@lists.ozlabs.org \
    --cc=jaswinder.singh@linaro.org \
    --cc=kgene.kim@samsung.com \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-samsung-soc@vger.kernel.org \
    --cc=rob.herring@calxeda.com \
    --cc=spi-devel-general@lists.sourceforge.net \
    --cc=thomas.abraham@linaro.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.