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 2/3] mfd: Add initial S5M8751 support
Date: Thu, 23 Jun 2011 10:14:51 +0900 [thread overview]
Message-ID: <016d01cc3142$f3ed4ec0$dbc7ec40$@com> (raw)
In-Reply-To: <20110622124820.GD23666@sirena.org.uk>
On Wed, Jun 22, 2011 at 09:48 PM +0900, Mark Brown wrote:
> > The WM8994 is a advanced PMIC with AUdio DAC
> > Since it includes regulators, Battery charger, audio dac,
> > it is represented as a multi-function device,
> > though the functionality will be provided by the each driver.
>
> I think you may have cut'n'pasted bits of this changelog from somewhere
> else without doing all the updates you meant to :)
Sorry, These days I work with 2 board based on S5M8751 & WM8994.
I little confused 8751 with 8994. I will modify it in new patch.
> > + if (event1 & S5M8751_MASK_PWRKEY1B)
> > + s5m8751_irq_call_handler(s5m8751, S5M8751_IRQ_PWRKEY1B);
> > +
> > + if (event1 & S5M8751_MASK_PWRKEY2B)
> > + s5m8751_irq_call_handler(s5m8751, S5M8751_IRQ_PWRKEY2B);
> > +
> > + if (event1 & S5M8751_MASK_PWRKEY3)
> > + s5m8751_irq_call_handler(s5m8751, S5M8751_IRQ_PWRKEY3);
>
> This looks like the IRQ handler code doesn't need to understand the
> specific events, it can just loop over the registers and fire off
> interrupts based on the bit numbers.
>
> As I said for the first patch this should all be using genirq.
OK I will modify it.
>
> > +static irqreturn_t s5m8751_irq(int irq, void *data)
> > +{
> > + struct s5m8751 *s5m8751 = data;
> > +
> > + disable_irq_nosync(irq);
> > + schedule_work(&s5m8751->irq_work);
> > +
> > + return IRQ_HANDLED;
> > +}
>
> Use a threaded IRQ handler.
OK,
>
> > +int s5m8751_device_init(struct s5m8751 *s5m8751, int irq,
> > + struct s5m8751_platform_data *pdata)
> > +{
> > + int ret = -EINVAL;
> > + u8 chip_id;
> > +
> > + if (pdata->init) {
> > + ret = pdata->init(s5m8751);
> > + if (ret != 0) {
> > + dev_err(s5m8751->dev,
> > + "Platform init() failed: %d\n", ret);
> > + goto err;
> > + }
> > + }
> > +
> > + s5m8751_reg_read(s5m8751, S5M8751_CHIP_ID, &chip_id);
> > + if (!chip_id)
> > + dev_info(s5m8751->dev, "Found S5M8751 device\n");
> > + else {
> > + dev_info(s5m8751->dev, "Didn't Find S5M8751 device\n");
> > + ret = -EINVAL;
> > + goto err;
> > + }
>
> I'd really expect the init() callback to run after we've checked that
> we can talk to the device.
OK, I will check it.
Thanks and regards,
SB Kim
next prev parent reply other threads:[~2011-06-23 1:14 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 [this message]
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
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='016d01cc3142$f3ed4ec0$dbc7ec40$@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