Re: spi 3wire support for ST MEMs sensors

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Fri, 9 Jun 2017 11:30:00 +0200
Lorenzo Bianconi <lorenzo.bianconi83@xxxxxxxxx> wrote:

> Hi all,
> 
> I started working on supporting spi-3wire mode in some STM MEMs
> drivers and I am facing a tricky issue. Let's consider the driver for
> LSM303AGR accel device
> (http://www.st.com/resource/en/datasheet/lsm303agr.pdf). The sensor is
> configured by default in spi 4 wire mode (BIT 0 in register 0x23) but
> the package does not export the MISO line for accelerometer. The only
> way to support spi is to enable 3-wire at bootstrap. I am wondering
> how to figure out the correct register address since it is not
> possible to read the device whoami. The only way that come up to my
> mind is to add a lookup table in st_accel_spi.c based on
> spi_device_id. Is there something better? Or should I just remove the
> spi support for LSM303AGR? Thanks
> 
> Regards,
> Lorenzo
> 

Hi Lorenzo,

Look up table is probably the best option when a device only supports
3 wire mode.

However, don't we need DT of ACPI to provide info on whether a 3 wire
bus is being used?  If so can we query it from the spi core?

Jonathan
--
To unsubscribe from this list: send the line "unsubscribe linux-iio" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html



[Index of Archives]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Input]     [Linux Kernel]     [Linux SCSI]     [X.org]

  Powered by Linux