aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/staging/fbtft (follow)
AgeCommit message (Collapse)AuthorFilesLines
2017-11-13Merge tag 'staging-4.15-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/stagingLinus Torvalds5-20/+26
Pull staging and IIO updates from Greg KH: "Here is the "big" staging and IIO driver update for 4.15-rc1. Lots and lots of little changes, almost all minor code cleanups as the Outreachy application process happened during this development cycle. Also happened was a lot of IIO driver activity, and the typec USB code moving out of staging to drivers/usb (same commits are in the USB tree on a persistent branch to not cause merge issues.) Overall, it's a wash, I think we added a few hundred more lines than removed, but really only a few thousand were modified at all. All of these have been in linux-next for a while. There might be a merge issue with Al's vfs tree in the pi433 driver (take his changes, they are always better), and the media tree with some of the odd atomisp cleanups (take the media tree's version)" * tag 'staging-4.15-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/staging: (507 commits) staging: lustre: add SPDX identifiers to all lustre files staging: greybus: Remove redundant license text staging: greybus: add SPDX identifiers to all greybus driver files staging: ccree: simplify ioread/iowrite staging: ccree: simplify registers access staging: ccree: simplify error handling logic staging: ccree: remove dead code staging: ccree: handle limiting of DMA masks staging: ccree: copy IV to DMAable memory staging: fbtft: remove redundant initialization of buf staging: sm750fb: Fix parameter mistake in poke32 staging: wilc1000: Fix bssid buffer offset in Txq staging: fbtft: fb_ssd1331: fix mirrored display staging: android: Fix checkpatch.pl error staging: greybus: loopback: convert loopback to use generic async operations staging: greybus: operation: add private data with get/set accessors staging: greybus: loopback: Fix iteration count on async path staging: greybus: loopback: Hold per-connection mutex across operations staging: greybus/loopback: use ktime_get() for time intervals staging: fsl-dpaa2/eth: Extra headroom in RX buffers ...
2017-11-06staging: fbtft: remove redundant initialization of bufColin Ian King1-1/+1
The pointer buf is being set on each iteration of a for-loop and so the initialization of buf at declaration time is redundant and can be removed. Cleans up clang warning: drivers/staging/fbtft/fb_uc1701.c:130:6: warning: Value stored to 'buf' during its initialization is never read Signed-off-by: Colin Ian King <colin.king@canonical.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2017-11-06staging: fbtft: fb_ssd1331: fix mirrored displayJohannes H. Jensen1-1/+7
When the row scan order is reversed (the default) we also need to reverse the column scan order. This was not done previously, resulting in a mirrored display. Also add support for 180 degree display rotation, in which case simply disable reversed row and column scan order. Tested on an Adafruit 0.96" mini Color OLED display. Signed-off-by: Johannes H. Jensen <joh@pseudoberries.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2017-11-02License cleanup: add SPDX GPL-2.0 license identifier to files with no licenseGreg Kroah-Hartman4-0/+4
Many source files in the tree are missing licensing information, which makes it harder for compliance tools to determine the correct license. By default all files without license information are under the default license of the kernel, which is GPL version 2. Update the files which contain no license information with the 'GPL-2.0' SPDX license identifier. The SPDX identifier is a legally binding shorthand, which can be used instead of the full boiler plate text. This patch is based on work done by Thomas Gleixner and Kate Stewart and Philippe Ombredanne. How this work was done: Patches were generated and checked against linux-4.14-rc6 for a subset of the use cases: - file had no licensing information it it. - file was a */uapi/* one with no licensing information in it, - file was a */uapi/* one with existing licensing information, Further patches will be generated in subsequent months to fix up cases where non-standard license headers were used, and references to license had to be inferred by heuristics based on keywords. The analysis to determine which SPDX License Identifier to be applied to a file was done in a spreadsheet of side by side results from of the output of two independent scanners (ScanCode & Windriver) producing SPDX tag:value files created by Philippe Ombredanne. Philippe prepared the base worksheet, and did an initial spot review of a few 1000 files. The 4.13 kernel was the starting point of the analysis with 60,537 files assessed. Kate Stewart did a file by file comparison of the scanner results in the spreadsheet to determine which SPDX license identifier(s) to be applied to the file. She confirmed any determination that was not immediately clear with lawyers working with the Linux Foundation. Criteria used to select files for SPDX license identifier tagging was: - Files considered eligible had to be source code files. - Make and config files were included as candidates if they contained >5 lines of source - File already had some variant of a license header in it (even if <5 lines). All documentation files were explicitly excluded. The following heuristics were used to determine which SPDX license identifiers to apply. - when both scanners couldn't find any license traces, file was considered to have no license information in it, and the top level COPYING file license applied. For non */uapi/* files that summary was: SPDX license identifier # files ---------------------------------------------------|------- GPL-2.0 11139 and resulted in the first patch in this series. If that file was a */uapi/* path one, it was "GPL-2.0 WITH Linux-syscall-note" otherwise it was "GPL-2.0". Results of that was: SPDX license identifier # files ---------------------------------------------------|------- GPL-2.0 WITH Linux-syscall-note 930 and resulted in the second patch in this series. - if a file had some form of licensing information in it, and was one of the */uapi/* ones, it was denoted with the Linux-syscall-note if any GPL family license was found in the file or had no licensing in it (per prior point). Results summary: SPDX license identifier # files ---------------------------------------------------|------ GPL-2.0 WITH Linux-syscall-note 270 GPL-2.0+ WITH Linux-syscall-note 169 ((GPL-2.0 WITH Linux-syscall-note) OR BSD-2-Clause) 21 ((GPL-2.0 WITH Linux-syscall-note) OR BSD-3-Clause) 17 LGPL-2.1+ WITH Linux-syscall-note 15 GPL-1.0+ WITH Linux-syscall-note 14 ((GPL-2.0+ WITH Linux-syscall-note) OR BSD-3-Clause) 5 LGPL-2.0+ WITH Linux-syscall-note 4 LGPL-2.1 WITH Linux-syscall-note 3 ((GPL-2.0 WITH Linux-syscall-note) OR MIT) 3 ((GPL-2.0 WITH Linux-syscall-note) AND MIT) 1 and that resulted in the third patch in this series. - when the two scanners agreed on the detected license(s), that became the concluded license(s). - when there was disagreement between the two scanners (one detected a license but the other didn't, or they both detected different licenses) a manual inspection of the file occurred. - In most cases a manual inspection of the information in the file resulted in a clear resolution of the license that should apply (and which scanner probably needed to revisit its heuristics). - When it was not immediately clear, the license identifier was confirmed with lawyers working with the Linux Foundation. - If there was any question as to the appropriate license identifier, the file was flagged for further research and to be revisited later in time. In total, over 70 hours of logged manual review was done on the spreadsheet to determine the SPDX license identifiers to apply to the source files by Kate, Philippe, Thomas and, in some cases, confirmation by lawyers working with the Linux Foundation. Kate also obtained a third independent scan of the 4.13 code base from FOSSology, and compared selected files where the other two scanners disagreed against that SPDX file, to see if there was new insights. The Windriver scanner is based on an older version of FOSSology in part, so they are related. Thomas did random spot checks in about 500 files from the spreadsheets for the uapi headers and agreed with SPDX license identifier in the files he inspected. For the non-uapi files Thomas did random spot checks in about 15000 files. In initial set of patches against 4.14-rc6, 3 files were found to have copy/paste license identifier errors, and have been fixed to reflect the correct identifier. Additionally Philippe spent 10 hours this week doing a detailed manual inspection and review of the 12,461 patched files from the initial patch version early this week with: - a full scancode scan run, collecting the matched texts, detected license ids and scores - reviewing anything where there was a license detected (about 500+ files) to ensure that the applied SPDX license was correct - reviewing anything where there was no detection but the patch license was not GPL-2.0 WITH Linux-syscall-note to ensure that the applied SPDX license was correct This produced a worksheet with 20 files needing minor correction. This worksheet was then exported into 3 different .csv files for the different types of files to be modified. These .csv files were then reviewed by Greg. Thomas wrote a script to parse the csv files and add the proper SPDX tag to the file, in the format that the file expected. This script was further refined by Greg based on the output to detect more types of files automatically and to distinguish between header and source .c files (which need different comment types.) Finally Greg ran the script using the .csv files to generate the patches. Reviewed-by: Kate Stewart <kstewart@linuxfoundation.org> Reviewed-by: Philippe Ombredanne <pombredanne@nexb.com> Reviewed-by: Thomas Gleixner <tglx@linutronix.de> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2017-10-18staging: fbtft: differentiate between buffer and data types to fix sparse warningAlfonso Lima Astor1-12/+12
sparse was complaning about an incorrect type cast: drivers/staging/fbtft/fbtft-bus.c:60:1: warning: incorrect type in assignment (different base types) drivers/staging/fbtft/fbtft-bus.c:60:1: expected unsigned short [unsigned] [short] [usertype] <noident> drivers/staging/fbtft/fbtft-bus.c:60:1: got restricted __be16 [usertype] <noident> drivers/staging/fbtft/fbtft-bus.c:60:1: warning: incorrect type in assignment (different base types) drivers/staging/fbtft/fbtft-bus.c:60:1: expected unsigned short [unsigned] [short] [usertype] <noident> drivers/staging/fbtft/fbtft-bus.c:60:1: got restricted __be16 [usertype] <noident> The solution is to add an extra parameter to the macro to differentiate between buffer type and data type. Cc: Thomas Petazzoni <thomas.petazzoni@free-electrons.com> Signed-off-by: Alfonso Lima Astor <alfonsolimaastor@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2017-10-18staging: fbtft: remove unnecessary parantheses around assignmentAastha Gupta1-1/+1
Parentheses are not needed around the right hand side of an assignment. This patch is done using Coccinelle: @@ expression a, b; @@ b = -( a -) Signed-off-by: Aastha Gupta <aastha.gupta4104@gmail.com> Acked-by: Julia Lawall <julia.lawall@lip6.fr> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2017-09-18staging: fbtft: remove redundant initialization of txbuf16Colin Ian King1-5/+5
txbuf16 is being initialized at declaration time and then later set to another value without it being read inbetween, hence making the initialization redundant. Fix this by setting txbuf16 just the once. Also clean up some incorrect indentations. Cleans up clang build warning: warning: Value stored to 'txbuf16' during its initialization is never read Signed-off-by: Colin Ian King <colin.king@canonical.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2017-07-28staging: fbtft: array underflow in fbtft_request_gpios_match()Dan Carpenter1-2/+2
"val" can be negative, so we'd write before the start of the par->gpio.db[] array. Fixes: c296d5f9957c ("staging: fbtft: core support") Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2017-07-16staging: fbtft: make const array gamma_par_mask staticColin Ian King1-1/+1
Don't populate array gamma_par_mask on the stack but instead make it static. Makes the object code smaller by 148 bytes: Before: text data bss dec hex filename 2993 1104 0 4097 1001 drivers/staging/fbtft/fb_st7789v.o After: text data bss dec hex filename 2757 1192 0 3949 f6d drivers/staging/fbtft/fb_st7789v.o Signed-off-by: Colin Ian King <colin.king@canonical.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2017-05-29staging: fbtft: Fix to avoid precedence issuesRishiraj Manwatkar1-1/+1
Parentheses added to avoid operator precedence issues. Signed-off-by: Rishiraj Manwatkar <manwatkar@outlook.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2017-05-16staging: fbtft: fix sparse warningJandy Gou1-1/+1
fix the following sparse warning: drivers/staging/fbtft/fbtft-io.c:74:29: warning: incorrect type in assignment (different base types) drivers/staging/fbtft/fbtft-io.c:74:29: expected unsigned long long [unsigned] [long] [long long] [usertype] <noident> drivers/staging/fbtft/fbtft-io.c:74:29: got restricted __be64 [usertype] <noident> Signed-off-by: Jandy Gou <gouqingsong@goodix.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2017-05-15Staging: fbtft: Fix unbalanced braces around else statementLaurence Rochfort1-2/+2
Balance if/else braces as recommended by checkpatch.pl Signed-off-by: Laurence Rochfort <laurence.rochfort@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2017-04-28staging: fbtft: fix open parentheses alignmentChristophe Colin1-7/+7
Modify the code indentations to fix the checkpatch issues. Signed-off-by: Christophe Colin <popscolin@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2017-04-08staging: fbtft: fix type assignment warningAlex Wilson1-1/+1
Sparse spits out a warning that a __be16 was being assigned to a u16. Change the type of txbuf16 to __be16 b/c it's a restricted type and prevents mixing endianness. Signed-off-by: Alex Wilson <alex.david.wilson@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2017-03-23staging: fbtft: Replace a bit shift by a use of BIT.Arushi Singhal4-4/+4
This patch replaces bit shifting on 1 with the BIT(x) macro. This was done with coccinelle: @@ constant c; @@ -1 << c +BIT(c) Signed-off-by: Arushi Singhal <arushisinghal19971997@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2017-03-09staging/fbtft: Hush checkpatch.pl warning about unnecessary line continuationsAlexander Kapshuk1-4/+4
Use a single string literal as the fmt argument passed to dev_err() instead of multiple string literals split with an embedded backslash character. Signed-off-by: Alexander Kapshuk <alexander.kapshuk@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2017-03-09staging: fbtft: fb_sh1106: use new helper helper fbtft_write_buf_dcHeiner Kallweit1-13/+4
Make use of new helper fbtft_write_buf_dc. Signed-off-by: Heiner Kallweit <hkallweit1@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2017-03-09staging: fbtft: use helper fbtft_write_buf_dc in fbtft-bus.cHeiner Kallweit1-23/+8
Make use of new helper fbtft_write_buf_dc. Signed-off-by: Heiner Kallweit <hkallweit1@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2017-03-09staging: fbtft: add helper fbtft_write_buf_dcHeiner Kallweit2-0/+16
Factor out setting DC GPIO and writing buffer content to helper fbtft_write_buf_dc. Signed-off-by: Heiner Kallweit <hkallweit1@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2017-03-09staging: fbtft: fb_sh1106: use own implementation of write_registerHeiner Kallweit1-32/+33
The default implementation of write_register keeps DC low for the first byte only. SH1106 requires DC to be low for all bytes of a multi-byte command. To deal with this limitation we currently use a separate call to write_reg for each single command byte what is not really efficient. Therefore override the default implementation of write_register with an own one which keeps DC low for all bytes. Signed-off-by: Heiner Kallweit <hkallweit1@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2017-03-09staging: fbtft: improve a syslog message in fbtft_register_framebufferHeiner Kallweit1-1/+1
There are drivers like fb_sh1106 which allocate a txbuf less than 1 KiB. In this case the message would include "0 KiB buffer memory" what doesn't make sense and in general I doubt that there is any benefit in informing the user about allocation of a very small buffer. Therefore omit this message part if the buffer has less than 1 KiB. Signed-off-by: Heiner Kallweit <hkallweit1@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2017-03-06staging: fbtft: add adriver for SH1106Heiner Kallweit3-0/+210
This patch adds support for the SH1106 OLED controller chip. It's similar to the SSD1306, however it supports only a subset of commands and the internal video memory has a different width. Major differences: - Internal video memory has a width of 132 pixels - Only a subset of commands is supported - Only page addressing mode is supported, no support for vertical and horizontal addressing - SPI frequency limited to 2 MHz according to the datasheet Successfully tested with a 1.3" OLED display with this chip and SPI interface. Signed-off-by: Heiner Kallweit <hkallweit1@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2017-03-06staging: fbtft: Merged two identical conditionals into one.Narcisa Ana Maria Vasile1-3/+2
Merged two if conditionals into a single one, since they had exactly the same condition. Signed-off-by: Narcisa Ana Maria Vasile <narcisaanamaria12@gmail.com> Acked-by: Julia Lawall <julia.lawall@lip6.fr> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2017-03-06staging: fbtft: fix unnecessary line continuationsCezary Gapinski1-1/+1
Fix the following formatting issues: WARNING: Avoid unnecessary line continuations Signed-off-by: Cezary Gapinski <gapalinux@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2017-03-06staging: fbtft: Make some s16 arrays constJoe Perches6-16/+16
Using const reduces data size. $ size drivers/staging/fbtft/built-in.o* text data bss dec hex filename 89909 41584 2928 134421 20d15 drivers/staging/fbtft/built-in.o.new 88053 43392 2928 134373 20ce5 drivers/staging/fbtft/built-in.o.old Signed-off-by: Joe Perches <joe@perches.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2017-03-06staging: fbtft: Make the pointers to s16 init arrays constJoe Perches3-5/+5
This allows making some of the actual arrays const. Signed-off-by: Joe Perches <joe@perches.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2017-03-06staging:fbtft: Fix some warnings regarding types.Anthony Brandon1-1/+1
Running make C=1 M=drivers/staging/fbtft reports warnings about conversion from __be16 to unsigned short. Change the type of the variables being assigned into __be16 to remove those warnings. Signed-off-by: Anthony Brandon <anthony@amarulasolutions.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2017-03-06Staging: fbtft: fb_watterott: fix incorrect type in assignmentsJulián de Gortari1-3/+3
__be16 type variables should be used with return value of macro cpu_to_be16() Signed-off-by: Julián de Gortari <kiototeko@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2017-03-06staging: fbtft: Remove blank lineGargi Sharma1-1/+0
Remove blank line before closing brace to fix the checkpatch issue blank lines aren't necessary before a close brace '}'. Signed-off-by: Gargi Sharma <gs051095@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2017-03-06staging: fbtft: Match alignment with open parenthesesGargi Sharma1-27/+27
Indent code to match alignment with open parentheses, to fix the checkpatch issue alignment should match open parenthesis. Signed-off-by: Gargi Sharma <gs051095@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2017-03-06staging: fbtft: Add check on strlcpy() return valueTobin C. Harding1-1/+7
Return value of strlcpy() is not checked. Name string is silently truncated if longer that SPI_NAME_SIZE, whilst not detrimental to the program logic it would be nice to notify the user. Module is currently quite verbose, adding extra pr_warn() calls will not overly impact this verbosity. Check return value from call to strlcpy(). If source string is truncated call pr_warn() to notify user. Signed-off-by: Tobin C. Harding <me@tobin.cc> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2017-03-06staging: fbtft: Replace magic number with constantTobin C. Harding1-1/+1
Current call to strncmp() uses a magic number. There is a compile time constant defined for this buffer, included and used already at other sites in the file. Remove magic number. Replace with pre-existing compile time constant. Signed-off-by: Tobin C. Harding <me@tobin.cc> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2017-03-06staging: fbtft: Fix buffer overflow vulnerabilityTobin C. Harding1-1/+1
Module copies a user supplied string (module parameter) into a buffer using strncpy() and does not check that the buffer is null terminated. Replace call to strncpy() with call to strlcpy() ensuring that the buffer is null terminated. Signed-off-by: Tobin C. Harding <me@tobin.cc> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2017-02-05staging: fbtft: fix unaligned parenthesesUmang Raghuvanshi3-12/+14
Fix the following formatting issues: CHECK: Alignment should match open parenthesis Signed-off-by: Umang Raghuvanshi <u@umangis.me> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2017-02-03staging: fbtft: change 'gamma' array to u32Arnd Bergmann22-26/+26
Having a local variable of 1024 bytes on 64-bit architectures is a bit too much, and I ran into this warning while trying to see what functions use the largest stack: drivers/staging/fbtft/fbtft-sysfs.c: In function 'store_gamma_curve': drivers/staging/fbtft/fbtft-sysfs.c:132:1: warning: the frame size of 1032 bytes is larger than 1024 bytes [-Wframe-larger-than=] As there is no need for 64-bit gamma values (on 32-bit architectures, we don't use those either), I'm changing the type from 'unsigned long' to 'u32' here, which cuts the required space in half everywhere. Signed-off-by: Arnd Bergmann <arnd@arndb.de> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2017-01-27staging: fbtft: fix unaligned parenthesesUmang Raghuvanshi1-5/+5
Fix the following formatting issues: CHECK: Alignment should match open parenthesis Signed-off-by: Umang Raghuvanshi <u@umangis.me> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2017-01-25staging: fbtft: fix checkpatch decimal permissions errorAbdul Rauf8-32/+32
Fix the following errors: Use 4 digit octal (0777) not decimal permissions Signed-off-by: Abdul Rauf <abdulraufmujahid@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2017-01-25staging: fbtft: remove duplicate entries of ili9225Amitesh Singh1-16/+0
There are multiple entries for ili9225 display defined in flexfb_chip_table array. remove duplicate entries and keep single entry. Signed-off-by: Amitesh Singh <singh.amitesh@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2017-01-19staging: fbtft: fb_ssd1306: Refactor write_vmem()Andy Shevchenko1-9/+7
Refactor write_vmem() for sake of readability. While here, fix indentation in one comment. Acked-by: Noralf Trønnes <noralf@tronnes.org> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2017-01-19staging: fbtft: fb_ssd1306: Support smaller screen sizesAndy Shevchenko1-0/+21
There is 64x48 display exists. In order to support that set multiplexer to 48 pixels and window address to proper position in the graphic display data RAM. Acked-by: Noralf Trønnes <noralf@tronnes.org> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2017-01-19staging: fbtft: propagate error code from kstrto*()Andy Shevchenko1-6/+1
kstrto*() functions return proper error code. Do propogate it to the user. Acked-by: Noralf Trønnes <noralf@tronnes.org> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2017-01-19staging: fbtft: remove custom DMA mapped bufferAndy Shevchenko4-29/+2
There is no need to duplicate what SPI core already does, i.e. mapping buffers for DMA capable transfers. Remove all related pices of code. Note, that code, besides its redundancy, was buggy: DMA address potentially can be 0, SPI slave device has nothing to do with DMA capable device properties and DMA mask in particular. Suggested-by: Noralf Trønnes <noralf@tronnes.org> Acked-by: Noralf Trønnes <noralf@tronnes.org> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2017-01-19staging: fbtft: convert fbtft_reset() to be non-atomicAndy Shevchenko1-4/+4
First of all, fbtft in current state doesn't allow to override GPIOs to be optional, like "reset" one. It might be a bug somewhere, but rather out of scope of this fix. Second, not all GPIOs available on the board would be SoC based, some of them might sit on I2C GPIO expanders, for example, on Intel Edison/Arduino, and thus any communication with them might sleep. Besides that using udelay() and mdelay() is kinda resource wasteful. Summarize all of the above, convert fbtft_reset() function to non-atomic variant by using gpio_set_value_cansleep(), usleep_range(), and msleep(). Reviewed-by: Noralf Trønnes <noralf@tronnes.org> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2017-01-19staging: fbtft: replace decimal with 4-digit octal permissionsStefano Manni1-9/+9
Following error detected by checkpatch.pl: ERROR: Use 4 digit octal (0777) not decimal permissions Signed-off-by: Stefano Manni <stefano.manni@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2017-01-03staging: fbtft: fix code alignment with open parenthesisScott Matheina1-8/+10
These changes where identified by checkpatch.pl as needed changes to align the code with the linux development coding style. The several lines of text where aligned with the precending parenthesis. Signed-off-by: Scott Matheina <scott@matheina.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-11-10staging: fbtft: Fix 'line over 80 characters'Maninder Singh1-11/+20
This patch fixes the following checkpatch.pl warning WARNING: line over 80 characters Signed-off-by: Maninder Singh <maninder.s2@samsung.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-10-25Staging:fbtft: Replace decimal permissions with 4 digit octalNadim Almas1-5/+5
ERROR: Use 4 digit octal (0777) not decimal permissions This error was detected by checkpatch.pl Signed-off-by: Nadim Almas <nadim.902@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-10-25staging: fbtft: Fix module autoloadJavier Martinez Canillas1-0/+1
If the driver is built as a module, autoload won't work because the module alias information is not filled. So user-space can't match the registered device with the corresponding module. Export the module alias information using the MODULE_DEVICE_TABLE() macro. Before this patch: $ modinfo drivers/staging/fbtft/flexfb.ko | grep alias $ After this patch: $ modinfo drivers/staging/fbtft/flexfb.ko | grep alias alias: platform:flexpfb Signed-off-by: Javier Martinez Canillas <javier@osg.samsung.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-10-16Staging: fbtft: Fix too many leading tabs warningGustavo A. R. Silva1-31/+37
This is a patch to the fb_agm1264k-fl.c file that fixes up the following issue: WARNING: Too many leading tabs - consider code refactoring Add new function iterate_diffusion_matrix() to refactor a piece of code inside write_vmem(). Signed-off-by: Gustavo A. R. Silva <garsilva@embeddedor.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-10-16staging: fbtft: Convert int arrays to s16Joe Perches8-75/+323
These arrays use -1, -2, and -3 as initiators for various types of writes to initialize hardware. No values are used that conflict with using these arrays as s16 instead of int and reducing overall data is good. $ size drivers/staging/fbtft/built-in.o* text data bss dec hex filename 116120 32872 4152 153144 25638 drivers/staging/fbtft/built-in.o.new 116104 36344 6200 158648 26bb8 drivers/staging/fbtft/built-in.o.old Miscellaneous: o Realign some of the arrays to make reading a bit easier Signed-off-by: Joe Perches <joe@perches.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>