Lines Matching full:regmap

17 #include <linux/regmap.h>
31 static int rt711_index_write(struct regmap *regmap, in rt711_index_write() argument
37 ret = regmap_write(regmap, addr, value); in rt711_index_write()
45 static int rt711_index_read(struct regmap *regmap, in rt711_index_read() argument
52 ret = regmap_read(regmap, addr, value); in rt711_index_read()
60 static int rt711_index_update_bits(struct regmap *regmap, unsigned int nid, in rt711_index_update_bits() argument
66 ret = rt711_index_read(regmap, nid, reg, &orig); in rt711_index_update_bits()
73 return rt711_index_write(regmap, nid, reg, tmp); in rt711_index_update_bits()
76 static void rt711_reset(struct regmap *regmap) in rt711_reset() argument
78 regmap_write(regmap, RT711_FUNC_RESET, 0); in rt711_reset()
79 rt711_index_update_bits(regmap, RT711_VENDOR_REG, in rt711_reset()
88 struct regmap *regmap = rt711->regmap; in rt711_calibration() local
92 regmap_write(rt711->regmap, in rt711_calibration()
95 dev = regmap_get_device(regmap); in rt711_calibration()
98 rt711_index_update_bits(regmap, RT711_VENDOR_REG, RT711_FSM_CTL, in rt711_calibration()
102 rt711_index_update_bits(regmap, RT711_VENDOR_CALI, in rt711_calibration()
107 rt711_index_read(regmap, RT711_VENDOR_CALI, in rt711_calibration()
120 rt711_index_read(regmap, RT711_VENDOR_CALI, in rt711_calibration()
125 rt711_index_update_bits(regmap, RT711_VENDOR_REG, in rt711_calibration()
128 regmap_write(rt711->regmap, in rt711_calibration()
141 ret = rt711_index_read(rt711->regmap, RT711_VENDOR_REG, in rt711_button_detect()
145 ret = rt711_index_read(rt711->regmap, RT711_VENDOR_REG, in rt711_button_detect()
189 ret = rt711_index_read(rt711->regmap, RT711_VENDOR_REG, in rt711_headset_detect()
199 ret = rt711_index_read(rt711->regmap, RT711_VENDOR_REG, in rt711_headset_detect()
205 ret = regmap_read(rt711->regmap, reg, &jack_status); in rt711_headset_detect()
256 ret = regmap_read(rt711->regmap, reg, &jack_status); in rt711_jack_detect_handler()
313 ret = regmap_read(rt711->regmap, reg, &jack_status); in rt711_btn_check_handler()
328 ret = rt711_index_read(rt711->regmap, RT711_VENDOR_REG, in rt711_btn_check_handler()
368 regmap_write(rt711->regmap, in rt711_jack_init()
373 regmap_write(rt711->regmap, in rt711_jack_init()
375 regmap_write(rt711->regmap, in rt711_jack_init()
377 regmap_write(rt711->regmap, in rt711_jack_init()
379 rt711_index_write(rt711->regmap, RT711_VENDOR_REG, in rt711_jack_init()
381 rt711_index_write(rt711->regmap, RT711_VENDOR_REG, in rt711_jack_init()
389 rt711_index_update_bits(rt711->regmap, RT711_VENDOR_REG, in rt711_jack_init()
394 rt711_index_update_bits(rt711->regmap, RT711_VENDOR_REG, in rt711_jack_init()
400 rt711_index_update_bits(rt711->regmap, RT711_VENDOR_REG, in rt711_jack_init()
405 rt711_index_update_bits(rt711->regmap, RT711_VENDOR_REG, in rt711_jack_init()
411 rt711_index_update_bits(rt711->regmap, RT711_VENDOR_REG, in rt711_jack_init()
414 rt711_index_update_bits(rt711->regmap, RT711_VENDOR_REG, in rt711_jack_init()
419 rt711_index_update_bits(rt711->regmap, RT711_VENDOR_REG, in rt711_jack_init()
424 rt711_index_update_bits(rt711->regmap, RT711_VENDOR_REG, in rt711_jack_init()
439 regmap_write(rt711->regmap, in rt711_jack_init()
441 regmap_write(rt711->regmap, in rt711_jack_init()
443 regmap_write(rt711->regmap, in rt711_jack_init()
451 regmap_write(rt711->regmap, in rt711_jack_init()
490 regmap_read(rt711->regmap, addr_l, r_val); in rt711_get_gain()
495 regmap_read(rt711->regmap, addr_h, l_val); in rt711_get_gain()
543 regmap_write(rt711->regmap, in rt711_set_amp_gain_put()
569 regmap_write(rt711->regmap, in rt711_set_amp_gain_put()
571 regmap_write(rt711->regmap, in rt711_set_amp_gain_put()
576 regmap_write(rt711->regmap, in rt711_set_amp_gain_put()
581 regmap_write(rt711->regmap, in rt711_set_amp_gain_put()
597 regmap_write(rt711->regmap, in rt711_set_amp_gain_put()
696 ret = regmap_read(rt711->regmap, reg, &val); in rt711_mux_get()
735 ret = regmap_read(rt711->regmap, reg, &val2); in rt711_mux_put()
749 regmap_write(rt711->regmap, reg, val); in rt711_mux_put()
790 regmap_write(rt711->regmap, in rt711_dac_surround_event()
794 regmap_write(rt711->regmap, in rt711_dac_surround_event()
799 regmap_write(rt711->regmap, in rt711_dac_surround_event()
803 regmap_write(rt711->regmap, in rt711_dac_surround_event()
819 regmap_write(rt711->regmap, in rt711_adc_09_event()
823 regmap_write(rt711->regmap, in rt711_adc_09_event()
839 regmap_write(rt711->regmap, in rt711_adc_08_event()
843 regmap_write(rt711->regmap, in rt711_adc_08_event()
906 regmap_write(rt711->regmap, in rt711_set_bias_level()
914 regmap_write(rt711->regmap, in rt711_set_bias_level()
1078 regmap_write(rt711->regmap, RT711_DAC_FORMAT_H, val); in rt711_pcm_hw_params()
1079 regmap_write(rt711->regmap, RT711_ADC1_FORMAT_H, val); in rt711_pcm_hw_params()
1080 regmap_write(rt711->regmap, RT711_ADC2_FORMAT_H, val); in rt711_pcm_hw_params()
1183 regmap_write(rt711->regmap, 0xe0, value); in rt711_clock_config()
1184 regmap_write(rt711->regmap, 0xf0, value); in rt711_clock_config()
1199 int rt711_init(struct device *dev, struct regmap *sdw_regmap, in rt711_init()
1200 struct regmap *regmap, struct sdw_slave *slave) in rt711_init() argument
1212 rt711->regmap = regmap; in rt711_init()
1251 regcache_cache_only(rt711->regmap, false); in rt711_io_init()
1252 regcache_cache_bypass(rt711->regmap, true); in rt711_io_init()
1274 rt711_reset(rt711->regmap); in rt711_io_init()
1277 regmap_write(rt711->regmap, RT711_SET_AUDIO_POWER_STATE, AC_PWRST_D0); in rt711_io_init()
1280 regmap_write(rt711->regmap, RT711_SET_PIN_MIC2, 0x25); in rt711_io_init()
1281 regmap_write(rt711->regmap, RT711_SET_PIN_HP, 0xc0); in rt711_io_init()
1282 regmap_write(rt711->regmap, RT711_SET_PIN_DMIC1, 0x20); in rt711_io_init()
1283 regmap_write(rt711->regmap, RT711_SET_PIN_DMIC2, 0x20); in rt711_io_init()
1284 regmap_write(rt711->regmap, RT711_SET_PIN_LINE1, 0x20); in rt711_io_init()
1285 regmap_write(rt711->regmap, RT711_SET_PIN_LINE2, 0x20); in rt711_io_init()
1288 regmap_write(rt711->regmap, RT711_SET_GAIN_HP_H, 0xa080); in rt711_io_init()
1289 regmap_write(rt711->regmap, RT711_SET_GAIN_HP_H, 0x9080); in rt711_io_init()
1290 regmap_write(rt711->regmap, RT711_SET_GAIN_ADC2_H, 0x6080); in rt711_io_init()
1291 regmap_write(rt711->regmap, RT711_SET_GAIN_ADC2_H, 0x5080); in rt711_io_init()
1292 regmap_write(rt711->regmap, RT711_SET_GAIN_ADC1_H, 0x6080); in rt711_io_init()
1293 regmap_write(rt711->regmap, RT711_SET_GAIN_ADC1_H, 0x5080); in rt711_io_init()
1296 regmap_write(rt711->regmap, 0x4f12, 0x91); in rt711_io_init()
1297 regmap_write(rt711->regmap, 0x4e12, 0xd6); in rt711_io_init()
1298 regmap_write(rt711->regmap, 0x4d12, 0x11); in rt711_io_init()
1299 regmap_write(rt711->regmap, 0x4c12, 0x20); in rt711_io_init()
1300 regmap_write(rt711->regmap, 0x4f13, 0x91); in rt711_io_init()
1301 regmap_write(rt711->regmap, 0x4e13, 0xd6); in rt711_io_init()
1302 regmap_write(rt711->regmap, 0x4d13, 0x11); in rt711_io_init()
1303 regmap_write(rt711->regmap, 0x4c13, 0x21); in rt711_io_init()
1304 regmap_write(rt711->regmap, 0x4c21, 0xf0); in rt711_io_init()
1305 regmap_write(rt711->regmap, 0x4d21, 0x11); in rt711_io_init()
1306 regmap_write(rt711->regmap, 0x4e21, 0x11); in rt711_io_init()
1307 regmap_write(rt711->regmap, 0x4f21, 0x01); in rt711_io_init()
1310 rt711_index_write(rt711->regmap, RT711_VENDOR_REG, in rt711_io_init()
1314 rt711_index_write(rt711->regmap, RT711_VENDOR_REG, in rt711_io_init()
1316 rt711_index_write(rt711->regmap, RT711_VENDOR_REG, in rt711_io_init()
1318 rt711_index_write(rt711->regmap, RT711_VENDOR_REG, in rt711_io_init()
1320 rt711_index_write(rt711->regmap, RT711_VENDOR_REG, in rt711_io_init()
1324 regmap_write(rt711->regmap, RT711_SET_AUDIO_POWER_STATE, AC_PWRST_D3); in rt711_io_init()
1339 regcache_cache_bypass(rt711->regmap, false); in rt711_io_init()
1340 regcache_mark_dirty(rt711->regmap); in rt711_io_init()