summaryrefslogtreecommitdiff
path: root/drivers/staging/fbtft
AgeCommit message (Collapse)Author
2019-02-26Staging: fbtft: Fix line over 80 charactersBhanusree Pola
Fix the checkpatch.pl warning: WARNING:line over 80 characters Move Parameters to the next lines with proper alignment Signed-off-by: Bhanusree Pola <bhanusreemahesh@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2019-02-26Staging: fbtft: Extra blank line not required before '}'Bhanusree Pola
Remove unnecesessary extra blank line before the closing brace, to solve the checkpatch.pl check: CHECK: Extra blank line not required before closing brace '}' Signed-off-by: Bhanusree Pola <bhanusreemahesh@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2019-02-26Staging: fbtft: Alignment should match open parenthesisBhanusree Pola
Clear the warning found by checkpatch.pl WARNING:Alignment should match open parenthesis Adjust paremeters in fbtft_par_dbg and write_reg. Signed-off-by: Bhanusree Pola <bhanusreemahesh@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2019-01-18Staging: fbtft: Switch to the gpio descriptor interfaceNishad Kamdar
This switches the fbtft driver to use GPIO descriptors rather than numerical gpios: Utilize the GPIO library's intrinsic handling of OF GPIOs and polarity. If the line is flagged active low, gpiolib will deal with this. Remove gpios from platform device structure. Neither assign statically numbers to gpios in platform device nor allow gpios to be parsed as module parameters. Signed-off-by: Nishad Kamdar <nishadkamdar@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2018-12-19staging: fbtft: fix strncmp() size warningYueHaibing
strncmp() stops comparing when either the end of one of the first two arguments is reached or when 'n' characters have been compared, whichever comes first.That means that strncmp(s1, s2, n) is equivalent to strcmp(s1, s2) if n exceeds the length of s1 or the length of s2. This patch avoids that the following warning is reported by smatch: drivers/staging/fbtft/fbtft_device.c:1458 fbtft_device_init() error: strncmp() '"list"' too small (5 vs 32) Signed-off-by: YueHaibing <yuehaibing@huawei.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2018-10-03staging: fbtft: Prefer using the BIT macroMamta Shukla
Replacing all occurrences of (1<<x) with BIT(x) to fix checkpatch issue. CHECK:Prefer using the BIT macro Signed-off-by: Mamta Shukla <mamtashukla555@gmail.com> Reviewed-by: Daniel Vetter <daniel.vetter@ffwll.ch> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2018-09-16Merge 4.19-rc4 into staging-nextGreg Kroah-Hartman
Handle the merge issues and take the iio and staging driver fixes. Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2018-09-10staging/fbtft: Update TODO and mailing listsDaniel Vetter
Motivated by the ksummit-discuss discussion. Cc: Shuah Khan <shuahkhan@gmail.com> Cc: Thomas Petazzoni <thomas.petazzoni@free-electrons.com> Cc: Mauro Carvalho Chehab <mchehab+samsung@kernel.org> Cc: linux-fbdev@vger.kernel.org Signed-off-by: Daniel Vetter <daniel.vetter@intel.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2018-08-27staging: fbtft: Adds space around "/"Leonardo Brás
Kernel coding style recommends a space char around "/". Signed-off-by: Leonardo Brás <leobras.c@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2018-08-08staging: fbtft: Add spaces around / - StyleLeonardo Brás
Puts spaces around the /. Signed-off-by: Leonardo Brás <leobras.c@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2018-08-08staging: fbtft: Erases some repetitive usage of function name - StyleLeonardo Brás
Changes this functions to avoid using "blank" on debug twice. Improves log readability. Signed-off-by: Leonardo Brás <leobras.c@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2018-08-08staging: fbtft: Adjust some empty-line problems - StyleLeonardo Brás
Erases some blank lines. Signed-off-by: Leonardo Brás <leobras.c@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2018-08-08staging: fbtft: Removes one nesting level to help readability - StyleLeonardo Brás
This nesting level was removed to improve readability. Signed-off-by: Leonardo Brás <leobras.c@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2018-08-08staging: fbtft: Changes gamma table to define.Leonardo Brás
Most of other "Gamma Tables" were already boxed on a define, just did the same to PIOLED. Signed-off-by: Leonardo Brás <leobras.c@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2018-08-08staging: fbtft: A bit more information on dev_err.Leonardo Brás
Adds a bit more information on debug. The line break was to avoid obfuscating the parameters on the end of a large line. Signed-off-by: Leonardo Brás <leobras.c@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2018-08-08staging: fbtft: Fixes some alignment issues - StyleLeonardo Brás
Fixes (most) alignment issues pointed by checkpatch.pl. Signed-off-by: Leonardo Brás <leobras.c@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2018-08-08staging: fbtft: Puts macro arguments in parenthesis to avoid precedence ↵Leonardo Brás
issues - Style Puts macro arguments in parenthesis to avoid precedence issues. Some large lines were broken to fit the 80-char limit. Signed-off-by: Leonardo Brás <leobras.c@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2018-07-16staging: fbtft: Fix line continuationMatthias Wolf
Fix checkpatch warning: avoid unnecessary line continuation to allow grepping of whole error message. Signed-off-by: Matthias Wolf <der_wolf_@web.de> Signed-off-by: Felix Siegel <felix.siegel@stud.uni-hannover.de> Signed-off-by: Tim Cofala <cofala@stud.uni-hannover.de> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2018-07-16staging: fbtft: Fix line over 80 charactersMatthias Wolf
Fix checkpatch line over 80 characters where it seemed appropriate Signed-off-by: Matthias Wolf <der_wolf_@web.de> Signed-off-by: Felix Siegel <felix.siegel@stud.uni-hannover.de> Signed-off-by: Tim Cofala <cofala@stud.uni-hannover.de> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2018-07-02staging: fbtft: indent fbtft_device_display - last entry - pdev - devRadek Dostál
The dev section was opening curly bracket, but not adding ident, which resulted in two times "}," after each other with same indentation. Add ident at the right place fixes this problem. This formatting issue is not detectable by checkpatch.pl Signed-off-by: Radek Dostál <radek.dostal@streamunlimited.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2018-06-11Merge tag 'backlight-next-4.18' of ↵Linus Torvalds
git://git.kernel.org/pub/scm/linux/kernel/git/lee/backlight Pull backlight updates from Lee Jones: "Core Frameworks - Provide helpers to enable/disable backlight - Provide standard and devres versions OF find helpers New Drivers: - Add support for the Zodiac Inflight Innovations RAVE Supervisory Processor New Functionality: - Allow pwm-on/pwm-off delay to be specified via DT Bug Fixes: - Fix ordering of the power {en,dis}able and PWM {en,dis}able signals - Fix Device Tree node look-up" * tag 'backlight-next-4.18' of git://git.kernel.org/pub/scm/linux/kernel/git/lee/backlight: backlight: as3711_bl: Fix Device Tree node leaks backlight: tps65217_bl: Fix Device Tree node lookup backlight: max8925_bl: Fix Device Tree node lookup backlight: as3711_bl: Fix Device Tree node lookup MAINTAINERS: Add dri-devel for backlight subsystem patches backlight: Nuke BL_CORE_DRIVER1 staging: fbtft: Stop using BL_CORE_DRIVER1 backlight: pandora: Stop using BL_CORE_DRIVER1 backlight: generic-bl: Remove DRIVER1 state backlight: Nuke unused backlight.props.state states backlight: otm3225a: Add support for ORISE OTM3225A LCD SoC backlight: pwm_bl: Don't use GPIOF_* with gpiod_get_direction pwm-backlight: Add support for PWM delays proprieties. dt-bindings: pwm-backlight: Add PWM delay proprieties. pwm-backlight: Enable/disable the PWM before/after LCD enable toggle. dt-bindings: backlight: Add binding for RAVE SP backlight driver backlight: Add RAVE SP backlight driver
2018-04-30staging: fbtft: Stop using BL_CORE_DRIVER1Daniel Vetter
Leaking driver internal tracking into the already massively confusing backlight power tracking is really confusing. Luckily we have already a drvdata structure, so fixing this is really easy. Signed-off-by: Daniel Vetter <daniel.vetter@intel.com> Acked-by: Daniel Thompson <daniel.thompson@linaro.org> Reviewed-by: Jani Nikula <jani.nikula@intel.com> Signed-off-by: Lee Jones <lee.jones@linaro.org>
2018-04-23staging: fbtft: Fixed lines exceeding columns limitRenato Soma
Fix checkpatch.pl warnings of lines exceeding 80 columns. Break lines in order to reduce instructions lengths to less than 80 columns. Signed-off-by: Renato Soma <renatoys08@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2018-04-23staging: fbtft: Add TODO file with GPIO work itemLinus Walleij
To make sure that these drivers do not leave staging before they are properly converted to use the new GPIO descriptor API, create the TODO file with this work item. Cc: Thomas Petazzoni <thomas.petazzoni@free-electrons.com> Cc: Noralf Tronnes <notro@tronnes.org> Signed-off-by: Linus Walleij <linus.walleij@linaro.org> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2018-01-25staging: fbtft: remove unused FB_TFT_SSD1325 kconfigCorentin Labbe
Since nothing builds/depends on FB_TFT_SSD1325, we could remove it. Signed-off-by: Corentin Labbe <clabbe@baylibre.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2018-01-15staging: fbtft: remove redundant license textGreg Kroah-Hartman
Now that the SPDX tag is in all fbtft files, that identifies the license in a specific and legally-defined manner. So the extra GPL text wording can be removed as it is no longer needed at all. This is done on a quest to remove the 700+ different ways that files in the kernel describe the GPL license text. And there's unneeded stuff like the address (sometimes incorrect) for the FSF which is never needed. No copyright headers or other non-license-description text was removed. Cc: Thomas Petazzoni <thomas.petazzoni@free-electrons.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2018-01-15staging: fbtft: add SPDX identifiersGreg Kroah-Hartman
It's good to have SPDX identifiers in all files to make it easier to audit the kernel tree for correct licenses. Fix up the all of the staging fbtft drivers to have a proper SPDX identifier, based on the license text in the file itself. The SPDX identifier is a legally binding shorthand, which can be used instead of the full boiler plate text. This work is based on a script and data from Thomas Gleixner, Philippe Ombredanne, and Kate Stewart. Cc: Thomas Gleixner <tglx@linutronix.de> Cc: Kate Stewart <kstewart@linuxfoundation.org> Cc: Philippe Ombredanne <pombredanne@nexb.com> Cc: Thomas Petazzoni <thomas.petazzoni@free-electrons.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2018-01-10staging: fbtft: Fix indentationLuis Gerhorst
This fixes the checkpatch message: CHECK: Alignment should match open parenthesis #1380: FILE: drivers/staging/fbtft/fbtft-core.c:1380: + dev_warn(dev, + "no default functions for regwidth=%d and buswidth=%d\n", Signed-off-by: Luis Gerhorst <linux-kernel@luisgerhorst.de> Signed-off-by: Jonny Schaefer <schaefer.jonny@gmail.com> Acked-by: Alexander Wuerstlein <arw@cs.fau.de> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2018-01-08drivers/fbtft: Remove unnecessary braces from if/elseLuis Gerhorst
The Linux kernel coding style states that braces should only be used when necessary. This fixes the checkpatch warning WARNING: line over 80 characters + } else if (display->regwidth == 8 && display->buswidth == 9 && par->spi) { introduced by patch #1. Signed-off-by: Luis Gerhorst <linux-kernel@luisgerhorst.de> Acked-by: Jonny Schaefer <schaefer.jonny@gmail.com> Acked-by: Alexander Wuerstlein <arw@cs.fau.de> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2018-01-08drivers/fbtft: Remove newline after else in else-ifLuis Gerhorst
This removes the following warning issued by checkpatch WARNING: suspect code indent for conditional statements (8, 8) + } else + if (display->regwidth == 8 && display->buswidth == 9 && par->spi) { Signed-off-by: Luis Gerhorst <linux-kernel@luisgerhorst.de> Acked-by: Jonny Schaefer <schaefer.jonny@gmail.com> Acked-by: Alexander Wuerstlein <arw@cs.fau.de> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2017-11-13Merge tag 'staging-4.15-rc1' of ↵Linus Torvalds
git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/staging 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 King
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. Jensen
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-Hartman
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 ↵Alfonso Lima Astor
warning 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 Gupta
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 King
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 Carpenter
"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 King
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 Manwatkar
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 Gou
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 Rochfort
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 Colin
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 Wilson
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 Singhal
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 Kapshuk
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 Kallweit
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 Kallweit
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 Kallweit
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 Kallweit
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>