mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: "Eric Miao" <eric.y.miao@gmail.com>
To: "Mike Rapoport" <mike@compulab.co.il>
Cc: LKML <linux-kernel@vger.kernel.org>,
	sameo@openedhand.com, "eric miao" <eric.miao@marvell.com>,
	cbou@mail.ru, "David Woodhouse" <dwmw2@infradead.org>,
	"Jonathan Cameron" <jic23@cam.ac.uk>
Subject: Re: [RFC PATCH 1/2] Add Dialog DA9030 battery charger driver
Date: Wed, 17 Dec 2008 16:49:16 +0800	[thread overview]
Message-ID: <f17812d70812170049y5df3ecd9y57122387075b8302@mail.gmail.com> (raw)
In-Reply-To: <4948B099.1080008@compulab.co.il>

On Wed, Dec 17, 2008 at 3:56 PM, Mike Rapoport <mike@compulab.co.il> wrote:
> This patch amends DA903x MFD driver with definitions and methods needed for
> battery charger driver.
>

Patch looks generally good, see some of my concerns below:

> Signed-off-by: Mike Rapoport <mike@compulab.co.il>
>
>  drivers/mfd/da903x.c       |   16 +++++++++++++++-
>  include/linux/mfd/da903x.h |   44 ++++++++++++++++++++++++++++++++++++++++++--
>  2 files changed, 57 insertions(+), 3 deletions(-)
>
> diff --git a/drivers/mfd/da903x.c b/drivers/mfd/da903x.c
> index 0b5bd85..2e04b44 100644
> --- a/drivers/mfd/da903x.c
> +++ b/drivers/mfd/da903x.c
> @@ -151,12 +151,24 @@ int da903x_write(struct device *dev, int reg, uint8_t val)
>  }
>  EXPORT_SYMBOL_GPL(da903x_write);
>
> +int da903x_writes(struct device *dev, int reg, int len, uint8_t *val)
> +{
> +       return __da903x_writes(to_i2c_client(dev), reg, len, val);
> +}
> +EXPORT_SYMBOL_GPL(da903x_writes);
> +
>  int da903x_read(struct device *dev, int reg, uint8_t *val)
>  {
>        return __da903x_read(to_i2c_client(dev), reg, val);
>  }
>  EXPORT_SYMBOL_GPL(da903x_read);
>
> +int da903x_reads(struct device *dev, int reg, int len, uint8_t *val)
> +{
> +       return __da903x_reads(to_i2c_client(dev), reg, len, val);
> +}
> +EXPORT_SYMBOL_GPL(da903x_reads);
> +
>  int da903x_set_bits(struct device *dev, int reg, uint8_t bit_mask)
>  {
>        struct da903x_chip *chip = dev_get_drvdata(dev);
> @@ -254,7 +266,7 @@ static int da9030_unmask_events(struct da903x_chip *chip, unsigned int events)
>  {
>        uint8_t v[3];
>
> -       chip->events_mask &= ~events;
> +       chip->events_mask |= events;
>

I wonder if this is true, it may also impact the da9030_mask_events(),
which is a pair.

>        v[0] = (chip->events_mask & 0xff);
>        v[1] = (chip->events_mask >> 8) & 0xff;
> @@ -391,6 +403,8 @@ static void da903x_irq_work(struct work_struct *work)
>                if (chip->ops->read_events(chip, &events))
>                        break;
>
> +/*             pr_info("%s: events=%x events_mask=%x\n", */
> +/*                     __func__, events, chip->events_mask); */

I'd prefer to remove this if it is annoying, sorry for this initial garbage
I sent.

>                events &= ~chip->events_mask;
>                if (events == 0)
>                        break;

  reply	other threads:[~2008-12-17  8:49 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-12-17  7:56 Mike Rapoport
2008-12-17  8:49 ` Eric Miao [this message]
2008-12-17  9:12   ` Mike Rapoport
2008-12-17  9:15     ` Eric Miao

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=f17812d70812170049y5df3ecd9y57122387075b8302@mail.gmail.com \
    --to=eric.y.miao@gmail.com \
    --cc=cbou@mail.ru \
    --cc=dwmw2@infradead.org \
    --cc=eric.miao@marvell.com \
    --cc=jic23@cam.ac.uk \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mike@compulab.co.il \
    --cc=sameo@openedhand.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

all inboxes | Powered by JetHome®