From: Hans de Goede <hdegoede@redhat.com>
To: Mark Brown <broonie@kernel.org>
Cc: "Rafael J . Wysocki" <rjw@rjwysocki.net>,
Mark Gross <markgross@kernel.org>,
Andy Shevchenko <andy@infradead.org>,
Daniel Scally <djrscally@gmail.com>,
Laurent Pinchart <laurent.pinchart@ideasonboard.com>,
Mauro Carvalho Chehab <mchehab@kernel.org>,
Liam Girdwood <lgirdwood@gmail.com>,
Michael Turquette <mturquette@baylibre.com>,
Stephen Boyd <sboyd@kernel.org>, Len Brown <lenb@kernel.org>,
linux-acpi@vger.kernel.org, platform-driver-x86@vger.kernel.org,
linux-kernel@vger.kernel.org,
Sakari Ailus <sakari.ailus@linux.intel.com>,
Kate Hsuan <hpa@redhat.com>,
linux-media@vger.kernel.org, linux-clk@vger.kernel.org
Subject: Re: [PATCH 05/12] regulator: Introduce tps68470-regulator driver
Date: Fri, 15 Oct 2021 22:14:30 +0200 [thread overview]
Message-ID: <1805d16e-87ab-c291-6a73-adabf41344ca@redhat.com> (raw)
In-Reply-To: <YWndpGgBtLEAEaNj@sirena.org.uk>
Hi,
On 10/15/21 9:59 PM, Mark Brown wrote:
> On Fri, Oct 15, 2021 at 09:48:24PM +0200, Hans de Goede wrote:
>> On 10/15/21 9:40 PM, Mark Brown wrote:
>
>>> I can't see how the quirking gets propagated through into the driver and
>>> I'd really expect that in a situation like this the platform data would
>>> be passed through as platform data from the code doing the quirks,
>
>> That is exactly what is happening here. The platform_data in this
>> case is just an array of regulator_init_data pointers (one per
>> regulator in the PMIC):
>
> No, it's not. What normally happens is that whatever registers the
> device will when registering the device supply platform data that the
> device later picks up from the struct device during probe. What you're
> saying is that the idea here is that driver unconditionally declares
> platform data and then other code scribbles over that before the driver
> instantiates. This is cleaner in that it keeps the platform
> configuration together and safer since the device can't exist before
> it's configuration is provided.
Right, this is the standard device-tree model. Unfortunately the
information about which supplies are needed and the constraints
for those supplies is missing from the ACPI description for the
devices which we are dealing with here.
Daniel Scally tried to solve this by allowing specifying this
in software-firmware-nodes. Which you nacked because those need
separate parsing code in the regulator core.
During that discussion you said that instead we should sinmply
directly pass the regulator_init_data, rather then first
encoding this in device-properties in a swnode and then
decoding those again in the regulator core.
And passing the regulator_init_data is exactly what we are doing
now; and now again this is not what we should be doing ?
Also note that the current solution is exactly what I suggested
we should do during the discussion with Daniel and I even provided
example code and you said absolutely nothing about this!
>> So we have the code doing the quirks determining the regulator_init_data
>> and passing this through platform_data, which AFAICT is exactly what
>> you want?
>
> No. There should be no sign of the platform data getting allocated or
> initialised in the driver consuming the platform data. It should purely
> be reading the data it gets passed by the platform initialisation code.
>
> Please make the use of platform data look like normal platform data use
> rather than going and inventing some new scheme.
I'm sorry but I no longer have any clue what it is what you want us to do /
how you want us to solve this.
AFAIK what the current code is doing is exactly what you requested during
the discussion with Daniel.
If this is not to your looking please provide some pseudo code explaining
how you want us to solve this problem instead of the current solution.
And please keep in mind that we *cannot* change the ACPI firmware interfaces
and that whether we like it or not things simply work different in the ACPI
world.
Frankly I'm quit unhappy, angry even about how you are blocking progress
here. You don't like APCI we get it, can we get over that now please?
So far all you seem to be doing is shooting down solutions, then first
being quiet about suggested alternative solutions and then once the
alternative solutions are implemented shoot them down again...
And all that without adding anything constructive. All you have
told us is how things should not be done (according to you).
So fine everything we come up is wrong, please tell us how we should
solve this instead then!
Regards,
Hans
next prev parent reply other threads:[~2021-10-15 20:14 UTC|newest]
Thread overview: 29+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-10-08 16:21 [PATCH 00/12] Add support for X86/ACPI camera sensor/PMIC setup with clk and regulator platform data Hans de Goede
2021-10-08 16:21 ` [PATCH 01/12] ACPI: Add has_unmet_acpi_deps() helper function Hans de Goede
2021-10-08 16:21 ` [PATCH 02/12] media: i2c: ov8865: Add an has_unmet_acpi_deps() check Hans de Goede
2021-10-08 18:41 ` Laurent Pinchart
2021-10-08 18:48 ` Hans de Goede
2021-10-08 18:58 ` Laurent Pinchart
2021-10-09 15:31 ` Hans de Goede
2021-10-08 16:21 ` [PATCH 03/12] media: i2c: ov5693: " Hans de Goede
2021-10-08 16:21 ` [PATCH 04/12] platform_data: Add linux/platform_data/tps68470.h file Hans de Goede
2021-10-08 16:21 ` [PATCH 05/12] regulator: Introduce tps68470-regulator driver Hans de Goede
2021-10-11 10:42 ` Mark Brown
2021-10-11 11:43 ` Hans de Goede
2021-10-15 16:46 ` Mark Brown
2021-10-15 18:50 ` Hans de Goede
2021-10-15 18:58 ` Mark Brown
2021-10-15 19:27 ` Hans de Goede
2021-10-15 19:40 ` Mark Brown
2021-10-15 19:48 ` Hans de Goede
2021-10-15 19:59 ` Mark Brown
2021-10-15 20:14 ` Hans de Goede [this message]
2021-10-15 22:29 ` Mark Brown
2021-10-16 10:18 ` Hans de Goede
2021-10-08 16:21 ` [PATCH 06/12] clk: Introduce clk-tps68470 driver Hans de Goede
2021-10-08 16:21 ` [PATCH 07/12] platform/x86: int3472: Enable I2c daisy chain Hans de Goede
2021-10-08 16:21 ` [PATCH 08/12] platform/x86: int3472: Split into 2 drivers Hans de Goede
2021-10-08 16:21 ` [PATCH 09/12] platform/x86: int3472: Add get_sensor_adev_and_name() helper Hans de Goede
2021-10-08 16:21 ` [PATCH 10/12] platform/x86: int3472: Pass tps68470_clk_platform_data to the tps68470-regulator MFD-cell Hans de Goede
2021-10-08 16:21 ` [PATCH 11/12] platform/x86: int3472: Pass tps68470_regulator_platform_data " Hans de Goede
2021-10-08 16:21 ` [PATCH 12/12] platform/x86: int3472: Call acpi_dev_clear_dependencies() on successful probe 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=1805d16e-87ab-c291-6a73-adabf41344ca@redhat.com \
--to=hdegoede@redhat.com \
--cc=andy@infradead.org \
--cc=broonie@kernel.org \
--cc=djrscally@gmail.com \
--cc=hpa@redhat.com \
--cc=laurent.pinchart@ideasonboard.com \
--cc=lenb@kernel.org \
--cc=lgirdwood@gmail.com \
--cc=linux-acpi@vger.kernel.org \
--cc=linux-clk@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-media@vger.kernel.org \
--cc=markgross@kernel.org \
--cc=mchehab@kernel.org \
--cc=mturquette@baylibre.com \
--cc=platform-driver-x86@vger.kernel.org \
--cc=rjw@rjwysocki.net \
--cc=sakari.ailus@linux.intel.com \
--cc=sboyd@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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox