Lines Matching refs:reg
110 static bool wm8961_volatile(struct device *dev, unsigned int reg) in wm8961_volatile() argument
112 switch (reg) { in wm8961_volatile()
123 static bool wm8961_readable(struct device *dev, unsigned int reg) in wm8961_readable() argument
125 switch (reg) { in wm8961_readable()
508 u16 reg; in wm8961_hw_params() local
524 reg = snd_soc_component_read(component, WM8961_ADDITIONAL_CONTROL_3); in wm8961_hw_params()
525 reg &= ~WM8961_SAMPLE_RATE_MASK; in wm8961_hw_params()
526 reg |= wm8961_srate[best].val; in wm8961_hw_params()
527 snd_soc_component_write(component, WM8961_ADDITIONAL_CONTROL_3, reg); in wm8961_hw_params()
557 reg = snd_soc_component_read(component, WM8961_CLOCKING_4); in wm8961_hw_params()
558 reg &= ~WM8961_CLK_SYS_RATE_MASK; in wm8961_hw_params()
559 reg |= wm8961_clk_sys_ratio[i].val << WM8961_CLK_SYS_RATE_SHIFT; in wm8961_hw_params()
560 snd_soc_component_write(component, WM8961_CLOCKING_4, reg); in wm8961_hw_params()
562 reg = snd_soc_component_read(component, WM8961_AUDIO_INTERFACE_0); in wm8961_hw_params()
563 reg &= ~WM8961_WL_MASK; in wm8961_hw_params()
568 reg |= 1 << WM8961_WL_SHIFT; in wm8961_hw_params()
571 reg |= 2 << WM8961_WL_SHIFT; in wm8961_hw_params()
574 reg |= 3 << WM8961_WL_SHIFT; in wm8961_hw_params()
579 snd_soc_component_write(component, WM8961_AUDIO_INTERFACE_0, reg); in wm8961_hw_params()
582 reg = snd_soc_component_read(component, WM8961_ADC_DAC_CONTROL_2); in wm8961_hw_params()
584 reg |= WM8961_DACSLOPE; in wm8961_hw_params()
586 reg &= ~WM8961_DACSLOPE; in wm8961_hw_params()
587 snd_soc_component_write(component, WM8961_ADC_DAC_CONTROL_2, reg); in wm8961_hw_params()
598 u16 reg = snd_soc_component_read(component, WM8961_CLOCKING1); in wm8961_set_sysclk() local
607 reg |= WM8961_MCLKDIV; in wm8961_set_sysclk()
611 reg &= ~WM8961_MCLKDIV; in wm8961_set_sysclk()
614 snd_soc_component_write(component, WM8961_CLOCKING1, reg); in wm8961_set_sysclk()
691 u16 reg = snd_soc_component_read(component, WM8961_ADDITIONAL_CONTROL_2); in wm8961_set_tristate() local
694 reg |= WM8961_TRIS; in wm8961_set_tristate()
696 reg &= ~WM8961_TRIS; in wm8961_set_tristate()
698 return snd_soc_component_write(component, WM8961_ADDITIONAL_CONTROL_2, reg); in wm8961_set_tristate()
704 u16 reg = snd_soc_component_read(component, WM8961_ADC_DAC_CONTROL_1); in wm8961_mute() local
707 reg |= WM8961_DACMU; in wm8961_mute()
709 reg &= ~WM8961_DACMU; in wm8961_mute()
713 return snd_soc_component_write(component, WM8961_ADC_DAC_CONTROL_1, reg); in wm8961_mute()
719 u16 reg; in wm8961_set_clkdiv() local
723 reg = snd_soc_component_read(component, WM8961_CLOCKING2); in wm8961_set_clkdiv()
724 reg &= ~WM8961_BCLKDIV_MASK; in wm8961_set_clkdiv()
725 reg |= div; in wm8961_set_clkdiv()
726 snd_soc_component_write(component, WM8961_CLOCKING2, reg); in wm8961_set_clkdiv()
730 reg = snd_soc_component_read(component, WM8961_AUDIO_INTERFACE_2); in wm8961_set_clkdiv()
731 reg &= ~WM8961_LRCLK_RATE_MASK; in wm8961_set_clkdiv()
732 reg |= div; in wm8961_set_clkdiv()
733 snd_soc_component_write(component, WM8961_AUDIO_INTERFACE_2, reg); in wm8961_set_clkdiv()
746 u16 reg; in wm8961_set_bias_level() local
760 reg = snd_soc_component_read(component, WM8961_ANTI_POP); in wm8961_set_bias_level()
761 reg |= WM8961_BUFIOEN | WM8961_BUFDCOPEN; in wm8961_set_bias_level()
762 snd_soc_component_write(component, WM8961_ANTI_POP, reg); in wm8961_set_bias_level()
765 reg = snd_soc_component_read(component, WM8961_PWR_MGMT_1); in wm8961_set_bias_level()
766 reg &= ~WM8961_VMIDSEL_MASK; in wm8961_set_bias_level()
767 reg |= (1 << WM8961_VMIDSEL_SHIFT) | WM8961_VREF; in wm8961_set_bias_level()
768 snd_soc_component_write(component, WM8961_PWR_MGMT_1, reg); in wm8961_set_bias_level()
775 reg = snd_soc_component_read(component, WM8961_PWR_MGMT_1); in wm8961_set_bias_level()
776 reg &= ~WM8961_VREF; in wm8961_set_bias_level()
777 snd_soc_component_write(component, WM8961_PWR_MGMT_1, reg); in wm8961_set_bias_level()
780 reg = snd_soc_component_read(component, WM8961_ANTI_POP); in wm8961_set_bias_level()
781 reg &= ~(WM8961_BUFIOEN | WM8961_BUFDCOPEN); in wm8961_set_bias_level()
782 snd_soc_component_write(component, WM8961_ANTI_POP, reg); in wm8961_set_bias_level()
785 reg = snd_soc_component_read(component, WM8961_PWR_MGMT_1); in wm8961_set_bias_level()
786 reg &= ~WM8961_VMIDSEL_MASK; in wm8961_set_bias_level()
787 snd_soc_component_write(component, WM8961_PWR_MGMT_1, reg); in wm8961_set_bias_level()
834 u16 reg; in wm8961_probe() local
837 reg = snd_soc_component_read(component, WM8961_CHARGE_PUMP_B); in wm8961_probe()
838 reg |= WM8961_CP_DYN_PWR_MASK; in wm8961_probe()
839 snd_soc_component_write(component, WM8961_CHARGE_PUMP_B, reg); in wm8961_probe()
843 reg = snd_soc_component_read(component, WM8961_ROUT1_VOLUME); in wm8961_probe()
845 reg | WM8961_LO1ZC | WM8961_OUT1VU); in wm8961_probe()
846 snd_soc_component_write(component, WM8961_LOUT1_VOLUME, reg | WM8961_LO1ZC); in wm8961_probe()
847 reg = snd_soc_component_read(component, WM8961_ROUT2_VOLUME); in wm8961_probe()
849 reg | WM8961_SPKRZC | WM8961_SPKVU); in wm8961_probe()
850 snd_soc_component_write(component, WM8961_LOUT2_VOLUME, reg | WM8961_SPKLZC); in wm8961_probe()
852 reg = snd_soc_component_read(component, WM8961_RIGHT_ADC_VOLUME); in wm8961_probe()
853 snd_soc_component_write(component, WM8961_RIGHT_ADC_VOLUME, reg | WM8961_ADCVU); in wm8961_probe()
854 reg = snd_soc_component_read(component, WM8961_RIGHT_INPUT_VOLUME); in wm8961_probe()
855 snd_soc_component_write(component, WM8961_RIGHT_INPUT_VOLUME, reg | WM8961_IPVU); in wm8961_probe()
858 reg = snd_soc_component_read(component, WM8961_ADC_DAC_CONTROL_2); in wm8961_probe()
859 reg |= WM8961_DACSMM; in wm8961_probe()
860 snd_soc_component_write(component, WM8961_ADC_DAC_CONTROL_2, reg); in wm8961_probe()
865 reg = snd_soc_component_read(component, WM8961_CLOCKING_3); in wm8961_probe()
866 reg &= ~WM8961_MANUAL_MODE; in wm8961_probe()
867 snd_soc_component_write(component, WM8961_CLOCKING_3, reg); in wm8961_probe()