linux-staging.lists.linux.dev archive mirror
 help / color / mirror / Atom feed
From: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
To: Axel Lin <axel.lin@ingics.com>
Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
	linuxarm@huawei.com, mauro.chehab@huawei.com,
	Lee Jones <lee.jones@linaro.org>, Arnd Bergmann <arnd@arndb.de>,
	Liam Girdwood <lgirdwood@gmail.com>,
	Mark Brown <broonie@kernel.org>,
	LKML <linux-kernel@vger.kernel.org>,
	linux-staging@lists.linux.dev
Subject: Re: [PATCH v10 2/5] regulator: hi6421v600-regulator: fix platform drvdata
Date: Tue, 29 Jun 2021 13:09:57 +0200	[thread overview]
Message-ID: <20210629130957.484f5c43@coco.lan> (raw)
In-Reply-To: <CAFRkauCzHqUfva+zTRhOyiMMb4WsKPHvYJuqpOPwy+siPMZGOQ@mail.gmail.com>

Em Tue, 29 Jun 2021 18:48:31 +0800
Axel Lin <axel.lin@ingics.com> escreveu:

> Mauro Carvalho Chehab <mchehab+huawei@kernel.org> 於 2021年6月29日 週二 下午6:31寫道:
> 
> > platform drvdata can't be used inside the regulator driver,
> > as this is already used by the MFD and SPMI drivers.
> >  
> 
> Could you point out which part of the code set the platform drvdata?
> My understanding is the mfd only set dev->platform_data rather than
> dev->driver_data.
> If you mean the dev_set_drvdata() call in hi6421_spmi_pmic_probe, it's the
> parent device of the regulator pdev.

It needs to be double-checked, but I guess the SPMI or the SPMI controller
driver already uses it.

See, there are 5 drivers involved, all of them using private data
and passing data to child drivers, called on the order below:

	spmi
	hisi-spmi-controller
	hi6421-spmi-pmic
	mfd drivers:
		hi6421v600-irq
		hi6421-regulator

If you're in doubt, try to apply this series, and then change the
driver again to use platform data. You'll see that it will stop
booting after initializing the first regulator.

Thanks,
Mauro

  parent reply	other threads:[~2021-06-29 11:10 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-06-29 10:31 [PATCH v10 0/5] Move Hisilicon 6421v600 SPMI and USB drivers out of staging Mauro Carvalho Chehab
2021-06-29 10:31 ` [PATCH v10 1/5] staging: hikey9xx: split hi6421v600 irq into a separate driver Mauro Carvalho Chehab
2021-06-29 10:31 ` [PATCH v10 2/5] regulator: hi6421v600-regulator: fix platform drvdata Mauro Carvalho Chehab
     [not found]   ` <CAFRkauCzHqUfva+zTRhOyiMMb4WsKPHvYJuqpOPwy+siPMZGOQ@mail.gmail.com>
2021-06-29 11:09     ` Mauro Carvalho Chehab [this message]
     [not found]       ` <CAFRkauCPKQyD_Dooqrxvra94RyLXrPDeCSSdfBfvh-o0Zh8q3g@mail.gmail.com>
2021-06-29 13:32         ` Mauro Carvalho Chehab
2021-06-29 15:11   ` Mark Brown
2021-06-29 19:31     ` Mauro Carvalho Chehab
2021-06-30  8:20     ` Mauro Carvalho Chehab
2021-06-29 10:31 ` [PATCH v10 3/5] mfd: hi6421-spmi-pmic: move driver from staging Mauro Carvalho Chehab
2021-07-01 14:02   ` Rob Herring
2021-06-29 10:43 ` [PATCH v10 0/5] Move Hisilicon 6421v600 SPMI and USB drivers out of staging Greg Kroah-Hartman
2021-06-30  8:28   ` Mauro Carvalho Chehab

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=20210629130957.484f5c43@coco.lan \
    --to=mchehab+huawei@kernel.org \
    --cc=arnd@arndb.de \
    --cc=axel.lin@ingics.com \
    --cc=broonie@kernel.org \
    --cc=gregkh@linuxfoundation.org \
    --cc=lee.jones@linaro.org \
    --cc=lgirdwood@gmail.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-staging@lists.linux.dev \
    --cc=linuxarm@huawei.com \
    --cc=mauro.chehab@huawei.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;
as well as URLs for NNTP newsgroup(s).