static int ak4535_write(struct snd_soc_codec *codec, unsigned int reg, unsigned int value) { u8 data[2]; data[0] = reg & 0xff; data[1] = value & 0xff; ak4535_write_reg_cache(codec, reg, value); if (codec->hw_write(codec->control_data, data, 2) == 2) return 0; else return -EIO; }
/* * write to the AK4535 register space */ static int ak4535_write(struct snd_soc_codec *codec, unsigned int reg, unsigned int value) { u8 data[2]; /* data is * D15..D8 AK4535 register offset * D7...D0 register data */ data[0] = reg & 0xff; data[1] = value & 0xff; ak4535_write_reg_cache(codec, reg, value); if (codec->hw_write(codec->control_data, data, 2) == 2) return 0; else return -EIO; }