Lines Matching refs:therm
34 pwm_info(struct nvkm_therm *therm, int *line, int *ctrl, int *indx) in pwm_info() argument
51 nv_error(therm, "unknown pwm ctrl for gpio %d\n", *line); in pwm_info()
59 nv50_fan_pwm_ctrl(struct nvkm_therm *therm, int line, bool enable) in nv50_fan_pwm_ctrl() argument
62 int ctrl, id, ret = pwm_info(therm, &line, &ctrl, &id); in nv50_fan_pwm_ctrl()
64 nv_mask(therm, ctrl, 0x00010001 << line, data << line); in nv50_fan_pwm_ctrl()
69 nv50_fan_pwm_get(struct nvkm_therm *therm, int line, u32 *divs, u32 *duty) in nv50_fan_pwm_get() argument
71 int ctrl, id, ret = pwm_info(therm, &line, &ctrl, &id); in nv50_fan_pwm_get()
75 if (nv_rd32(therm, ctrl) & (1 << line)) { in nv50_fan_pwm_get()
76 *divs = nv_rd32(therm, 0x00e114 + (id * 8)); in nv50_fan_pwm_get()
77 *duty = nv_rd32(therm, 0x00e118 + (id * 8)); in nv50_fan_pwm_get()
85 nv50_fan_pwm_set(struct nvkm_therm *therm, int line, u32 divs, u32 duty) in nv50_fan_pwm_set() argument
87 int ctrl, id, ret = pwm_info(therm, &line, &ctrl, &id); in nv50_fan_pwm_set()
91 nv_wr32(therm, 0x00e114 + (id * 8), divs); in nv50_fan_pwm_set()
92 nv_wr32(therm, 0x00e118 + (id * 8), duty | 0x80000000); in nv50_fan_pwm_set()
97 nv50_fan_pwm_clock(struct nvkm_therm *therm, int line) in nv50_fan_pwm_clock() argument
99 int chipset = nv_device(therm)->chipset; in nv50_fan_pwm_clock()
100 int crystal = nv_device(therm)->crystal; in nv50_fan_pwm_clock()
105 u8 pwm_div = nv_rd32(therm, 0x410c); in nv50_fan_pwm_clock()
106 if (nv_rd32(therm, 0xc040) & 0x800000) { in nv50_fan_pwm_clock()
123 nv50_sensor_setup(struct nvkm_therm *therm) in nv50_sensor_setup() argument
125 nv_mask(therm, 0x20010, 0x40000000, 0x0); in nv50_sensor_setup()
130 nv50_temp_get(struct nvkm_therm *therm) in nv50_temp_get() argument
132 struct nvkm_therm_priv *priv = (void *)therm; in nv50_temp_get()
136 core_temp = nv_rd32(therm, 0x20014) & 0x3fff; in nv50_temp_get()
182 struct nvkm_therm *therm = (void *)object; in nv50_therm_init() local
184 nv50_sensor_setup(therm); in nv50_therm_init()