Commit graph

574901 commits

Author SHA1 Message Date
James Simmons ddbc66a5e5 staging: lustre: drop *_t from end of struct lnet_text_buf
When lnet_text_buf data structure was transform from typedef
to struct the *_t which is typical of typedef was not drop.
This patch removes the *_t to be consistent.

Signed-off-by: James Simmons <jsimmons@infradead.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-02-14 16:20:32 -08:00
Greg Kroah-Hartman d9750a2f9e 2nd round of new IIO device support, features and cleanups for the 4.6 cycle.
New Device Support
 * Apex stx104 DAC
   - new driver for this PC104 board. Right now DAC support only.
 * ADI ad5064
   - Add support for ad5625, ad5627, ad5645, ad5665, ad5667 DACs.
   - Add support for Linear Technology ltc2606, ltc2607, ltc2609, ltc2616,
     ltc2617, ltc2619, ltc2626, ltc2627 and ltc2629.
 * ADI ad7192
   - add support for the ad7193
 * Invensense mpu6050
   - substantial rework of driver to use regmap allowing SPI support extending
     the now split driver to cover the MPU6000.
 * TI adc0832
   - new driver supporting ADC0831, ADC0832, ADC0834 and ADC0838 ADCs.
 * TI ads1015
   - new driver, note that there is an existing hwmon driver. The long term
     intention is to probably remove the hwmon driver but for now we just have
     guards in place to ensure this driver is not built if that one is enabled.
 * TI afe4403
   - new driver for this heart rate monitor / pulse oximeter front end chip.
 * TI afe4404
   - new driver for this heart rate monitor / pulse oximeter front end chip.
 
 Staging Graduations
 * mxs-lradc
   - A combined general purpose and touch screen (input) device driver.
     Originally held in staging to allow reworking into and MFD but as
     that wasn't happening and isn't an absolute requirement we are moving
     it out of staging.
 
 Driver new features
 * ms5611
   - triggered buffer support
   - IIO_CHAN_INFO_SCALE to aid the triggered buffer support.
 
 Driver cleanups / reworks / fixes
 * ad5064
   - Use an enum for the register map layout to allow support of additional
     chips (precursor to the new support listed above).
   - Structural driver changes to allow support of the slightly different
     handling for the ltc parts above.
 * ad5933
   - drop an exceptional & unnecessary for a function pointer.
 * ad7606
   - Cleanup the repeated copies of pm ops.
   - consolidate the various channels specs via a sport of rearranging so only
     one version is needed.
 * atlas ph sensor
   - add select IRQ_WORK
 * hmc8543 (soon to move out of staging)
   - Comment style fixes
   - functionality of suspend and resume was swapped.
 * spear-adc
   - use devm_clk_dev instead of managing the clk lifetime by hand.
 
 Core
 * Use new dmaengine_terminate_sync call to avoid a theoretical race.
 * Fix docs for mlock in struct iio_dev as it is correctly taken in some
   drivers (docs used to say for core only).
 * Add a helper function for calculating the scan index storage size within
   the core cutting out some cut and paste versions of the same code.
 -----BEGIN PGP SIGNATURE-----
 Version: GnuPG v2
 
 iQIcBAABCAAGBQJWwJeMAAoJEFSFNJnE9BaI9N8P/3nvhVTXXTkwl8UF22dAyRhP
 l6Szj8vk6M9yJ0z8sBPPzKRoPOESuZU/N8BndN5w17Em3fU9k3Qe6CaUYGTKziFt
 hzuL1ySpnrGphKZR6AfONKR6m+yfk+PYVPJlMG1EEdop2nkMyezoZxh9yjNXfm9H
 gekh41rz8LrAluG4n88XdJMzIGBRfup7PPt+sJ5Ao6AMrrQVrx4DA+dTaoVJ50ED
 rvh1DIwUDH158a27Wgc5QgxyA2dSL+65KiD6HR69XKq3exUZ6AlvXHCHwOZR8/xp
 /MtBNP7V9C0vO7PBNIxRQWIdsLRQdfaiCJSWEHH1lqxQK2S6DFYzSXFCA8lQ448Q
 1qH8G2JiYzbzPVX9noXvuQJJYnGa1xsKvdOGFzi/mRXEGTaygPVYEjn2JN4WzRho
 zgAdLdI6RkPVuqDp7Mliu8lsC9giQoLD22Ln2z9AzF1PDMrCD+p2Ff+q+1xQip/q
 8B8AMniPkK8Bn5mMAGPrN6FqUt5cqtnRkECC/Yzg8B21qLcefeFmcwSecmOrd331
 +7PWWDOWCmHVMweo9whZhaS3yZFNerl7G2DzwDI76So+eeBFikFvgitTMbuWWlyG
 SXMqUqfelBs3SpftKlAKXxZ4PK/MEo45LzNSfbi0J69zpIFTqICR9nnN8/rN9ew0
 KhZtcL9Q1H6yJwGuefdp
 =LIQe
 -----END PGP SIGNATURE-----

