Hi All,
I have a SPI device problem on MRST CDK.
I use a GPIO as SS because my slave device expects the SS to be low between
byte transfers.
My probe function does a read as:
int read_val;
-------
---
read_val = spi_w8r8(&spi_dev,0x20);
if ( read_val < 0 )
printk ( "spi_read err\n");
else
printk ( "spi_read %d\n",read_val );
----
--
The MRST SFI interface passes the device board info. Because, my device is
not listed in the IA32 f/w I modified the MRST.c code sfi_handle_spi_dev
function as:
while(dev->name[0])
{
if (dev->type == SFI_DEV_TYPE_SPI &&
!strncmp(dev->name, spi_info->modalias, 16))
{
if (!strncmp("spi_old_device", spi_info->modalias,
16)){
strncpy (spi_info->modalias,
"spi_my_dev",16);
pdata = dev->get_platform_data(spi_info);
pr_info ( "spi_old_device modalias to
spi_my_dev ");
}
else
{
pdata = dev->get_platform_data(spi_info);
}
break;
}
dev++;
}
i also modified the devs_id array to change the platform_data
{"spi_old_dev", SFI_DEV_TYPE_SPI, 0, &no_platform_data}
The issue is that for the spi_w8r8 call, i get multiple read (multiple * (8
clock cycles/SS toggle))on the SPI bus.
Also regarding the spi->irq, is it the responsibility of the protocol driver
to register for this irq and handle it or does the spi framework or master
driver take care of this ?
Any pointers would be really helpful. ( attached is the test code)
Regards,
Tom
------------------------------------------------------------------------------
The ultimate all-in-one performance toolkit: Intel(R) Parallel Studio XE:
Pinpoint memory and threading errors before they happen.
Find and fix more than 250 security defects in the development cycle.
Locate bottlenecks in serial and parallel code that limit performance.
http://p.sf.net/sfu/intel-dev2devfeb
_______________________________________________
spi-devel-general mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/spi-devel-general