Linux Samsung SOC development
 help / color / mirror / Atom feed
From: Kukjin Kim <kgene.kim@samsung.com>
To: 'Kyungmin Park' <kyungmin.park@samsung.com>
Cc: 'Mark Brown' <broonie@opensource.wolfsonmicro.com>,
	'Liam Girdwood' <lrg@slimlogic.co.uk>,
	linux-samsung-soc@vger.kernel.org,
	'MyungJoo Ham' <myungjoo.ham@samsung.com>,
	myungjoo.ham@gmail.com, linux-arm-kernel@lists.infradead.org,
	'Changhwan Youn' <chaos.youn@samsung.com>
Subject: RE: [PATCH v2] MAX8952 PMIC Driver Initial Release
Date: Wed, 01 Sep 2010 19:27:11 +0900	[thread overview]
Message-ID: <001101cb49c0$3fd715c0$bf854140$%kim@samsung.com> (raw)
In-Reply-To: <AANLkTinUNXmDc=H16gS5EXEAdrGAU=zK4cjsHSh7UQ8Q@mail.gmail.com>

Kyungmin Park wrote:
> 
> On Wed, Sep 1, 2010 at 6:44 PM, Kukjin Kim <kgene.kim@samsung.com> wrote:
> > Mark Brown wrote:
> >>
> >> On Wed, Sep 01, 2010 at 09:15:36AM +0900, Kukjin Kim wrote:
> >>
> >> > Seems almost same between the operation of max8649 and max8952 except
> >> output
> >> > voltage range.
> >>
> >> > How do you think that can support max8952 with small modifying
max8649?
> >>
> >> Take a look at something like the WM831x drivers for how you can handle
> >> multiple devices with one driver - you can register I2C IDs for
multiple
> >> devices and then select behaviour based on the name that was quoted.
> >
> > MM...but I'm not sure if I can submit other patch for max8952...
> > Actually, Mr. Ham's max8952 code has been applied by Liam.
> >
> > Anyway, could you please see below patch?
> > Basic functions are tested on the board...
> >
> >
> > From: Changhwan Youn <chaos.youn@samsung.com>
> > ---
> > diff --git a/drivers/regulator/max8649.c b/drivers/regulator/max8649.c
> > index 4520ace..a13bf1d 100644
> > --- a/drivers/regulator/max8649.c
> > +++ b/drivers/regulator/max8649.c

(snip)

> > @@ -311,13 +323,13 @@ static int __devinit
max8649_regulator_probe(struct
> > i2c_client *client,
> >                break;
> >        }
> >
> > -       ret = max8649_reg_read(info->i2c, MAX8649_CHIP_ID1);
> > +       ret = max8649_reg_read(info->i2c, MAX8649_CHIP_ID2);
> Why do you read the ID2? original code read the ID1. With this change
> don't brake the max8649?

It's no problem, because it is used only in the following printout.

And the reason of changing is that the CHIP_ID1 value of max8649 and max
8952 is same by 0x20.
So cannot distinguish them. If change to CHIP_ID2, can separate them in the
printout.
(The CHIP_ID2 value of max 8649 is '0x0D', max8952 is '0x1A')

> >        if (ret < 0) {
> >                dev_err(info->dev, "Failed to detect ID of MAX8649:%d\n",
> >                        ret);
> >                goto out;
> >        }
> > -       dev_info(info->dev, "Detected MAX8649 (ID:%x)\n", ret);
> > +       dev_info(info->dev, "Detected %s (ID:%x)\n", id->name, ret);
> >
> >        /* enable VID0 & VID1 */
> >        max8649_set_bits(info->i2c, MAX8649_CONTROL, MAX8649_VID_MASK,
> 0);
> > @@ -354,7 +366,7 @@ static int __devinit max8649_regulator_probe(struct
> > i2c_client *client,
> >                goto out;
> >        }
> >
> > -       dev_info(info->dev, "Max8649 regulator device is detected.\n");
> > +       dev_info(info->dev, "%s regulator device is detected.\n",
id->name);
> >        return 0;
> >  out:
> >        kfree(info);
> > @@ -376,6 +388,7 @@ static int __devexit max8649_regulator_remove(struct
> > i2c_client *client)
> >
> >  static const struct i2c_device_id max8649_id[] = {
> >        { "max8649", 0 },
> > +       { "max8952", 0 },
> >        { }
> >  };
> >  MODULE_DEVICE_TABLE(i2c, max8649_id);
> > --
> > 1.6.2.5
> >
> >


Thanks.

Best regards,
Kgene.
--
Kukjin Kim <kgene.kim@samsung.com>, Senior Engineer,
SW Solution Development Team, Samsung Electronics Co., Ltd.

  reply	other threads:[~2010-09-01 10:27 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-08-20  5:43 [PATCH v2] MAX8952 PMIC Driver Initial Release MyungJoo Ham
2010-08-20  9:53 ` Mark Brown
2010-08-20 10:47   ` Liam Girdwood
2010-09-01  0:15     ` Kukjin Kim
2010-09-01  9:15       ` Mark Brown
2010-09-01  9:44         ` Kukjin Kim
2010-09-01  9:48           ` Mark Brown
2010-09-01 10:05             ` Kukjin Kim
2010-09-01 10:12           ` Kyungmin Park
2010-09-01 10:27             ` Kukjin Kim [this message]
2010-09-01 10:36               ` Kyungmin Park
2010-09-01 11:16                 ` 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='001101cb49c0$3fd715c0$bf854140$%kim@samsung.com' \
    --to=kgene.kim@samsung.com \
    --cc=broonie@opensource.wolfsonmicro.com \
    --cc=chaos.youn@samsung.com \
    --cc=kyungmin.park@samsung.com \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-samsung-soc@vger.kernel.org \
    --cc=lrg@slimlogic.co.uk \
    --cc=myungjoo.ham@gmail.com \
    --cc=myungjoo.ham@samsung.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