Merge tag 'iio-for-4.6b' of git://git.kernel.org/pub/scm/linux/kernel/git/jic23/iio into staging-next

Jonathan writes:

2nd round of new IIO device support, features and cleanups for the 4.6 cycle.

New Device Support
* Apex stx104 DAC
  - new driver for this PC104 board. Right now DAC support only.
* ADI ad5064
  - Add support for ad5625, ad5627, ad5645, ad5665, ad5667 DACs.
  - Add support for Linear Technology ltc2606, ltc2607, ltc2609, ltc2616,
    ltc2617, ltc2619, ltc2626, ltc2627 and ltc2629.
* ADI ad7192
  - add support for the ad7193
* Invensense mpu6050
  - substantial rework of driver to use regmap allowing SPI support extending
    the now split driver to cover the MPU6000.
* TI adc0832
  - new driver supporting ADC0831, ADC0832, ADC0834 and ADC0838 ADCs.
* TI ads1015
  - new driver, note that there is an existing hwmon driver. The long term
    intention is to probably remove the hwmon driver but for now we just have
    guards in place to ensure this driver is not built if that one is enabled.
* TI afe4403
  - new driver for this heart rate monitor / pulse oximeter front end chip.
* TI afe4404
  - new driver for this heart rate monitor / pulse oximeter front end chip.

Staging Graduations
* mxs-lradc
  - A combined general purpose and touch screen (input) device driver.
    Originally held in staging to allow reworking into and MFD but as
    that wasn't happening and isn't an absolute requirement we are moving
    it out of staging.

Driver new features
* ms5611
  - triggered buffer support
  - IIO_CHAN_INFO_SCALE to aid the triggered buffer support.

Driver cleanups / reworks / fixes
* ad5064
  - Use an enum for the register map layout to allow support of additional
    chips (precursor to the new support listed above).
  - Structural driver changes to allow support of the slightly different
    handling for the ltc parts above.
* ad5933
  - drop an exceptional & unnecessary for a function pointer.
* ad7606
  - Cleanup the repeated copies of pm ops.
  - consolidate the various channels specs via a sport of rearranging so only
    one version is needed.
* atlas ph sensor
  - add select IRQ_WORK
* hmc8543 (soon to move out of staging)
  - Comment style fixes
  - functionality of suspend and resume was swapped.
* spear-adc
  - use devm_clk_dev instead of managing the clk lifetime by hand.

Core
* Use new dmaengine_terminate_sync call to avoid a theoretical race.
* Fix docs for mlock in struct iio_dev as it is correctly taken in some
  drivers (docs used to say for core only).
* Add a helper function for calculating the scan index storage size within
  the core cutting out some cut and paste versions of the same code.
2016-02-14 11:10:38 -08:00
Daniel Baluta ecc24e72f4 iio: adc: Add TI ADS1015 ADC driver support
The driver has sysfs readings with runtime PM support for power saving.
It also offers buffer support that can be used together with IIO software
triggers.

Datasheet can be found here:
	http://www.ti.com.cn/cn/lit/ds/symlink/ads1015.pdf

