From: Kevyn-Alexandre Pare <kapare@xxxxxxxxxxxxxxxxxx> Signed-off-by: Kevyn-Alexandre Pare <kapare@xxxxxxxxxxxxxxxxxx> --- Documentation/ABI/testing/sysfs-class-asus_oled | 94 +++++++++++++++++++++++ drivers/staging/asus_oled/TODO | 3 - 2 files changed, 94 insertions(+), 3 deletions(-) create mode 100644 Documentation/ABI/testing/sysfs-class-asus_oled diff --git a/Documentation/ABI/testing/sysfs-class-asus_oled b/Documentation/ABI/testing/sysfs-class-asus_oled new file mode 100644 index 0000000..e32ea15 --- /dev/null +++ b/Documentation/ABI/testing/sysfs-class-asus_oled @@ -0,0 +1,94 @@ +What: /sys/class/asus_oled/oled_N/enabled +Date: November 2008 +KernelVersion: 2.6.29 +Contact: Jakub Schmidtke <sjakub@xxxxxxxxx> +Description: + N is the device number, the first, and probably the only, has number + 1, so it is /sys/class/asus_oled/oled_1/enabled. The 'enabled' files + is for reading and writing. You can write 0 or 1 to 'enabled' file, + which will switch on and off the display. Reading from this file will + tell you the last status set, either 0 or 1. By default it is 1, so if + the device was set to 'off', and the computer was rebooted without + power-off, this file will contain wrong value - because the device is + off, but hasn't been disabled this time and is assumed to be on... + + If the display is switched off you also need to run: + echo 1 > /sys/class/asus_oled/oled_1/enabled + To switch it off, just use: + echo 0 > /sys/class/asus_oled/oled_1/enabled +Users: Costin Grigoras <costing@xxxxxxxxx> http://asusg50oled.sourceforge.net/ + +What: /sys/class/asus_oled/oled_N/picture +Date: November 2008 +KernelVersion: 2.6.29 +Contact: Jakub Schmidtke <sjakub@xxxxxxxxx> +Description: + To 'picture' file you write pictures to be displayed by the OLED + device. + The format of the file: + <M:WxH> + 00001110010111000 + 00010101010101010 + .... + + First line is a configuration parameter. Meaning of fields in <M:WxH>: + M - picture mode. It can be either 's' for static pictures, + 'r' for rolling pictures, and 'f' for flashing pictures. + W - width of the picture. May be between 1 and 1792 + H - height of the picture. May be between 1 and 32 + + For example <s:128x32> means static picture, 128 pixels long and 32 + pixels high. + + The physical size of the display is 128x32 pixels. Static and flashing + pictures can't be larger than that (actually they can, but only part + of them will be displayed ;) ) + + If the picture is smaller than 128x32 it will be centered. Rolling + pictures wider than 128 pixels will be centered too, unless their + width = n*128. Vertically they will be centered just like static + pictures, if their height is smaller than 32. + + Flashing pictures will be centered horizontally if their width < 128, + but they were centered vertically in a different way. If their height + < 16, they will be centered in the upper half of the display + (rows 0-15). This is because only the first half of flashing pictures + is used for flashing. When the picture with heigh = 32 is displayed in + flashing mode, its upper 16 rows will be flashing in the upper half of + the display, and the lower half will be empty. After few seconds upper + part will stop flashing (but that part of the picture will remain + there), and the lower half of the display will start displaying the + lower half of the picture in rolling mode, unless it is empty, or the + picture was small enough to fit in upper part. It is not mine idea, + this is just the way Asus' display work ;) + + So if you need just flashing, use at most 128x16 picture. If you need + flashing and rolling, use whole size of the display. + + Lines following the first, configuration, line are picture data. Each + '1' means that the pixel is lit, and '0' means that it is not. You can + also use '#' as ON, and ' ' (space) as OFF. Empty lines and all other + characters are ignored. + + It is possible to write everything in one line + <M:WxH>01010101010101010..., and W*H characters will be used. If there + is not enough characters, nothing will be displayed. However, the + 'line mode' is easier to read (and write), and it also lets to omit + parts of data. Whenever End-Of-Line character is found, but the line + is not W characters long, it is assumed that all missing characters + are equal to the last character in the line. + + Following line represents '0', '1' and a lots of '0's, dependng on the + width of the picture provided in configuration data: + 010 + + So if you need empty line, it is sufficient to write line with only one + '0' in it. The same works with '1' (or ' ' and '#'). + + If there are too many data in the file, they will be ignored. If you + are not sure how many characters you are missing, you can add few lines + with one zero in each of them. + + There are some example pictures in .txt format, that can be used as + follows: cat foo.txt > /sys/class/asus_oled/oled_1/picture +Users: Costin Grigoras <costing@xxxxxxxxx> http://asusg50oled.sourceforge.net/ diff --git a/drivers/staging/asus_oled/TODO b/drivers/staging/asus_oled/TODO index 2514131..95eb624 100644 --- a/drivers/staging/asus_oled/TODO +++ b/drivers/staging/asus_oled/TODO @@ -1,9 +1,6 @@ TODO: - - checkpatch.pl cleanups - - sparse fixes - audit the userspace interface - sysfs vs. char? - - Documentation/ABI/ needs to be added - put the sample .txt files and README file somewhere. Please send patches to Greg Kroah-Hartman <greg@xxxxxxxxx> and -- 1.7.1 _______________________________________________ devel mailing list devel@xxxxxxxxxxxxxxxxxxxxxx http://driverdev.linuxdriverproject.org/mailman/listinfo/devel