[alsa-devel] [PATCH] ASoC: rt5677: Use specific r/w function for DSP mode

Mark Brown broonie at kernel.org
Tue Oct 28 23:29:15 CET 2014


On Mon, Oct 27, 2014 at 10:52:31AM +0800, Oder Chiou wrote:

> +	/* Write register */
> +	r[0] = reg & 0xff;
> +	xfer[0].addr = client->addr;
> +	xfer[0].flags = 0;
> +	xfer[0].len = 1;
> +	xfer[0].buf = &r[0];
> +
> +	/* Read data */
> +	xfer[1].addr = client->addr;
> +	xfer[1].flags = I2C_M_RD;
> +	xfer[1].len = 2;
> +	xfer[1].buf = data;
> +
> +	ret = i2c_transfer(client->adapter, xfer, 2);
> +	if (ret != 2) {
> +		dev_err(&client->dev, "i2c_transfer() returned %d\n", ret);
> +		return -EIO;
> +	}

This looks like standard regmap stuff - what's different?
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 473 bytes
Desc: Digital signature
URL: <http://mailman.alsa-project.org/pipermail/alsa-devel/attachments/20141028/d52b5574/attachment.sig>


More information about the Alsa-devel mailing list