22 May, 2020
1 commit
-
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
Link: https://lore.kernel.org/r/20200521135038.345878-1-colin.king@canonical.com
Signed-off-by: Greg Kroah-Hartman
15 May, 2020
1 commit
-
Set Gamma Values and Register Values for the HSD20_IPS Panel
Signed-off-by: Oliver Graute
Link: https://lore.kernel.org/r/1589380299-21871-1-git-send-email-oliver.graute@gmail.com
Signed-off-by: Greg Kroah-Hartman
17 Mar, 2020
4 commits
-
Put parentheses around uses of macro parameters to avoid possible
precedence issues. Problem detected by checkpatch.Signed-off-by: Deepak R Varma
Reviewed-by: Stefano Brivio
Link: https://lore.kernel.org/r/5c8520a5c3da453460608deee9a25232d52f4513.1584314604.git.mh12gx2825@gmail.com
Signed-off-by: Greg Kroah-Hartman -
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
Link: https://lore.kernel.org/r/4bf407e1b3e05745f767b2bad6218c9fb836d869.1584314604.git.mh12gx2825@gmail.com
Signed-off-by: Greg Kroah-Hartman -
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
Link: https://lore.kernel.org/r/b8d2fc0f55339830694ee51860cc970ce1b9cae4.1584314604.git.mh12gx2825@gmail.com
Signed-off-by: Greg Kroah-Hartman -
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
Link: https://lore.kernel.org/r/027ccfa893feafc25da273b4b4de444d7a466cfd.1584314603.git.mh12gx2825@gmail.com
Signed-off-by: Greg Kroah-Hartman
10 Dec, 2019
2 commits
-
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
Link: https://lore.kernel.org/r/20191121140207.65089-1-andriy.shevchenko@linux.intel.com
Signed-off-by: Greg Kroah-Hartman -
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
Signed-off-by: Linus Walleij
Link: https://lore.kernel.org/r/20191204233230.22309-1-linus.walleij@linaro.org
Signed-off-by: Greg Kroah-Hartman
20 Nov, 2019
6 commits
-
Adjust indentation from spaces to tab (+optional two spaces) as in
coding style with command like:
$ sed -e 's/^ /\t/' -i */KconfigSigned-off-by: Krzysztof Kozlowski
Link: https://lore.kernel.org/r/20191120133911.13539-1-krzk@kernel.org
Signed-off-by: Greg Kroah-Hartman -
Now, since driver became OF independent, no need to keep OF dependency.
Signed-off-by: Andy Shevchenko
Link: https://lore.kernel.org/r/20191120095716.26628-5-andriy.shevchenko@linux.intel.com
Signed-off-by: Greg Kroah-Hartman -
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
Link: https://lore.kernel.org/r/20191120095716.26628-4-andriy.shevchenko@linux.intel.com
Signed-off-by: Greg Kroah-Hartman -
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
Link: https://lore.kernel.org/r/20191120095716.26628-3-andriy.shevchenko@linux.intel.com
Signed-off-by: Greg Kroah-Hartman -
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
Link: https://lore.kernel.org/r/20191120095716.26628-2-andriy.shevchenko@linux.intel.com
Signed-off-by: Greg Kroah-Hartman -
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
Link: https://lore.kernel.org/r/20191120095716.26628-1-andriy.shevchenko@linux.intel.com
Signed-off-by: Greg Kroah-Hartman
27 Oct, 2019
1 commit
-
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.pdfSigned-off-by: Michael Hennerich
Co-developed-by: Beniamin Bia
Signed-off-by: Beniamin Bia
Link: https://lore.kernel.org/r/20191017170203.11999-1-beniamin.bia@analog.com
Signed-off-by: Greg Kroah-Hartman
25 Oct, 2019
1 commit
-
Fix duplicated arguments to bitwise & operator.
Issue detected by coccinelle.Signed-off-by: Jamal Shareef
Link: https://lore.kernel.org/r/20191023215105.18049-1-jamal.k.shareef@gmail.com
Signed-off-by: Greg Kroah-Hartman
14 Oct, 2019
1 commit
-
We want the staging driver fixes in here as well to build on and test
with.Signed-off-by: Greg Kroah-Hartman
13 Oct, 2019
1 commit
-
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
Signed-off-by: Alexandru Ardelean
Link: https://lore.kernel.org/r/20191011112441.31003-1-alexandru.ardelean@analog.com
Signed-off-by: Greg Kroah-Hartman
04 Oct, 2019
1 commit
-
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
Reviewed-by: Dan Carpenter
Cc: stable
Link: https://lore.kernel.org/r/20190930030949.28615-1-navid.emamdoost@gmail.com
Signed-off-by: Greg Kroah-Hartman
01 Oct, 2019
3 commits
-
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
Link: https://lore.kernel.org/r/20190917171843.10334-3-noralf@tronnes.org
Signed-off-by: Greg Kroah-Hartman -
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
Link: https://lore.kernel.org/r/20190917171843.10334-2-noralf@tronnes.org
Signed-off-by: Greg Kroah-Hartman -
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
Signed-off-by: Noralf Trønnes
Link: https://lore.kernel.org/r/20190917171843.10334-1-noralf@tronnes.org
Signed-off-by: Greg Kroah-Hartman
12 Sep, 2019
1 commit
-
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.oAfter:
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
Link: https://lore.kernel.org/r/20190906153052.31846-1-colin.king@canonical.com
Signed-off-by: Greg Kroah-Hartman
12 Aug, 2019
1 commit
-
We need the iio/staging fixes in here as well.
Signed-off-by: Greg Kroah-Hartman
30 Jul, 2019
1 commit
-
The driver is related to 'pcd8544'.
However, 2 strings are about pdc8544 (c and d switched)
Fix it.Signed-off-by: Christophe JAILLET
Link: https://lore.kernel.org/r/20190725183856.17616-1-christophe.jaillet@wanadoo.fr
Signed-off-by: Greg Kroah-Hartman
25 Jul, 2019
3 commits
-
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
Reviewed-by: Nicolas Saenz Julienne
Signed-off-by: Jan Sebastian Götte
Link: https://lore.kernel.org/r/75ada52f-afa1-08bc-d0ce-966fc1110e70@jaseg.net
Signed-off-by: Greg Kroah-Hartman -
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
Tested-by: Nicolas Saenz Julienne
Tested-by: Jan Sebastian Götte
Signed-off-by: Phil Reid
Cc: stable
Link: https://lore.kernel.org/r/1563236677-5045-3-git-send-email-preid@electromag.com.au
Signed-off-by: Greg Kroah-Hartman -
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
Tested-by: Nicolas Saenz Julienne
Tested-by: Jan Sebastian Götte
Signed-off-by: Phil Reid
Cc: stable
Link: https://lore.kernel.org/r/1563236677-5045-2-git-send-email-preid@electromag.com.au
Signed-off-by: Greg Kroah-Hartman
13 Jun, 2019
1 commit
-
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
Reviewed-by: Sam Ravnborg
Reviewed-by: Maarten Lankhorst
Cc: Bartlomiej Zolnierkiewicz
Cc: Daniel Vetter
Cc: "Michał Mirosław"
Cc: Peter Rosin
Cc: Hans de Goede
Cc: Mikulas Patocka
Cc: linux-fbdev@vger.kernel.org
Link: https://patchwork.freedesktop.org/patch/msgid/20190528090304.9388-19-daniel.vetter@ffwll.ch
03 Apr, 2019
3 commits
-
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
-
Challenge suggested by coccinelle.
Prefer using BIT and replace bit shifting with the BIT(x) macro.Signed-off-by: Payal Kshirsagar
Signed-off-by: Greg Kroah-Hartman -
Challenge suggested by coccinelle.
Prefer using BIT and replace bit shifting with the BIT(x) macro.Signed-off-by: Payal Kshirsagar
Signed-off-by: Greg Kroah-Hartman
19 Mar, 2019
1 commit
-
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
Signed-off-by: Greg Kroah-Hartman
18 Mar, 2019
5 commits
-
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
Signed-off-by: Greg Kroah-Hartman -
Fix the checkpatch.pl warning
WARNING: line over 80 charactersSigned-off-by: Bhagyashri Dighole
Signed-off-by: Greg Kroah-Hartman -
Convert a macro to an inline function to improve type safety and make
the code simpler.Signed-off-by: Bhagyashri Dighole
Signed-off-by: Greg Kroah-Hartman -
Remove unused #defines, which is detected while resolving `CHECK:
Avoid CamelCase` issue.Signed-off-by: Bhagyashri Dighole
Signed-off-by: Greg Kroah-Hartman -
Fix line with over 80 characters to get rid of the warning
given by checkpatchSigned-off-by: Daniela Mormocea
Signed-off-by: Greg Kroah-Hartman
26 Feb, 2019
2 commits
-
Fix the checkpatch.pl warning:
WARNING:line over 80 characters
Move Parameters to the next lines with proper alignmentSigned-off-by: Bhanusree Pola
Signed-off-by: Greg Kroah-Hartman -
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
Signed-off-by: Greg Kroah-Hartman