[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <CZM1LPDLQXLP.VVOVCCQPGBOL@gimli.ms.mff.cuni.cz>
Date: Tue, 05 Mar 2024 19:53:52 +0100
From: "Karel Balej" <karelb@...li.ms.mff.cuni.cz>
To: "Lee Jones" <lee@...nel.org>
Cc: "Rob Herring" <robh+dt@...nel.org>, "Krzysztof Kozlowski"
<krzysztof.kozlowski+dt@...aro.org>, "Conor Dooley" <conor+dt@...nel.org>,
"Dmitry Torokhov" <dmitry.torokhov@...il.com>, "Liam Girdwood"
<lgirdwood@...il.com>, "Mark Brown" <broonie@...nel.org>,
<devicetree@...r.kernel.org>, <linux-kernel@...r.kernel.org>,
<linux-input@...r.kernel.org>, Duje Mihanović
<duje.mihanovic@...le.hr>, <~postmarketos/upstreaming@...ts.sr.ht>,
<phone-devel@...r.kernel.org>
Subject: Re: [RFC PATCH v3 2/5] mfd: add driver for Marvell 88PM886 PMIC
Lee Jones, 2024-03-05T11:44:18+00:00:
> > +static struct mfd_cell pm886_devs[] = {
> > + {
> > + .name = "88pm886-onkey",
> > + .num_resources = ARRAY_SIZE(pm886_onkey_resources),
> > + .resources = pm886_onkey_resources,
> > + },
> > + {
> > + .name = "88pm886-regulator",
> > + .id = PM886_REGULATOR_ID_LDO2,
>
> Why doesn't PLATFORM_DEVID_AUTO work for this device?
Because I am using the IDs in the regulator driver to determine which
regulator data to use/which regulator to register.
> > +static int pm886_initialize_subregmaps(struct pm886_chip *chip)
> > +{
> > + struct device *dev = &chip->client->dev;
> > + struct i2c_client *page;
> > + struct regmap *regmap;
> > + int err;
> > +
> > + /* regulators page */
> > + page = devm_i2c_new_dummy_device(dev, chip->client->adapter,
> > + chip->client->addr + PM886_PAGE_OFFSET_REGULATORS);
> > + if (IS_ERR(page)) {
> > + err = PTR_ERR(page);
> > + dev_err(dev, "Failed to initialize regulators client: %d\n", err);
> > + return err;
> > + }
> > + regmap = devm_regmap_init_i2c(page, &pm886_i2c_regmap);
> > + if (IS_ERR(regmap)) {
> > + err = PTR_ERR(regmap);
> > + dev_err(dev, "Failed to initialize regulators regmap: %d\n", err);
> > + return err;
> > + }
> > + chip->regmaps[PM886_REGMAP_REGULATORS] = regmap;
>
> Except for the regulator driver, where else is the regulators regmap used?
Nowhere, at least as of now. So you are saying that I should initialize
the regmap in the regulator driver?
Thank you,
K. B.
Powered by blists - more mailing lists