On 30/03/2016 1:01 PM, Yong Li wrote:
Or another method is using the below to convert the u8 to u16: cpu_to_le16(get_unaligned((u16 *) val)), compared with the i2c_smbus_write_byte_data method, which one is better?
G'day Yong, I'd go with the cpu_to_le16(get_unaligned((u16 *) val)) -- Regards Phil Reid -- To unsubscribe from this list: send the line "unsubscribe linux-gpio" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html