static void wconfig(unsigned char config) { setcommand(COMMANDCONFIGW); setdata(config); }
static unsigned int reset_write(struct system_node *self, struct service_state *state, void *buffer, unsigned int count) { setcommand(COMMANDCTRLRESET); return 0; }
static unsigned int testdevice(unsigned int id) { setcommand(devices[id].test); return polldata() == PTESTOK; }
static unsigned int testbus(void) { setcommand(COMMANDCTEST); return polldata() == CTESTOK; }
static unsigned char rconfig(void) { setcommand(COMMANDCONFIGR); return polldata(); }
static void setdevicedata(unsigned int id, unsigned char value) { if (id == PS2_MOUSE) setcommand(COMMANDDEV2WI); setdata(value); }
static void initialize_textlcd() { setcommand(CMD_FUNCTION_SET | F_DATA8 | F_LINE2 | F_FONT10); udelay(4000); setcommand(CMD_FUNCTION_SET | F_DATA8 | F_LINE2 | F_FONT10); udelay(100); setcommand(CMD_DISPLAY | D_ON | D_CURSOR); setcommand(CMD_ENTRY_MODE | E_CURSOR); setcommand(CMD_CLEAR_DISPLAY); setcommand(CMD_RETURN_HOME); udelay(100); }
int iom_lcd_ioctl(struct inode *inode, struct file *file, unsigned int cmd, unsigned long gdata) { unsigned long command; copy_from_user(&command, (char*)gdata, 4); printk("ioctl %d %x\n", cmd, command); switch(cmd){ case IOM_LCD_COMMAND: setcommand((unsigned short)command); break; default: printk("driver : no such command!\n"); return -ENOTTY; } return 0; }
void ps2_disable(unsigned int id) { setcommand(devices[id].disable); }
void ps2_enable(unsigned int id) { setcommand(devices[id].enable); }
static void clear_textlcd() { setcommand(CMD_CLEAR_DISPLAY); setcommand(CMD_RETURN_HOME); udelay(100); }