summaryrefslogtreecommitdiffstats
path: root/drivers/staging/fbtft/fbtft_device.c
Commit message (Collapse)AuthorAgeFilesLines
* staging: fbtft: fix voltage settings for C-Berry28Dennis Menschel2015-10-241-4/+4
| | | | | | | | | | | | | | | | | This patch fixes some internal voltage settings for the C-Berry28 display. The original example source files for the C-Berry28 as provided by its vendor admatec contained six issues where a command parameter's value didn't match its corresponding comment. I've informed admatec about these discrepancies on 2015-08-25. In the meantime, I've assumed the comments to be more reliable than the code, and thus have used these values to write the initial C-Berry28 driver. After having received a reply from admatec on 2015-10-16 that the issues have been fixed in their example code, it has turned out that for the voltages VCOM and AVDD, the code was indeed correct, but the comments were wrong. This patch is meant to fix these two pending mistakes. Signed-off-by: Dennis Menschel <menschel-d@posteo.de> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* staging: fbtft: use MIPI DCS for ST7789V and C-Berry28Dennis Menschel2015-10-241-3/+4
| | | | | | | | | | This patch makes use of the standard MIPI Display Command Set to remove redundant entries from the command enum of the ST7789V display controller and also some of the magic constants found in the init sequence of the C-Berry28 display. Signed-off-by: Dennis Menschel <menschel-d@posteo.de> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* staging: fbtft: add support for C-Berry28 displayDennis Menschel2015-10-131-0/+74
| | | | | | | | | | This patch adds support for the C-Berry28, a small 2.8" color display with a resolution of 320x240 pixels from admatec for the Raspberry Pi. It uses the Sitronix ST7789V display controller along with a custom init sequence and custom gamma curves. Signed-off-by: Dennis Menschel <menschel-d@posteo.de> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* staging: fbtft: change log levelSudip Mukherjee2015-09-121-6/+2
| | | | | | | | Reduce the log level of some of the pr_* calls and remove 2 pr_debug calls which just prints "init" and "exit". Signed-off-by: Sudip Mukherjee <sudip@vectorindia.org> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* staging: fbtft: start using pr_fmtSudip Mukherjee2015-09-121-38/+29
| | | | | | | | Instead of defining DRVNAME and using it in all calls to pr_* family of macros lets start using pr_fmt. Signed-off-by: Sudip Mukherjee <sudip@vectorindia.org> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* staging: fbtft: use dev_*Sudip Mukherjee2015-09-121-8/+7
| | | | | | | Use dev_* family of macros where we have a reference of a device. Signed-off-by: Sudip Mukherjee <sudip@vectorindia.org> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* staging: fbtft: do not use magic numbersSudip Mukherjee2015-09-121-1/+1
| | | | | | | | Using magic numbers are not good coding practise. Use FBTFT_GPIO_NAME_SIZE as defined in the header files. Signed-off-by: Sudip Mukherjee <sudip@vectorindia.org> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* staging: fbtft: use strncpy instead of strcpySudip Mukherjee2015-09-121-1/+2
| | | | | | | | | Using strcpy() is a security risk as the destination buffer size is not checked and we may over-run the buffer. Use strncpy() instead, while mentioning the buffer size leaving place for the NULL termination. Signed-off-by: Sudip Mukherjee <sudip@vectorindia.org> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* staging/fbtft : Add missing whitespace around operatorsAnish Bhatt2015-09-121-2/+2
| | | | | | | | Add blank spaces around operators where recommended by checkpatch.pl Signed-off-by: Anish Bhatt <anish@chelsio.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* staging/fbtft : Fix multiple/missing blank line issuesAnish Bhatt2015-09-121-1/+0
| | | | | | | Remove or add blank lines as recommended by checkpatch.pl Signed-off-by: Anish Bhatt <anish@chelsio.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* staging/fbtft : Remove repeated set_addr_win debug messagesAnish Bhatt2015-09-121-2/+0
| | | | | | | | | | fbtft_par_dbg(DEBUG_SET_ADDR_WIN.. ) is repeated in every set_addr_win() handler, this could be replicated by using the kernel function tracer instead. Signed-off-by: Anish Bhatt <anish@chelsio.com> Suggested-by: Greg KH <gregkh@linuxfoundation.org> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* staging/fbtft : Remove FSF mailing addressAnish Bhatt2015-09-121-4/+0
| | | | | | | | checkpatch.pl recommends that this is no longer required. Also replaces ASCII-art copyright notice with simple text Signed-off-by: Anish Bhatt <anish@chelsio.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* Staging: fbtft: Add support for the Ultrachip UC1611 LCD controllerHenri Chain2015-07-141-0/+31
| | | | | | | | | | This is a driver chip for 240x160 4-bit greyscale LCDs. It is capable of 4-wire (8 bit) or 3-wire (9 bit) SPI that have both been tested. (It also has a 6800 or 8080-style parallel interface, but I have not included support for it.) Signed-off-by: Henri Chain <henri.chain@eleves.ec-nantes.fr> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* staging: fbtft: eliminate code duplicationAnton Gerasimov2015-06-131-4/+2
| | | | | | | Eliminated code duplication when searching for a display. Signed-off-by: Anton Gerasimov <anton.gerasimov@openmailbox.org> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* staging: fbtft: remove unnecessary spaces before tabsAnton Gerasimov2015-06-131-2/+2
| | | | | | | The patch removes spaces before tabs so that checkpatch.pl is content. Signed-off-by: Anton Gerasimov <anton.gerasimov@openmailbox.org> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* staging: fbtft: remove unnecessary line continuationsAnton Gerasimov2015-06-131-16/+16
| | | | | | | Removed unnecessary line continuations in several lines. Signed-off-by: Anton Gerasimov <anton.gerasimov@openmailbox.org> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* staging: fbtft: make module descriptions greppableAnton Gerasimov2015-06-131-6/+3
| | | | | | | Split module description strings are merged for searchability. Signed-off-by: Anton Gerasimov <anton.gerasimov@openmailbox.org> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* staging: fbtft: split long stringsAnton Gerasimov2015-06-131-1/+2
| | | | | | | Split long function declarations, function calls, comments etc. Signed-off-by: Anton Gerasimov <anton.gerasimov@openmailbox.org> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* staging: fbtft: Add support for ili9163 controllerKozhevnikov Anatoly2015-03-261-0/+18
| | | | | | | Driver for ili9163-based displays (for example: Nokia 5110) Signed-off-by: Kozhevnikov Anatoly <shilo.xyz@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* staging: fbtft: Do not use binary constantsGeert Uytterhoeven2015-03-241-3/+3
| | | | | | | | | | | | | | | | | | | | Gcc < 4.3 doesn't understand binary constants (0b*): drivers/staging/fbtft/fbtft-sysfs.c:156:19: error: invalid suffix "b111" on integer constant drivers/staging/fbtft/fb_hx8340bn.c:159:3: error: invalid suffix "b1111" on integer constant drivers/staging/fbtft/fb_hx8340bn.c:159:11: error: invalid suffix "b1111" on integer constant drivers/staging/fbtft/fb_hx8340bn.c:159:19: error: invalid suffix "b11111" on integer constant drivers/staging/fbtft/fb_hx8340bn.c:159:28: error: invalid suffix "b1111" on integer constant drivers/staging/fbtft/fb_hx8340bn.c:159:36: error: invalid suffix "b1111" on integer constant drivers/staging/fbtft/fb_hx8340bn.c:159:44: error: invalid suffix "b1111" on integer constant drivers/staging/fbtft/fb_hx8340bn.c:159:52: error: invalid suffix "b11111" on integer constant drivers/staging/fbtft/fb_hx8340bn.c:160:3: error: invalid suffix "b111" on integer constant ... Hence use hexadecimal constants (0x*) instead. Signed-off-by: Geert Uytterhoeven <geert@linux-m68k.org> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* staging: fbtft: fbtft_device.c: remove extra parentheses around function ↵Aya Mahfouz2015-03-151-2/+2
| | | | | | | | | | | | | | | | | | | | | arguments Removes extra parentheses around function arguments. Issue detected and resolved using the following coccinelle script: @@ expression e; identifier f; @@ f(..., -( e -) ,...) Signed-off-by: Aya Mahfouz <mahfouz.saif.elyazal@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* Staging: fbtft: Fix Sparse warningsFrederic Jacob2015-03-011-2/+2
| | | | | | | | | | | This fixes the folowing sparse warnings: fb_hx8340bn.c:111:6: warning: symbol 'set_addr_win' was not declared. Should it be static? fbtft_device.c:32:19: warning: symbol 'spi_device' was not declared. Should it be static? fbtft_device.c:33:24: warning: symbol 'p_device' was not declared. Should it be static? Signed-off-by: Frederic Jacob <frederic.jacob.78@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* staging: fbtft: fix spacing errorsAya Mahfouz2015-02-261-31/+57
| | | | | | | | | | | | | This patch fixes the following checkpatch.pl errors: space prohibited before that ',' space required after that ',' spaces required around that '=' Given that the addition of spaces triggered the line over 80 characters warning, some lines were divided into two. Signed-off-by: Aya Mahfouz <mahfouz.saif.elyazal@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* staging: fbtft: add fbtft_device driverThomas Petazzoni2015-01-171-0/+1444
This commit adds the fbtft_device driver from the fbtft project at https://github.com/notro/fbtft. Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com> Signed-off-by: Noralf Tronnes <notro@tronnes.org> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>