Commit graph

357 commits

Author SHA1 Message Date
Mike Rapoport f5d7f1905f staging: sm750fb: remove PANEL_DISPLAY_CTRL_TFT_DISP defines
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-11 19:52:37 -08:00
Mike Rapoport 6fba39cf32 staging: sm750fb: use BIT macro for PANEL_DISPLAY_CTRL single-bit fields
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-11 19:52:37 -08:00
Mike Rapoport 5b621779c2 staging: sm750fb: hw_sm750_setBLANK: reduce printk verbosity
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-11 19:52:37 -08:00
Mike Rapoport b117b637da staging: sm750fb: refactor setDisplayControl function
The enable/disbable sequence in setDisplayControl function is duplicated
for primary and secondary display controllers. The function can be
refactored so that the common part of register access will be shared for
both controllers.

Signed-off-by: Mike Rapoport <mike.rapoport@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-02-11 19:52:37 -08:00
Mike Rapoport 9bd2c86b5a staging: sm750fb: merge reserved bits of PANEL/CRT_DISPLAY_CTRL registers
Use single mask for reserved bits in PANEL_DISPLAY_CTRL and
CRT_DISPLAY_CTRL registers.

Signed-off-by: Mike Rapoport <mike.rapoport@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-02-11 19:52:37 -08:00
Mike Rapoport 85e4db5347 staging: sm750fb: share common bits in display control registers
The display control registers for primary and secondary display share some
of the bits and those bits can be defined in a single place and then used
for manipulations of the relevant registers.

Signed-off-by: Mike Rapoport <mike.rapoport@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-02-11 19:52:37 -08:00
Mike Rapoport 7755265a99 staging: sm750fb: setDisplayControl: rename local vairables
Remove HungarianCamelCase notation.

Signed-off-by: Mike Rapoport <mike.rapoport@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-02-11 19:52:37 -08:00
Mike Rapoport c436e6ba7e staging: sm750fb: programModeRegisters: rename local vairables
Remove HungarianCamelCase notation.

Signed-off-by: Mike Rapoport <mike.rapoport@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-02-11 19:52:37 -08:00
Mike Rapoport e6f10d2814 staging: sm750fb: change definition of VGA_CONFIGURATION multi-bit field
Use more straight-forward definitions for multi-bit field of
VGA_CONFIGURATION register.

Signed-off-by: Mike Rapoport <mike.rapoport@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-02-11 19:52:37 -08:00
Mike Rapoport d97981431f staging: sm750fb: use BIT macro for VGA_CONFIGURATION single-bit fields
Replace complex defintion of VGA_CONFIGURATION register fields with BIT()
macro and use open-coded implementation for VGA_CONFIGURATION
manipulations.

Signed-off-by: Mike Rapoport <mike.rapoport@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-02-11 19:52:37 -08:00
Mike Rapoport cf25a70436 staging: sm750fb: drop redundant defines for PLL_CTRL fields
The PLL_CTRL fields have common defines for several PLL control
registers and re-defining the same values per register is not needed.

Signed-off-by: Mike Rapoport <mike.rapoport@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-02-11 19:52:37 -08:00
Mike Rapoport cdd5df644a staging: sm750fb: change defintion of PANEL_PLL_CTRL multi-bit fields
Use more straight-forward definitions for multi-bit field of
PANEL_PLL_CTRL register 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-11 19:52:37 -08:00
Mike Rapoport 5557eb17b3 staging: sm750fb: use BIT macro for PLL_CTRL single-bit fields
Replace complex defintion of PLL_CTRL fields with BIT() macro and use
open-coded implementation for PLL register manipulations.

Signed-off-by: Mike Rapoport <mike.rapoport@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-02-11 19:52:37 -08:00
Mike Rapoport 79254c60db staging: sm750fb: use PLL_CTRL_POWER defines for CRT_PLL_CTRL
Use PLL_CTRL_POWER definitions for CRT_PLL_CTRL register access

Signed-off-by: Mike Rapoport <mike.rapoport@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-02-11 19:52:37 -08:00
Mike Rapoport 54feb93153 staging: sm750fb: rename PANEL_PLL_CTRL_* fields to PLL_CTRL_*
Several PLL control registers have the same layout and therefore the
field definitions may be shared for those registers. Renaming
definitions of PANEL_PLL_CTRL_* fields to more generic PLL_CTRL_* will
allow reusing these definitions for other PLL control registers.

Signed-off-by: Mike Rapoport <mike.rapoport@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-02-11 19:52:37 -08:00
Mike Rapoport 0c4d85fc7f staging: sm750fb: formatPllReg: fix comment formatting
Fix comment alignment and formatting to follow kernel coding style

Signed-off-by: Mike Rapoport <mike.rapoport@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-02-11 19:52:37 -08:00
Mike Rapoport 375b4d427e staging: sm750fb: formatPllReg: rename ulPllReg to reg
Remove HungarianCamelCase notation

Signed-off-by: Mike Rapoport <mike.rapoport@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-02-11 19:52:37 -08:00
Matej Vasek fbb8c96357 staging: sm750fb, fix typos
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-07 18:53:35 -08:00
Bogicevic Sasa fe7185908a drivers:staging:sm750fb Fix all space preferred around messages
This fixes all messages from checkpatch.pl about space preferred

Signed-off-by: Bogicevic Sasa <brutallesale@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-02-07 18:52:31 -08:00
Othmar Pasteka 04c73f2896 staging: sm750fb: fix style for if clause
Fix for checkpatch.pl complaints:
ERROR: that open brace { should be on the previous line
CHECK: spaces preferred around that '+' (ctx:VxV)

Signed-off-by: Othmar Pasteka <pasteka@kabsi.at>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-02-07 18:52:31 -08:00
Mike Rapoport f41b17fc3f staging: sm750fb: change definition of POWER_MODE_CTRL multi-bit field
Use more straight-forward definitions for multi-bit field of
POWER_MODE_CTRL register 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-07 18:51:36 -08:00
Mike Rapoport 776980cf0f staging: sm750fb: use BIT macro for POWER_MODE_CTRL single-bit fields
Replace complex definition of POWER_MODE_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-07 18:51:36 -08:00
Mike Rapoport a941245109 staging: sm750fb: change definition of MODE0_GATE multi-bit fields
Use more straight-forward definitions for multi-bit fields of MODE0_GATE
register.

Signed-off-by: Mike Rapoport <mike.rapoport@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-02-07 18:51:36 -08:00
Mike Rapoport 05e9d9ea44 staging: sm750fb: use BIT macro for MODE0_GATE single-bit fields
Replace complex definition of MODE0_GATE 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-07 18:51:36 -08:00
Mike Rapoport 6e8aa4a136 staging: sm750fb: change definition of CURRENT_GATE multi-bit fields
Use more straight-forward definitions for multi-bit fields of
CURRENT_GATE 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-07 18:51:36 -08:00
Mike Rapoport 19aa211387 staging: sm750fb: set{Memory, Master}Clock: rename ulReg to reg
Remove HungarianCamelCase notation

Signed-off-by: Mike Rapoport <mike.rapoport@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-02-07 18:51:36 -08:00
Mike Rapoport 90946e5293 staging: sm750fb: use BIT macro for CURRENT_GATE single-bit fields
Replace complex definition of CURRENT_GATE 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-07 18:51:36 -08:00
Mike Rapoport 5538d5c8bd staging: sm750fb: change definition of MISC_CTRL multi-bit fields
Use more straight-forward definitions for multi-bit fields of MISC_CTRL
register 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-07 18:51:36 -08:00
Mike Rapoport 2a5149e0a2 staging: sm750fb: use BIT macro for GPIO_MUX single-bit fields
Replace complex definition of GPIO_MUX 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-07 18:51:36 -08:00
Mike Rapoport 9a357143bc staging: sm750fb: ddk750_sii164: fix defines for i2c{Read, Write}reg
For case when USE_HW_I2C is not defined, i2c{Read,Write}reg was wrongly
defined to use old function names.

Signed-off-by: Mike Rapoport <mike.rapoport@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-02-07 18:51:36 -08:00
Mike Rapoport 5372350be3 staging: sm750fb: use BIT macro for MISC_CTRL single-bit fields
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-07 18:51:36 -08:00
Mike Rapoport 8bc728cf01 staging: sm750fb: ddk750_initHw: rename ulReg to reg
Remove HungarianCamelCase notation

Signed-off-by: Mike Rapoport <mike.rapoport@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-02-07 18:51:36 -08:00
Mike Rapoport a8856ff88e staging: sm750fb: change definition of SYSTEM_CTRL multi-bit fields
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-07 18:51:36 -08:00
Mike Rapoport 410c756d41 staging: sm750fb: use BIT macro for SYSTEM_CTRL single-bit fields
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-07 18:51:36 -08:00
Mike Rapoport 1c3ad30688 staging: sm750fb: remove unused DE_STATE2_DE_RESERVED
Definition of reserved fields in a register is not interesting

Signed-off-by: Mike Rapoport <mike.rapoport@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-02-07 18:51:36 -08:00
Mike Rapoport ae6061dbfc staging: sm750fb: use BIT macro for DE_STATE2 single-bit fields
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-07 18:51:36 -08:00
Mike Rapoport c808d6ce4a staging: sm750fb: use BIT macro for DE_STATE1 single-bit field
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-07 18:51:36 -08:00
Mike Rapoport 9eced7438d staging: sm750fb: hw_sm750(le)_deWait: rename dwVal to val
Remove HungarianCamelCase notation

Signed-off-by: Mike Rapoport <mike.rapoport@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-02-07 18:51:36 -08:00
Mike Rapoport 61da1a12d8 staging: sm750fb: lynxfb_pci_probe: remove some pr_info
Several pr_info statements in lynxfb_pci_probe seem like debug leftovers
and may be removed.

Signed-off-by: Mike Rapoport <mike.rapoport@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-02-07 18:50:53 -08:00
Mike Rapoport a50bc32d32 staging: sm750fb: introduce sm750fb_frambuffer_alloc
Split framebuffer allocation and registration into a dedicated function
to simplify lynxfb_pci_probe

Signed-off-by: Mike Rapoport <mike.rapoport@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-02-07 18:50:53 -08:00
Mike Rapoport 9324f9193b staging: sm750fb: introduce sm750fb_frambuffer_release
Use a function to unregister framebuffer info and release its resources.

Signed-off-by: Mike Rapoport <mike.rapoport@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-02-07 18:50:53 -08:00
Mike Rapoport a3f92cc94c staging: sm750fb: replace dual member of sm750_dev with fb_count
Will be used in futher refactoring of driver _probe and _remove methods.

Signed-off-by: Mike Rapoport <mike.rapoport@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-02-07 18:50:53 -08:00
Mike Rapoport 473baa2df6 staging: sm750fb: lynxfb_pci_remove: remove unused variable
The par variable in lynxfb_pci_remove is only assigned a value and never
used afterwards. Remove it.

Signed-off-by: Mike Rapoport <mike.rapoport@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-02-07 18:50:53 -08:00
Mike Rapoport baf24530a4 staging: sm750fb: lynxfb_pci_probe: return actual errors
The lynxfb_pci_probe always returned -ENODEV in case of error. Modify it
so that actual error code will be propogated to the caller.

Signed-off-by: Mike Rapoport <mike.rapoport@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-02-07 18:50:53 -08:00
Mike Rapoport 0fbc7c5056 staging: sm750fb: disable PCI device if lynxfb_pci_probe fails
In case of error during lynxfb_pci_probe, the function returned without
calling pci_disable_device. Fix it by adding pci_disable_device on the
error cleanup path.

Signed-off-by: Mike Rapoport <mike.rapoport@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-02-07 18:50:53 -08:00
Shraddha Barke cdfeaae5b3 Staging: sm750fb: Remove unused modedb.h file
The header file modedb.h is only included in sm750.c but the things
defined by modedb.h are not used anywhere in sm750.c. Thus, drop
the include in sm750.c and modedb.h can be dropped completely.

Signed-off-by: Shraddha Barke <shraddha.6596@gmail.com>
Acked-by: Sudip Mukherjee <sudipm.mukherjee@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-11-15 20:02:47 -08:00
Mike Rapoport af28398d31 staging: sm750fb: remove unused fields from struct sm750_dev
The {x,y}LCD fields of struct sm750_dev are not used and can be removed.

Signed-off-by: Mike Rapoport <mike.rapoport@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-10-27 17:04:57 +09:00
Mike Rapoport 823e034c0f staging: sm750fb: remove '#ifdef CAP_EXP*' conditionals
There are several occurencies of '#ifdef CAP_EXP<something>', spelled
differently each time. None of these is ever defined and therefore they
enclose dead code that can be removed.

Signed-off-by: Mike Rapoport <mike.rapoport@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-10-27 17:04:57 +09:00
Mike Rapoport e359b6a863 staging: sm750fb: merge lynx_share into sm750_dev
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-27 17:04:57 +09:00
Mike Rapoport 8ac97f19df staging: sm750fb: remove unused field in lynx_cursor
The lynx_share field in lynx_cursor structure is never used and can be
removed.

Signed-off-by: Mike Rapoport <mike.rapoport@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-10-27 17:04:57 +09:00
Mike Rapoport 52e933278a staging: sm750fb: fix wrong indentation
Fix wrong indentation of a line in lynxfb_set_fbinfo

Signed-off-by: Mike Rapoport <mike.rapoport@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-10-27 17:04:57 +09:00
Mike Rapoport 083c2048f5 staging: sm750fb: use sm750_dev with pci_{get, set}_drvdata
Use sm750_dev as private driver data for the PCI device

Signed-off-by: Mike Rapoport <mike.rapoport@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-10-27 17:04:57 +09:00
Mike Rapoport 4fd92f51da staging: sm750fb: use 'struct sm750_dev *' instead of 'void *'
Use proper 'struct sm750_dev *' type instead of 'void *'

Signed-off-by: Mike Rapoport <mike.rapoport@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-10-27 17:04:57 +09:00
Mike Rapoport 700591a9ad staging: sm750fb: replace lynx_share with sm750_dev in function calls
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-27 17:04:57 +09:00
Mike Rapoport 142de763c0 staging: sm750fb: remove hw_sm750_getVMSize function
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-27 17:04:57 +09:00
Mike Rapoport f11fa2a972 staging: sm750fb: replace lynx_share with sm750_dev in lynxfb_par
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-27 17:04:57 +09:00
Mike Rapoport c96341916d staging: sm750fb: remove unused PROC_SPEC_* typedefs
The PROC_SPEC* typedefs are not used and can be removed

Signed-off-by: Mike Rapoport <mike.rapoport@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-10-27 17:04:57 +09:00
Mike Rapoport 1757d106a9 staging: sm750fb: merge struct sm750_state into struct sm750_dev
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-27 17:04:57 +09:00
Mike Rapoport 5ef2f68857 staging: sm750fb: rename 'struct sm750_dev' variables to sm750_dev
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-27 17:04:57 +09:00
Mike Rapoport bc3d48f33e staging: sm750fb: rename struct sm750_share to sm750_dev
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-27 17:04:57 +09:00
Mike Rapoport 05407e153f staging: sm750fb: merge sm750_hw.h into sm750.h
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-27 17:04:57 +09:00
Mike Rapoport 492bcecfd8 staging: sm750fb: remove unused smi_indent variable
The smi_indent variable is only declared, but never used. Remove it.

Signed-off-by: Mike Rapoport <mike.rapoport@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-10-27 17:04:57 +09:00
Mike Rapoport e3a3f9f512 staging: sm750fb: replace PADDING macro with ALIGN
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-27 17:04:57 +09:00
Mike Rapoport 6732071c25 staging: sm750fb: remove unused SPC_SM750 define
The SPC_SM750 define is not used and can be removed

Signed-off-by: Mike Rapoport <mike.rapoport@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-10-27 17:04:57 +09:00
Mike Rapoport fb7f40559e staging: sm750fb: replace lynx_cursor methods with function calls
The methods in lynx_cursor always use the same implementation and there is
no point to use redirection rather than direct function call.

Signed-off-by: Mike Rapoport <mike.rapoport@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-10-27 17:04:57 +09:00
Mike Rapoport 9821ed0479 staging: sm750fb: use direct call to hw_sm750_output_setMode
The proc_setMode method in lynx_output always uses the same
implementation and there is no point to use redirection rather than
direct function call.

Signed-off-by: Mike Rapoport <mike.rapoport@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-10-24 19:04:13 -07:00
Mike Rapoport c202beee7f staging: sm750fb: replace lynx_crtc methods with function calls
The methods in lynx_crtc always use the same implementation and there is
no point to use redirection rather than direct function call.

Signed-off-by: Mike Rapoport <mike.rapoport@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-10-24 19:04:13 -07:00
Mike Rapoport 9b2941e27e staging: sm750fb: remove unused methods from lynx_share
The suspend and resume methods in lynx_share are not implemented and
never set. Remove them.

Signed-off-by: Mike Rapoport <mike.rapoport@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-10-24 19:04:13 -07:00
Mike Rapoport 4edd3f3af2 staging: sm750fb: remove ancient kernel support
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-24 19:04:13 -07:00
Mike Rapoport b108da7586 staging: sm750fb: remove defintion of offsetof
There is no need to redefine offsetof

Signed-off-by: Mike Rapoport <mike.rapoport@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-10-24 19:04:13 -07:00
Mike Rapoport 7a81b9477a staging: sm750fb: remove unused pllcalparam typedef
The pllcalparam type is not used and can be removed.

Signed-off-by: Mike Rapoport <mike.rapoport@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-10-24 19:03:28 -07:00
Mike Rapoport a61dc139ce staging: sm750fb: simplify PLL divisors calculations
The calcPllValues currently uses arrays of PLL parametres that contain
possible PLL control register field values and redundant data that is
calculated according to those values. The usage of these arrays can be
replaced with simple arithmetics.

Signed-off-by: Mike Rapoport <mike.rapoport@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-10-24 19:03:28 -07:00
Mike Rapoport cfac7d6a70 staging: sm750fb: remove '#if 1' conditionals
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-24 19:02:42 -07:00
Amitoj Kaur Chawla f741554e25 staging: sm750fb: Replace uint32_t with u32
Replace uint32_t with u32 consistent with Linux kernel coding
practice.
Problem found using checkpatch.pl

Signed-off-by: Amitoj Kaur Chawla <amitoj1606@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-10-24 19:02:42 -07:00
Amitoj Kaur Chawla 347cf6d109 staging: sm750fb: Replace include <asm/*.h> with include <linux/*.h>
Problem found using checkpatch.pl
WARNING: Use #include <linux/io.h> instead of <asm/io.h>
WARNING: Use #include <linux/uaccess.h> instead of <asm/uaccess.h>

Signed-off-by: Amitoj Kaur Chawla <amitoj1606@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-10-24 19:02:42 -07:00
Amitoj Kaur Chawla a5eabae947 staging: sm750fb: Prefer using BIT Macro
Replace bit shifting on 1 with the BIT(x) Macro
Problem found using checkpatch.pl
WARNING: 'Prefer using the BIT macro'

Signed-off-by: Amitoj Kaur Chawla <amitoj1606@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-10-17 09:03:16 -07:00
Shivani Bhardwaj f955a398f2 Staging: sm750fb: sm750: Remove irrelevant code
The variable ret is only declared and initialized to 0, but never
referenced, so remove it.

Signed-off-by: Shivani Bhardwaj <shivanib134@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-10-16 22:05:40 -07:00
Mike Rapoport b02f9240e0 staging: sm750fb: remove some unnecessary castings
The clock divisor calculations in setMasterClock and setMemoryClock
unnecessaryly cast unsigned int to unsigned int. Removing the casting.

Signed-off-by: Mike Rapoport <mike.rapoport@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-10-16 22:05:40 -07:00
Mike Rapoport 7092d76f14 staging: sm750fb: rename getChipClock to get_mxclk_freq
The getChipClock is used to detect MXCLK frequency. Make it's name
reflect what the function is actually doing.

Signed-off-by: Mike Rapoport <mike.rapoport@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-10-16 22:05:40 -07:00
Mike Rapoport 7751e0e2d2 staging: sm750fb: merge calcPLL and getPllValue into getChipClock
The getChipClock function is used only to get MXCLK frequency, which
makes most of getPllValue function unused and thus. The detection of
MXCLK frequency may be implemented directly in getChipClock rendering
getPllValue and calcPLL unused.

Signed-off-by: Mike Rapoport <mike.rapoport@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-10-16 22:05:40 -07:00
Binbin Zhou 31557ea033 staging: sm750fb: Fix the power state error in resume
The PM_EVENT_RESUME state is needed when SM750 resume, otherwise it
will be failed in the second time of continuous suspend/resume.

Cc: Sudip Mukherjee <sudipm.mukherjee@gmail.com>
Signed-off-by: Binbin Zhou <zhoubb@lemote.com>
Reviewed-by: Huacai Chen <chenhc@lemote.com>
Reviewed-by: Teddy Wang <teddy.wang@siliconmotion.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-10-12 20:33:51 -07:00
Amitoj Kaur Chawla aeec43da3e staging: sm750fb: Add space around '&'
Add space around operator '&'. Problem found using
checkpatch.pl
CHECK: spaces preferred around that '&' (ctx:VxV)

Signed-off-by: Amitoj Kaur Chawla <amitoj1606@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-10-12 20:33:51 -07:00
Amitoj Kaur Chawla e80ef45dad staging: sm750fb: Add space around '<<'
Add space around operator '<<'. Problem found using
checkpatch.pl
CHECK: spaces preferred around that '<<' (ctx:VxV)

Signed-off-by: Amitoj Kaur Chawla <amitoj1606@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-10-12 20:33:51 -07:00
Amitoj Kaur Chawla aa355c8645 staging: sm750fb: Remove multiple blank lines
Remove multiple blank lines. Problem found using checkpatch.pl
CHECK: Please don't use multiple blank lines

Signed-off-by: Amitoj Kaur Chawla <amitoj1606@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-10-12 20:33:51 -07:00
Amitoj Kaur Chawla edb23022f2 staging: sm750fb: Rename dispState
Rename dispState to disp_state to avoid CamelCase. Problem found using
checkpatch.pl
CHECK: Avoid CamelCase: <dispState>

Signed-off-by: Amitoj Kaur Chawla <amitoj1606@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-10-12 20:33:51 -07:00
Amitoj Kaur Chawla 0221381c46 staging: sm750fb: Remove multiple blank lines
Remove multiple blank lines. Problem found using checkpatch.pl
CHECK: Please don't use multiple blank lines

Signed-off-by: Amitoj Kaur Chawla <amitoj1606@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-10-12 20:33:51 -07:00
Amitoj Kaur Chawla 43ce0b538a staging: sm750fb: Rename miniDiff
Rename miniDiff to mini_diff to avoid CamelCase. Problem found using
checkpatch.pl
CHECK: Avoid CamelCase: <miniDiff>

Signed-off-by: Amitoj Kaur Chawla <amitoj1606@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-10-12 20:33:51 -07:00
Amitoj Kaur Chawla a76f23d66d staging: sm750fb: Remove space after opening brace
Remove space after opening brace '{'. Problem found using
checkpatch.pl
CHECK: Blank lines aren't necessary after an open brace '{'

Signed-off-by: Amitoj Kaur Chawla <amitoj1606@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-10-12 20:32:07 -07:00
Amitoj Kaur Chawla 2a66a986b4 staging: sm750fb: Remove space before closing brace
Remove space before closing brace '}'. Problem found using
checkpatch.pl
CHECK: Blank lines aren't necessary before a close brace '}'

Signed-off-by: Amitoj Kaur Chawla <amitoj1606@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-10-12 20:32:07 -07:00
Amitoj Kaur Chawla a0fd4b57ba staging: sm750fb: Remove space after cast
Remove unnecessary space after cast. Problem found using checkpatch.pl
CHECK: No space is necessary after a cast

Signed-off-by: Amitoj Kaur Chawla <amitoj1606@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-10-12 20:32:07 -07:00
Shraddha Barke 80fb74c387 Staging: sm750fb: Use ARRAY_SIZE macro
ARRAY_SIZE is more concise to use when the size of an array is divided
by the size of its first element.

Changes made using Coccinelle-

@@
type T;
T[] E;
@@

- (sizeof(E)/sizeof(E[...]))
+ ARRAY_SIZE(E)

Signed-off-by: Shraddha Barke <shraddha.6596@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-10-12 20:32:07 -07:00
Amitoj Kaur Chawla 0ce5fdb14b staging: sm750fb: Remove multiple blank lines
Remove multiple blank lines. Problem found using checkpatch.pl
CHECK: Please don't use multiple blank lines

Signed-off-by: Amitoj Kaur Chawla <amitoj1606@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-10-08 09:50:08 +01:00
Amitoj Kaur Chawla 07387cba81 staging: sm750fb: Add space around ':'
Add space around operator ':'. Problem found using
checkpatch.pl
CHECK: spaces preferred around that ':' (ctx:VxV)

Signed-off-by: Amitoj Kaur Chawla <amitoj1606@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-10-08 09:43:18 +01:00
Amitoj Kaur Chawla 31418e3701 staging: sm750fb: Add space around '?'
Add space around operator '?'. Problem found using
checkpatch.pl
CHECK: spaces preferred around that '?' (ctx:VxV)

Signed-off-by: Amitoj Kaur Chawla <amitoj1606@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-10-08 09:43:18 +01:00
Amitoj Kaur Chawla f40917ea0b staging: sm750fb: Add space around '*'
Add space around operator '*'. Problem found using
checkpatch.pl
CHECK: spaces preferred around that '*' (ctx:VxV)

Signed-off-by: Amitoj Kaur Chawla <amitoj1606@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-10-08 09:43:18 +01:00
Amitoj Kaur Chawla c18c331193 staging: sm750fb: Add space around '/'
Add space around operator '/'. Problem found using
checkpatch.pl
CHECK: spaces preferred around that '/' (ctx:VxV)

Signed-off-by: Amitoj Kaur Chawla <amitoj1606@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-10-08 09:43:18 +01:00
Mike Rapoport 4dc4d22555 staging: sm750fb: remove clear method from lynxfb_{crtc,output}
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-02 11:50:52 +02:00
Mike Rapoport efca4885b2 staging: sm750fb: remove proc_checkMode method from lynxfb_output
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>
2015-10-02 11:50:52 +02:00
Mike Rapoport 104f456ce1 staging: sm750fb: remove unneeded switch statement
The lynxfb_ops_check_var function has two switch statements, the first
one checks for validity of var->bits_per_pixel and it is is immediatly
followed by another one that sets parameters according to
var->bits_per_pixel value. These switch statements can be merged into
one.

Signed-off-by: Mike Rapoport <mike.rapoport@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-10-02 11:50:52 +02:00
Mike Rapoport 4221c59587 staging: sm750fb: remove unused enable{ZVPort,SSP,PWM} functions
The functions that enable/disable power for some sub-devices are not
used 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-09-30 12:26:20 +02:00
Mike Rapoport 228a4cf8e7 staging: sm750fb: staticize getPowerMode function
The getPowerMode function is not used outside ddk750_power, make it
static.

Signed-off-by: Mike Rapoport <mike.rapoport@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-09-30 12:26:20 +02:00
Mike Rapoport 6af7003043 staging: sm750fb: remove unused macros
Several macros defined in sm750.h and sm750_help.h are not used 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-09-30 12:26:20 +02:00
Mike Rapoport 86b5f4ed35 staging: sm750fb: remove unused ddk750_initDVIDisp function
The ddk750_initDVIDisp function is never used and therefore it can be
removed.

Signed-off-by: Mike Rapoport <mike.rapoport@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-09-30 12:26:20 +02:00
Mike Rapoport 55a6cf5d4b staging: sm750fb: remove unused calcPllValue2 function
The calcPllValue2 function is never called and therefore it can be
removed.

Signed-off-by: Mike Rapoport <mike.rapoport@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-09-30 12:26:20 +02:00
Mike Rapoport fb6f37a8c8 staging: sm750fb: staticize local functions in ddk750_chip
Several functions in ddk750_chip are not used elsewhere, let's make them
static.

Signed-off-by: Mike Rapoport <mike.rapoport@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-09-30 12:26:20 +02:00
Mike Rapoport 1282bade3b staging: sm750fb: remove dead code
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-29 15:20:35 +02:00
Mike Rapoport 174f264234 staging: sm750fb: replace twoToPowerOfx with shift operator
The function twoToPowerOfx that iteratively calculates the power of 2
may be replaced with shift operator

Signed-off-by: Mike Rapoport <mike.rapoport@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-09-29 04:16:31 +02:00
Mike Rapoport e967d336ee staging: sm750fb: remove unused MB(x) and KB(x) macros
The MB(x) and KB(x) macros are not used 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-09-29 04:16:31 +02:00
Mike Rapoport 4cf26d859a staging: sm750fb: replace custom MB(x) macro with appropriate SZ_xM
Use SZ_xM defined in linux/sizes.h instead of custom MB(x) macro

Signed-off-by: Mike Rapoport <mike.rapoport@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-09-29 04:16:30 +02:00
Mike Rapoport 67088d49a1 staging: sm750fb: tidy up #include directives
Add space between '#include' keyword and the header name

Signed-off-by: Mike Rapoport <mike.rapoport@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-09-29 04:16:30 +02:00
Mike Rapoport 27254ec26c staging: sm750fb: sm750_help.h: spacing fix
Remove unnecessary space in sm750_help.h to fix the following
checkpatch.pl error:
drivers/staging/sm750fb/sm750_help.h:46: space prohibited after that '~' (ctx:ExW)

Signed-off-by: Mike Rapoport <mike.rapoport@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-09-29 04:16:30 +02:00
Mike Rapoport 9137f812e9 staging: sm750fb: ddk750_*i2c: shorten lines to under 80 characters
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-14 08:50:47 -07:00
Mike Rapoport 987f202a34 staging: sm750fb: ddk750_*i2c: remove multiple blank lines
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-14 08:50:47 -07:00
Mike Rapoport fe82004489 staging: sm750fb: ddk750_swi2c: further reduce CamelCase
Rename remaining CamelCase variables

Signed-off-by: Mike Rapoport <mike.rapoport@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-09-14 08:50:47 -07:00
Mike Rapoport 53bc6b6e1a staging: sm750fb: ddk750_swi2c: rename CamelCase static variables
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-14 08:50:47 -07:00
Mike Rapoport b3696b7971 staging: sm750fb: ddk750_hwi2c: reduce amount of CamelCase
Rename camel case variables deviceAddress, pBuffer and totalBytes to
addr, buf and total_bytes respectively in sm750_hw_i2c_{read,write}_data
functions.

Signed-off-by: Mike Rapoport <mike.rapoport@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-09-14 08:50:47 -07:00
Mike Rapoport 938ad7edf2 staging: sm750fb: hw_i2c_{read,write}: rename CamelCase variables
Rename longCamelCase variables deviceAddress and registerIndex to
shorter addr and reg

Signed-off-by: Mike Rapoport <mike.rapoport@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-09-14 08:50:47 -07:00
Mike Rapoport a503da64fd staging: sm750fb: ddk750_hw_i2c: rename busSpeedMode
rename CamelCase parameter in sm750_hw_i2c_init()

Signed-off-by: Mike Rapoport <mike.rapoport@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-09-14 08:50:47 -07:00
Mike Rapoport 6c78f4ce60 staging: sm750fb: ddk750_swi2c: rename CamelCase static functions
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-14 08:50:47 -07:00
Mike Rapoport 01a64c4469 staging: sm750fb: ddk750_swi2c: staticize swI2C{SCL,SDA}
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-14 08:50:47 -07:00
Mike Rapoport d33b42048e staging: sm750fb: rename swI2CWriteReg to sm750_sw_i2c_write_reg
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-14 08:50:46 -07:00
Mike Rapoport 288836b69f staging: sm750fb: rename swI2CReadReg to sm750_sw_i2c_read_reg
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-14 08:50:46 -07:00
Mike Rapoport f2ea7733dd staging: sm750fb: rename swI2CInit to sm750_sw_i2c_init
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-14 08:50:46 -07:00
Mike Rapoport ac1189513f staging: sm750fb: ddk750_hwi2c: rename CamelCase static functions
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-14 08:50:46 -07:00
Mike Rapoport 6bdbe62b9d staging: sm750fb: rename hwI2CWriteReg to sm750_hw_i2c_write_reg
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-14 08:50:46 -07:00
Mike Rapoport 5ccf734003 staging: sm750fb: rename hwI2CReadReg to sm750_hw_i2c_read_reg
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-14 08:50:46 -07:00
Mike Rapoport ed7042edaf staging: sm750fb: rename hwI2CClose to sm750_hw_i2c_close
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-14 08:50:46 -07:00
Mike Rapoport 19f70eaedb staging: sm750fb: rename hwI2CInit to sm750_hw_i2c_init
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-14 08:50:46 -07:00
Yash Shah cc6c16df80 Staging: sm750fb: Fix "foo* bar" should be "foo *bar" errors
Fix "foo* bar" should be "foo *bar" errors as detected by
checkpatch.pl

Signed-off-by: Yash Shah <yshah1@visteon.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-08-14 19:20:42 -07:00
Sudip Mukherjee 4063ea9af6 staging: sm750fb: simplify return
Lets return the return value directly instead of using a variable to
store the result.

Signed-off-by: Sudip Mukherjee <sudip@vectorindia.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-08-07 15:12:54 -07:00
Sudip Mukherjee f8fbc838f4 staging: sm750fb: rearrange code
Rearrange the code to remove one exit label which also makes the code
less indented and more readable.

Signed-off-by: Sudip Mukherjee <sudip@vectorindia.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-08-07 15:12:54 -07:00
Sudip Mukherjee d11ac7cbcc staging: sm750fb: fix multiline comment
Multiline comments are edited to be in the kernel coding style.

Signed-off-by: Sudip Mukherjee <sudip@vectorindia.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-08-07 15:12:54 -07:00
Sudip Mukherjee 13ef345822 staging: sm750fb: space around operator
Kernel coding style says to have a space around the operators.

Signed-off-by: Sudip Mukherjee <sudip@vectorindia.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-08-07 15:12:54 -07:00
Sudip Mukherjee 5fd93ddf32 staging: sm750fb: remove multiple blank line
Multiple blank lines are not kernel coding style and so checkpatch
complains. Remove them.

Signed-off-by: Sudip Mukherjee <sudip@vectorindia.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-08-07 15:12:54 -07:00
Antoine BLIN 9a2c874c51 staging: sm750fb: ddk750_power.c: Split lines over 80 characters.
Fix up "line over 80 characters" warning found by the checkpatch.pl script.

Signed-off-by: Antoine BLIN <antoine.blin@lip6.fr>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-07-22 20:56:03 -07:00
Aaron Ouellette 9d7a0ffe6d staging: sm750fb: removed extra parentheses
fixed checkpatch.pl error:
ERROR: return is not a function, parentheses are not needed

Signed-off-by: Aaron Ouellette <aouellette2016@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-07-22 20:56:03 -07:00
Juston Li 40403c1b13 staging: sm750fb: add missing blank line after declarations
Fixes checkpatch.pl
WARNING: Missing a blank line after declarations

Signed-off-by: Juston Li <juston.h.li@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-07-14 22:52:53 -07:00
Juston Li 7b05cbe8b6 staging: sm750fb: remove unnecessary braces
Fixes checkpatch.pl warning:
WARNING: braces {} are not necessary for single statement blocks

Signed-off-by: Juston Li <juston.h.li@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-07-14 22:52:52 -07:00
Juston Li cebafd8d6f staging: sm750fb: move while to follow do close brace
Fixes checkpatch.pl error:
ERROR: while should follow close brace '}'

Signed-off-by: Juston Li <juston.h.li@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-07-14 22:52:52 -07:00
Juston Li 259fef35c7 staging: sm750fb: fix brace placement
Fix brace placement errors caught by checkpatch.pl
ERROR: that open brace { should be on the previous line

Signed-off-by: Juston Li <juston.h.li@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-07-14 22:52:52 -07:00
Juston Li a1fe154f0f staging: sm750fb: remove unnecessary whitespace
Fixes checkpatch.pl warning:
WARNING: unnecessary whitespace before a quoted newline

Signed-off-by: Juston Li <juston.h.li@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-07-14 22:52:52 -07:00
Juston Li 919ca7c63b staging: sm750fb: remove trailing whitespace
Fixes checkpatch.pl error:
ERROR: trailing whitespace

Signed-off-by: Juston Li <juston.h.li@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-07-14 22:52:52 -07:00
Juston Li adbb90e830 staging: sm750fb: add space after semicolon
Fixes checkpatch.pl error:
ERROR: space required after that ';'

Signed-off-by: Juston Li <juston.h.li@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-07-14 22:52:52 -07:00
Juston Li 0d5e63c462 staging: sm750fb: add spaces around operators
Fixes checkpath.pl error:
ERROR: spaces required around that operator

Note running checkpatch.pl with '--strict' catches more
of these errors along with cases where spacing is optional
but preferred. Take care of these in a future patch.

Signed-off-by: Juston Li <juston.h.li@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-07-14 22:52:52 -07:00
Juston Li 6ab5b6d16b staging: sm750fb: consistent spacing around operators
Fixes checkpatch.pl error:
ERROR: need consistent spacing around operator

Signed-off-by: Juston Li <juston.h.li@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-07-14 22:52:52 -07:00
Juston Li f7d8b69a1d staging: sm750fb: add space after return type
Fixes checkpatch.pl warning:
WARNING: missing space after return type

Signed-off-by: Juston Li <juston.h.li@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-07-14 22:52:52 -07:00
Juston Li 5d14c13ae0 staging: sm750fb: add space after struct definition
Fixes checkpatch.pl warning:
WARNING: missing space after struct definition

Signed-off-by: Juston Li <juston.h.li@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-07-14 22:52:51 -07:00
Juston Li b63f3dcab1 staging: sm750fb: add space after enum definition
Fixes checkpatch.pl warning:
WARNING: missing space after enum definition

Signed-off-by: Juston Li <juston.h.li@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-07-14 22:52:00 -07:00
Juston Li 6338a78132 staging: sm750fb: add space after close brace
Fixes checkpatch.pl error:
ERROR: space required after that close brace '}'

Signed-off-by: Juston Li <juston.h.li@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-07-14 22:52:00 -07:00
Juston Li 8c11f5a280 staging: sm750fb: add space before open brace
Fixes checkpatch.pl error:
ERROR: space required before the open brace '{'

Signed-off-by: Juston Li <juston.h.li@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-07-14 22:52:00 -07:00