예제 #1
0
void create_proc_fp(void)
{
	int i;

	for (i = 0; i < sizeof(fp_procs)/sizeof(fp_procs[0]); i++)
	{
		install_e2_procs(fp_procs[i].name, fp_procs[i].read_proc, fp_procs[i].write_proc, NULL);
	}
}
예제 #2
0
파일: cec_proc.c 프로젝트: Audioniek/driver
void init_e2_proc(void)
{
	int i;

	for (i = 0; i < sizeof(e2_procs) / sizeof(e2_procs[0]); i++)
	{
		install_e2_procs(e2_procs[i].name, e2_procs[i].read_proc,
				 e2_procs[i].write_proc, NULL);
	}
}
예제 #3
0
static int __init init_fan_module(void)
{
  install_e2_procs(e2_procs[0].name, e2_procs[0].read_proc, e2_procs[0].write_proc, NULL);

  fan_registers = (unsigned long) ioremap(0x18010000, 0x100);
  printk("fan_registers = 0x%.8lx\n", fan_registers);

#if LINUX_VERSION_CODE > KERNEL_VERSION(2,6,17)
  fan_pin = stpio_request_pin (4, 7, "fan ctrl", STPIO_OUT);
  stpio_set_pin(fan_pin, 1);
#else
  fan_pin = stpio_request_pin (4, 7, "fan ctrl", STPIO_ALT_OUT);
#endif

  return 0;
}
예제 #4
0
static int __init init_fan_module(void)
{
  install_e2_procs(e2_procs[0].name, e2_procs[0].read_proc, e2_procs[0].write_proc, NULL);

  fan_registers = (unsigned long) ioremap(0x18010000, 0x100);
  printk("fan_registers = 0x%.8lx\n\t", fan_registers);


  fan_pin = stpio_request_pin (4, 7, "fan ctrl", STPIO_ALT_OUT);
  
  stpio_set_pin(fan_pin, 1);
  printk("fan pin %p\n", fan_pin);


  //not sure if first one is necessary
  ctrl_outl(0x200, fan_registers + 0x50);
  
  //set a default speed, because default is zero
  ctrl_outl(0xaa, fan_registers + 0x4);

  return 0;
}