aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/staging/sm750fb/sm750_hw.c (follow)
AgeCommit message (Collapse)AuthorFilesLines
2017-03-23staging: sm750fb: Remove typedef from "typedef struct _mode_parameter_t"Arushi Singhal1-1/+1
This patch removes typedefs from struct and renames it from "typedef struct _mode_parameter_t" to "struct mode_parameter" as per kernel coding standards." Signed-off-by: Arushi Singhal <arushisinghal19971997@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2017-02-09staging: sm750fb: Replace POKE32 and PEEK32 by inline functionsMatthieu Simon1-51/+51
POKE32 and PEEK32 have been replaced by inlined functions poke32 and peek32. Having inline functions instead of macros help to get the correct type-checking and avoid the possible precedence issues reported by checkpatch. Signed-off-by: Matthieu Simon <gmatthsim@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-11-10staging: sm750fb: prefix global identifiersArnd Bergmann1-2/+2
Renaming some symbols inside this driver caused a conflict with an existing function, which in turn results in a link error: drivers/staging/sm750fb/sm750fb.o: In function `enable_dma': ddk750_hwi2c.c:(.text.enable_dma+0x0): multiple definition of `enable_dma' This adds a sm750_ prefix to each global symbol in the sm750fb driver that does not already have one. I manually looked for the symbols and then converted the driver using for i in calc_pll_value format_pll_reg set_power_mode set_current_gate \ enable_2d_engine enable_dma enable_gpio enable_i2c hw_set2dformat \ hw_de_init hw_fillrect hw_copyarea hw_imageblit hw_cursor_enable \ hw_cursor_disable hw_cursor_setSize hw_cursor_setPos \ hw_cursor_setColor hw_cursor_setData hw_cursor_setData2 ; do sed -i "s:\<$i\>:sm750_$i:" drivers/staging/sm750fb/*.[ch] done Fixes: 03140dabf584 ("staging: sm750fb: Replace functions CamelCase naming with underscores.") Signed-off-by: Arnd Bergmann <arnd@arndb.de> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-10-30staging: sm750fb: Replace functions CamelCase naming with underscores.Elise Lennion1-1/+1
Replace CamelCase function names with underscores to comply with the standard kernel coding style. Signed-off-by: Elise Lennion <elise.lennion@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-10-25staging: sm750fb: restructure multi-line comments to follow CodingStyleEric S. Stone1-9/+16
Eliminates all checkpatch.pl BLOCK_COMMENT_STYLE warnings in sm750fb, and coincidentally eliminates some line-length (80) warnings. Signed-off-by: Eric S. Stone <esstone@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-10-16staging: sm750fb: Replace functions CamelCase naming with underscores.Elise Lennion1-3/+3
Replace CamelCase function names with underscores to comply with the standard kernel coding style. Signed-off-by: Elise Lennion <elise.lennion@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-10-16staging: sm750fb: Merge ddk750_help.* into ddk750_chip.*.Elise Lennion1-1/+4
The file ddk750_help.c contained only one function declaration, so it was merged into ddk750_chip.c to simplify the driver. Also, ddk750_help.h was merged into ddk750_chip.h to keep consistency. With these changes a few global variables are removed and the function ddk750_set_mmio is rewritten, so its purpose in the code is clearer. Signed-off-by: Elise Lennion <elise.lennion@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-10-16Staging: sm750fb: fix do not add new typedefs warningMihaela Muraru1-1/+1
This patch fixes the checkpatch.pl warning: "WARNING: do not add new typedefs". Hiding a variables of type 'struct' is not always a good idea,because when we passing them as parameters we tempt to forget that in this proces we work with stack memory and allocatting struct on stack is something that we should manage carefuly. It is also delete the '_t' from the name of the structs and treat a line over 80 character issue in ddk750_mode.c, that appear after my modification. Signed-off-by: Mihaela Muraru <mihaela.muraru21@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-09-27staging: sm750fb: rename getChipType to sm750_get_chip_typeMoshe Green1-4/+4
Rename CamelCased function getChipType to sm750_get_chip_type (prefex with sm750 in order to make the context of the function clear). This issue was found by checkpatch.pl Signed-off-by: Moshe Green <mgmoshes@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-09-22staging: sm750fb: Remove unnecessary parenthesesRehas Sachdeva1-2/+2
Remove unnecessary parentheses from right side of an assignment. Issue detected by the following Coccinelle semantic patch: @r@ identifier x; expression e1, e2; @@ - x = (e1 << e2); + x = e1 << e2; Signed-off-by: Rehas Sachdeva <aquannie@gmail.com> Acked-by: Julia Lawall <julia.lawall@lip6.fr> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-09-16staging: sm750fb: Change 'uint32_t' to 'u32'Rehas Sachdeva1-1/+1
It is preferred to use 'u32' instead of 'uint32_t' for unsigned int. Issue detected by checkpatch. Signed-off-by: Rehas Sachdeva <aquannie@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-08-21sm750fb/sm750_hw.c: split assignment & long linesStefan Wolz1-4/+9
Split lines over 80 characters and separated assignments. Signed-off-by: Stefan Wolz <wolzstefan@web.de> Signed-off-by: Christian Halder <christian.halder@fau.de> Signed-off-by: Sebastian Handwerker <sebastian.handwerker@posteo.de> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-08-21sm750fb/sm750_hw.c: fixed commentsStefan Wolz1-22/+26
Fixed multiline comments to meet style standards, fixed typos and split comment lines over 80 characters. Signed-off-by: Stefan Wolz <wolzstefan@web.de> Signed-off-by: Christian Halder <christian.halder@fau.de> Signed-off-by: Sebastian Handwerker <sebastian.handwerker@posteo.de> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-08-21sm750fb/sm750_hw.c: fixed whitespacingStefan Wolz1-17/+9
Deleted unnecessary newlines and added whitespaces around operators. Signed-off-by: Stefan Wolz <wolzstefan@web.de> Signed-off-by: Christian Halder <christian.halder@fau.de> Signed-off-by: Sebastian Handwerker <sebastian.handwerker@posteo.de> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-08-21sm750fb/sm750_hw.c: corrected alignmentStefan Wolz1-6/+7
Fixed alignment in multiline declarations. Signed-off-by: Stefan Wolz <wolzstefan@web.de> Signed-off-by: Christian Halder <christian.halder@fau.de> Signed-off-by: Sebastian Handwerker <sebastian.handwerker@posteo.de> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-02-15staging: sm750fb: change definition of CRT_FB_ADDRESS fieldsMike Rapoport1-2/+2
Use stratight-forward definition of CRT_FB_ADDRESS register fields and use open-coded implementation for register manipulation Signed-off-by: Mike Rapoport <mike.rapoport@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-02-15staging: sm750fb: change definition of CRT_FB_WIDTH fieldsMike Rapoport1-5/+4
Use stratight-forward definition of CRT_FB_WIDTH register fields and use open-coded implementation for register manipulation Signed-off-by: Mike Rapoport <mike.rapoport@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-02-15staging: sm750fb: Remove inclusion of header fileAmitoj Kaur Chawla1-1/+0
version.h header inclusion is not necessary as detected by versioncheck. Signed-off-by: Amitoj Kaur Chawla <amitoj1606@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-02-14staging: sm750fb: Fix indentation of if...else statementsJanani Ravichandran1-10/+9
This patch clears the checkpatch warning about suspect code indent for conditional statements in the file. Signed-off-by: Janani Ravichandran <janani.rvchndrn@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-02-11staging: sm750fb: change definition of CRT_DISPLAY_CTRL multi-bit fieldsMike Rapoport1-2/+4
Use more straight-forward definitions for multi-bit fields of CRT_DISPLAY_CTRL register and use open-coded implementation for register manipulation Signed-off-by: Mike Rapoport <mike.rapoport@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-02-11staging: sm750fb: use BIT macro for CRT_DISPLAY_CTRL single-bit fieldsMike Rapoport1-12/+17
Replace complex definition of CRT_DISPLAY_CTRL register fields with BIT() macro and use open-coded implementation for register manipulation Signed-off-by: Mike Rapoport <mike.rapoport@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-02-11staging: sm750fb: change definition of PANEL_PLANE_BR fieldsMike Rapoport1-3/+4
Use stratight-forward defintion of PANEL_PLANE_BR register fields and use open-coded implementation for register manipulations Signed-off-by: Mike Rapoport <mike.rapoport@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-02-11staging: sm750fb: change definition of PANEL_WINDOW_HEIGHT fieldsMike Rapoport1-3/+5
Use stratight-forward defintion of PANEL_WINDOW_HEIGHT register fields and use open-coded implementation for register manipulations Signed-off-by: Mike Rapoport <mike.rapoport@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-02-11staging: sm750fb: change definition of PANEL_WINDOW_WIDTH fieldsMike Rapoport1-3/+4
Use stratight-forward defintion of PANEL_WINDOW_WIDTH register fields and use open-coded implementation for register manipulations Signed-off-by: Mike Rapoport <mike.rapoport@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-02-11staging: sm750fb: change definition of PANEL_FB_WIDTH fieldsMike Rapoport1-4/+4
Use stratight-forward defintion of PANEL_FB_WIDTH register fields and use open-coded implementation for register manipulations Signed-off-by: Mike Rapoport <mike.rapoport@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-02-11staging: sm750fb: change definition of PANEL_FB_ADDRESS fieldsMike Rapoport1-5/+3
Use BIT() macro for single-bit fields of PANEL_FB_ADDRESS register and define PANEL_FB_ADDRESS_ADDRESS_MASK for masking the address bits. Signed-off-by: Mike Rapoport <mike.rapoport@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-02-11staging: sm750fb: change definition of PANEL_DISPLAY_CTRL multi-bit fieldsMike Rapoport1-5/+1
Use more straight-forward definitions for multi-bit fields of PANEL_DISPLAY_CTRL register and use open-coded implementation for register manipulation Signed-off-by: Mike Rapoport <mike.rapoport@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-02-11staging: sm750fb: remove PANEL_DISPLAY_CTRL_TFT_DISP definesMike Rapoport1-7/+10
The PANEL_DISPLAY_CTRL_TFT_DISP definitions artificially encode PANEL_DISPLAY_CTRL_DUAL_DISPLAY and PANEL_DISPLAY_CTRL_DOUBLE_PIXEL bits combinations. Replace the PANEL_DISPLAY_CTRL_TFT_DISP usage with direct use of the bits defined in the datasheet. Signed-off-by: Mike Rapoport <mike.rapoport@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-02-11staging: sm750fb: use BIT macro for PANEL_DISPLAY_CTRL single-bit fieldsMike Rapoport1-7/+8
Replace complex definition of PANEL_DISPLAY_CTRL register fields with BIT() macro and use open-coded implementation for register manipulations. Signed-off-by: Mike Rapoport <mike.rapoport@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-02-11staging: sm750fb: hw_sm750_setBLANK: reduce printk verbosityMike Rapoport1-2/+2
pr_debug would be enough Signed-off-by: Mike Rapoport <mike.rapoport@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-02-07staging: sm750fb, fix typosMatej Vasek1-1/+1
The code contained typos like "structur", "fointers", etc. Fix that. No code change, only comments. Signed-off-by: Matej Vasek <xvasek1@fi.muni.cz> Cc: Sudip Mukherjee <sudipm.mukherjee@gmail.com> Cc: Teddy Wang <teddy.wang@siliconmotion.com> Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org> Cc: <linux-fbdev@vger.kernel.org> Cc: <devel@driverdev.osuosl.org> Signed-off-by: Jiri Slaby <jslaby@suse.cz> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-02-07staging: sm750fb: use BIT macro for MISC_CTRL single-bit fieldsMike Rapoport1-6/+2
Replace complex definition of MISC_CTRL register fields with BIT() macro and use open-coded implementation for register manipulations. Signed-off-by: Mike Rapoport <mike.rapoport@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-02-07staging: sm750fb: change definition of SYSTEM_CTRL multi-bit fieldsMike Rapoport1-9/+9
Use more straight-forward definitions for multi-bit fields of SYSTEM_CTRL register and replace FIELD_GET/SET for these fields with open-coded implementation. Signed-off-by: Mike Rapoport <mike.rapoport@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-02-07staging: sm750fb: use BIT macro for SYSTEM_CTRL single-bit fieldsMike Rapoport1-7/+8
Replace complex definition of SYSTEM_CTRL fields and usage of FIELD_GET/SET with BIT() macro and open-coded register value modifications Signed-off-by: Mike Rapoport <mike.rapoport@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-02-07staging: sm750fb: use BIT macro for DE_STATE2 single-bit fieldsMike Rapoport1-4/+4
Replace complex definition of DE_STATE1 fields and usage of FIELD_GET with BIT() macro and open-coded register value modifications Signed-off-by: Mike Rapoport <mike.rapoport@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-02-07staging: sm750fb: use BIT macro for DE_STATE1 single-bit fieldMike Rapoport1-2/+2
Replace complex definition of DE_STATE1 field and usage of FIELD_SET with BIT() macro and open-coded register value modifications Signed-off-by: Mike Rapoport <mike.rapoport@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-02-07staging: sm750fb: hw_sm750(le)_deWait: rename dwVal to valMike Rapoport1-8/+8
Remove HungarianCamelCase notation Signed-off-by: Mike Rapoport <mike.rapoport@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-10-27staging: sm750fb: merge lynx_share into sm750_devMike Rapoport1-29/+27
Both struct lynx_share and struct sm750_dev reprsent some parts of the SM750 graphics adapter. There is no point to keep these parts in different structures. Signed-off-by: Mike Rapoport <mike.rapoport@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-10-27staging: sm750fb: replace lynx_share with sm750_dev in function callsMike Rapoport1-9/+7
Use sm750_dev rather than lynx_share as parameter for hw_sm750_map, hw_sm750_inithw and hw_sm750_initAccel functions. Signed-off-by: Mike Rapoport <mike.rapoport@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-10-27staging: sm750fb: remove hw_sm750_getVMSize functionMike Rapoport1-11/+2
The hw_sm750_getVMSize wraps ddk750_getVMSize without any added functionality. Call ddk750_getVMSize directly and remove hw_sm750_getVMSize. Signed-off-by: Mike Rapoport <mike.rapoport@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-10-27staging: sm750fb: replace lynx_share with sm750_dev in lynxfb_parMike Rapoport1-3/+3
Use sm750_dev instead of lynx_share in the private data of the frambuffer device. Signed-off-by: Mike Rapoport <mike.rapoport@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-10-27staging: sm750fb: merge struct sm750_state into struct sm750_devMike Rapoport1-5/+5
The struct sm750_state is never used on its own. Merge it into the struct sm750_dev. Signed-off-by: Mike Rapoport <mike.rapoport@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-10-27staging: sm750fb: rename 'struct sm750_dev' variables to sm750_devMike Rapoport1-9/+9
Use consistent naming for 'struct sm750_dev' variables Signed-off-by: Mike Rapoport <mike.rapoport@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-10-27staging: sm750fb: rename struct sm750_share to sm750_devMike Rapoport1-4/+4
The struct sm750_share represents the device state and name sm750_dev seems more appropriate. Signed-off-by: Mike Rapoport <mike.rapoport@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-10-27staging: sm750fb: merge sm750_hw.h into sm750.hMike Rapoport1-1/+0
There is no actual need to split type definitions and global function declarations between lots of small headers. Signed-off-by: Mike Rapoport <mike.rapoport@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-10-27staging: sm750fb: replace PADDING macro with ALIGNMike Rapoport1-2/+2
The custom macro PADDING differs from standard kernel ALIGN only in parameters order. Replace PADDING with ALIGN and remove it's definition. Signed-off-by: Mike Rapoport <mike.rapoport@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-10-24staging: sm750fb: remove ancient kernel supportMike Rapoport1-36/+0
Remove the code that should be compiled for ancient kernel versions together with controlling '#if LINUX_VERSION_CODE' conditionals Signed-off-by: Mike Rapoport <mike.rapoport@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-10-24staging: sm750fb: remove '#if 1' conditionalsMike Rapoport1-2/+1
The code enclosed in '#if 1' anyway gets compiled. Removing useless conditionals. Signed-off-by: Mike Rapoport <mike.rapoport@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-10-02staging: sm750fb: remove clear method from lynxfb_{crtc,output}Mike Rapoport1-12/+0
The clear methods of lynxfb_crtc and lynxfb_output are empty and therefore they can be removed. Signed-off-by: Mike Rapoport <mike.rapoport@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-10-02staging: sm750fb: remove proc_checkMode method from lynxfb_outputMike Rapoport1-9/+0
The proc_checkMode of lynxfb_output is set to function that always returns 0. Calling that function and checking for its return value is meaningless. Signed-off-by: Mike Rapoport <mike.rapoport@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>