Lines Matching refs:lpass

57 static void exynos_lpass_core_sw_reset(struct exynos_lpass *lpass, int mask)  in exynos_lpass_core_sw_reset()  argument
61 regmap_read(lpass->top, SFR_LPASS_CORE_SW_RESET, &val); in exynos_lpass_core_sw_reset()
64 regmap_write(lpass->top, SFR_LPASS_CORE_SW_RESET, val); in exynos_lpass_core_sw_reset()
69 regmap_write(lpass->top, SFR_LPASS_CORE_SW_RESET, val); in exynos_lpass_core_sw_reset()
72 static void exynos_lpass_enable(struct exynos_lpass *lpass) in exynos_lpass_enable() argument
74 clk_prepare_enable(lpass->sfr0_clk); in exynos_lpass_enable()
77 regmap_write(lpass->top, SFR_LPASS_INTR_CA5_MASK, in exynos_lpass_enable()
80 regmap_write(lpass->top, SFR_LPASS_INTR_CPU_MASK, in exynos_lpass_enable()
84 exynos_lpass_core_sw_reset(lpass, LPASS_I2S_SW_RESET); in exynos_lpass_enable()
85 exynos_lpass_core_sw_reset(lpass, LPASS_DMA_SW_RESET); in exynos_lpass_enable()
86 exynos_lpass_core_sw_reset(lpass, LPASS_MEM_SW_RESET); in exynos_lpass_enable()
87 exynos_lpass_core_sw_reset(lpass, LPASS_UART_SW_RESET); in exynos_lpass_enable()
90 static void exynos_lpass_disable(struct exynos_lpass *lpass) in exynos_lpass_disable() argument
93 regmap_write(lpass->top, SFR_LPASS_INTR_CPU_MASK, 0); in exynos_lpass_disable()
94 regmap_write(lpass->top, SFR_LPASS_INTR_CA5_MASK, 0); in exynos_lpass_disable()
96 clk_disable_unprepare(lpass->sfr0_clk); in exynos_lpass_disable()
110 struct exynos_lpass *lpass; in exynos_lpass_probe() local
113 lpass = devm_kzalloc(dev, sizeof(*lpass), GFP_KERNEL); in exynos_lpass_probe()
114 if (!lpass) in exynos_lpass_probe()
121 lpass->sfr0_clk = devm_clk_get(dev, "sfr0_ctrl"); in exynos_lpass_probe()
122 if (IS_ERR(lpass->sfr0_clk)) in exynos_lpass_probe()
123 return PTR_ERR(lpass->sfr0_clk); in exynos_lpass_probe()
125 lpass->top = regmap_init_mmio(dev, base_top, in exynos_lpass_probe()
127 if (IS_ERR(lpass->top)) { in exynos_lpass_probe()
129 return PTR_ERR(lpass->top); in exynos_lpass_probe()
132 platform_set_drvdata(pdev, lpass); in exynos_lpass_probe()
135 exynos_lpass_enable(lpass); in exynos_lpass_probe()
142 struct exynos_lpass *lpass = platform_get_drvdata(pdev); in exynos_lpass_remove() local
144 exynos_lpass_disable(lpass); in exynos_lpass_remove()
147 exynos_lpass_disable(lpass); in exynos_lpass_remove()
148 regmap_exit(lpass->top); in exynos_lpass_remove()
155 struct exynos_lpass *lpass = dev_get_drvdata(dev); in exynos_lpass_suspend() local
157 exynos_lpass_disable(lpass); in exynos_lpass_suspend()
164 struct exynos_lpass *lpass = dev_get_drvdata(dev); in exynos_lpass_resume() local
166 exynos_lpass_enable(lpass); in exynos_lpass_resume()