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] [thread-next>] [day] [month] [year] [list]
Date:   Wed, 15 Feb 2017 11:24:25 +0000
From:   Charles Keepax <ckeepax@...nsource.wolfsonmicro.com>
To:     Baoyou Xie <baoyou.xie@...aro.org>
CC:     <jun.nie@...aro.org>, <lgirdwood@...il.com>, <broonie@...nel.org>,
        <robh+dt@...nel.org>, <mark.rutland@....com>, <perex@...ex.cz>,
        <tiwai@...e.com>, <lars@...afoo.de>, <arnd@...db.de>,
        <kuninori.morimoto.gx@...esas.com>, <bardliao@...ltek.com>,
        <nh6z@...z.net>, <Paul.Handrigan@...rus.com>,
        <oder_chiou@...ltek.com>, <axel.lin@...ics.com>, <petr@...ix.com>,
        <yesanishhere@...il.com>, <srinivas.kandagatla@...aro.org>,
        <linux-arm-kernel@...ts.infradead.org>,
        <alsa-devel@...a-project.org>, <devicetree@...r.kernel.org>,
        <linux-kernel@...r.kernel.org>, <shawnguo@...nel.org>,
        <xie.baoyou@....com.cn>, <chen.chaokai@....com.cn>,
        <wang.qiang01@....com.cn>
Subject: Re: [PATCH v1 3/3] ASoC: zx-96p22: add zte's aud96p22 controller
 driver

On Wed, Feb 15, 2017 at 06:55:10PM +0800, Baoyou Xie wrote:
> This patch adds aud96p22 controller driver for zte's SoC family.
> 
> Signed-off-by: Baoyou Xie <baoyou.xie@...aro.org>
> ---
<snip>
> +static int zx_aud96p22_i2c_write(struct i2c_client *i2c_client,
> +				 const void *data, size_t count)
> +{
> +	int xfer;
> +
> +	xfer = i2c_master_send(i2c_client, data, count);
> +	if (xfer == count)
> +		return 0;
> +	else if (xfer < 0)
> +		return xfer;
> +	else
> +		return -EIO;
> +}
> +
> +static int zx_aud96p22_i2c_read(struct i2c_client *i2c_client,
> +				unsigned char addr)
> +{
> +	int xfer;
> +
> +	xfer = i2c_smbus_read_word_data(i2c_client, addr);
> +	if (xfer < 0)
> +		dev_warn(&i2c_client->dev, "transfer error %d\n", xfer);
> +
> +	return xfer;
> +}
> +

Is there any reason this isn't using regmap? It looks like it
should be, have a look at any of the other mainline CODECs for an
example.

Thanks,
Charles

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