Signed-off-by: Daniel Baluta <daniel.baluta@intel.com>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
2016-02-13 20:54:15 +00:00
William Breathitt Gray 97a445dad3 iio: Add IIO support for the DAC on the Apex Embedded Systems STX104
The Apex Embedded Systems STX104 is a 16-channel 16-bit analog input and
2-channel 16-bit analog output PC/104 card. The STX104 incorporates a
large one mega-sample FIFO.

This driver provides IIO support for the 2-channel DAC on the STX104.
The base port addresses for the devices may be configured via the "base"
module parameter array.

Signed-off-by: William Breathitt Gray <vilhelm.gray@gmail.com>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
2016-02-13 20:54:14 +00:00
Adriana Reus fd64df16f4 iio: imu: inv_mpu6050: Add SPI support for MPU6000
The only difference between the MPU6000 and the
MPU6050 is that the first also supports SPI.
Add SPI driver for this chip.

Signed-off-by: Adriana Reus <adriana.reus@intel.com>
Reviewed-by: Lucas De Marchi <lucas.demarchi@intel.com>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
2016-02-13 20:54:07 +00:00
Adriana Reus b3eea8dacf iio: imu: inv_mpu6050: Separate driver into core and i2c functionality.
Separate this driver into core and i2c functionality.
This is in preparation for adding spi support.

Signed-off-by: Adriana Reus <adriana.reus@intel.com>
Reviewed-by: Lucas De Marchi <lucas.demarchi@intel.com>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
2016-02-13 20:54:00 +00:00
Adriana Reus d430f3c36c iio: imu: inv_mpu6050: Use regmap instead of i2c specific functions
Use regmap instead of i2c specific functions.
This is in preparation of splitting this driver into core and
i2c specific functionality.

Signed-off-by: Adriana Reus <adriana.reus@intel.com>
Acked-by: Crt Mori <cmo@melexis.com>
Reviewed-by: Lucas De Marchi <lucas.demarchi@intel.com>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
2016-02-13 20:53:50 +00:00
Adriana Reus c278ac0ecd iio: imu: inv-mpu6050: Fix interrupt pin configuration
The select/deselect_bypass duo writes the irq number into the interrupt
configuration register.
If there is a i2c slave device connected to the mpu (eg. a magnetometer)
then this can hinder interrupt delivery for the accelerometer and
gyroscope.
Set this register to the default configuration.

Signed-off-by: Adriana Reus <adriana.reus@intel.com>
Reviewed-by: Lucas De Marchi <lucas.demarchi@intel.com>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
2016-02-13 20:52:47 +00:00
Janani Ravichandran 2cdb82c7ff staging: fsl-mc: Remove unneeded parentheses
Remove unneeded parentheses on the right hand side of assignment
statements.
Semantic patch:

@@
expression a, b, c;
@@

(
  a = (b == c)
|
  a =
- (
  b
- )
)

Signed-off-by: Janani Ravichandran <janani.rvchndrn@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-02-11 20:05:35 -08:00
Janani Ravichandran 3a35be2a14 staging: media: Remove unneeded parentheses
Remove unneeded parentheses in assignment statements.
Semantic patch:

@@
expression a, b, c;
@@

(
  a = (b == c)
|
  a =
- (
  b
- )
)

Signed-off-by: Janani Ravichandran <janani.rvchndrn@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-02-11 20:05:35 -08:00
Janani Ravichandran 599b878095 staging: emxx_udc: Remove parentheses around the right hand side of assignment
Remove parentheses around the right hand side of assignments as they are
not needed. Semantic patch used:

@@
expression a, b, c;
@@

(
  a = (b == c)
|
  a =
- (
  b
- )
)

Signed-off-by: Janani Ravichandran <janani.rvchndrn@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-02-11 20:05:35 -08:00
Hari Prasath Gujulan Elango 686f0c2301 staging: rtl8192e: prefer using eth_broadcast_addr()
Prefer using the eth_broadcast_addr() instead of memset to broadcast
address 0xFF to the array.

Signed-off-by: Hari Prasath Gujulan Elango <hgujulan@visteon.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-02-11 20:05:35 -08:00
Andrew Bradford d9b36d5225 staging: rtl8188eu: fix signal strength indication
RTL8188E can only have a maximum of 2 chains so match that in the actual
phy_rx_agc_info structure within phy_status_rpt.  This will cause the
other data received from the PHY, such as signal strength indication of
beacons, to properly align and allow extraction and use within the
signal strength record-keeping mechanisms.

Signed-off-by: Andrew Bradford <andrew@bradfordembedded.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-02-11 20:03:56 -08:00
Ivan Safonov 8b0187188a staging: rtl8188eu: add release_firmware() between request_firmware and function error exit
Small memory leak fixed.

Signed-off-by: Ivan Safonov <insafonov@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-02-11 20:03:56 -08:00
Ivan Safonov 29e20dd4c7 staging: rtl8188eu: remove pfirmware and fwsize of the hal_data_8188e structure
The pfirmware is used only in rtl88eu_download_fw function
(except the kfree(rtlhal->pfirmware) in netdev_close).

The fwsize not used after initialization at all.

The pfirmvare replaced by fw_data and fwsize removed.

Signed-off-by: Ivan Safonov <insafonov@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-02-11 20:03:56 -08:00
Ivan Safonov f643ba69d1 staging: rtl8188eu: remove _rtl88e_fill_dummy
The _rtl88e_fill_dummy function replaced by memset in rtl88eu_download_fw.

More appropriate names are used for pfwdata and fwsize variables
(download_data and download_size respectively).

Also u32 replaced by size_t for download_size variable.

Signed-off-by: Ivan Safonov <insafonov@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-02-11 20:03:56 -08:00
Janani Ravichandran 139737983d staging: rtl8188eu: Remove unnecessary pointer cast
Remove unnecessary pointer cast. Issue found using the following Coccinelle semantic patch.

@@
type T;
T e;
identifier x;
@@

* T x = (T)e;

Signed-off-by: Janani Ravichandran <janani.rvchndrn@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-02-11 20:03:56 -08:00
Janani Ravichandran 993c0a0ea0 staging: rtl8723au: Use ARRAY_SIZE macro for sizes of arrays
Use ARRAY_SIZE to calculate the size of an array to make code concise.
The semantic patch used can be found here:
9cbab452a3

Signed-off-by: Janani Ravichandran <janani.rvchndrn@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-02-11 20:03:56 -08:00
Haneen Mohammed 2fbf6d6166 Staging: vt6655: Add check dma_mapping_error
This patch checks for dma_mapping_error() after using dma_map_single.
If the dma map fails we release skb buff allocated by dev_alloc_skb() to
avoid possible causes of resource leak.

Signed-off-by: Haneen Mohammed <hamohammed.sa@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-02-11 20:00:30 -08:00
Alison Schofield 27f31cf9f7 staging: vt6656: replace explicit NULL comparison with ! operator
Replace explicit NULL comparison with ! operator to simplify code.

Found with Coccinelle:
@@
expression e;
statement s0, s1;
@@

if (
(
+ !
e
- == NULL
 || ...
)
 ) s0 else s1

Signed-off-by: Alison Schofield <amsfield22@gmail.com>
Acked-by: Julia Lawall <julia.lawall@lip6.fr>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-02-11 20:00:30 -08:00
Janani Ravichandran e3b07865f5 staging: gdm724x: Remove unneeded parentheses
Remove parentheses around the right hand side of assignment statements
as they are not needed.
Semantic patch:

@@
expression a, b, c;
@@

(
  a = (b == c)
|
  a =
- (
  b
- )
)
Signed-off-by: Janani Ravichandran <janani.rvchndrn@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-02-11 20:00:30 -08:00
Alison Schofield 474be12de6 staging: gdm72xx: compress return logic into one line
Simplify function returns by merging assignment and return into
one command line.
Found with Coccinelle
@@
expression e, ret;
@@

-ret =
+return
	e;
-return ret;

Signed-off-by: Alison Schofield <amsfield22@gmail.com>
Acked-by: Julia Lawall <julia.lawall@lip6.fr>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-02-11 20:00:30 -08:00
Alison Schofield 5a41b93476 staging: speakup: compress return logic into one line
Simplify function return by merging assignment and return into
one command line. Remove (now) unused local variable.

Found using Coccinelle:
@@
expression e, ret;
@@

