Re: [PATCH 3/3] mfd: Add I2C control support for S5M8751

From: Mark Brown
Date: Thu Jun 23 2011 - 06:35:12 EST


On Thu, Jun 23, 2011 at 11:21:10AM +0900, Sangbeom Kim wrote:
> On Thu, Jun 23, 2011 at 10:29 AM +0900, Mark Brown wrote:

> > In that case you should definitely take a look at the regmap API I've
> > been posting. It factors all the device I/O stuff out so you should be
> > able to just tell it that you have a device with n bit registers and n
> > bit values and it'll provide all the I/O functions you need. I just
> > reposted it today, though it needs another round for some SPI stuff.

> OK, After reviewing your patch, I will apply it.

Note that it's not actually in mainline yet, it's still being reviewed.

> > > > > + *val = (uint8_t)ret;

> > > > Why is this case required?

> > > I want pass the read value by val

> > Sorry, typo - why is this *cast* required?

> Just want to make same type.

Usually unless there's a reason to do a cast it's better to let the
compiler figure things out as a cast can stop the toolchain identifying
real issues for you.
--
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/