#
b83b7368 |
|
26-Oct-2023 |
Uwe Kleine-König <u.kleine-koenig@pengutronix.de> |
staging: fbtft: Convert to platform remove callback returning void The .remove() callback for a platform driver returns an int which makes many driver authors wrongly assume it's possible to do error handling by returning an error code. However the value returned is (mostly) ignored and this typically results in resource leaks. To improve here there is a quest to make the remove callback return void. In the first step of this quest all drivers are converted to .remove_new() which already returns void. The function fbtft_driver_remove_pdev() (that exists several times as it's part of a macro expansion) returns zero unconditionally, so it can be trivially converted to return void without semantic changes. Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de> Link: https://lore.kernel.org/r/20231026214407.2508590-2-u.kleine-koenig@pengutronix.de Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
|
#
0e8cf2be |
|
16-Mar-2022 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
staging: fbtft: Constify buf parameter in fbtft_dbg_hex() It's obvious that we don't and shouldn't modify buffer that is about to be dumped. Constify parameter in fbtft_dbg_hex() to make it clear. Fixes: c296d5f9957c ("staging: fbtft: core support") Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Link: https://lore.kernel.org/r/20220316165351.58107-1-andriy.shevchenko@linux.intel.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
|
#
39ddef56 |
|
18-Jan-2022 |
Uwe Kleine-König <u.kleine-koenig@pengutronix.de> |
staging: fbtft: Deduplicate driver registration macros The two macros FBTFT_REGISTER_DRIVER and FBTFT_REGISTER_SPI_DRIVER contain quite some duplication: Both define an spi driver and an of device table and the differences are quite subtle. So create two new macros and use both twice. Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de> Link: https://lore.kernel.org/r/20220118181338.207943-2-u.kleine-koenig@pengutronix.de Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
|
#
a0386bba |
|
23-Jan-2022 |
Uwe Kleine-König <u.kleine-koenig@pengutronix.de> |
spi: make remove callback a void function The value returned by an spi driver's remove function is mostly ignored. (Only an error message is printed if the value is non-zero that the error is ignored.) So change the prototype of the remove function to return no value. This way driver authors are not tempted to assume that passing an error to the upper layer is a good idea. All drivers are adapted accordingly. There is no intended change of behaviour, all callbacks were prepared to return 0 before. Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de> Acked-by: Marc Kleine-Budde <mkl@pengutronix.de> Acked-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Geert Uytterhoeven <geert+renesas@glider.be> Acked-by: Jérôme Pouiller <jerome.pouiller@silabs.com> Acked-by: Miquel Raynal <miquel.raynal@bootlin.com> Acked-by: Jonathan Cameron <Jonathan.Cameron@huawei.com> Acked-by: Claudius Heine <ch@denx.de> Acked-by: Stefan Schmidt <stefan@datenfreihafen.org> Acked-by: Alexandre Belloni <alexandre.belloni@bootlin.com> Acked-by: Ulf Hansson <ulf.hansson@linaro.org> # For MMC Acked-by: Marcus Folkesson <marcus.folkesson@gmail.com> Acked-by: Łukasz Stelmach <l.stelmach@samsung.com> Acked-by: Lee Jones <lee.jones@linaro.org> Link: https://lore.kernel.org/r/20220123175201.34839-6-u.kleine-koenig@pengutronix.de Signed-off-by: Mark Brown <broonie@kernel.org>
|
#
c222ea5d |
|
23-Jan-2022 |
Uwe Kleine-König <u.kleine-koenig@pengutronix.de> |
staging: fbtft: Deduplicate driver registration macros The two macros FBTFT_REGISTER_DRIVER and FBTFT_REGISTER_SPI_DRIVER contain quite some duplication: Both define an spi driver and an of device table and the differences are quite subtle. So create two new macros and use both twice. Link: https://lore.kernel.org/r/20220118181338.207943-2-u.kleine-koenig@pengutronix.de Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de> Acked-by: Lee Jones <lee.jones@linaro.org> Link: https://lore.kernel.org/r/20220123175201.34839-3-u.kleine-koenig@pengutronix.de Signed-off-by: Mark Brown <broonie@kernel.org>
|
#
7d8e4c98 |
|
23-Jan-2022 |
Uwe Kleine-König <u.kleine-koenig@pengutronix.de> |
staging: fbtft: Fix error path in fbtft_driver_module_init() If registering the platform driver fails, the function must not return without undoing the spi driver registration first. Fixes: c296d5f9957c ("staging: fbtft: core support") Link: https://lore.kernel.org/r/20220118181338.207943-1-u.kleine-koenig@pengutronix.de Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de> Acked-by: Lee Jones <lee.jones@linaro.org> Link: https://lore.kernel.org/r/20220123175201.34839-2-u.kleine-koenig@pengutronix.de Signed-off-by: Mark Brown <broonie@kernel.org>
|
#
426aca16 |
|
18-Jan-2022 |
Uwe Kleine-König <u.kleine-koenig@pengutronix.de> |
staging: fbtft: Fix error path in fbtft_driver_module_init() If registering the platform driver fails, the function must not return without undoing the spi driver registration first. Fixes: c296d5f9957c ("staging: fbtft: core support") Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de> Link: https://lore.kernel.org/r/20220118181338.207943-1-u.kleine-koenig@pengutronix.de Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
|
#
15e66fc7 |
|
01-Dec-2021 |
Heiner Kallweit <hkallweit1@gmail.com> |
staging: fbtft: add macro FBTFT_REGISTER_SPI_DRIVER After 5fa6863ba692 ("spi: Check we have a spi_device_id for each DT compatible") we need to add spi id_tables. Changing existing macro FBTFT_REGISTER_DRIVER would have meant to change arguments and therefore adjust all fbtft drivers. This patch adds a new and simplified macro FBTFT_REGISTER_SPI_DRIVER that includes a spi id_table, and in addition to that: - does not define a platform driver - uses macro module_spi_driver() Signed-off-by: Heiner Kallweit <hkallweit1@gmail.com> Link: https://lore.kernel.org/r/a58b3bc9-27a2-3f16-dd92-e597666a0263@gmail.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
|
#
cb08d3d2 |
|
12-Oct-2021 |
Uwe Kleine-König <u.kleine-koenig@pengutronix.de> |
staging: fbtft: Make fbtft_remove_common() return void fbtft_remove_common() is only called with a non-NULL fb_info. (All callers are in remove callbacks and the matching probe callbacks set driver data accordingly.) So fbtft_remove_common() always returns zero. Make it return void instead which makes it easier to see in the callers that there is no error to handle. Also the return value of platform and spi remove callbacks is ignored anyway and not freeing resources in .remove() is a bad idea. Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de> Link: https://lore.kernel.org/r/20211012153945.2651412-20-u.kleine-koenig@pengutronix.de Acked-by: Andy Shevchenko <andy.shevchenko@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
|
#
f54df479 |
|
15-Mar-2020 |
Deepak R Varma <mh12gx2825@gmail.com> |
staging: fbtft: Avoid potential precedence issues 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>
|
#
b32d2fb2 |
|
15-Mar-2020 |
Deepak R Varma <mh12gx2825@gmail.com> |
staging: fbtft: Reformat long macro definitions 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>
|
#
189f39ee |
|
20-Nov-2019 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
fbtft: Drop OF dependency 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>
|
#
27a0eb8f |
|
08-Mar-2019 |
Jeremy Sowden <jeremy@azazel.net> |
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>
|
#
c440eee1 |
|
16-Jan-2019 |
Nishad Kamdar <nishadkamdar@gmail.com> |
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>
|
#
48b775ca |
|
03-Oct-2018 |
Mamta Shukla <mamtashukla555@gmail.com> |
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>
|
#
2b2424d9 |
|
09-Aug-2018 |
Leonardo Brás <leobras.c@gmail.com> |
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>
|
#
333c7b94 |
|
07-Aug-2018 |
Leonardo Brás <leobras.c@gmail.com> |
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>
|
#
0b1533c6 |
|
07-Aug-2018 |
Leonardo Brás <leobras.c@gmail.com> |
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>
|
#
9adfe5c8 |
|
25-Apr-2018 |
Daniel Vetter <daniel.vetter@ffwll.ch> |
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>
|
#
78c00ccc |
|
11-Jan-2018 |
Greg Kroah-Hartman <gregkh@linuxfoundation.org> |
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>
|
#
783de57c |
|
11-Jan-2018 |
Greg Kroah-Hartman <gregkh@linuxfoundation.org> |
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>
|
#
60da7020 |
|
02-Mar-2017 |
Heiner Kallweit <hkallweit1@gmail.com> |
staging: fbtft: add helper fbtft_write_buf_dc 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>
|
#
0a859b31 |
|
22-Feb-2017 |
Joe Perches <joe@perches.com> |
staging: fbtft: Make the pointers to s16 init arrays const This allows making some of the actual arrays const. Signed-off-by: Joe Perches <joe@perches.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
|
#
22eb36b8 |
|
02-Feb-2017 |
Arnd Bergmann <arnd@arndb.de> |
staging: fbtft: change 'gamma' array to u32 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>
|
#
7c3eaadd |
|
18-Jan-2017 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
staging: fbtft: remove custom DMA mapped buffer There is no need to duplicate what SPI core already does, i.e. mapping buffers for DMA capable transfers. Remove all related pices of code. Note, that code, besides its redundancy, was buggy: DMA address potentially can be 0, SPI slave device has nothing to do with DMA capable device properties and DMA mask in particular. Suggested-by: Noralf Trønnes <noralf@tronnes.org> Acked-by: Noralf Trønnes <noralf@tronnes.org> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
|
#
9f8e0562 |
|
07-Oct-2016 |
Joe Perches <joe@perches.com> |
staging: fbtft: Convert int arrays to s16 These arrays use -1, -2, and -3 as initiators for various types of writes to initialize hardware. No values are used that conflict with using these arrays as s16 instead of int and reducing overall data is good. $ size drivers/staging/fbtft/built-in.o* text data bss dec hex filename 116120 32872 4152 153144 25638 drivers/staging/fbtft/built-in.o.new 116104 36344 6200 158648 26bb8 drivers/staging/fbtft/built-in.o.old Miscellaneous: o Realign some of the arrays to make reading a bit easier Signed-off-by: Joe Perches <joe@perches.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
|
#
1c41494a |
|
17-Jul-2016 |
Ming Yang <minos.future@gmail.com> |
Staging: fbtft: fixed unsigned type warnings 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>
|
#
817d1648 |
|
20-Dec-2015 |
Priit Laes <plaes@plaes.org> |
staging: fbtft: Remove unused and duplicated defines This patch makes use of the standard MIPI Display Command Set to remove some of duplicate defines from the headers. Signed-off-by: Priit Laes <plaes@plaes.org> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
|
#
3821a065 |
|
23-Oct-2015 |
Andrew F. Davis <afd@ti.com> |
spi: Drop owner assignment from spi_drivers An spi_driver does not need to set an owner, it will be populated by the driver core. Signed-off-by: Andrew F. Davis <afd@ti.com> Acked-by: Jonathan Cameron <jic23@kernel.org> Signed-off-by: Mark Brown <broonie@kernel.org>
|
#
367e8560 |
|
07-Oct-2015 |
Ksenija Stanojevic <ksenija.stanojevic@gmail.com> |
Staging: fbtbt: Replace timespec with ktime_t struct timespec will overflow in year 2038, so replace it with ktime_t. And replace functions that use struct timespec, timespec_sub with ktime_sub. Also use monotonic time instead of real time, by replacing getnstimeofday with ktime_get, to be more robust against leap seconds and settimeofday() calls. Signed-off-by: Ksenija Stanojevic <ksenija.stanojevic@gmail.com> Reviewed-by: Arnd Bergmann <arnd@arndb.de> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
|
#
1014c2ce |
|
03-Sep-2015 |
Anish Bhatt <anish7@gmail.com> |
staging/fbtft : Fix multiple/missing blank line issues 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>
|
#
4a1a8383 |
|
02-Sep-2015 |
Anish Bhatt <anish7@gmail.com> |
staging/fbtft : Remove FSF mailing address checkpatch.pl recommends that this is no longer required. Also replaces ASCII-art copyright notice with simple text Signed-off-by: Anish Bhatt <anish@chelsio.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
|
#
cd951ddc |
|
10-Aug-2015 |
Joe Perches <joe@perches.com> |
staging: fbtft: Remove unnecessary externs Using 'extern' is not necessary for function prototypes. Miscellanea: o Reflow alignments Signed-off-by: Joe Perches <joe@perches.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
|
#
ad6d8812 |
|
30-Jul-2015 |
Noralf Trønnes <noralf@tronnes.org> |
staging: fbtft: core: Don't set device platform_data Pass platform_data as an argument to fbtft_framebuffer_alloc() instead of using dev->platform_data. This fixes an issue where the device comes from Device Tree and fbtft_probe_common() sets dev->platform_data to allocated memory. When the module is reloaded, dev->platform_data points to freed memory. Signed-off-by: Noralf Trønnes <noralf@tronnes.org> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
|
#
b38c760a |
|
31-May-2015 |
Madhusudhanan Ravindran <mravindr@visteon.com> |
staging: fbtft: replace fbtft_dev_dbg with standard dev_dbg call This patch attempts to simplify the debugging using standard dev_dbg call so that individual debug prints can be enabled or disbled by dynamic debugging rather than using module params. Signed-off-by: Madhusudhanan Ravindran <mravindr@visteon.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
|
#
92def781 |
|
20-Mar-2015 |
Masanari Iida <standby24x7@gmail.com> |
staging: fbtft: Fix typo in fbtft This patch fix spelling typo in comment and printk within fbtft Signed-off-by: Masanari Iida <standby24x7@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
|
#
4ebe6f46 |
|
25-Mar-2015 |
Helen Fornazier <helen.fornazier@gmail.com> |
staging: fbtft: Remove do {} while(0) in single statement macro This patch fixes the checkpatch.pl warning: WARNING: Single statement macros should not use a do {} while (0) loop +#define write_reg(par, ...) \ +do { \ + par->fbtftops.write_register(par, NUMARGS(__VA_ARGS__), __VA_ARGS__); \ +} while (0) Signed-off-by: Helen Fornazier <helen.fornazier@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
|
#
42efd001 |
|
20-Mar-2015 |
Helen Fornazier <helen.fornazier@gmail.com> |
staging: fbtft: Fix indentation style by space This patch fixes the checkpatch.pl warning and error: WARNING: please, no spaces at the start of a line ERROR: code indent should use tabs where possible Signed-off-by: Helen Fornazier <helen.fornazier@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
|
#
c296d5f9 |
|
31-Dec-2014 |
Thomas Petazzoni <thomas.petazzoni@free-electrons.com> |
staging: fbtft: core support This commit adds the core fbtft framework from 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>
|