-ret =
+return
	e;
-return ret;

Signed-off-by: Alison Schofield <amsfield22@gmail.com>
Acked-by: Julia Lawall <julia.lawall@lip6.fr>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-02-11 20:00:30 -08:00
Janani Ravichandran b3d0ea8d80 staging: speakup: Eliminate commented out code
This patch removes commented out code as it contributes to code clutter.

Signed-off-by: Janani Ravichandran <janani.rvchndrn@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-02-11 20:00:30 -08:00
Eva Rachel Retuya faad1a6cba staging: fbtft: Remove blank line after '{' brace
Omit the whitespace after '{' brace as suggested by checkpatch.

CHECK: Blank lines aren't necessary after an open brace '{'

Signed-off-by: Eva Rachel Retuya <eraretuya@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-02-11 19:54:36 -08:00
Eva Rachel Retuya b15cd7e809 staging: fbtft: Add blank line after function declaration
Insert the required whitespace after the function declaration as
suggested by checkpatch.

CHECK: Please use a blank line after function/struct/union/enum
declarations

Signed-off-by: Eva Rachel Retuya <eraretuya@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-02-11 19:54:36 -08:00
Eva Rachel Retuya 5f10ef7dce staging: fbtft: Indent to match open parenthesis
Fix alignment issues by properly indenting function parameters in
accordance to the kernel coding style. Checkpatch pointed out this
issue.

CHECK: Alignment should match open parenthesis

Signed-off-by: Eva Rachel Retuya <eraretuya@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-02-11 19:54:36 -08:00
Eva Rachel Retuya e0246ea374 staging: fbtft: Fix block comments according to kernel coding style
Add the required trailing * on subsequent lines as well as move the */
on a separate line. Checkpatch found this issue.

Signed-off-by: Eva Rachel Retuya <eraretuya@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-02-11 19:54:36 -08:00
Mike Rapoport 60112069a9 staging: sm750fb: change definition of PANEL_HORIZONTAL_TOTAL fields
Use stratight-forward defintion of PANEL_HORIZONTAL_TOTAL 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-11 19:52:37 -08:00
Mike Rapoport 3e155b8134 staging: sm750fb: use BIT macro for I2C_STATUS fields
Replace complex definition of I2C_STATUS 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-11 19:52:37 -08:00
Mike Rapoport b71413e0d5 staging: sm750fb: use BIT macro for I2C_CTRL fields
Replace complex definition of I2C_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-11 19:52:37 -08:00
Mike Rapoport cdce1f1877 staging: sm750fb: change definition of CRT_DISPLAY_CTRL multi-bit fields
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-11 19:52:37 -08:00
Mike Rapoport d8264edf44 staging: sm750fb: use BIT macro for CRT_DISPLAY_CTRL single-bit fields
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-11 19:52:37 -08:00
Mike Rapoport 0f23be7050 staging: sm750fb: use BIT macro for DMA_ABORT_INTERRUPT single-bit fields
Replace complex definition of DMA_ABORT_INTERRUPT 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-11 19:52:37 -08:00
Mike Rapoport 27b047bbe1 staging: sm750fb: change definition of PANEL_PLANE_BR fields
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-11 19:52:37 -08:00
Mike Rapoport 30ca5cb63c staging: sm750fb: change definition of PANEL_PLANE_TL fields
Use stratight-forward defintion of PANEL_PLANE_TL register fields

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 f91969f773 staging: sm750fb: change definition of PANEL_WINDOW_HEIGHT fields
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-11 19:52:37 -08:00
Mike Rapoport 4c221d82cf staging: sm750fb: change definition of PANEL_WINDOW_WIDTH fields
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-11 19:52:37 -08:00
Mike Rapoport 26a3cc907c staging: sm750fb: change definition of PANEL_FB_WIDTH fields
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-11 19:52:37 -08:00
Mike Rapoport 4463690afc staging: sm750fb: change definition of PANEL_FB_ADDRESS fields
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-11 19:52:37 -08:00
Mike Rapoport c4e893b7cc staging: sm750fb: change definition of PANEL_DISPLAY_CTRL multi-bit fields
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-11 19:52:37 -08:00
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