Re: [PATCH 4/4] regulator: Convert tps65023 to use regmap API

From: Mark Brown
Date: Fri Jul 15 2011 - 09:10:43 EST


On Fri, Jul 15, 2011 at 02:58:48PM +0200, Jean Delvare wrote:
> On Fri, 15 Jul 2011 21:16:50 +0900, Mark Brown wrote:

> > regmap API. As far as I can tell this isn't really a big deal except
> > for those device classes like hwmon which are frequently deployed in
> > PCs, anything else just won't care.

> Mostly correct. There are a few other devices which can also be found
> on PCs: multiplexers and EEPROMs at least.

I did say "device classes like" for a reason :)

> > This should be reasonably simple to handle in the regmap API, just teach
> > the I2C module to fall back to using the SMBus operations if the
> > controller is limited to that. This should be done incrementally as it
> > adds complexity, and ideally would be done by someone with some access
> > to hardware that can use the SMBus API (I don't have any myself) so they
> > can test.

> You do have access ;) The i2c core will translate SMBus to I2C as
> needed, so all you have to do is temporarily alter the regmap core to
> unconditionally translate to SMBus. This will be inefficient (regmap ->
> SMBus -> I2C) but should be suitable for testing.

I have access to host controllers obviously, what I don't have is access
to any client devices with suitable register maps.

> > > > static int tps_65023_set_bits(struct tps_pmic *tps, u8 reg, u8 mask)
> > > > {
> > > > - int err, data;

> > *Please* could people delete unneeded context from mails?

> ? There were more comments from me in the rest of the code, which is
> why I left it.

You should delete all the text that isn't directly related to your
comments, you appeared to have not deleted any content at all from the
mail. There were pages and pages of stuff with no comments at all.

This really helpful both for finding the content (it's really easy to
just page past stuff) and for those of us who read mail on mobile
devices.
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/