linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Sangbeom Kim <sbkim73@samsung.com>
To: "'Mark Brown'" <broonie@opensource.wolfsonmicro.com>
Cc: sameo@linux.intel.com, linux-kernel@vger.kernel.org
Subject: RE: [PATCH 3/3] mfd: Add I2C control support for S5M8751
Date: Thu, 23 Jun 2011 11:21:10 +0900	[thread overview]
Message-ID: <017301cc314c$37839eb0$a68adc10$@com> (raw)
In-Reply-To: <20110623012841.GF20949@opensource.wolfsonmicro.com>

On Thu, Jun 23, 2011 at 10:29 AM +0900, Mark Brown wrote:
 > > Thank for your comment,
> > We have a few PMIC (S5M8751, S5M8752 and others).
> > They have different features. And Each one will have separate core file.
> > But i2c interface is same.
> > So, I try to separate i2s code.
> > I would modify prefix like s5m87xx.
> 
> 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.

> > > > +static int s5m8751_i2c_read_device(struct s5m8751 *s5m8751, uint8_t
> > reg,
> > > > +					uint8_t *val)
> > > > +{
> > > > +	int ret;
> > > > +	ret = i2c_smbus_read_byte_data(s5m8751->i2c_client, reg);
> > > > +	if (ret < 0) {
> > > > +		dev_err(s5m8751->dev, "failed reading at 0x%02x\n",
> reg);
> > > > +		return ret;
> > > > +	}
> > > > +	*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.

Thanks,
SB Kim


  reply	other threads:[~2011-06-23  2:21 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-06-22  5:53 [PATCH 0/3] S5M8751 core driver Sangbeom Kim
2011-06-22  5:53 ` [PATCH 1/3] mfd: Add S5M8751 register definitions Sangbeom Kim
2011-06-22 12:42   ` Mark Brown
2011-06-22 23:59     ` Sangbeom Kim
2011-06-22  5:53 ` [PATCH 2/3] mfd: Add initial S5M8751 support Sangbeom Kim
2011-06-22 12:48   ` Mark Brown
2011-06-23  1:14     ` Sangbeom Kim
2011-07-04 14:07   ` Samuel Ortiz
2011-07-04 23:49     ` Sangbeom Kim
2011-06-22  5:53 ` [PATCH 3/3] mfd: Add I2C control support for S5M8751 Sangbeom Kim
2011-06-22  8:56   ` Maxin B John
2011-06-22 12:50   ` Mark Brown
2011-06-23  1:25     ` Sangbeom Kim
2011-06-23  1:28       ` Mark Brown
2011-06-23  2:21         ` Sangbeom Kim [this message]
2011-06-23 10:35           ` Mark Brown

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='017301cc314c$37839eb0$a68adc10$@com' \
    --to=sbkim73@samsung.com \
    --cc=broonie@opensource.wolfsonmicro.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=sameo@linux.intel.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;
as well as URLs for NNTP newsgroup(s).