Re: [PATCH V1 1/2] mfd: tps65910: use regmap for device registeraccess.

From: Laxman Dewangan
Date: Thu Feb 09 2012 - 07:10:46 EST


On Thursday 09 February 2012 05:33 PM, Mark Brown wrote:
* PGP Signed by an unknown key

On Thu, Feb 09, 2012 at 05:29:38PM +0530, Laxman Dewangan wrote:

I am working on mfd/tps65910.c and function is:
static int tps65910_i2c_write(struct tps65910 *tps65910, u8 reg,
int bytes, void *src)
All your feedback will help me to improve my next two mfd/pmic
drivers which I am planning to upstream...
Yeah, I know that's the i2c_write() function but all the callers I
noticed were calling it with bytes set to 1.

Yes, currently all callers are calling with 1 byte but when we will add rtc (which is not there currently), at that time, it may call multibyte read/write.
The interface is such that it can support multi-byte transfer. And when using for single byte transfer (currently) and if it is cached, regmap_raw_write() is creating warnings and that's why I broken transfer in multi-transfer in tps65910.c which was not a good idea..


* Unknown Key
* 0x6E30FDDD

--
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/