lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <ZDPVYEHSI3ud27rN@ye-NUC7i7DNHE>
Date:   Mon, 10 Apr 2023 17:22:40 +0800
From:   "Ye, Xiang" <xiang.ye@...el.com>
To:     Andi Shyti <andi.shyti@...nel.org>
CC:     Greg Kroah-Hartman <gregkh@...uxfoundation.org>,
        Arnd Bergmann <arnd@...db.de>,
        Matthias Kaehlcke <mka@...omium.org>,
        Lee Jones <lee@...nel.org>, Wolfram Sang <wsa@...nel.org>,
        Tyrone Ting <kfting@...oton.com>,
        Mark Brown <broonie@...nel.org>,
        Linus Walleij <linus.walleij@...aro.org>,
        Bartosz Golaszewski <brgl@...ev.pl>,
        <linux-usb@...r.kernel.org>, <linux-i2c@...r.kernel.org>,
        <linux-kernel@...r.kernel.org>, <linux-spi@...r.kernel.org>,
        <linux-gpio@...r.kernel.org>, <srinivas.pandruvada@...el.com>,
        <heikki.krogerus@...ux.intel.com>,
        <andriy.shevchenko@...ux.intel.com>,
        <sakari.ailus@...ux.intel.com>, <zhifeng.wang@...el.com>,
        <wentong.wu@...el.com>, <lixu.zhang@...el.com>
Subject: Re: [PATCH v6 5/6] i2c: Add support for Intel LJCA USB I2C driver

Hi Andi,

Thanks for the review.
On Sun, Mar 26, 2023 at 05:38:46PM +0200, Andi Shyti wrote:
> Hi Ye,
> 
> looks good, just a few questions:
> 
> On Fri, Mar 24, 2023 at 01:21:12AM +0800, Ye Xiang wrote:
> > This patch implements the I2C function of Intel USB-I2C/GPIO/SPI adapter
> 
> also here, please keep using the imperative form.
Got it.
> 
> > device named "La Jolla Cove Adapter" (LJCA). It communicate with LJCA
> > I2c module with specific protocol through interfaces exported by LJCA USB
> > driver.
...
> > +static u8 ljca_i2c_format_slave_addr(u8 slave_addr, u8 type)
> > +{
> > +	return (slave_addr << 1) | (type == LJCA_I2C_READ_XFER_TYPE) ?
> > +		       LJCA_I2C_SLAVE_TRANSFER_READ :
> > +		       LJCA_I2C_SLAVE_TRANSFER_WRITE;
> > +}
> 
> How about:
> 
> 	return (slave_addr << 1) | !!type;
> 
> BTW, am I reading correctly that the address here is composed as:
> 
>    7     6     5     5     3     2     1    0
>  ADDR7 ADDR6 ADDR5 ADDR4 ADDR3 ADDR2 ADDR1 R/W
> 
> [...]
>
You are correct. Will adopt this solution on next version. 
> > +static u32 ljca_i2c_func(struct i2c_adapter *adap)
> > +{
> > +	return I2C_FUNC_I2C | I2C_FUNC_SMBUS_EMUL;
> 
> how is the smbus supported here?
The i2c-sub module of LJCA device is SMBUS compatible.
It's supported by LJCA device hardware itself.

Thanks
Ye Xiang


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