From: Mark Brown <broonie@opensource.wolfsonmicro.com>
To: "AnilKumar, Chimata" <anilkumar@ti.com>
Cc: "axel.lin@gmail.com" <axel.lin@gmail.com>,
"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
"Girdwood, Liam" <lrg@ti.com>, "Nori, Sekhar" <nsekhar@ti.com>
Subject: Re: [PATCH RFT] regulator: tps65217: Convert to regulator_[is_enabled|get_voltage_sel]_regmap
Date: Mon, 18 Jun 2012 13:45:14 +0100 [thread overview]
Message-ID: <20120618124513.GM3974@opensource.wolfsonmicro.com> (raw)
In-Reply-To: <331ABD5ECB02734CA317220B2BBEABC13E9D84D9@DBDE01.ent.ti.com>
[-- Attachment #1: Type: text/plain, Size: 790 bytes --]
On Mon, Jun 18, 2012 at 12:39:38PM +0000, AnilKumar, Chimata wrote:
> + if (config->regmap)
> + rdev->regmap = config->regmap;
> + else
> + rdev->regmap = dev_get_regmap(dev->parent, NULL);
No, this would be broken. We're specifically using the device we got
passed in. In this case the fact that the regmap is on the MFD means
that the driver does need to explicitly set the regmap. Or we should
have this be a multi-stage series of checks:
if (config->regmap)
rdev->regmap = config->regmap;
else if (dev_get_regmap(dev, NULL))
rdev->regmap = dev_get_regmap(dev, NULL);
else if (dev->parent)
rdev->regmap = dev_get_regmap(dev->parent, NULL);
which should cover the MFD case if there's no regmap on the child
without having to go through all the drivers doing it by hand.
[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 836 bytes --]
next prev parent reply other threads:[~2012-06-18 12:45 UTC|newest]
Thread overview: 19+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-06-13 3:27 [PATCH RFT] regulator: tps65217: Convert to regulator_[is_enabled|get_voltage_sel]_regmap Axel Lin
2012-06-13 9:09 ` AnilKumar, Chimata
2012-06-13 17:58 ` Mark Brown
2012-06-18 11:48 ` AnilKumar, Chimata
2012-06-18 11:55 ` Axel Lin
2012-06-18 12:01 ` Mark Brown
2012-06-18 12:05 ` AnilKumar, Chimata
2012-06-18 12:06 ` Axel Lin
2012-06-18 12:14 ` AnilKumar, Chimata
2012-06-18 12:39 ` AnilKumar, Chimata
2012-06-18 12:45 ` Mark Brown [this message]
2012-06-18 12:56 ` AnilKumar, Chimata
2012-06-18 13:09 ` Mark Brown
2012-09-07 14:19 ` AnilKumar, Chimata
2012-09-07 14:21 ` Mark Brown
2012-09-07 14:26 ` AnilKumar, Chimata
2012-09-07 14:30 ` Mark Brown
2012-09-07 14:38 ` AnilKumar, Chimata
2012-06-18 13:13 ` AnilKumar, Chimata
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=20120618124513.GM3974@opensource.wolfsonmicro.com \
--to=broonie@opensource.wolfsonmicro.com \
--cc=anilkumar@ti.com \
--cc=axel.lin@gmail.com \
--cc=linux-kernel@vger.kernel.org \
--cc=lrg@ti.com \
--cc=nsekhar@ti.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