• Home
  • Raw
  • Download

Lines Matching refs:x

81 } x;  variable
83 #define T(x,y) (((x)<<8) | (y)*0x100/10 ) argument
113 return sprintf(buf, "%d.%d\n", x.temp>>8, (x.temp & 255)*10/256 ); in show_cpu_temperature()
119 return sprintf(buf, "%d.%d\n", x.casetemp>>8, (x.casetemp & 255)*10/256 ); in show_case_temperature()
170 write_reg( x.fan, 0x25, val, 1 ); in tune_fan()
171 write_reg( x.fan, 0x20, 0, 1 ); in tune_fan()
172 print_temp("CPU-temp: ", x.temp ); in tune_fan()
173 if( x.casetemp ) in tune_fan()
174 print_temp(", Case: ", x.casetemp ); in tune_fan()
175 printk(", Fan: %d (tuned %+d)\n", 11-fan_setting, x.fan_level-fan_setting ); in tune_fan()
177 x.fan_level = fan_setting; in tune_fan()
185 temp = read_reg( x.thermostat, 0, 2 ); in poll_temp()
191 casetemp = read_reg(x.fan, 0x0b, 1) << 8; in poll_temp()
192 casetemp |= (read_reg(x.fan, 0x06, 1) & 0x7) << 5; in poll_temp()
194 if( LOG_TEMP && x.temp != temp ) { in poll_temp()
197 printk(", Fan: %d\n", 11-x.fan_level ); in poll_temp()
199 x.temp = temp; in poll_temp()
200 x.casetemp = casetemp; in poll_temp()
205 if( i < x.downind ) in poll_temp()
207 x.downind = i; in poll_temp()
211 if( x.upind < i ) in poll_temp()
213 x.upind = i; in poll_temp()
227 x.r0 = read_reg( x.fan, 0x00, 1 ); in setup_hardware()
228 x.r1 = read_reg( x.fan, 0x01, 1 ); in setup_hardware()
229 x.r20 = read_reg( x.fan, 0x20, 1 ); in setup_hardware()
230 x.r23 = read_reg( x.fan, 0x23, 1 ); in setup_hardware()
231 x.r25 = read_reg( x.fan, 0x25, 1 ); in setup_hardware()
234 if( (val=read_reg(x.thermostat, 1, 1)) >= 0 ) { in setup_hardware()
236 if( write_reg( x.thermostat, 1, val, 1 ) ) in setup_hardware()
240 write_reg( x.fan, 0x01, 0x01, 1 ); in setup_hardware()
242 write_reg( x.fan, 0x23, 0x91, 1 ); in setup_hardware()
244 write_reg( x.fan, 0x00, 0x95, 1 ); in setup_hardware()
251 if( x.overheat_temp == (80 << 8) ) { in setup_hardware()
252 x.overheat_temp = 65 << 8; in setup_hardware()
253 x.overheat_hyst = 60 << 8; in setup_hardware()
254 write_reg( x.thermostat, 2, x.overheat_hyst, 2 ); in setup_hardware()
255 write_reg( x.thermostat, 3, x.overheat_temp, 2 ); in setup_hardware()
257 print_temp("Reducing overheating limit to ", x.overheat_temp ); in setup_hardware()
258 print_temp(" (Hyst: ", x.overheat_hyst ); in setup_hardware()
263 x.downind = 0xffff; in setup_hardware()
264 x.upind = -1; in setup_hardware()
267 err = device_create_file( &x.of_dev->dev, &dev_attr_cpu_temperature ); in setup_hardware()
268 err |= device_create_file( &x.of_dev->dev, &dev_attr_case_temperature ); in setup_hardware()
277 device_remove_file( &x.of_dev->dev, &dev_attr_cpu_temperature ); in restore_regs()
278 device_remove_file( &x.of_dev->dev, &dev_attr_case_temperature ); in restore_regs()
280 write_reg( x.fan, 0x01, x.r1, 1 ); in restore_regs()
281 write_reg( x.fan, 0x20, x.r20, 1 ); in restore_regs()
282 write_reg( x.fan, 0x23, x.r23, 1 ); in restore_regs()
283 write_reg( x.fan, 0x25, x.r25, 1 ); in restore_regs()
284 write_reg( x.fan, 0x00, x.r0, 1 ); in restore_regs()
289 mutex_lock(&x.lock); in control_loop()
291 mutex_unlock(&x.lock); in control_loop()
298 mutex_lock(&x.lock); in control_loop()
300 mutex_unlock(&x.lock); in control_loop()
303 mutex_lock(&x.lock); in control_loop()
305 mutex_unlock(&x.lock); in control_loop()
323 if( !x.running ) { in do_attach()
325 if( x.thermostat && x.fan ) { in do_attach()
326 x.running = 1; in do_attach()
327 x.poll_task = kthread_run(control_loop, NULL, "g4fand"); in do_attach()
341 if( x.running ) { in do_detach()
342 x.running = 0; in do_detach()
343 kthread_stop(x.poll_task); in do_detach()
344 x.poll_task = NULL; in do_detach()
346 if( client == x.thermostat ) in do_detach()
347 x.thermostat = NULL; in do_detach()
348 else if( client == x.fan ) in do_detach()
349 x.fan = NULL; in do_detach()
369 if( x.fan ) in attach_fan()
380 x.fan = cl; in attach_fan()
382 if( cl != x.fan ) in attach_fan()
392 if( x.thermostat ) in attach_thermostat()
412 x.temp = temp; in attach_thermostat()
413 x.overheat_temp = os_temp; in attach_thermostat()
414 x.overheat_hyst = hyst_temp; in attach_thermostat()
419 x.thermostat = cl; in attach_thermostat()
421 if( cl != x.thermostat ) in attach_thermostat()
492 mutex_init(&x.lock); in g4fan_init()
508 x.of_dev = of_platform_device_create(np, "temperature", NULL); in g4fan_init()
511 if( !x.of_dev ) { in g4fan_init()
525 if( x.of_dev ) in g4fan_exit()
526 of_device_unregister( x.of_dev ); in g4fan_exit()