Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1581230

Re: [PATCH v1 3/3] ASoC: zx-96p22: add zte's aud96p22 controller driver

From Charles Keepax <ckeepax@opensource.wolfsonmicro.com>
Newsgroups linux.kernel
Subject Re: [PATCH v1 3/3] ASoC: zx-96p22: add zte's aud96p22 controller driver
Date 2017-02-15 12:30 +0100
Message-ID <tb5Wy-7HU-7@gated-at.bofh.it> (permalink)
References <tb5tv-7iH-9@gated-at.bofh.it> <tb5tv-7iH-7@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


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@linaro.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

Back to linux.kernel | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread


Thread

[PATCH v1 3/3] ASoC: zx-96p22: add zte's aud96p22 controller driver Baoyou Xie <baoyou.xie@linaro.org> - 2017-02-15 12:00 +0100
  Re: [PATCH v1 3/3] ASoC: zx-96p22: add zte's aud96p22 controller  driver Charles Keepax <ckeepax@opensource.wolfsonmicro.com> - 2017-02-15 12:30 +0100
  Re: [PATCH v1 3/3] ASoC: zx-96p22: add zte's aud96p22 controller  driver Shawn Guo <shawnguo@kernel.org> - 2017-02-16 12:20 +0100

csiph-web