/* "implement" : set bits in a little endian bit stream. Same concepts as "extract" (see comments above). The data mangled in the bit stream remains in little endian order the whole time. It make more sense to talk about endianness of register values by considering a register a "cached" copy of the little endiad bit stream.  */
static __inline__ void implement(__u8 *report, unsigned offset, unsigned n, __u32 value)
/* "implement" : set bits in a little endian bit stream. Same concepts as "extract" (see comments above). The data mangled in the bit stream remains in little endian order the whole time. It make more sense to talk about endianness of register values by considering a register a "cached" copy of the little endiad bit stream.  */
static __inline__ void implement(__u8 *report, unsigned offset, unsigned n, __u32 value)
{
	u64 x;
	u64 m = (1ULL << n) - 1;
	if (n > 32)
		printk(KERN_WARNING "HID: implement() called with n (%d) > 32! (%s)\n",
				n, current->comm);
	if (value > m)
		printk(KERN_WARNING "HID: implement() called with too large value %d! (%s)\n",
				value, current->comm);
	WARN_ON(value > m);
	value &= m;
	report += offset >> 3;
	offset &= 7;
	x = get_unaligned_le64(report);
	x &= ~(m << offset);
	x |= ((u64)value) << offset;
	put_unaligned_le64(x, report);
}