/* * linux/drivers/video/n411.c -- Platform device for N411 EPD kit * * Copyright (C) 2008, Jaya Kumar * * This file is subject to the terms and conditions of the GNU General Public * License. See the file COPYING in the main directory of this archive for * more details. * * Layout is based on skeletonfb.c by James Simmons and Geert Uytterhoeven. * * This driver is written to be used with the Hecuba display controller * board, and tested with the EInk 800x600 display in 1 bit mode. * The interface between Hecuba and the host is TTL based GPIO. The * GPIO requirements are 8 writable data lines and 6 lines for control. * Only 4 of the controls are actually used here but 6 for future use. * The driver requires the IO addresses for data and control GPIO at * load time. It is also possible to use this display with a standard * PC parallel port. * * General notes: * - User must set dio_addr=0xIOADDR cio_addr=0xIOADDR c2io_addr=0xIOADDR *
*/
staticvoid n411_wait_for_ack(struct hecubafb_par *par, int clear)
{ int timeout; unsignedchar tmp;
timeout = 500; do {
tmp = n411_get_ctl(par); if ((tmp & HCB_ACK_BIT) && (!clear)) return; elseif (!(tmp & HCB_ACK_BIT) && (clear)) return;
udelay(1);
} while (timeout--);
printk(KERN_ERR "timed out waiting for ack\n");
}
staticint n411_init_control(struct hecubafb_par *par)
{ unsignedchar tmp; /* for init, we want the following setup to be set: WUP = lo ACK = hi DS = hi RW = hi CD = lo
*/
/* write WUP to lo, DS to hi, RW to hi, CD to lo */
ctl = HCB_WUP_BIT | HCB_RW_BIT | HCB_CD_BIT ;
n411_set_ctl(par, HCB_DS_BIT, 1);
/* check ACK is not lo */
tmp = n411_get_ctl(par); if (tmp & HCB_ACK_BIT) {
printk(KERN_ERR "Fail because ACK is already low\n"); return -ENXIO;
}
return 0;
}
staticint n411_init_board(struct hecubafb_par *par)
{ int retval;
retval = n411_init_control(par); if (retval) return retval;
/* have to wait while display resets */
udelay(1000);
/* if we were told to splash the screen, we just clear it */ if (!nosplash) {
par->send_command(par, APOLLO_ERASE_DISPLAY);
par->send_data(par, splashval);
}
Die Informationen auf dieser Webseite wurden
nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit,
noch Qualität der bereit gestellten Informationen zugesichert.
Bemerkung:
Die farbliche Syntaxdarstellung und die Messung sind noch experimentell.