Commit Graph

309 Commits

Author SHA1 Message Date
Andy Shevchenko 88540bc176 fbtft: Make sure string is NULL terminated
[ Upstream commit 21f585480d ]

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>
Signed-off-by: Sasha Levin <sashal@kernel.org>
2019-12-31 16:45:42 +01:00
Navid Emamdoost 5bdea60606 Staging: fbtft: fix memory leak in fbtft_framebuffer_alloc
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: c296d5f995 ("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-04 10:20:57 +02:00
Noralf Trønnes cc29650919 staging/fbtft: Remove flexfb
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-01 08:22:44 +02:00
Noralf Trønnes 2962db71c7 staging/fbtft: Remove fbtft_device
Commit c440eee1a7 ("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: c440eee1a7 ("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-01 08:22:44 +02:00
Noralf Trønnes 63f2b1677f staging/fbtft: Depend on OF
Commit c440eee1a7 ("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: c440eee1a7 ("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-10-01 08:22:44 +02:00
Colin Ian King 5817eca067 staging: fbtft: make several arrays static const, makes object smaller
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-09-12 10:35:52 +01:00
Greg Kroah-Hartman b2a878de11 Merge 5.3-rc4 into staging-next
We need the iio/staging fixes in here as well.

Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2019-08-12 07:41:14 +02:00
Christophe JAILLET 9d6b3ee001 Staging: fbtft: Fix some typo. pdc8544 --> pcd8544
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-30 09:52:04 +02:00
Jan Sebastian Götte 92e3e88488 Staging: fbtft: Fix GPIO handling
Commit c440eee1a7 ("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: c440eee1a7 ("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-25 10:09:29 +02:00
Phil Reid b918d1c270 Staging: fbtft: Fix reset assertion when using gpio descriptor
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: c440eee1a7 ("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-25 09:18:21 +02:00
Phil Reid dbc4f989c8 Staging: fbtft: Fix probing of gpio descriptor
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: c440eee1a7 ("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-07-25 09:18:21 +02:00
Daniel Vetter deb00d2785 fbdev: make unregister/unlink functions not fail
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-06-12 20:28:52 +02:00
Greg Kroah-Hartman 99b75a4e32 staging: add missing SPDX lines to Kconfig files
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-03 11:10:15 +02:00
Payal Kshirsagar 36cbd6851d staging: fbtft: fb_ssd1351.c: Replace bit shifting with BIT macro
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-02 19:57:11 +02:00
Payal Kshirsagar 46a49a52d1 staging: fbtft: fb_agm1264k-fl.c: Replace bit shifting with BIT macro
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-02 19:57:11 +02:00
Bhagyashri Dighole e54c2b0aef staging: fbtft: ternary statement to if statement.
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-19 14:35:42 +01:00
Jeremy Sowden 27a0eb8fb6 staging: fbtft: fixed format-string errors.
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-18 07:06:08 +01:00
Bhagyashri Dighole 3f8e5931fe staging: fbtft: line over 80 characters
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-18 07:06:01 +01:00
Bhagyashri Dighole dfa5fbb9db staging: fbtft: convert a macro to a function.
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-18 07:05:22 +01:00
Bhagyashri Dighole 730551f754 staging: fbtft: Remove unused #defines.
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-18 07:05:20 +01:00
Daniela Mormocea 5e8e08c81f staging: fbtft: Fix line over 80 characters
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-03-18 07:05:19 +01:00
Bhanusree Pola 1ba539d53b Staging: fbtft: Fix line over 80 characters
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-26 11:40:07 +01:00
Bhanusree Pola d0ff480a35 Staging: fbtft: Extra blank line not required before '}'
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-26 11:40:07 +01:00
Bhanusree Pola 4973c2e6d9 Staging: fbtft: Alignment should match open parenthesis
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-02-26 11:40:07 +01:00
Nishad Kamdar c440eee1a7 Staging: fbtft: Switch to the gpio descriptor interface
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>
2019-01-18 11:01:02 +01:00
YueHaibing b57f944785 staging: fbtft: fix strncmp() size warning
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-12-19 08:29:28 +01:00
Mamta Shukla 48b775ca0f staging: fbtft: Prefer using the BIT macro
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-10-03 11:36:08 -07:00
Greg Kroah-Hartman 7dc074348e Merge 4.19-rc4 into staging-next
Handle the merge issues and take the iio and staging driver fixes.

Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2018-09-16 22:04:13 +02:00
Daniel Vetter f8ff6b2d4a staging/fbtft: Update TODO and mailing lists
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-09-10 10:39:19 +02:00
Leonardo Brás 2b2424d9a7 staging: fbtft: Adds space around "/"
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-27 19:38:36 +02:00
Leonardo Brás 1b989094ba staging: fbtft: Add spaces around / - Style
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-08 14:23:16 +02:00
Leonardo Brás 1315e8bad8 staging: fbtft: Erases some repetitive usage of function name - Style
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-08 14:23:16 +02:00
Leonardo Brás c21cbb5ee3 staging: fbtft: Adjust some empty-line problems - Style
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-08 14:23:16 +02:00
Leonardo Brás 5bfac06f3e staging: fbtft: Removes one nesting level to help readability - Style
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-08 14:23:16 +02:00
Leonardo Brás d9932c8be0 staging: fbtft: Changes gamma table to define.
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-08 14:23:16 +02:00
Leonardo Brás e66f30ee13 staging: fbtft: A bit more information on dev_err.
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-08 14:23:16 +02:00
Leonardo Brás 333c7b9405 staging: fbtft: Fixes some alignment issues - Style
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-08 14:23:16 +02:00
Leonardo Brás 0b1533c6c6 staging: fbtft: Puts macro arguments in parenthesis to avoid precedence 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-08-08 14:23:16 +02:00
Matthias Wolf ab608b341b staging: fbtft: Fix line continuation
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-16 11:47:12 +02:00
Matthias Wolf 66558395e1 staging: fbtft: Fix line over 80 characters
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-16 11:47:12 +02:00
Radek Dostál 0d7fa8fa9c staging: fbtft: indent fbtft_device_display - last entry - pdev - dev
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-07-02 10:43:10 +02:00
Linus Torvalds 0f105cf4f6 - 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
 -----BEGIN PGP SIGNATURE-----
 
 iQIzBAABCgAdFiEEdrbJNaO+IJqU8IdIUa+KL4f8d2EFAlsecEYACgkQUa+KL4f8
 d2FGhA/+K+4o6WmyNxcQ2NZdZ0XZecFJv+iE73GHl2YYQH5dW6r98BmWa8Blbfdf
 Ik3Q9cUAcsB9P5OMQrrTC0vpoFbvP/0aNhd+essIAx+mQGQbr73uoDMTgzyD9y9s
 lqTXBfbvEP5AUwyLWmmLK0LwaU4LFrRF2q2lMwIqy9Cklogl6Xy+bNToq+NHkpvW
 nPkNiZfy3afDSSycqiUgPRbpQT1Yw2+BswSKWybI8HSkSJozNEZM8GydJmRSeNPD
 VvQh7j3/EHhZ1EyaBKc1xLYDJ0OKgbXSWuXUxIRCGlaQCVazCAONu4KDBVeYWmdB
 khqJRobWbNrGeo2zvAOuw0aYf0mpc5HMTzQAQkjhvFTEbgoyc/di1oYKClfT3eke
 xPq1L5lEl4uGU+CRHvC9eiju1vLOiFX8aFvnJInNacooWdCJQmKurl8FwyiKnAWT
 w0GExtT6CHw2N3OIKk3qnymlGpUJ0DCwxlOVK6m69nR5dhUq83KPpbALA4Bz6xLU
 BYoHxa46cqVmv0i2zRyL+ANsk47ayLG48KLuLg5evRCbCP2IomLqBgQ06PteRVOf
 mNvJtM461J+1MRh18G2g5OfYsHcIGrvG5scEUvZJiNYimSCHLcFPrO/tgYV4fgST
 Raqbi/zcLbhKrq+GxKUqufDxvLcwmpNQbibluYWu9fBaAR1cJ3c=
 =hWye
 -----END PGP SIGNATURE-----

Merge tag 'backlight-next-4.18' of 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-06-11 07:23:19 -07:00
Daniel Vetter 9adfe5c89b staging: fbtft: Stop using BL_CORE_DRIVER1
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-30 13:25:14 +01:00
Renato Soma cc1c0eea85 staging: fbtft: Fixed lines exceeding columns limit
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-23 14:36:16 +02:00
Linus Walleij f670e481ca staging: fbtft: Add TODO file with GPIO work item
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-04-23 14:36:10 +02:00
Corentin Labbe 1bb66049da staging: fbtft: remove unused FB_TFT_SSD1325 kconfig
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-25 13:10:39 +01:00
Greg Kroah-Hartman 78c00ccc52 staging: fbtft: remove redundant license text
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-15 16:03:46 +01:00
Greg Kroah-Hartman 783de57c52 staging: fbtft: add SPDX identifiers
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-15 16:03:46 +01:00
Luis Gerhorst 9365f281e2 staging: fbtft: Fix indentation
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-10 19:14:47 +01:00
Luis Gerhorst c3738b37d8 drivers/fbtft: Remove unnecessary braces from if/else
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-08 16:03:45 +01:00