From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-3.8 required=3.0 tests=BAYES_00, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS autolearn=no autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id A1F3BC433DB for ; Wed, 10 Feb 2021 02:53:42 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 74CAA64E05 for ; Wed, 10 Feb 2021 02:53:42 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233783AbhBJCxi (ORCPT ); Tue, 9 Feb 2021 21:53:38 -0500 Received: from vps0.lunn.ch ([185.16.172.187]:59320 "EHLO vps0.lunn.ch" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233779AbhBJCxg (ORCPT ); Tue, 9 Feb 2021 21:53:36 -0500 Received: from andrew by vps0.lunn.ch with local (Exim 4.94) (envelope-from ) id 1l9fcW-005Eb7-Sz; Wed, 10 Feb 2021 03:52:48 +0100 Date: Wed, 10 Feb 2021 03:52:48 +0100 From: Andrew Lunn To: Michal Simek Cc: linux-kernel@vger.kernel.org, monstr@monstr.eu, git@xilinx.com, linux-usb@vger.kernel.org, "Alexander A. Klimov" , Piyush Mehta , Masahiro Yamada , Al Cooper , Alan Stern , Bastien Nocera , Greg Kroah-Hartman , linux-arm-kernel@lists.infradead.org Subject: Re: [PATCH 2/2] usb: misc: usb5744: Add support for USB hub controller Message-ID: References: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: Precedence: bulk List-ID: X-Mailing-List: linux-usb@vger.kernel.org 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