Lines Matching refs:chn
117 int chn, void __iomem *reg, int *temp);
119 int chn, void __iomem *reg, int temp);
121 int chn, void __iomem *reg, int temp);
122 void (*set_tshut_mode)(int chn, void __iomem *reg, enum tshut_mode m);
183 #define TSADCV2_DATA(chn) (0x20 + (chn) * 0x04) argument
184 #define TSADCV2_COMP_INT(chn) (0x30 + (chn) * 0x04) argument
185 #define TSADCV2_COMP_SHUT(chn) (0x40 + (chn) * 0x04) argument
192 #define TSADCV2_AUTO_SRC_EN(chn) BIT(4 + (chn)) argument
197 #define TSADCV2_INT_SRC_EN(chn) BIT(chn) argument
198 #define TSADCV2_SHUT_2GPIO_SRC_EN(chn) BIT(4 + (chn)) argument
199 #define TSADCV2_SHUT_2CRU_SRC_EN(chn) BIT(8 + (chn)) argument
848 int chn, void __iomem *regs, int *temp) in rk_tsadcv2_get_temp() argument
852 val = readl_relaxed(regs + TSADCV2_DATA(chn)); in rk_tsadcv2_get_temp()
858 int chn, void __iomem *regs, int temp) in rk_tsadcv2_alarm_temp() argument
871 int_clr &= ~TSADCV2_INT_SRC_EN(chn); in rk_tsadcv2_alarm_temp()
882 regs + TSADCV2_COMP_INT(chn)); in rk_tsadcv2_alarm_temp()
885 int_en |= TSADCV2_INT_SRC_EN(chn); in rk_tsadcv2_alarm_temp()
892 int chn, void __iomem *regs, int temp) in rk_tsadcv2_tshut_temp() argument
901 writel_relaxed(tshut_value, regs + TSADCV2_COMP_SHUT(chn)); in rk_tsadcv2_tshut_temp()
905 writel_relaxed(val | TSADCV2_AUTO_SRC_EN(chn), regs + TSADCV2_AUTO_CON); in rk_tsadcv2_tshut_temp()
910 static void rk_tsadcv2_tshut_mode(int chn, void __iomem *regs, in rk_tsadcv2_tshut_mode() argument
917 val &= ~TSADCV2_SHUT_2CRU_SRC_EN(chn); in rk_tsadcv2_tshut_mode()
918 val |= TSADCV2_SHUT_2GPIO_SRC_EN(chn); in rk_tsadcv2_tshut_mode()
920 val &= ~TSADCV2_SHUT_2GPIO_SRC_EN(chn); in rk_tsadcv2_tshut_mode()
921 val |= TSADCV2_SHUT_2CRU_SRC_EN(chn); in rk_tsadcv2_tshut_mode()