lkml.org 
[lkml]   [2021]   [Feb]   [9]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH 2/2] usb: misc: usb5744: Add support for USB hub controller
On Tue, Feb 09, 2021 at 10:53:20AM +0100, Michal Simek wrote:
> +static int usb5744_i2c_probe(struct i2c_client *client,
> + const struct i2c_device_id *id)
> +{
> + struct device *dev = &client->dev;
> + int ret;
> +
> + /* Trigger gpio reset to the hub. */
> + ret = usb5744_init_hw(dev);
> + if (ret)
> + return ret;
> +
> + /* Send SMBus command to boot hub. */
> + ret = i2c_smbus_write_word_data(client, 0xAA, swab16(0x5600));

Hi Michal

This is not my area of the kernel. But that swab16() stood out, and
made me wonder about endianness. Will this work correctly on big and
little endian hosts?

Andrew

\
 
 \ /
  Last update: 2021-02-10 03:55    [W:0.132 / U:0.060 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site