lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Date:	Wed, 12 Oct 2011 13:07:08 +0800
From:	"Ying-Chun Liu (PaulLiu)" <paul.liu@...aro.org>
To:	ashish.jangam@...tcummins.com
CC:	Mark Brown <broonie@...nsource.wolfsonmicro.com>,
	Dajun <dajun.chen@...semi.com>, sameo@...nedhand.com,
	linaro-dev@...ts.linaro.org, linux-kernel@...r.kernel.org,
	arnd@...db.de
Subject: Re: [PATCH 01/11] MFD: DA9052/53 MFD core module v6

(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@...semi.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
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