aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/staging/fbtft/fb_ssd1351.c (follow)
AgeCommit message (Collapse)AuthorFilesLines
2022-06-10staging: ftbft: Use backlight helperStephen Kitt1-2/+1
backlight_properties.fb_blank is deprecated. The states it represents are handled by other properties; but instead of accessing those properties directly, drivers should use the helpers provided by backlight.h. Instead of manually checking the power state in struct backlight_properties, use backlight_is_blank(). Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org> Cc: "Noralf Trønnes" <noralf@tronnes.org> Cc: Thomas Zimmermann <tzimmermann@suse.de> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Javier Martinez Canillas <javierm@redhat.com> Cc: Len Baker <len.baker@gmx.com> Cc: dri-devel@lists.freedesktop.org Cc: linux-fbdev@vger.kernel.org Cc: linux-staging@lists.linux.dev Reviewed-by: Daniel Thompson <daniel.thompson@linaro.org> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Signed-off-by: Stephen Kitt <steve@sk2.org> Link: https://lore.kernel.org/r/20220607185516.1129900-1-steve@sk2.org Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2021-11-15staging/fbtft: Fix backlightNoralf Trønnes1-4/+0
Commit b4a1ed0cd18b ("fbdev: make FB_BACKLIGHT a tristate") forgot to update fbtft breaking its backlight support when FB_BACKLIGHT is a module. Since FB_TFT selects FB_BACKLIGHT there's no need for this conditional so just remove it and we're good. Fixes: b4a1ed0cd18b ("fbdev: make FB_BACKLIGHT a tristate") Cc: <stable@vger.kernel.org> Acked-by: Sam Ravnborg <sam@ravnborg.org> Signed-off-by: Noralf Trønnes <noralf@tronnes.org> Link: https://lore.kernel.org/r/20211105204358.2991-1-noralf@tronnes.org Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2021-05-10staging: fbtft: Rectify GPIO handlingAndy Shevchenko1-1/+0
The infamous commit c440eee1a7a1 ("Staging: staging: fbtft: Switch to the GPIO descriptor interface") broke GPIO handling completely. It has already four commits to rectify and it seems not enough. In order to fix the mess here we: 1) Set default to "inactive" for all requested pins 2) Fix CS#, RD#, and WR# pins polarity since it's active low and GPIO descriptor interface takes it into consideration from the Device Tree or ACPI 3) Consolidate chip activation (CS# assertion) under default ->reset() callback To summarize the expectations about polarity for GPIOs: RD# Low WR# Low CS# Low RESET# Low DC or RS High RW High Data 0 .. 15 High See also Adafruit learning course [1] for the example of the schematics. While at it, drop unneeded NULL checks, since GPIO API is tolerant to that. [1]: https://learn.adafruit.com/adafruit-2-8-and-3-2-color-tft-touchscreen-breakout-v2/downloads Fixes: 92e3e884887c ("Staging: fbtft: Fix GPIO handling") Fixes: b918d1c27066 ("Staging: fbtft: Fix reset assertion when using gpio descriptor") Fixes: dbc4f989c878 ("Staging: fbtft: Fix probing of gpio descriptor") Fixes: c440eee1a7a1 ("Staging: fbtft: Switch to the gpio descriptor interface") Cc: Jan Sebastian Götte <linux@jaseg.net> Cc: Nishad Kamdar <nishadkamdar@gmail.com> Reviewed-by: Phil Reid <preid@electromag.com.au> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Link: https://lore.kernel.org/r/20210503172114.27891-2-andriy.shevchenko@linux.intel.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2019-04-02staging: fbtft: fb_ssd1351.c: Replace bit shifting with BIT macroPayal Kshirsagar1-2/+2
Challenge suggested by coccinelle. Prefer using BIT and replace bit shifting with the BIT(x) macro. Signed-off-by: Payal Kshirsagar <payal.s.kshirsagar.98@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2019-02-26Staging: fbtft: Alignment should match open parenthesisBhanusree Pola1-1/+1
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 Kamdar1-1/+1
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-08-08staging: fbtft: Erases some repetitive usage of function name - StyleLeonardo Brás1-1/+1
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: A bit more information on dev_err.Leonardo Brás1-2/+4
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ás1-11/+20
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-07-16staging: fbtft: Fix line continuationMatthias Wolf1-4/+2
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-01-15staging: fbtft: add SPDX identifiersGreg Kroah-Hartman1-0/+1
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>
2017-02-05staging: fbtft: fix unaligned parenthesesUmang Raghuvanshi1-2/+2
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 Bergmann1-1/+1
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>
2016-09-16staging: fbtft: add spaces around <<Gargi Sharma1-2/+2
add spaces around << to fix the checkpatch issue, spaces preferred around that '<<'. Signed-off-by: Gargi Sharma <gs051095@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-09-16staging: fbtft: move && operator for logical continuationGargi Sharma1-4/+4
Move && up to the previous line, to fix the checkpatch issue Logical continuations should be on the previous line. Signed-off-by: Gargi Sharma <gs051095@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-08-21Staging: fbtft: fixed unsigned type warningsMing Yang1-1/+1
Replace unsigned by unsigned int in fbtft driver. Issue found by checkpatch. Signed-off-by: Ming Yang <minos.future@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-10-16staging: fbtft: Fix multi-line comment styleCristina Moraru1-20/+20
Thus use the preferred style for multi-line coments as mentioned in Documentation/CodingStyle. It also silences 'Block comments use * on subsequent lines' checkpatch.pl warnings. Signed-off-by: Cristina Moraru <cristina.moraru09@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-10-02Staging: fbtft: Remove debug messages related to DEBUG_BACKLIGHTShraddha Barke1-2/+0
Remove debug messages related to fbtft_par_dbg(DEBUG_BACKLIGHT.. ) as this info can be obtained using kernel function tracer Signed-off-by: Shraddha Barke <shraddha.6596@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-09-21Staging: fbtft: Remove debug messagesShraddha Barke1-6/+0
Remove debug messages related to fbtft_par_dbg(DEBUG_INIT_DISPLAY.. ) as this info can be obtained using kernel function tracer Signed-off-by: Shraddha Barke <shraddha.6596@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-09-12staging/fbtft : Fix multiple/missing blank line issuesAnish Bhatt1-3/+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>
2015-09-12staging/fbtft : Remove repeated set_addr_win debug messagesAnish Bhatt1-3/+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>
2015-09-12staging: fbtft: fb_ssd1351: define backlight_ops staticallyMike Rapoport1-8/+5
instead of devm_kzalloc'ing them Signed-off-by: Mike Rapoport <mike.rapoport@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-03-24staging: fbtft: Do not use binary constantsGeert Uytterhoeven1-4/+4
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>
2015-03-06Staging: fbtft: Remove unnecessary 'out of memory' message.Dilek Uzulmez1-5/+1
This patch fixes checkpatch.pl warning in file fb_ssd1351.c WARNING: Possible unnecessary 'out of memory' message Signed-off-by: Dilek Uzulmez <dilekuzulmez@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-02-26Staging: fbtft: Added blank line after declarationaybuke ozdemir1-0/+1
WARNING: Missing a blank line after declaration chackpatch.pl warning in fb_ssd1351.c Signed-off-by: aybuke ozdemir <aybuke.147@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-01-17staging: fbtft: add fb_ssd1351 driverThomas Petazzoni1-0/+258
This commit adds the fb_ssd1351 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>