3 #include <asm/arch/chip_drv_config_extern.h>
4 #include <asm/arch/bits.h>
5 #include <linux/types.h>
6 #include <asm/arch/regs_adi.h>
7 #include <asm/arch/adi_hal_internal.h>
8 #include <asm/arch/sprd_reg.h>
10 #define ANA_VIBRATOR_CTRL0_U (ANA_REGS_GLB_BASE + 0xf8)
12 #define CUR_DRV_CAL_SEL_U (0x0 << 12)
13 #define SLP_LDOVIBR_PD_EN_U (0x1 << 9)
14 #define LDO_VIBR_PD_U (0x1 << 8)
15 #define LDO_VIBR_V_U (0xB4)
17 void set_vibrator(int on)
20 ANA_REG_AND(ANA_VIBRATOR_CTRL0_U, ~LDO_VIBR_PD_U);
21 ANA_REG_AND(ANA_VIBRATOR_CTRL0_U, ~SLP_LDOVIBR_PD_EN_U);
24 ANA_REG_MSK_OR(ANA_VIBRATOR_CTRL0_U, LDO_VIBR_PD_U, LDO_VIBR_PD_U);
25 ANA_REG_MSK_OR(ANA_VIBRATOR_CTRL0_U, SLP_LDOVIBR_PD_EN_U, SLP_LDOVIBR_PD_EN_U);
29 void vibrator_hw_init(void)
31 ANA_REG_OR(ANA_REG_GLB_RTC_CLK_EN, BIT_RTC_VIBR_EN);
32 ANA_REG_MSK_OR(ANA_VIBRATOR_CTRL0_U,CUR_DRV_CAL_SEL_U,CUR_DRV_CAL_SEL_U);
33 ANA_REG_MSK_OR(ANA_VIBRATOR_CTRL0_U,LDO_VIBR_V_U,LDO_VIBR_V_U);