linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Guenter Roeck <groeck@google.com>
To: Lee Jones <lee.jones@linaro.org>
Cc: Raul E Rangel <rrangel@chromium.org>,
	Enric Balletbo i Serra <enric.balletbo@collabora.com>,
	Wolfram Sang <wsa@the-dreams.de>,
	Akshu.Agrawal@amd.com, Guenter Roeck <groeck@chromium.org>,
	Chanwoo Choi <cw00.choi@samsung.com>,
	linux-kernel <linux-kernel@vger.kernel.org>,
	Alexandre Belloni <alexandre.belloni@bootlin.com>,
	linux-i2c@vger.kernel.org, Benson Leung <bleung@chromium.org>
Subject: Re: [PATCH 4/4] platform/chrome: i2c: i2c-cros-ec-tunnel: Convert i2c tunnel to MFD Cell
Date: Fri, 22 Nov 2019 02:42:53 -0800	[thread overview]
Message-ID: <CABXOdTf7Oo-qPSnC040Tgxhn3mCogKo=WCsxo_Kj+C+f9DOCyw@mail.gmail.com> (raw)
In-Reply-To: <20191122080319.GC3296@dell>

On Fri, Nov 22, 2019 at 12:03 AM Lee Jones <lee.jones@linaro.org> wrote:
>
> On Thu, 21 Nov 2019, Guenter Roeck wrote:
>
> > On Thu, Nov 21, 2019 at 1:11 PM Raul E Rangel <rrangel@chromium.org> wrote:
> > >
> > > If the i2c-cros-ec-tunnel driver is compiled into the kernel, it is
> > > possible that i2c-cros-ec-tunnel could be probed before cros_ec_XXX
> > > has finished initializing and setting the drvdata. This would cause a
> > > NULL pointer panic.
> > >
> > > Converting this driver over to an MFD solves the problem and aligns with
> > > where the cros_ec is going.
> > >
> >
> > I thought the mfd maintainer objects to the use of the mfd API outside
> > drivers/mfd. Did that change recently ?
>
> It hasn't changed, although I don't see that here?
>
Sorry, I was confused.

Guenter

> > > Signed-off-by: Raul E Rangel <rrangel@chromium.org>
> > > ---
> > > You can now see the device node lives under the mfd device.
> > >
> > > $ find /sys/bus/platform/devices/cros-ec-dev.0.auto/cros-ec-i2c-tunnel.12.auto/ -iname firmware_node -exec ls -l '{}' \;
> > > /sys/bus/platform/devices/cros-ec-dev.0.auto/cros-ec-i2c-tunnel.12.auto/firmware_node -> ../../../../../../LNXSYSTM:00/LNXSYBUS:00/PNP0A08:00/device:1c/PNP0C09:00/GOOG0004:00/GOOG0012:00
> > > /sys/bus/platform/devices/cros-ec-dev.0.auto/cros-ec-i2c-tunnel.12.auto/i2c-9/firmware_node -> ../../../../../../../LNXSYSTM:00/LNXSYBUS:00/PNP0A08:00/device:1c/PNP0C09:00/GOOG0004:00/GOOG0012:00
> > > /sys/bus/platform/devices/cros-ec-dev.0.auto/cros-ec-i2c-tunnel.12.auto/i2c-9/i2c-10EC5682:00/firmware_node -> ../../../../../../../../LNXSYSTM:00/LNXSYBUS:00/PNP0A08:00/device:1c/PNP0C09:00/GOOG0004:00/GOOG0012:00/10EC5682:00
> > >
> > >  drivers/i2c/busses/i2c-cros-ec-tunnel.c | 36 +++++++++----------------
> > >  drivers/mfd/cros_ec_dev.c               | 19 +++++++++++++
> > >  2 files changed, 32 insertions(+), 23 deletions(-)
>
> --
> Lee Jones [李琼斯]
> Linaro Services Technical Lead
> Linaro.org │ Open source software for ARM SoCs
> Follow Linaro: Facebook | Twitter | Blog

  reply	other threads:[~2019-11-22 11:22 UTC|newest]

Thread overview: 20+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-11-21 21:10 [PATCH 0/4] Convert cros-ec-i2c-tunnel to MFD Cell Raul E Rangel
2019-11-21 21:10 ` [PATCH 1/4] i2c: i2c-cros-ec-tunnel: Pass ACPI node to i2c adapter Raul E Rangel
2019-11-25 16:06   ` Enric Balletbo i Serra
2019-11-25 18:05     ` Raul Rangel
2020-01-31  7:48   ` Wolfram Sang
2019-11-21 21:10 ` [PATCH 2/4] i2c: i2c-cros-ec-tunnel: Fix ACPI identifier Raul E Rangel
2019-11-25 16:23   ` Enric Balletbo i Serra
2019-11-25 18:12     ` Raul Rangel
2020-01-31  7:48   ` Wolfram Sang
2019-11-21 21:10 ` [PATCH 3/4] platform/chrome: cros_ec: Pass firmware node to MFD device Raul E Rangel
2019-11-25 16:30   ` Enric Balletbo i Serra
2019-11-21 21:10 ` [PATCH 4/4] platform/chrome: i2c: i2c-cros-ec-tunnel: Convert i2c tunnel to MFD Cell Raul E Rangel
2019-11-21 21:40   ` Guenter Roeck
2019-11-21 21:49     ` Raul Rangel
2019-11-22  8:03     ` Lee Jones
2019-11-22 10:42       ` Guenter Roeck [this message]
2019-11-25 16:51   ` Enric Balletbo i Serra
2019-11-25 19:38     ` Raul Rangel
2019-12-09 13:17   ` Lee Jones
2019-12-09 14:41     ` Enric Balletbo i Serra

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='CABXOdTf7Oo-qPSnC040Tgxhn3mCogKo=WCsxo_Kj+C+f9DOCyw@mail.gmail.com' \
    --to=groeck@google.com \
    --cc=Akshu.Agrawal@amd.com \
    --cc=alexandre.belloni@bootlin.com \
    --cc=bleung@chromium.org \
    --cc=cw00.choi@samsung.com \
    --cc=enric.balletbo@collabora.com \
    --cc=groeck@chromium.org \
    --cc=lee.jones@linaro.org \
    --cc=linux-i2c@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=rrangel@chromium.org \
    --cc=wsa@the-dreams.de \
    /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;
as well as URLs for NNTP newsgroup(s).