aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/staging/fbtft (follow)
AgeCommit message (Collapse)AuthorFilesLines
2021-05-10staging: fbtft: Update TODOAndy Shevchenko1-5/+0
Now, after a few fixes we may consider the conversion to the GPIO descriptor API is done. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Link: https://lore.kernel.org/r/20210503172114.27891-6-andriy.shevchenko@linux.intel.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2021-05-10staging: fbtft: Replace custom ->reset() with generic oneAndy Shevchenko1-14/+0
The custom ->reset() repeats the generic one, replace it. Note, in newer kernels the context of the function is a sleeping one, it's fine to switch over to the sleeping functions. Keeping the reset line asserted longer than 20 microseconds is also okay, it's an idling state of the hardware. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Link: https://lore.kernel.org/r/20210503172114.27891-5-andriy.shevchenko@linux.intel.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2021-05-10staging: fbtft: Add support for orientation on Himax HX8347dAndy Shevchenko1-3/+26
Himax HX8347d has non-standard register to control orientation. Add support for different orientation values. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Link: https://lore.kernel.org/r/20210503172114.27891-4-andriy.shevchenko@linux.intel.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2021-05-10staging: fbtft: Don't spam logs when probe is deferredAndy Shevchenko1-8/+4
When requesting GPIO line the probe can be deferred. In such case don't spam logs with an error message. This can be achieved by switching to dev_err_probe(). Fixes: c440eee1a7a1 ("Staging: fbtft: Switch to the gpio descriptor interface") Cc: Nishad Kamdar <nishadkamdar@gmail.com> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Link: https://lore.kernel.org/r/20210503172114.27891-3-andriy.shevchenko@linux.intel.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2021-05-10staging: fbtft: Rectify GPIO handlingAndy Shevchenko17-60/+25
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>
2021-05-10staging: fbtft: fb_ili9320: Remove unused variable 'ret'Lee Jones1-2/+1
Fixes the following W=1 kernel build warning(s): drivers/staging/fbtft/fb_ili9320.c: In function ‘read_devicecode’: drivers/staging/fbtft/fb_ili9320.c:25:6: warning: variable ‘ret’ set but not used [-Wunused-but-set-variable] Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org> Cc: dri-devel@lists.freedesktop.org Cc: linux-fbdev@vger.kernel.org Cc: linux-staging@lists.linux.dev Signed-off-by: Lee Jones <lee.jones@linaro.org> Link: https://lore.kernel.org/r/20210414181129.1628598-39-lee.jones@linaro.org Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2021-04-05staging: fbtft: convert sysfs snprintf to sysfs_emitXuezhi Zhang1-1/+1
Fix the following coccicheck warning: drivers/staging/fbtft//fbtft-sysfs.c:202:8-16: WARNING: use scnprintf or sprintf Signed-off-by: Xuezhi Zhang <zhangxuezhi1@yulong.com> Link: https://lore.kernel.org/r/20210403140722.169623-1-llyz108@163.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2021-02-12staging: fbtft: add tearing signal detectCarlis1-0/+115
For st7789v IC, when we need continuous full screen refresh, it is best to wait for the tearing effect line signal to arrive to avoid screen tearing. Signed-off-by: Carlis <zhangxuezhi1@yulong.com> Link: https://lore.kernel.org/r/1612706517-124617-1-git-send-email-zhangxuezhi3@gmail.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2020-05-22staging: fbtft: fb_st7789v: make HSD20_IPS numeric and not a stringColin Ian King1-1/+1
Currently HSD20_IPS is defined as "true" and will always result in a non-zero result even if it is defined as "false" because it is an array and that will never be zero. Fix this by defining it as an integer 1 rather than a literal string. Addessses-Coverity: ("Array compared against 0") Fixes: f03c9b788472 ("staging: fbtft: fb_st7789v: Initialize the Display") Signed-off-by: Colin Ian King <colin.king@canonical.com> Link: https://lore.kernel.org/r/20200521135038.345878-1-colin.king@canonical.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2020-05-15staging: fbtft: fb_st7789v: Initialize the DisplayOliver Graute1-5/+27
Set Gamma Values and Register Values for the HSD20_IPS Panel Signed-off-by: Oliver Graute <oliver.graute@kococonnector.com> Link: https://lore.kernel.org/r/1589380299-21871-1-git-send-email-oliver.graute@gmail.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2020-03-17staging: fbtft: Avoid potential precedence issuesDeepak R Varma1-2/+2
Put parentheses around uses of macro parameters to avoid possible precedence issues. Problem detected by checkpatch. Signed-off-by: Deepak R Varma <mh12gx2825@gmail.com> Reviewed-by: Stefano Brivio <sbrivio@redhat.com> Link: https://lore.kernel.org/r/5c8520a5c3da453460608deee9a25232d52f4513.1584314604.git.mh12gx2825@gmail.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2020-03-17staging: fbtft: simplify array index computationDeepak R Varma1-1/+5
An array index is being computed by mathematical calculation on the Lvalue side of the expression. This also further results in the statement exceeding 80 character statement length. A local variable can store the value of the array index computation. The variable can then be used as array index. This improves readability of the code and also address 80 character warning raised by checkpatch. Signed-off-by: Deepak R Varma <mh12gx2825@gmail.com> Link: https://lore.kernel.org/r/4bf407e1b3e05745f767b2bad6218c9fb836d869.1584314604.git.mh12gx2825@gmail.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2020-03-17staging: fbtft: Reformat long macro definitionsDeepak R Varma1-3/+11
Multiple macro definitions crossing 80 character line length makes them hard to understand. Reformatting the these lines makes the code more readable and easier to understand. Issue flagged by checkpatch script. Signed-off-by: Deepak R Varma <mh12gx2825@gmail.com> Link: https://lore.kernel.org/r/b8d2fc0f55339830694ee51860cc970ce1b9cae4.1584314604.git.mh12gx2825@gmail.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2020-03-17staging: fbtft: Reformat line over 80 charactersDeepak R Varma1-1/+3
A long variable name beyond 80 characters extends into the next line. Reformatting the line makes it more readable. Also adding an extra line for the next instruction following current if block helps understand it better. Signed-off-by: Deepak R Varma <mh12gx2825@gmail.com> Link: https://lore.kernel.org/r/027ccfa893feafc25da273b4b4de444d7a466cfd.1584314603.git.mh12gx2825@gmail.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2019-12-10fbtft: Fix the initialization from property algorithmAndy Shevchenko1-3/+3
When converting to device property API the commit 8b2d3aeeb7ec ("fbtft: Make use of device property API") mistakenly placed the reading of the first value inside the loop, that jumps over value after initialization sequence or sleep commands. Move the above mentioned reading outside of the loop to restore correct behaviour. Besides that, we are using pre-increment operation which may lead to out of the boundary access at the end of sequence. Thus, allocate buffer with an additional element at the end to prevent out of the boundary access. Fixes: 8b2d3aeeb7ec ("fbtft: Make use of device property API") Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Link: https://lore.kernel.org/r/20191121140207.65089-1-andriy.shevchenko@linux.intel.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2019-12-10staging: fbtft: Do not hardcode SPI CS polarity inversionLinus Walleij2-6/+19
The current use of the mode flag SPI_CS_HIGH is fragile: it overwrites anything already assigned by the SPI core. Assign ^= SPI_CS_HIGH since we might be active high already, and that is usually the case with GPIOs used for chip select, even if they are in practice active low. Add a comment clarifying why ^= SPI_CS_HIGH is the right choice here. Reported-by: Mark Brown <broonie@kernel.org> Signed-off-by: Linus Walleij <linus.walleij@linaro.org> Link: https://lore.kernel.org/r/20191204233230.22309-1-linus.walleij@linaro.org Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2019-11-20staging: fbtft: Fix Kconfig indentationKrzysztof Kozlowski1-6/+6
Adjust indentation from spaces to tab (+optional two spaces) as in coding style with command like: $ sed -e 's/^ /\t/' -i */Kconfig Signed-off-by: Krzysztof Kozlowski <krzk@kernel.org> Link: https://lore.kernel.org/r/20191120133911.13539-1-krzk@kernel.org Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2019-11-20fbtft: Drop OF dependencyAndy Shevchenko2-3/+3
Now, since driver became OF independent, no need to keep OF dependency. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Link: https://lore.kernel.org/r/20191120095716.26628-5-andriy.shevchenko@linux.intel.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2019-11-20fbtft: Make use of device property APIAndy Shevchenko1-47/+58
Make use of device property API in this driver so that both OF based system and ACPI based system can use this driver. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Link: https://lore.kernel.org/r/20191120095716.26628-4-andriy.shevchenko@linux.intel.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2019-11-20fbtft: Drop useless #ifdef CONFIG_OF and dead codeAndy Shevchenko1-17/+2
First of all there is no need to guard GPIO request by CONFIG_OF. It works for everybody independently on resource provider. While here, rename the function to reflect the above. Moreover, since we have a global dependency to OF, the rest of conditional compilation is no-op, i.e. it's always be true. Due to above drop useless #ifdef CONFIG_OF and therefore dead code. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Link: https://lore.kernel.org/r/20191120095716.26628-3-andriy.shevchenko@linux.intel.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2019-11-20fbtft: Describe function parameters in kernel-docAndy Shevchenko1-0/+1
Kernel documentation script complains that some of the function parameters are not described: drivers/staging/fbtft/fbtft-core.c:543: warning: Function parameter or member 'pdata' not described in 'fbtft_framebuffer_alloc' Describe function parameters where it's appropriate. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Link: https://lore.kernel.org/r/20191120095716.26628-2-andriy.shevchenko@linux.intel.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2019-11-20fbtft: Make sure string is NULL terminatedAndy Shevchenko1-1/+1
New GCC warns about inappropriate use of strncpy(): drivers/staging/fbtft/fbtft-core.c: In function ‘fbtft_framebuffer_alloc’: drivers/staging/fbtft/fbtft-core.c:665:2: warning: ‘strncpy’ specified bound 16 equals destination size [-Wstringop-truncation] 665 | strncpy(info->fix.id, dev->driver->name, 16); | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Later on the copy is being used with the assumption to be NULL terminated. Make sure string is NULL terminated by switching to snprintf(). Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Link: https://lore.kernel.org/r/20191120095716.26628-1-andriy.shevchenko@linux.intel.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2019-10-26drivers/staging/fbtft/fb_seps525: New driver for SEPS525 (Syncoam) LCD ControllersMichael Hennerich3-0/+221
The SEPS525 is a 160 RGB x 128 Dots, 262K Colors PM-OLED Display Driver and Controller. The controller can be found on the NHD-1.69-160128UGC3 (Newhaven Display International, Inc.). Datasheets: Link: https://www.newhavendisplay.com/appnotes/datasheets/OLEDs/SEPS525.pdf Signed-off-by: Michael Hennerich <michael.hennerich@analog.com> Co-developed-by: Beniamin Bia <beniamin.bia@analog.com> Signed-off-by: Beniamin Bia <beniamin.bia@analog.com> Link: https://lore.kernel.org/r/20191017170203.11999-1-beniamin.bia@analog.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2019-10-24staging: fbtft: Fix duplicate arguments to bitwise ANDJamal Shareef1-11/+11
Fix duplicated arguments to bitwise & operator. Issue detected by coccinelle. Signed-off-by: Jamal Shareef <jamal.k.shareef@gmail.com> Link: https://lore.kernel.org/r/20191023215105.18049-1-jamal.k.shareef@gmail.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2019-10-14Merge 5.4-rc3 into staging-nextGreg Kroah-Hartman5-2129/+6
We want the staging driver fixes in here as well to build on and test with. Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2019-10-13staging: fbtft: fbtft-core: Fix last line displayed on fbconMichael Hennerich1-1/+1
For the special case when fbtft_mkdirty() is called with with -1 for the y coordinate, the height is truncated by 1. This isn't required, and causes the last line to not update. Signed-off-by: Michael Hennerich <michael.hennerich@analog.com> Signed-off-by: Alexandru Ardelean <alexandru.ardelean@analog.com> Link: https://lore.kernel.org/r/20191011112441.31003-1-alexandru.ardelean@analog.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2019-10-04Staging: fbtft: fix memory leak in fbtft_framebuffer_allocNavid Emamdoost1-2/+5
In fbtft_framebuffer_alloc the error handling path should take care of releasing frame buffer after it is allocated via framebuffer_alloc, too. Therefore, in two failure cases the goto destination is changed to address this issue. Fixes: c296d5f9957c ("staging: fbtft: core support") Signed-off-by: Navid Emamdoost <navid.emamdoost@gmail.com> Reviewed-by: Dan Carpenter <dan.carpenter@gmail.com> Cc: stable <stable@vger.kernel.org> Link: https://lore.kernel.org/r/20190930030949.28615-1-navid.emamdoost@gmail.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2019-10-01staging/fbtft: Remove flexfbNoralf Trønnes3-858/+0
flexfb was an attempt to write a generic fbtft driver that was abandoned. All the displays it supports are supported by other fbtft drivers. Signed-off-by: Noralf Trønnes <noralf@tronnes.org> Link: https://lore.kernel.org/r/20190917171843.10334-3-noralf@tronnes.org Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2019-10-01staging/fbtft: Remove fbtft_deviceNoralf Trønnes3-1268/+0
Commit c440eee1a7a1 ("Staging: fbtft: Switch to the gpio descriptor interface") removed the gpio code from fbtft_device rendering it useless. fbtft_device is a module that was used on the Raspberry Pi to dynamically add fbtft devices when the Pi didn't have Device Tree support. Just remove the module since it's the responsibility of Device Tree, ACPI or platform code to add devices. Fixes: c440eee1a7a1 ("Staging: fbtft: Switch to the gpio descriptor interface") Signed-off-by: Noralf Trønnes <noralf@tronnes.org> Link: https://lore.kernel.org/r/20190917171843.10334-2-noralf@tronnes.org Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2019-10-01staging/fbtft: Depend on OFNoralf Trønnes1-1/+1
Commit c440eee1a7a1 ("Staging: fbtft: Switch to the gpio descriptor interface") removed setting gpios via platform data. This means that fbtft will now only work with Device Tree so set the dependency. This also prevents a NULL pointer deref on non-DT platform because fbtftops.request_gpios is not set in that case anymore. Fixes: c440eee1a7a1 ("Staging: fbtft: Switch to the gpio descriptor interface") Cc: stable <stable@vger.kernel.org> Signed-off-by: Noralf Trønnes <noralf@tronnes.org> Link: https://lore.kernel.org/r/20190917171843.10334-1-noralf@tronnes.org Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2019-09-12staging: fbtft: make several arrays static const, makes object smallerColin Ian King7-7/+7
Don't populate the arrays on the stack but instead make them static const. Makes the object code smaller by 1329 bytes. Before: text data bss dec hex filename 5581 1488 64 7133 1bdd drivers/staging/fbtft/fb_hx8340bn.o 5444 1264 0 6708 1a34 drivers/staging/fbtft/fb_hx8347d.o 3581 1360 0 4941 134d drivers/staging/fbtft/fb_ili9163.o 7154 1552 0 8706 2202 drivers/staging/fbtft/fb_ili9320.o 7478 2544 0 10022 2726 drivers/staging/fbtft/fb_ili9325.o 6327 1424 0 7751 1e47 drivers/staging/fbtft/fb_s6d1121.o 6498 1776 0 8274 2052 drivers/staging/fbtft/fb_ssd1289.o After: text data bss dec hex filename 5376 1584 64 7024 1b70 drivers/staging/fbtft/fb_hx8340bn.o 5276 1328 0 6604 19cc drivers/staging/fbtft/fb_hx8347d.o 3581 1360 0 4941 134d drivers/staging/fbtft/fb_ili9163.o 6905 1616 0 8521 2149 drivers/staging/fbtft/fb_ili9320.o 7229 2608 0 9837 266d drivers/staging/fbtft/fb_ili9325.o 6030 1488 0 7518 1d5e drivers/staging/fbtft/fb_s6d1121.o 6249 1872 0 8121 1fb9 drivers/staging/fbtft/fb_ssd1289.o (gcc version 9.2.1, amd64) Signed-off-by: Colin Ian King <colin.king@canonical.com> Link: https://lore.kernel.org/r/20190906153052.31846-1-colin.king@canonical.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2019-08-12Merge 5.3-rc4 into staging-nextGreg Kroah-Hartman9-34/+31
We need the iio/staging fixes in here as well. Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2019-07-30Staging: fbtft: Fix some typo. pdc8544 --> pcd8544Christophe JAILLET1-2/+2
The driver is related to 'pcd8544'. However, 2 strings are about pdc8544 (c and d switched) Fix it. Signed-off-by: Christophe JAILLET <christophe.jaillet@wanadoo.fr> Link: https://lore.kernel.org/r/20190725183856.17616-1-christophe.jaillet@wanadoo.fr Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2019-07-25Staging: fbtft: Fix GPIO handlingJan Sebastian Götte9-11/+11
Commit c440eee1a7a1 ("Staging: fbtft: Switch to the gpio descriptor interface") breaks GPIO handling. In several places, checks to only set a GPIO if it was configured ended up backwards. I have tested this fix. The fixed driver works with a ili9486 display connected to a raspberry pi via SPI. Fixes: c440eee1a7a1d ("Staging: fbtft: Switch to the gpio descriptor interface") Tested-by: Jan Sebastian Götte <linux@jaseg.net> Reviewed-by: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Signed-off-by: Jan Sebastian Götte <linux@jaseg.net> Link: https://lore.kernel.org/r/75ada52f-afa1-08bc-d0ce-966fc1110e70@jaseg.net Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2019-07-25Staging: fbtft: Fix reset assertion when using gpio descriptorPhil Reid1-2/+2
Typically gpiod_set_value calls would assert the reset line and then release it using the symantics of: gpiod_set_value(par->gpio.reset, 0); ... delay gpiod_set_value(par->gpio.reset, 1); And the gpio binding would specify the polarity. Prior to conversion to gpiod calls the polarity in the DT was ignored and assumed to be active low. Fix it so that DT polarity is respected. Fixes: c440eee1a7a1 ("Staging: fbtft: Switch to the gpio descriptor interface") Reviewed-by: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Tested-by: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Tested-by: Jan Sebastian Götte <linux@jaseg.net> Signed-off-by: Phil Reid <preid@electromag.com.au> Cc: stable <stable@vger.kernel.org> Link: https://lore.kernel.org/r/1563236677-5045-3-git-send-email-preid@electromag.com.au Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2019-07-25Staging: fbtft: Fix probing of gpio descriptorPhil Reid1-21/+18
Conversion to use gpio descriptors broke all gpio lookups as devm_gpiod_get_index was converted to use dev->driver->name for the gpio name lookup. Fix this by using the name param. In addition gpiod_get post-fixes the -gpios to the name so that shouldn't be included in the call. However this then breaks the of_find_property call to see if the gpio entry exists as all fbtft treats all gpios as optional. So use devm_gpiod_get_index_optional instead which achieves the same thing and is simpler. Nishad confirmed the changes where only ever compile tested. Fixes: c440eee1a7a1 ("Staging: fbtft: Switch to the gpio descriptor interface") Reviewed-by: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Tested-by: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Tested-by: Jan Sebastian Götte <linux@jaseg.net> Signed-off-by: Phil Reid <preid@electromag.com.au> Cc: stable <stable@vger.kernel.org> Link: https://lore.kernel.org/r/1563236677-5045-2-git-send-email-preid@electromag.com.au Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2019-06-12fbdev: make unregister/unlink functions not failDaniel Vetter1-1/+3
Except for driver bugs (which we'll catch with a WARN_ON) this is only to report failures of the new driver taking over the console. There's nothing the outgoing driver can do about that, and no one ever bothered to actually look at these return values. So remove them all. v2: fixup unregister_framebuffer in savagefb, fbtft, ivtvfb, and neofb drivers, reported by kbuild. Signed-off-by: Daniel Vetter <daniel.vetter@intel.com> Reviewed-by: Sam Ravnborg <sam@ravnborg.org> Reviewed-by: Maarten Lankhorst <maarten.lankhorst@linux.intel.com> Cc: Bartlomiej Zolnierkiewicz <b.zolnierkie@samsung.com> Cc: Daniel Vetter <daniel.vetter@ffwll.ch> Cc: "Michał Mirosław" <mirq-linux@rere.qmqm.pl> Cc: Peter Rosin <peda@axentia.se> Cc: Hans de Goede <hdegoede@redhat.com> Cc: Mikulas Patocka <mpatocka@redhat.com> Cc: linux-fbdev@vger.kernel.org Link: https://patchwork.freedesktop.org/patch/msgid/20190528090304.9388-19-daniel.vetter@ffwll.ch
2019-04-03staging: add missing SPDX lines to Kconfig filesGreg Kroah-Hartman1-0/+1
There are a few remaining drivers/staging/*/Kconfig files that do not have SPDX identifiers in them. Add the correct GPL-2.0 identifier to them to make scanning tools happy. 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-04-02staging: fbtft: fb_agm1264k-fl.c: Replace bit shifting with BIT macroPayal Kshirsagar1-1/+1
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-03-19staging: fbtft: ternary statement to if statement.Bhagyashri Dighole1-1/+2
Convert a ternary statement into a if statement which is detected while resolving "WARNING: line over 80 characters". Use BIT() macro instead manually left shifting. Signed-off-by: Bhagyashri Dighole <digholebhagyashri@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2019-03-18staging: fbtft: fixed format-string errors.Jeremy Sowden5-9/+10
Added __printf attribute to declaration of fbtft_dbg_hex and fixed mismatches between format-specifiers and arguments in several function calls. Signed-off-by: Jeremy Sowden <jeremy@azazel.net> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2019-03-18staging: fbtft: line over 80 charactersBhagyashri Dighole2-2/+4
Fix the checkpatch.pl warning WARNING: line over 80 characters Signed-off-by: Bhagyashri Dighole <digholebhagyashri@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2019-03-18staging: fbtft: convert a macro to a function.Bhagyashri Dighole1-4/+5
Convert a macro to an inline function to improve type safety and make the code simpler. Signed-off-by: Bhagyashri Dighole <digholebhagyashri@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2019-03-18staging: fbtft: Remove unused #defines.Bhagyashri Dighole1-6/+0
Remove unused #defines, which is detected while resolving `CHECK: Avoid CamelCase` issue. Signed-off-by: Bhagyashri Dighole <digholebhagyashri@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2019-03-18staging: fbtft: Fix line over 80 charactersDaniela Mormocea1-1/+3
Fix line with over 80 characters to get rid of the warning given by checkpatch Signed-off-by: Daniela Mormocea <daniela.mormocea@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2019-02-26Staging: fbtft: Fix line over 80 charactersBhanusree Pola1-3/+3
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 Pola1-1/+0
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 Pola2-2/+2
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 Kamdar27-587/+143
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>