From 4c35079c1cc05159f31042686dd74e390fd55986 Mon Sep 17 00:00:00 2001 From: Franck Jullien Date: Wed, 6 Jul 2011 00:14:48 +0200 Subject: [PATCH] spi: add bits_per_word to proxy structure 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 Signed-off-by: Sascha Hauer --- drivers/spi/spi.c | 1 + include/spi/spi.h | 1 + 2 files changed, 2 insertions(+) diff --git a/drivers/spi/spi.c b/drivers/spi/spi.c index 64568976b..5f3272b61 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 ac2013ad5..948e0501c 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; };