From: Hans de Goede <hansg@kernel.org>
To: Wolfram Sang <wsa+renesas@sang-engineering.com>
Cc: Israel Cepeda <israel.a.cepeda.lopez@intel.com>,
Sakari Ailus <sakari.ailus@linux.intel.com>,
Wolfram Sang <wsa@kernel.org>, Andi Shyti <andi.shyti@kernel.org>,
Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
Bartosz Golaszewski <brgl@bgdev.pl>,
Linus Walleij <linus.walleij@linaro.org>,
Richard Hughes <rhughes@redhat.com>,
linux-i2c@vger.kernel.org, linux-usb@vger.kernel.org,
linux-gpio@vger.kernel.org
Subject: Re: [PATCH v4 3/3] i2c: Add Intel USBIO I2C driver
Date: Thu, 11 Sep 2025 13:48:42 +0200 [thread overview]
Message-ID: <4e2f79bc-2827-4db9-bb2b-4a330cd14f2d@kernel.org> (raw)
In-Reply-To: <aMHznOCa_9vtW6_1@shikoro>
Hi Wolfram,
Thank you for the review.
On 10-Sep-25 11:54 PM, Wolfram Sang wrote:
> Hi Hans,
>
>> +out_log:
>> + dev_dbg(adap->dev.parent, "RD[%d]:%*phN\n", msg->len, msg->len, msg->buf);
>
> I think this...
>
>> +
>> + return 0;
>> +}
>> +
>> +static int usbio_i2c_write(struct i2c_adapter *adap, struct i2c_msg *msg)
>> +{
>> + struct usbio_i2c *i2c = i2c_get_adapdata(adap);
>> + u16 txchunk = i2c->txbuf_len - I2C_RW_OVERHEAD;
>> + struct usbio_i2c_rw *wbuf = i2c->rwbuf;
>> + int ret;
>> +
>> + dev_dbg(adap->dev.parent, "WR[%d]:%*phN\n", msg->len, msg->len, msg->buf);
>
> ... and this dbg can go. The tracepoints we have should do?
Ack, I've dropped both for the upcoming v5.
>> +static u32 usbio_i2c_func(struct i2c_adapter *adap)
>> +{
>> + return I2C_FUNC_I2C | I2C_FUNC_10BIT_ADDR | I2C_FUNC_SMBUS_EMUL;
>> +}
>
> How did you test 10 bit addresses? I have never seen them in the wild?
I did not test 10 bit addresses. This was there in the original code
from Intel.
> Did you also check SMBUS_QUICK? 'i2cdetect' uses it by default.
I just tested this and this indeed does not work, when doing
a 0 byte write then waiting for the chip to respond times-out and
further i2c transfers after that also fail until the chip is
power-cycled.
> Does the underlying USBIO driver use usb_control_msg? If so, we need to
> disable zero length read messages. See [1] for a reference.
No it uses bulk messages.
Still based on the no support for writing 0 byte messages, I've tried
a 0 byte read, since the 0 byte write was not liked much and doing
i2ctransfer ... r0@0x10 results in the same problem.
So I'll add I2C_AQ_NO_ZERO_LEN to the quirks.
Regards,
Hans
next prev parent reply other threads:[~2025-09-11 11:48 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-09-10 13:39 [PATCH v4 0/3] usb/gpio/i2c: Add Intel USBIO USB IO-expander drivers Hans de Goede
2025-09-10 13:39 ` [PATCH v4 1/3] usb: misc: Add Intel USBIO bridge driver Hans de Goede
2025-09-10 13:39 ` [PATCH v4 2/3] gpio: Add Intel USBIO GPIO driver Hans de Goede
2025-09-10 21:41 ` Linus Walleij
2025-09-11 10:44 ` Hans de Goede
2025-09-10 13:39 ` [PATCH v4 3/3] i2c: Add Intel USBIO I2C driver Hans de Goede
2025-09-10 21:54 ` Wolfram Sang
2025-09-11 11:48 ` Hans de Goede [this message]
2025-09-11 14:43 ` Wolfram Sang
2025-09-11 18:12 ` Hans de Goede
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=4e2f79bc-2827-4db9-bb2b-4a330cd14f2d@kernel.org \
--to=hansg@kernel.org \
--cc=andi.shyti@kernel.org \
--cc=brgl@bgdev.pl \
--cc=gregkh@linuxfoundation.org \
--cc=israel.a.cepeda.lopez@intel.com \
--cc=linus.walleij@linaro.org \
--cc=linux-gpio@vger.kernel.org \
--cc=linux-i2c@vger.kernel.org \
--cc=linux-usb@vger.kernel.org \
--cc=rhughes@redhat.com \
--cc=sakari.ailus@linux.intel.com \
--cc=wsa+renesas@sang-engineering.com \
--cc=wsa@kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.