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

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

 



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?

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

Yours,
Linus Walleij
--
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