From: Jonathan Cameron <jic23@kernel.org>
To: Stepan Ionichev <sozdayvek@gmail.com>
Cc: salah.triki@gmail.com, dlechner@baylibre.com, nuno.sa@analog.com,
andy@kernel.org, linux-iio@vger.kernel.org,
linux-kernel@vger.kernel.org
Subject: Re: [PATCH v7] iio: humidity: ens210: Extend I2C functionality check
Date: Sun, 17 May 2026 12:44:24 +0100 [thread overview]
Message-ID: <20260517124424.2cb1961f@jic23-huawei> (raw)
In-Reply-To: <20260517073823.1280-1-sozdayvek@gmail.com>
On Sun, 17 May 2026 12:38:22 +0500
Stepan Ionichev <sozdayvek@gmail.com> wrote:
> On Fri, May 16, 2026, Jonathan Cameron wrote:
> > Sashiko pointed this out... Take a look at definition of I2C_FUNC_SMBUS_BYTE_DATA
> > and consider if the line above makes sense. Check for other instances of
> > this.
>
> grep across the driver shows what actually gets called:
>
> i2c_smbus_read_byte_data -> I2C_FUNC_SMBUS_READ_BYTE_DATA
> i2c_smbus_write_byte_data -> I2C_FUNC_SMBUS_WRITE_BYTE_DATA
> i2c_smbus_read_word_data -> I2C_FUNC_SMBUS_READ_WORD_DATA
> i2c_smbus_read_i2c_block_data -> I2C_FUNC_SMBUS_READ_I2C_BLOCK
>
> i2c_smbus_write_byte() (without _data) is not called anywhere in the
> driver, so the WRITE_BYTE flag in the current mask is dead. WORD_DATA
> asks for both read and write word data, but only the read side is used.
>
> Minimal correct mask:
>
> I2C_FUNC_SMBUS_BYTE_DATA | /* read + write byte data */
> I2C_FUNC_SMBUS_READ_WORD_DATA |
> I2C_FUNC_SMBUS_READ_I2C_BLOCK
Yes.
>
> Stepan
>
prev parent reply other threads:[~2026-05-17 11:44 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-05-14 8:41 [PATCH v7] iio: humidity: ens210: Extend I2C functionality check Salah Triki
2026-05-16 16:31 ` Jonathan Cameron
2026-05-17 7:38 ` Stepan Ionichev
2026-05-17 11:44 ` Jonathan Cameron [this message]
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=20260517124424.2cb1961f@jic23-huawei \
--to=jic23@kernel.org \
--cc=andy@kernel.org \
--cc=dlechner@baylibre.com \
--cc=linux-iio@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=nuno.sa@analog.com \
--cc=salah.triki@gmail.com \
--cc=sozdayvek@gmail.com \
/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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox