aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/staging/fbtft/fbtft.h (follow)
AgeCommit message (Collapse)AuthorFilesLines
2019-03-18staging: fbtft: fixed format-string errors.Jeremy Sowden1-0/+1
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-01-18Staging: fbtft: Switch to the gpio descriptor interfaceNishad Kamdar1-11/+10
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-10-03staging: fbtft: Prefer using the BIT macroMamta Shukla1-28/+28
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-08-27staging: fbtft: Adds space around "/"Leonardo Brás1-1/+1
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-08staging: fbtft: Fixes some alignment issues - StyleLeonardo Brás1-3/+3
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-08staging: fbtft: Puts macro arguments in parenthesis to avoid precedence issues - StyleLeonardo Brás1-4/+5
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-04-30staging: fbtft: Stop using BL_CORE_DRIVER1Daniel Vetter1-0/+1
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-01-15staging: fbtft: remove redundant license textGreg Kroah-Hartman1-13/+1
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-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-03-09staging: fbtft: add helper fbtft_write_buf_dcHeiner Kallweit1-0/+1
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>
2017-03-06staging: fbtft: Make the pointers to s16 init arrays constJoe Perches1-2/+2
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>
2017-02-03staging: fbtft: change 'gamma' array to u32Arnd Bergmann1-2/+2
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>
2017-01-19staging: fbtft: remove custom DMA mapped bufferAndy Shevchenko1-1/+0
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>
2016-10-16staging: fbtft: Convert int arrays to s16Joe Perches1-2/+2
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>
2016-08-21Staging: fbtft: fixed unsigned type warningsMing Yang1-13/+13
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>
2016-02-07staging: fbtft: Remove unused and duplicated definesPriit Laes1-8/+0
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>
2015-11-05Merge tag 'spi-v4.4' of git://git.kernel.org/pub/scm/linux/kernel/git/broonie/spiLinus Torvalds1-1/+0
Pull spi updates from Mark Brown: "Quite a lot of activity in SPI this cycle, almost all of it in drivers with a few minor improvements and tweaks in the core. - Updates to pxa2xx to support Intel Broxton and multiple chip selects. - Support for big endian in the bcm63xx driver. - Multiple slave support for the mt8173 - New driver for the auxiliary SPI controller in bcm2835 SoCs. - Support for Layerscale SoCs in the Freescale DSPI driver" * tag 'spi-v4.4' of git://git.kernel.org/pub/scm/linux/kernel/git/broonie/spi: (87 commits) spi: pxa2xx: Rework self-initiated platform data creation for non-ACPI spi: pxa2xx: Add support for Intel Broxton spi: pxa2xx: Detect number of enabled Intel LPSS SPI chip select signals spi: pxa2xx: Add output control for multiple Intel LPSS chip selects spi: pxa2xx: Use LPSS prefix for defines that are Intel LPSS specific spi: Add DSPI support for layerscape family spi: ti-qspi: improve ->remove() callback spi/spi-xilinx: Fix race condition on last word read spi: Drop owner assignment from spi_drivers spi: Add THIS_MODULE to spi_driver in SPI core spi: Setup the master controller driver before setting the chipselect spi: dw: replace magic constant by DW_SPI_DR spi: mediatek: mt8173 spi multiple devices support spi: mediatek: handle controller_data in mtk_spi_setup spi: mediatek: remove mtk_spi_config spi: mediatek: Update document devicetree bindings to support multiple devices spi: fix kernel-doc warnings about missing return desc in spi.c spi: fix kernel-doc warnings about missing return desc in spi.h spi: pxa2xx: Align a few defines spi: pxa2xx: Save other reg_cs_ctrl bits when configuring chip select ...
2015-10-28spi: Drop owner assignment from spi_driversAndrew F. Davis1-1/+0
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>
2015-10-08Staging: fbtbt: Replace timespec with ktime_tKsenija Stanojevic1-1/+1
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>
2015-09-12staging/fbtft : Fix multiple/missing blank line issuesAnish Bhatt1-5/+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 FSF mailing addressAnish Bhatt1-4/+0
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>
2015-08-14staging: fbtft: Remove unnecessary externsJoe Perches1-27/+25
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>
2015-08-03staging: fbtft: core: Don't set device platform_dataNoralf Trønnes1-2/+3
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>
2015-06-08staging: fbtft: replace fbtft_dev_dbg with standard dev_dbg callMadhusudhanan Ravindran1-5/+0
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>
2015-03-26staging: fbtft: Fix typo in fbtftMasanari Iida1-2/+2
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>
2015-03-26staging: fbtft: Remove do {} while(0) in single statement macroHelen Fornazier1-3/+1
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>
2015-03-23staging: fbtft: Fix indentation style by spaceHelen Fornazier1-4/+4
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>
2015-01-17staging: fbtft: core supportThomas Petazzoni1-0/+447
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>