This series of patches add drier support for hardware implemented modes:
spi_lsb_fist and spi_loop
Also fix an issue when multiple spi devices are defined on a device tree.
Ricardo Ribalda Delgado (3):
spi/xilinx: Use automatic bus number on device tree
spi/xilinx: Support for spi mode LSB_FIRST
spi/xilinx: Support for spi mode LOOP
drivers/spi/spi-xilinx.c | 12 ++++++++++--
1 file changed, 10 insertions(+), 2 deletions(-)
--
2.1.4
--
To unsubscribe from this list: send the line "unsubscribe linux-spi" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
@@ -197,6 +197,8 @@ static void xilinx_spi_chipselect(struct spi_device *spi, int is_on)cr|=XSPI_CR_CPOL;if(spi->mode&SPI_LSB_FIRST)cr|=XSPI_CR_LSB_FIRST;+if(spi->mode&SPI_LOOP)+cr|=XSPI_CR_LOOP;xspi->write_fn(cr,xspi->regs+XSPI_CR_OFFSET);/* We do not check spi->max_speed_hz here as the SPI clock
@@ -194,6 +195,8 @@ static void xilinx_spi_chipselect(struct spi_device *spi, int is_on)cr|=XSPI_CR_CPHA;if(spi->mode&SPI_CPOL)cr|=XSPI_CR_CPOL;+if(spi->mode&SPI_LSB_FIRST)+cr|=XSPI_CR_LSB_FIRST;xspi->write_fn(cr,xspi->regs+XSPI_CR_OFFSET);/* We do not check spi->max_speed_hz here as the SPI clock
--
2.1.4
--
To unsubscribe from this list: send the line "unsubscribe linux-spi" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
If there is more than one spi device on a device tree, the second one
will fail to probe due to a duplicated bus_num.
This patch uses automatic bus number if the device is deined on a device
tree.
Signed-off-by: Ricardo Ribalda Delgado <redacted>
---
drivers/spi/spi-xilinx.c | 5 ++++-
1 file changed, 4 insertions(+), 1 deletion(-)
@@ -332,14 +332,17 @@ static int xilinx_spi_probe(struct platform_device *pdev)structspi_master*master;u32tmp;u8i;+s16bus_num;pdata=dev_get_platdata(&pdev->dev);if(pdata){num_cs=pdata->num_chipselect;bits_per_word=pdata->bits_per_word;+bus_num=pdev->id;}else{of_property_read_u32(pdev->dev.of_node,"xlnx,num-ss-bits",&num_cs);+bus_num=-1;}if(!num_cs){
@@ -369,7 +372,7 @@ static int xilinx_spi_probe(struct platform_device *pdev)gotoput_master;}-master->bus_num=pdev->id;+master->bus_num=bus_num;master->num_chipselect=num_cs;master->dev.of_node=pdev->dev.of_node;
--
2.1.4
--
To unsubscribe from this list: send the line "unsubscribe linux-spi" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Hi Lars
I think you are right. The other patches on the set are still valid though
Thanks!
On Wed, Jan 21, 2015 at 5:02 PM, Lars-Peter Clausen [off-list ref] wrote:
On 01/21/2015 04:53 PM, Ricardo Ribalda Delgado wrote:
quoted
If there is more than one spi device on a device tree, the second one
will fail to probe due to a duplicated bus_num.
--
Ricardo Ribalda
--
To unsubscribe from this list: send the line "unsubscribe linux-spi" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at http://vger.kernel.org/majordomo-info.html