Rockchip RK3188 I2C driver

Mark Brown broonie at kernel.org
Tue Apr 15 11:50:25 PDT 2014


On Tue, Apr 15, 2014 at 08:39:24PM +0200, Heiko Stübner wrote:

> The register has 32 bit. The upper 16 bit [31:16] are a write enable mask, so 
> to change bit x, you also have to set (x+16) to 1.

Perhaps I'm missing something about why this is helpful but it does seem
like the hardware designers have good drugs here.

> To cite the relevant bits 31:16:
> 	bit0~bit15 write enable
> 	When bit 16=1, bit 0 can be written by software .
> 	When bit 16=0, bit 0 cannot be written by software;
> 	When bit 17=1, bit 1 can be written by software .
> 	When bit 17=0, bit 1 cannot be written by software;
> 	...

> And these "write enable" bits are reset to 0 after the write, so if you write 
> 0x30001 you will get something like 0x1 on the next read, without the mask.

For non-volatile registers this should work fine if the write enable
bits are just latched on at probe time, we'll never actually look at the
what the hardware reads back once things are in cache.  For ones that
are volatile we'll need to teach the framework about it...  a write
enable mask setting that we splat into the value perhaps?
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 836 bytes
Desc: Digital signature
URL: <http://lists.infradead.org/pipermail/linux-arm-kernel/attachments/20140415/57db1d0a/attachment.sig>


More information about the linux-arm-kernel mailing list