Re: [PATCH 7/9] iio: pressure: bmp280: add SPI interface driver

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

 



2016-06-23 4:04 GMT+09:00 Linus Walleij <linus.walleij@xxxxxxxxxx>:
> On Mon, Jun 20, 2016 at 1:06 PM, Akinobu Mita <akinobu.mita@xxxxxxxxx> wrote:
>
>> I was also trying to support SPI interface for this driver and found
>> that we can't simply use regmap_init_spi().
>>
>> Quote from 5.3 SPI interface in BMP280 datasheet:
>>
>>         In SPI mode, only 7 bits of the register addresses are used; the MSB of
>>         register address is not used and replaced by a read/write bit (RW = ‘0’
>>         for write and RW = ‘1’ for read).  Example: address 0xF7 is accessed by
>>         using SPI register address 0x77. For write access, the byte 0x77 is
>>         transferred, for read access, the byte 0xF7 is transferred.
>>
>> The write operation used by regmap_init_spi() doesn't replace the RW bit.
>> So we need custom regmap_bus like below.
>
> Aha! OK I added your bus implementation and will add your Signed-off to
> the patch as well, OK?

OK

> It would be great if you could also test the result.

I've tested v2 patches with fixing undefined symbols error, missing
NULL entry in of_device_id, and missing MODULE_LICENSE in bmp280.ko.

The SPI interface for BMP280 works fine as well as I2C interface.

Tested-by: Akinobu Mita <akinobu.mita@xxxxxxxxx>
--
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