/* em28xx_read_ac97() write a 16 bit value to the specified AC97 address (LSB first!)  */
int em28xx_read_ac97(struct em28xx *dev, u8 reg)
/* em28xx_read_ac97() write a 16 bit value to the specified AC97 address (LSB first!)  */
int em28xx_read_ac97(struct em28xx *dev, u8 reg)
{
	int ret;
	u8 addr = (reg & 0x7f) | 0x80;
	u16 val;
	ret = em28xx_is_ac97_ready(dev);
	if (ret < 0)
		return ret;
	ret = em28xx_write_regs(dev, EM28XX_R42_AC97ADDR, &addr, 1);
	if (ret < 0)
		return ret;
	ret = dev->em28xx_read_reg_req_len(dev, 0, EM28XX_R40_AC97LSB,
					   (u8 *)&val, sizeof(val));
	if (ret < 0)
		return ret;
	return le16_to_cpu(val);
}