mail archive of the barebox mailing list
 help / color / mirror / Atom feed
From: Sascha Hauer <s.hauer@pengutronix.de>
To: franck.jullien@gmail.com
Cc: barebox@lists.infradead.org
Subject: Re: [PATCH] spi: add bits_per_word to proxy structure
Date: Wed, 6 Jul 2011 10:26:00 +0200	[thread overview]
Message-ID: <20110706082600.GR6069@pengutronix.de> (raw)
In-Reply-To: <1309904090-9100-1-git-send-email-franck.jullien@gmail.com>

All applied to master.

Thanks
 Sascha

On Wed, Jul 06, 2011 at 12:14:48AM +0200, franck.jullien@gmail.com wrote:
> From: Franck Jullien <franck.jullien@gmail.com>
> 
> During the creation of a new spi device, we need to
> have the possiblility to give the bits_per_word value
> to master->setup.
> 
> As a matter of fact, spi master could check the spi
> device bits_per_word and compare this value against its
> capabilities.
> 
> Signed-off-by: Franck Jullien <franck.jullien@gmail.com>
> ---
>  drivers/spi/spi.c |    1 +
>  include/spi/spi.h |    1 +
>  2 files changed, 2 insertions(+), 0 deletions(-)
> 
> diff --git a/drivers/spi/spi.c b/drivers/spi/spi.c
> index 6456897..5f3272b 100644
> --- a/drivers/spi/spi.c
> +++ b/drivers/spi/spi.c
> @@ -75,6 +75,7 @@ struct spi_device *spi_new_device(struct spi_master *master,
>  	proxy->chip_select = chip->chip_select;
>  	proxy->max_speed_hz = chip->max_speed_hz;
>  	proxy->mode = chip->mode;
> +	proxy->bits_per_word = chip->bits_per_word;
>  	proxy->dev.platform_data = chip->platform_data;
>  	strcpy(proxy->dev.name, chip->name);
>  	proxy->dev.type_data = proxy;
> diff --git a/include/spi/spi.h b/include/spi/spi.h
> index ac2013a..948e050 100644
> --- a/include/spi/spi.h
> +++ b/include/spi/spi.h
> @@ -15,6 +15,7 @@ struct spi_board_info {
>  	 * where the default of SPI_CS_HIGH = 0 is wrong.
>  	 */
>  	u8	mode;
> +	u8	bits_per_word;
>  	void	*platform_data;
>  };
>  
> -- 
> 1.7.0.4
> 
> 
> _______________________________________________
> barebox mailing list
> barebox@lists.infradead.org
> http://lists.infradead.org/mailman/listinfo/barebox
> 

-- 
Pengutronix e.K.                           |                             |
Industrial Linux Solutions                 | http://www.pengutronix.de/  |
Peiner Str. 6-8, 31137 Hildesheim, Germany | Phone: +49-5121-206917-0    |
Amtsgericht Hildesheim, HRA 2686           | Fax:   +49-5121-206917-5555 |

_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox

      parent reply	other threads:[~2011-07-06  8:26 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-07-05 22:14 franck.jullien
2011-07-05 22:14 ` [PATCH] spi: unregister dev if master->setup fails franck.jullien
2011-07-05 22:14 ` [PATCH] Nios2: Compile bootm only if needed franck.jullien
2011-07-06  8:26 ` Sascha Hauer [this message]

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=20110706082600.GR6069@pengutronix.de \
    --to=s.hauer@pengutronix.de \
    --cc=barebox@lists.infradead.org \
    --cc=franck.jullien@gmail.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