linux/include/video/broadsheetfb.h

75 lines
2.1 KiB
C
Raw Normal View History

/*
* broadsheetfb.h - definitions for the broadsheet framebuffer driver
*
* Copyright (C) 2008 by 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.
*
*/
#ifndef _LINUX_BROADSHEETFB_H_
#define _LINUX_BROADSHEETFB_H_
/* Broadsheet command defines */
#define BS_CMD_INIT_SYS_RUN 0x06
#define BS_CMD_INIT_DSPE_CFG 0x09
#define BS_CMD_INIT_DSPE_TMG 0x0A
#define BS_CMD_INIT_ROTMODE 0x0B
#define BS_CMD_RD_REG 0x10
#define BS_CMD_WR_REG 0x11
#define BS_CMD_LD_IMG 0x20
#define BS_CMD_LD_IMG_AREA 0x22
#define BS_CMD_LD_IMG_END 0x23
#define BS_CMD_WAIT_DSPE_TRG 0x28
#define BS_CMD_WAIT_DSPE_FREND 0x29
#define BS_CMD_RD_WFM_INFO 0x30
#define BS_CMD_UPD_INIT 0x32
#define BS_CMD_UPD_FULL 0x33
#define BS_CMD_UPD_GDRV_CLR 0x37
broadsheetfb: support storing waveform This patch adds waveform storing capability to broadsheetfb. It uses the firmware class to retrieve the waveform, and the request to initiate the waveform storing is done via a driver sysfs entry, loadstore_waveform. Broadsheet is a framebuffer device. It is slightly different from a typical framebuffer controller that drives a normal TFT-LCD display. Most E-Ink display panels require a waveform in order to function. That is, in order to drive the state of a pixel to black, gray, or white, a specific waveform is utilized. Basically, that waveform represents the specific E-field wiggling needed to get the pixel to its optimal state given current temperature, and its previous state. TN/IPS-LCDs use a similar concept but the driving waveform is sufficiently simple that it is internalized in the TFT source/gate driver. These E-Ink waveforms are specific to a production batch. That is, a batch of display films are produced, then they get characterized and a waveform is generated for that batch. Broadsheet, typically, is attached to its private SPI flash which is then flashed with this waveform. Users won't be able to see the waveform and typically won't ever need to know about it. If however, the display panel attached to broadsheet is changed out, then they will need to update their waveform. That would typically be done at a factory or repair facility rather than by a user. [akpm@linux-foundation.org: fix printk warning] Signed-off-by: Jaya Kumar <jayakumar.lkml@gmail.com> Cc: Geert Uytterhoeven <geert@linux-m68k.org> Cc: Krzysztof Helt <krzysztof.h1@wp.pl> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2010-03-11 00:21:43 +01:00
/* Broadsheet register interface defines */
#define BS_REG_REV 0x00
#define BS_REG_PRC 0x02
/* Broadsheet pin interface specific defines */
#define BS_CS 0x01
#define BS_DC 0x02
#define BS_WR 0x03
/* Broadsheet IO interface specific defines */
#define BS_MMIO_CMD 0x01
#define BS_MMIO_DATA 0x02
/* struct used by broadsheet. board specific stuff comes from *board */
struct broadsheetfb_par {
struct fb_info *info;
struct broadsheet_board *board;
void (*write_reg)(struct broadsheetfb_par *, u16 reg, u16 val);
u16 (*read_reg)(struct broadsheetfb_par *, u16 reg);
wait_queue_head_t waitq;
int panel_index;
broadsheetfb: support storing waveform This patch adds waveform storing capability to broadsheetfb. It uses the firmware class to retrieve the waveform, and the request to initiate the waveform storing is done via a driver sysfs entry, loadstore_waveform. Broadsheet is a framebuffer device. It is slightly different from a typical framebuffer controller that drives a normal TFT-LCD display. Most E-Ink display panels require a waveform in order to function. That is, in order to drive the state of a pixel to black, gray, or white, a specific waveform is utilized. Basically, that waveform represents the specific E-field wiggling needed to get the pixel to its optimal state given current temperature, and its previous state. TN/IPS-LCDs use a similar concept but the driving waveform is sufficiently simple that it is internalized in the TFT source/gate driver. These E-Ink waveforms are specific to a production batch. That is, a batch of display films are produced, then they get characterized and a waveform is generated for that batch. Broadsheet, typically, is attached to its private SPI flash which is then flashed with this waveform. Users won't be able to see the waveform and typically won't ever need to know about it. If however, the display panel attached to broadsheet is changed out, then they will need to update their waveform. That would typically be done at a factory or repair facility rather than by a user. [akpm@linux-foundation.org: fix printk warning] Signed-off-by: Jaya Kumar <jayakumar.lkml@gmail.com> Cc: Geert Uytterhoeven <geert@linux-m68k.org> Cc: Krzysztof Helt <krzysztof.h1@wp.pl> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2010-03-11 00:21:43 +01:00
struct mutex io_lock;
};
/* board specific routines */
struct broadsheet_board {
struct module *owner;
int (*init)(struct broadsheetfb_par *);
int (*wait_for_rdy)(struct broadsheetfb_par *);
void (*cleanup)(struct broadsheetfb_par *);
int (*get_panel_type)(void);
int (*setup_irq)(struct fb_info *);
/* Functions for boards that use GPIO */
void (*set_ctl)(struct broadsheetfb_par *, unsigned char, u8);
void (*set_hdb)(struct broadsheetfb_par *, u16);
u16 (*get_hdb)(struct broadsheetfb_par *);
/* Functions for boards that have specialized MMIO */
void (*mmio_write)(struct broadsheetfb_par *, int type, u16);
u16 (*mmio_read)(struct broadsheetfb_par *);
};
#endif