From: Andi Shyti <andi.shyti@kernel.org>
To: Ramiro Oliveira <ramiro.oliveira@advantech.com>
Cc: Lee Jones <lee@kernel.org>, Linus Walleij <linusw@kernel.org>,
Bartosz Golaszewski <brgl@kernel.org>,
Guenter Roeck <linux@roeck-us.net>,
Daniel Thompson <danielt@kernel.org>,
Jingoo Han <jingoohan1@gmail.com>, Helge Deller <deller@gmx.de>,
Wim Van Sebroeck <wim@linux-watchdog.org>,
"Rafael J. Wysocki" <rafael@kernel.org>,
Daniel Lezcano <daniel.lezcano@kernel.org>,
Zhang Rui <rui.zhang@intel.com>,
Lukasz Luba <lukasz.luba@arm.com>,
linux-kernel@vger.kernel.org, mfd@lists.linux.dev,
linux-gpio@vger.kernel.org, linux-hwmon@vger.kernel.org,
linux-i2c@vger.kernel.org, dri-devel@lists.freedesktop.org,
linux-fbdev@vger.kernel.org, linux-watchdog@vger.kernel.org,
linux-pm@vger.kernel.org,
Wenkai Chung <wenkai.chung@advantech.com.tw>,
Francisco Aragon-Trivino
<francisco.aragon-trivino@advantech.com>,
Hongzhi Wang <hongzhi.wang@advantech.com>,
Mikhail Tsukerman <mikhail.tsukerman@advantech.com>,
Thomas Kastner <thomas.kastner@advantech.com>
Subject: Re: [PATCH v2 4/8] Add Advantech EIO I2C driver
Date: Sun, 26 Jul 2026 22:41:20 +0200 [thread overview]
Message-ID: <amZsX1SEjK0irSRv@zenone.zhora.eu> (raw)
In-Reply-To: <20260714-upstream-v2-v2-4-76e5e41026db@advantech.com>
Hi Ramiro,
I had a fast look and I'm limiting to few comments this round.
On Tue, Jul 14, 2026 at 05:54:18PM +0200, Ramiro Oliveira wrote:
> This commit adds the driver to control the Advantech EIO I2C block, this
> block is included in the Advantech EIO MFD.
Can you please read the SubmittingPatches documentation for
properly formatting the commit log? Please ask if you have
questions.
...
> +static inline int eio_reg_set_bits(const struct eio_i2c_chan *chan,
> + unsigned int reg, unsigned int mask)
> +{
> + return regmap_update_bits(chan->parent->regmap, reg, mask, mask);
> +}
> +
> +static inline int eio_reg_clear_bits(const struct eio_i2c_chan *chan,
> + unsigned int reg, unsigned int mask)
> +{
> + return regmap_update_bits(chan->parent->regmap, reg, mask, 0);
should the two regmap_update_bits above use chan->base + reg?
> +}
...
> +static int smb_access(struct eio_i2c_chan *i2c_chan, u8 addr, bool is_read, u8 cmd,
> + int size, union i2c_smbus_data *data)
> +{
> + int i, tmp, ret = 0;
> + unsigned int st1, st2;
> + int len = 0;
...
> + for (i = 1; i <= len; i++)
> + eio_reg_read(i2c_chan, SMB_REG_HBLOCK,
> + (unsigned int *)&data->block[i]);
mmmhhhh... how many bytes are you sending to eio_reg_read()
starting from &data_block[i]?
> + break;
...
> +static int eio_i2c_probe(struct platform_device *pdev)
> +{
> + static const char * const names[] = { "i2c0", "i2c1", "smb0", "smb1" };
> + struct device *dev = &pdev->dev;
> + struct eio_i2c_dev *eio_i2c;
> + struct eio_dev *eio_dev = dev_get_drvdata(dev->parent);
> + int ret = 0;
> + enum eio_chan_id ch;
> +
> + if (!eio_dev) {
> + dev_err(dev, "Error contact eio_core\n");
please use dev_err_probe()
Andi
> + return -ENODEV;
> + }
next prev parent reply other threads:[~2026-07-26 20:41 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-07-14 15:54 [PATCH v2 0/8] Add support for Advantech EIO MFD series devices Ramiro Oliveira
2026-07-14 15:54 ` [PATCH v2 1/8] Add Advantech EIO driver Ramiro Oliveira
2026-07-14 15:54 ` [PATCH v2 2/8] Add Advantech EIO GPIO driver Ramiro Oliveira
2026-07-15 12:24 ` Bartosz Golaszewski
2026-07-24 21:31 ` Linus Walleij
2026-07-14 15:54 ` [PATCH v2 3/8] Add Advantech EIO Hardware Monitor driver Ramiro Oliveira
2026-07-16 0:29 ` Guenter Roeck
2026-07-16 8:10 ` Ramiro Manuel Silva Oliveira
2026-07-16 11:36 ` Guenter Roeck
2026-07-14 15:54 ` [PATCH v2 4/8] Add Advantech EIO I2C driver Ramiro Oliveira
2026-07-26 20:41 ` Andi Shyti [this message]
2026-07-14 15:54 ` [PATCH v2 5/8] Add Advantech EIO Backlight driver Ramiro Oliveira
2026-07-14 15:54 ` [PATCH v2 6/8] Add Advantech EIO Watchdog driver Ramiro Oliveira
2026-07-14 15:54 ` [PATCH v2 7/8] Add Advantech EIO Thermal driver Ramiro Oliveira
2026-07-14 15:54 ` [PATCH v2 8/8] Add Advantech EIO Fan driver Ramiro Oliveira
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=amZsX1SEjK0irSRv@zenone.zhora.eu \
--to=andi.shyti@kernel.org \
--cc=brgl@kernel.org \
--cc=daniel.lezcano@kernel.org \
--cc=danielt@kernel.org \
--cc=deller@gmx.de \
--cc=dri-devel@lists.freedesktop.org \
--cc=francisco.aragon-trivino@advantech.com \
--cc=hongzhi.wang@advantech.com \
--cc=jingoohan1@gmail.com \
--cc=lee@kernel.org \
--cc=linusw@kernel.org \
--cc=linux-fbdev@vger.kernel.org \
--cc=linux-gpio@vger.kernel.org \
--cc=linux-hwmon@vger.kernel.org \
--cc=linux-i2c@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-pm@vger.kernel.org \
--cc=linux-watchdog@vger.kernel.org \
--cc=linux@roeck-us.net \
--cc=lukasz.luba@arm.com \
--cc=mfd@lists.linux.dev \
--cc=mikhail.tsukerman@advantech.com \
--cc=rafael@kernel.org \
--cc=ramiro.oliveira@advantech.com \
--cc=rui.zhang@intel.com \
--cc=thomas.kastner@advantech.com \
--cc=wenkai.chung@advantech.com.tw \
--cc=wim@linux-watchdog.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox