RE: [PATCH v1] asm-generic: introduce be56 unaligned accessors

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

 



...
> I'm using block read in order to get multiple registers at a time
> (around 76 bytes) and to increase the efficiency of the transfer over
> I2C. Being a block read there are different registers length involved
> from 16 up to 56 bits long and I need to unpack.

You could do an unaligned 64bit BE read and then shift the value right 8 bits
(and only advance the pointer 7 bytes).
Safe because you can guarantee a spare byte at the end of the data.

On x86-64 you could do that for all sizes!

	David

-
Registered Address Lakeside, Bramley Road, Mount Farm, Milton Keynes, MK1 1PT, UK
Registration No: 1397386 (Wales)




[Index of Archives]     [Linux Kernel]     [Kernel Newbies]     [x86 Platform Driver]     [Netdev]     [Linux Wireless]     [Netfilter]     [Bugtraq]     [Linux Filesystems]     [Yosemite Discussion]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Samba]     [Device Mapper]

  Powered by Linux