This directory contains framebuffer driver for eink apollo controller
and couple of sample user apps.

The driver provides enough functionality to be used by microwindows in 
1bit or 2bits per pixel mode, but it is not a full blown implementation of 
the framebuffer linux API. 

I.  Driver functionality:

1.	mmapable framebuffer.
2. 	efficient communication with the apollo controller through the apollo 
	bus interface.    
3.	1bpp and 2bpp modes (this cannot be dynamically switched but can be
	specified at driver init)
4.      autoupdate or user controlled update (also has to be specified at init)
5.      dynamically controlled update type (fast vs thorough presently)
	exposed via /proc interface
6.      user accessible apollo rom and ram exposed via /proc interface


II.  Driver parameters:

autoupdate_on : 1 - use heuristic to automatically decide when to update eink
		screen
		0 - let user control exactly when screen gets updated via
		ioctl call
		default value is 1 (autoupdate)


bpp :	1 - 1 bit per pixel
	2 - 2 bits per pixel
	default value is 2 bits per pixel

these parameters can be overriden at module load time as follows:

   shell$ insmod einkfb.ko autoupdate_on=0 bpp=1

or they have to be changed in eink_fb.c file at compile time if the driver
is linked into kernel.

NOTE:  The autoupdate mechanism has been deprecated.

III.  Proc interface:

There are three entries created in /proc/eink_fb directory by the driver:

	eink_ram
	eink_rom
	update_ctrl

1. eink_ram presently serves no practical purpose.  It was used for board 
bringup to verify apollo ram function

2. eink_rom is used to update apollo controller's waveforms (firmware).
Assuming there is a 'firmware.bin' file of size 'x', you can use the following
shell command to update the apollo's firmware

	dd if=firmware.bin of=/proc/eink_fb/eink_rom bs=x count=1

3. update_ctrl is a flag specifiying update type. writing 0 to this file will
force subsequent updates to be fast, writing 1 will force subsequent updates to
be thorough.

echo 0 > /proc/eink/update_ctrl  #force fast updates
echo 1 > /proc/eink/update_ctrl  #force thorough updates
cat /proc/eink/update_ctrl       #show current update style

NOTE:  The update_ctrl proc has been deprecated

IV.  Autoupdate mode. DEPRECATED.

zap_page_range in combination with nopage mechanism is used to indicate when
microwindows updates a portion of the mmapped framebuffer, forcing a subsequent
update after a short timeout designed to catch multipage (full screen) updates.

NOTE:
zap_page_range is kernel's private function not exported to modules.  Current
kernel is changed to export this function, so that eink driver can be used as
a module or compiled in.  The driver will fail to load as a module in stock 
kernel that does not export zap_page_range function.








