aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/staging/sm750fb/ddk750_swi2c.c (follow)
AgeCommit message (Collapse)AuthorFilesLines
2019-08-15staging: sm750fb: fix odd license textGreg Kroah-Hartman1-3/+0
There is some "confusing" license text in some of the sm750fb driver files. After discussing it with the company, it turns out to have been a mistake and these lines can be safely removed. The files are all to be licensed under the GPLv2 license. Cc: Sudip Mukherjee <sudipm.mukherjee@gmail.com> Cc: Teddy Wang <teddy.wang@siliconmotion.com> Cc: linux-fbdev@vger.kernel.org Cc: devel@driverdev.osuosl.org Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org> Link: https://lore.kernel.org/r/20190815123009.16499-1-gregkh@linuxfoundation.org Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2019-04-03staging: sm750fb: add proper SPDX identifier to driverGreg Kroah-Hartman1-0/+1
By default all files without license information are under the default license of the kernel, which is GPL version 2. Because of this, add the GPL-2.0 identifier to the sm750fb driver which did not have any license identifiers in it at all. Cc: Sudip Mukherjee <sudipm.mukherjee@gmail.com> Cc: Teddy Wang <teddy.wang@siliconmotion.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2017-05-18staging: sm750fb: fix length of lines, function calls and declarationMatej Dujava1-15/+6
This patch breaks lines that are longer than 80 characters and joins together those, that are too short and can be placed at one. Function calls and declarations are updated to fit kernel code style. Signed-off-by: Matej Dujava <mdujava@kocurkovo.cz> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2017-02-09staging: sm750fb: Replace POKE32 and PEEK32 by inline functionsMatthieu Simon1-17/+17
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-1/+1
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-14/+13
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: Merge ddk750_help.* into ddk750_chip.*.Elise Lennion1-1/+1
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-02staging: sm750fb: conform to block comment styleElizabeth Ferdman1-6/+6
Fix 2 checkpatch errors: -Block comments use * on subsequent lines, -Block comments use a trailing */ on a separate line to conform to block commenting style. Signed-off-by: Elizabeth Ferdman <gnudevliz@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-09-27staging: sm750fb: rename getChipType to sm750_get_chip_typeMoshe Green1-1/+1
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>
2015-09-29staging: sm750fb: remove dead codeMike Rapoport1-4/+1
Remove the code enclosed in '#if 0' Signed-off-by: Mike Rapoport <mike.rapoport@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-09-14staging: sm750fb: ddk750_*i2c: shorten lines to under 80 charactersMike Rapoport1-6/+16
Fix some checkpatch warnings about long lines Signed-off-by: Mike Rapoport <mike.rapoport@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-09-14staging: sm750fb: ddk750_*i2c: remove multiple blank linesMike Rapoport1-1/+0
Fix the checkpatch warning about multiple blank lines Signed-off-by: Mike Rapoport <mike.rapoport@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-09-14staging: sm750fb: ddk750_swi2c: further reduce CamelCaseMike Rapoport1-61/+61
Rename remaining CamelCase variables Signed-off-by: Mike Rapoport <mike.rapoport@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-09-14staging: sm750fb: ddk750_swi2c: rename CamelCase static variablesMike Rapoport1-48/+48
Rename static variables defining I2C GPIO pins and their control registers from CamelCase. Signed-off-by: Mike Rapoport <mike.rapoport@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-09-14staging: sm750fb: ddk750_swi2c: rename CamelCase static functionsMike Rapoport1-58/+58
Fix the checkpatch warning about CamelCase. Signed-off-by: Mike Rapoport <mike.rapoport@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-09-14staging: sm750fb: ddk750_swi2c: staticize swI2C{SCL,SDA}Mike Rapoport1-2/+2
swI2C{SCL,SDA} are not used outside ddk750_swi2c, make them static Signed-off-by: Mike Rapoport <mike.rapoport@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-09-14staging: sm750fb: rename swI2CWriteReg to sm750_sw_i2c_write_regMike Rapoport1-1/+1
Fix the checkpatch warning about CamelCase. Signed-off-by: Mike Rapoport <mike.rapoport@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-09-14staging: sm750fb: rename swI2CReadReg to sm750_sw_i2c_read_regMike Rapoport1-1/+1
Fix the checkpatch warning about CamelCase. Signed-off-by: Mike Rapoport <mike.rapoport@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-09-14staging: sm750fb: rename swI2CInit to sm750_sw_i2c_initMike Rapoport1-1/+1
Fix the checkpatch warning about CamelCase. Signed-off-by: Mike Rapoport <mike.rapoport@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-06-18Staging: sm750fb: ddk750_swi2c.c: Insert spaces before parenthesisIsaac Assegai1-6/+6
Insert spaces before open parenthesis in ddk750_swi2c.c to rectify the following checkpatch errors: ERROR: space required before the open parenthesis '(' Signed-off-by: Isaac Assegai <isaac.a.travers@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-06-18Staging: sm750fb: ddk750_swi2c.c: Place braces on correct linesIsaac Assegai1-22/+10
Place braces on correct lines in ddk750_swi2c.c to rectify the following checkpatch errors: ERROR: that open brace { should be on the previous line Signed-off-by: Isaac Assegai <isaac.a.travers@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-06-18Staging: sm750fb: ddk750_swi2c.c: Insert spaces around operatorsIsaac Assegai1-7/+7
Insert spaces around comparison operators in ddk750_swi2c.c to rectify the following set of checkpatch errors: ERROR: spaces required around that '=' ERROR: spaces required around that '<' ERROR: spaces required around that '>=' Signed-off-by: Isaac Assegai <isaac.a.travers@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-06-18Staging: sm750fb: ddk750_swi2c.c: Replace spaces with tabsIsaac Assegai1-229/+229
Replace spaces with tabs in ddk750_swi2c.c to rectify the following checkpatch warnings: WARNING: please, no spaces at the start of a line Signed-off-by: Isaac Assegai <isaac.a.travers@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-06-08Staging: sm750fb: Insert spaces after commas in two files.Isaac Assegai1-1/+1
Insert Spaces after commas to rectify the following checkpatch errors in ddk750_power.c and ddk750_swi2c.c: ERROR: space required after that ',' Signed-off-by: Isaac Assegai <isaac.a.travers@gmail.com>: Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-03-20staging/sm75fb: Declare static functions as suchRicardo Ribalda Delgado1-8/+6
This patch fixes this sparse warning CHECK drivers/staging/sm750fb/ddk750_swi2c.c drivers/staging/sm750fb/ddk750_swi2c.c:223:6: warning: symbol 'swI2CStart' was not declared. Should it be static? drivers/staging/sm750fb/ddk750_swi2c.c:234:6: warning: symbol 'swI2CStop' was not declared. Should it be static? drivers/staging/sm750fb/ddk750_swi2c.c:252:6: warning: symbol 'swI2CWriteByte' was not declared. Should it be static? drivers/staging/sm750fb/ddk750_swi2c.c:320:15: warning: symbol 'swI2CReadByte' was not declared. Should it be static? drivers/staging/sm750fb/ddk750_swi2c.c:361:6: warning: symbol 'swI2CInit_SM750LE' was not declared. Should it be static? Signed-off-by: Ricardo Ribalda Delgado <ricardo.ribalda@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-03-15staging: sm750fb: remove parantheses from return statementsSupriya Karanth1-3/+3
found by checkpatch.pl :ERROR: return is not a function, parentheses are not required changes made using coccinelle script: @@ expression e,e1; @@ ( return (e / e1); | return -( e -) ; ) Signed-off-by: Supriya Karanth <iskaranth@gmail.com> Acked-by: Julia Lawall <julia.lawall@lip6.fr> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-03-10staging: sm750fb: remove unused functionsSudip Mukherjee1-8/+0
removed the functions which were not used anywhere. it has been build tested also confirmed with git grep that there is no other reference of these functions. Signed-off-by: Sudip Mukherjee <sudip@vectorindia.org> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-03-10staging: sm750fb: remove pragma optimizeSudip Mukherjee1-3/+0
remove use of #pragma optimize which will usually be ignored by the compiler. Signed-off-by: Sudip Mukherjee <sudip@vectorindia.org> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-03-06staging: sm750fb: add sm750 to stagingSudip Mukherjee1-0/+535
sm750 of Silicon Motion is pci-e display controller device and has features like dual display and 2D acceleration. This patch adds the driver to staging. Signed-off-by: Sudip Mukherjee <sudip@vectorindia.org> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>