All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Ying-Chun Liu (PaulLiu)" <paul.liu@linaro.org>
To: ashish.jangam@kpitcummins.com
Cc: Mark Brown <broonie@opensource.wolfsonmicro.com>,
	Dajun <dajun.chen@diasemi.com>,
	sameo@openedhand.com, linaro-dev@lists.linaro.org,
	linux-kernel@vger.kernel.org, arnd@arndb.de
Subject: Re: [PATCH 01/11] MFD: DA9052/53 MFD core module v6
Date: Wed, 12 Oct 2011 13:07:08 +0800	[thread overview]
Message-ID: <4E95207C.90302@linaro.org> (raw)
In-Reply-To: <1316435562.344.131.camel@L-0761.kpit.com>

(2011年09月19日 20:32), ashishj3 wrote:
> --- /dev/null
> +++ b/drivers/mfd/da9052-i2c.c
> @@ -0,0 +1,142 @@
> +/*
> + * I2C access for DA9052 PMICs.
> + *
> + * Copyright(c) 2011 Dialog Semiconductor Ltd.
> + *
> + * Author: David Dajun Chen <dchen@diasemi.com>
> + *
> + * This program is free software; you can redistribute it and/or modify
> + * it under the terms of the GNU General Public License as published by
> + * the Free Software Foundation; either version 2 of the License, or
> + * (at your option) any later version.
> + *
> + */
> +
> +#include <linux/device.h>
> +#include <linux/input.h>
> +#include <linux/mfd/core.h>
> +#include <linux/i2c.h>
> +#include <linux/err.h>
> +
> +#include <linux/mfd/da9052/da9052.h>
> +#include <linux/mfd/da9052/reg.h>
> +
> +static int da9052_i2c_enable_multiwrite(struct da9052 *da9052)
> +{
> +	int reg_val, ret;
> +
> +	ret = regmap_read(da9052->regmap, DA9052_CONTROL_B_REG, &reg_val);
> +	if (ret < 0)
> +		return ret;
> +
> +	if (reg_val & DA9052_CONTROL_B_WRITEMODE) {
> +		reg_val = ~DA9052_CONTROL_B_WRITEMODE;

Hi Ashish,

I think you should use reg_val &= ~DA9052_CONTROL_B_WRITEMODE; instead
of just "=".

Regards,
Paul

  reply	other threads:[~2011-10-12  5:07 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-09-19 12:32 [PATCH 01/11] MFD: DA9052/53 MFD core module v6 ashishj3
2011-10-12  5:07 ` Ying-Chun Liu (PaulLiu) [this message]
  -- strict thread matches above, loose matches on Subject: below --
2011-09-19 12:33 ashishj3
2011-09-26  9:12 ` Eric Miao
2011-09-29 15:55   ` Samuel Ortiz
2011-09-26  9:56 ` 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=4E95207C.90302@linaro.org \
    --to=paul.liu@linaro.org \
    --cc=arnd@arndb.de \
    --cc=ashish.jangam@kpitcummins.com \
    --cc=broonie@opensource.wolfsonmicro.com \
    --cc=dajun.chen@diasemi.com \
    --cc=linaro-dev@lists.linaro.org \
    --cc=linux-kernel@vger.kernel.org \
    --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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.