[PATCH 6/6] thermal: Add Tegra SOCTHERM thermal management driver
Tuomas Tynkkynen
tuomas.tynkkynen at iki.fi
Tue Jul 1 16:47:58 PDT 2014
On 27/06/14 11:11, Mikko Perttunen wrote:
> + /* Sign extend from 6 bits to 32 bits */
> + shifted_cp = (s32)((val & 0x1f) | ((val & 0x20) ? 0xffffffe0 : 0x0));
> + val = ((val & (0x1f << 21)) >> 21);
> + /* Sign extend from 5 bits to 32 bits */
> + shifted_ft = (s32)((val & 0xf) | ((val & 0x10) ? 0xfffffff0 : 0x0));
There's sign_extend32 in bitops.h
More information about the linux-arm-kernel
mailing list