GitHub/moto-9609/android_kernel_motorola_exynos9610.git
8 years agostaging: fsl-mc: Extended MC bus allocator to include IRQs
J. German Rivera [Wed, 6 Jan 2016 22:03:23 +0000 (16:03 -0600)]
staging: fsl-mc: Extended MC bus allocator to include IRQs

All the IRQs for DPAA2 objects in the same DPRC must use
the ICID of that DPRC, as their device Id in the GIC-ITS.
Thus, all these IRQs must share the same ITT table in the GIC.
As a result, a pool of IRQs with the same device Id must be
preallocated per DPRC (fsl-mc bus instance). So, the fsl-mc
bus object allocator is extended to also provide services
to allocate IRQs to DPAA2 devices, from their parent fsl-mc bus
IRQ pool.

Signed-off-by: J. German Rivera <German.Rivera@freescale.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
8 years agostaging: fsl-mc: Added GICv3-ITS support for FSL-MC MSIs
J. German Rivera [Wed, 6 Jan 2016 22:03:22 +0000 (16:03 -0600)]
staging: fsl-mc: Added GICv3-ITS support for FSL-MC MSIs

Added platform-specific MSI support layer for FSL-MC devices.

Signed-off-by: J. German Rivera <German.Rivera@freescale.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
8 years agostaging: fsl-mc: Added generic MSI support for FSL-MC devices
J. German Rivera [Wed, 6 Jan 2016 22:03:21 +0000 (16:03 -0600)]
staging: fsl-mc: Added generic MSI support for FSL-MC devices

Created an MSI domain for the fsl-mc bus-- including functions
to create a domain, find a domain, alloc/free domain irqs, and
bus specific overrides for domain and irq_chip ops.

Signed-off-by: J. German Rivera <German.Rivera@freescale.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
8 years agofsl-mc: msi: Added FSL-MC-specific member to the msi_desc's union
J. German Rivera [Wed, 6 Jan 2016 22:03:20 +0000 (16:03 -0600)]
fsl-mc: msi: Added FSL-MC-specific member to the msi_desc's union

FSL-MC is a bus type different from PCI and platform, so it needs
its own member in the msi_desc's union.

Signed-off-by: J. German Rivera <German.Rivera@freescale.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
8 years agoirqdomain: Added domain bus token DOMAIN_BUS_FSL_MC_MSI
J. German Rivera [Wed, 6 Jan 2016 22:03:19 +0000 (16:03 -0600)]
irqdomain: Added domain bus token DOMAIN_BUS_FSL_MC_MSI

Since an FSL-MC bus is a new bus type that is neither PCI nor
PLATFORM, we need a new domain bus token to disambiguate the
IRQ domain for FSL-MC MSIs.

Signed-off-by: J. German Rivera <German.Rivera@freescale.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
8 years agoStaging:speakup:add space around '|'
Bhumika Goyal [Mon, 1 Feb 2016 19:31:28 +0000 (01:01 +0530)]
Staging:speakup:add space around '|'

Fix checkpatch.pl check:CHECK: spaces preferred around that '|'.
Add spaces around operands to fix these warnings.

Signed-off-by: Bhumika Goyal <bhumirks@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
8 years agostaging: wlan-ng: use list_for_each_entry*
Geliang Tang [Tue, 15 Dec 2015 15:29:32 +0000 (23:29 +0800)]
staging: wlan-ng: use list_for_each_entry*

Use list_for_each_entry*() instead of list_for_each*() to simplify
the code.

Signed-off-by: Geliang Tang <geliangtang@163.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
8 years agodrivers:staging:wlan-ng Fix space preferred around that messages
Bogicevic Sasa [Mon, 14 Dec 2015 14:25:59 +0000 (06:25 -0800)]
drivers:staging:wlan-ng Fix space preferred around that messages

This fixes all "space preferred around that ..." messages from
checkpatch.pl

Signed-off-by: Bogicevic Sasa <brutallesale@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
8 years agodrivers:staging:wlan-ng Fix all no space necesarry after a cast
Bogicevic Sasa [Mon, 14 Dec 2015 14:11:18 +0000 (06:11 -0800)]
drivers:staging:wlan-ng Fix all no space necesarry after a cast

This fixes all messages "no space necesarry after a cast" in cfg80211.c
file

Signed-off-by: Bogicevic Sasa <brutallesale@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
8 years agostaging: wlan-ng: Fixed more comments
Gavin O'Leary [Mon, 23 Nov 2015 17:23:36 +0000 (09:23 -0800)]
staging: wlan-ng: Fixed more comments

Fixed more comment issues

Signed-off-by: Gavin O'Leary <gavinoleary3@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
8 years agostaging: wlan-ng: fixed a comment
Gavin O'Leary [Mon, 23 Nov 2015 17:08:18 +0000 (09:08 -0800)]
staging: wlan-ng: fixed a comment

Fixed a comment style issue.

Signed-off-by: Gavin O'Leary <gavinoleary3@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
8 years agostaging: wlan-ng: (coding style) remove unnecessary blank line before "}"
Christian Colic [Mon, 23 Nov 2015 13:25:05 +0000 (14:25 +0100)]
staging: wlan-ng: (coding style) remove unnecessary blank line before "}"

Fix checkpatch checks: "Blank lines aren't necessary before a close brace '}' "
Remove two unnecessary blank lines.

Signed-off-by: Christian Colic <colic.christian@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
8 years agoStaging: wlan-ng: p80211wep: fixed a block comment style issue
Gavin O'Leary [Mon, 9 Nov 2015 06:44:20 +0000 (22:44 -0800)]
Staging: wlan-ng: p80211wep: fixed a block comment style issue

Fixed a comment style issue.

Signed-off-by: Gavin O'Leary <gavinoleary3@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
8 years agostaging: wlan-ng: NULL comparisons made elegant
Pranjal Bhor [Mon, 18 Jan 2016 19:35:13 +0000 (01:05 +0530)]
staging: wlan-ng: NULL comparisons made elegant

Elegance added for NULL comparisons

Signed-off-by: Pranjal Bhor <bhor.pranjal@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
8 years agostaging: wlan-ng: Open parenthesis alignment style fix
Pranjal Bhor [Mon, 18 Jan 2016 19:34:56 +0000 (01:04 +0530)]
staging: wlan-ng: Open parenthesis alignment style fix

Alignment of lines matched with open parenthesis

Signed-off-by: Pranjal Bhor <bhor.pranjal@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
8 years agostaging: wlan-ng: Coding style fix for casting operation
Pranjal Bhor [Mon, 18 Jan 2016 19:34:41 +0000 (01:04 +0530)]
staging: wlan-ng: Coding style fix for casting operation

Removed spaces after casting operating

Signed-off-by: Pranjal Bhor <bhor.pranjal@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
8 years agostaging: wlan-ng: Removed blank lines after braces
Pranjal Bhor [Mon, 18 Jan 2016 19:34:25 +0000 (01:04 +0530)]
staging: wlan-ng: Removed blank lines after braces

Blank lines before closing braces and after opening braces
have been removed.

Signed-off-by: Pranjal Bhor <bhor.pranjal@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
8 years agostaging: wlan-ng: Logical continuation fixes
Pranjal Bhor [Mon, 18 Jan 2016 19:34:09 +0000 (01:04 +0530)]
staging: wlan-ng: Logical continuation fixes

Logical continuation coding style issues fixed while
condition checking

Signed-off-by: Pranjal Bhor <bhor.pranjal@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
8 years agostaging: wlan-ng: Fixed block comments coding style issue
Pranjal Bhor [Mon, 18 Jan 2016 19:33:49 +0000 (01:03 +0530)]
staging: wlan-ng: Fixed block comments coding style issue

All block comment lines now begin with "*" and end with "*/"
on a new line.

Signed-off-by: Pranjal Bhor <bhor.pranjal@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
8 years agoStaging: vt6656: Fixed multiple commenting codig style issues.
maomao xu [Thu, 31 Dec 2015 07:20:53 +0000 (15:20 +0800)]
Staging: vt6656: Fixed multiple commenting codig style issues.

Fixed multiple comment blocks that didn't comply with the
kernels coding style.

Signed-off-by: maomao xu <albert008.xu@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
8 years agodrivers:staging:vt6656: Fix coding style issues
Sergey Lysanov [Fri, 18 Dec 2015 08:06:24 +0000 (11:06 +0300)]
drivers:staging:vt6656: Fix coding style issues

This patch fixes the following issues reported by checkpatch.pl:
- code indent should use tabs where possible

Signed-off-by: Sergey Lysanov <lysanovsergey@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
8 years agostaging: vt6656: fix definitions of DEVICE_FLAGS_* flags
Alexey Tulia [Sat, 21 Nov 2015 12:36:47 +0000 (15:36 +0300)]
staging: vt6656: fix definitions of DEVICE_FLAGS_* flags

test_bit and set_bit take the bit number to operate on, rather than a
mask. This patch fixes the DEVICE_FLAGS_* definitions so that they represent
the bit index in priv->flags as opposed to the mask returned by the
BIT macro.

Signed-off-by: Alexey Tulia <alexey.tulia@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
8 years agostaging: vt6655: mac.c replace void __iomem * with struct vnt_private
Malcolm Priestley [Sun, 22 Nov 2015 09:07:22 +0000 (09:07 +0000)]
staging: vt6655: mac.c replace void __iomem * with struct vnt_private

Moving void __iomem down one level in the following functions
MACbIsRegBitsOn
MACbIsRegBitsOff
MACbIsIntDisable
MACvSetShortRetryLimit
MACvSetLongRetryLimit
MACvGetLongRetryLimit
MACvSetLoopbackMode
MACvSaveContext
MACvRestoreContext
MACbSoftwareReset
MACbSafeSoftwareReset
MACbSafeRxOff
MACbSafeTxOff
MACbSafeStop
MACbShutdown
MACvInitialize
MACvSetCurrRx0DescAddr
MACvSetCurrRx1DescAddr
MACvSetCurrTXDescAddr
MACvSetCurrTx0DescAddrEx
MACvSetCurrAC0DescAddrEx
MACvSetCurrSyncDescAddrEx
MACvSetCurrATIMDescAddrEx
MACvTimer0MicroSDelay
MACvOneShotTimer1MicroSec
MACvSetMISCFifo
MACbPSWakeup
MACvSetKeyEntry
MACvDisableKeyEntry

Signed-off-by: Malcolm Priestley <tvboxspy@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
8 years agostaging: vt6655: PSbIsNextTBTTWakeUp Rename bWakeUp wake_up
Malcolm Priestley [Sun, 22 Nov 2015 09:07:21 +0000 (09:07 +0000)]
staging: vt6655: PSbIsNextTBTTWakeUp Rename bWakeUp wake_up

Removing camel case.

Signed-off-by: Malcolm Priestley <tvboxspy@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
8 years agostaging: vt6655: rf.c/h Replace DeviceContext with vnt_private
Malcolm Priestley [Sun, 22 Nov 2015 09:07:20 +0000 (09:07 +0000)]
staging: vt6655: rf.c/h Replace DeviceContext with vnt_private

Removing void and including device.h for power.h

Signed-off-by: Malcolm Priestley <tvboxspy@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
8 years agostaging: vt6655: power.c replace pDevice with priv
Malcolm Priestley [Sun, 22 Nov 2015 09:07:19 +0000 (09:07 +0000)]
staging: vt6655: power.c replace pDevice with priv

Removing camel case.

Signed-off-by: Malcolm Priestley <tvboxspy@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
8 years agostaging: vt6655: rf.c rename bResult ret.
Malcolm Priestley [Sun, 22 Nov 2015 09:07:18 +0000 (09:07 +0000)]
staging: vt6655: rf.c rename bResult ret.

Removing camel case and reflecting return value.

Signed-off-by: Malcolm Priestley <tvboxspy@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
8 years agostaging: vt6655: set_channel replace bResult with ret
Malcolm Priestley [Sun, 22 Nov 2015 09:07:17 +0000 (09:07 +0000)]
staging: vt6655: set_channel replace bResult with ret

Removing camel case.

Signed-off-by: Malcolm Priestley <tvboxspy@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
8 years agostaging: vt6655: set_channel replace void handler.
Malcolm Priestley [Sun, 22 Nov 2015 09:07:16 +0000 (09:07 +0000)]
staging: vt6655: set_channel replace void handler.

Replace with struct vnt_private.

Signed-off-by: Malcolm Priestley <tvboxspy@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
8 years agostaging: vt6655: channel.c replace pDevice with priv
Malcolm Priestley [Sun, 22 Nov 2015 09:07:15 +0000 (09:07 +0000)]
staging: vt6655: channel.c replace pDevice with priv

Removing camel case.

Signed-off-by: Malcolm Priestley <tvboxspy@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
8 years agostaging: rtl8188eu: use eth_broadcast_addr() in place of memset
Hari Prasath Gujulan Elango [Wed, 20 Jan 2016 12:52:58 +0000 (12:52 +0000)]
staging: rtl8188eu: use eth_broadcast_addr() in place of memset

Replace the memset of array to broadcast address 0xFF by using the
eth_broadcast_addr() API

Signed-off-by: Hari Prasath Gujulan Elango <hgujulan@visteon.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
8 years agostaging: rtl8188eu: use list_first_entry_or_null()
Geliang Tang [Mon, 1 Feb 2016 14:37:13 +0000 (22:37 +0800)]
staging: rtl8188eu: use list_first_entry_or_null()

Use list_first_entry_or_null() instead of list_empty() + container_of()
to simplify the code.

Signed-off-by: Geliang Tang <geliangtang@163.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
8 years agostaging: rtl8188eu: print OUI with %*ph
Andy Shevchenko [Thu, 10 Dec 2015 15:43:55 +0000 (17:43 +0200)]
staging: rtl8188eu: print OUI with %*ph

There is no need to pass each byte as a parameter when printing values in hex
format. We rather use %*ph specifier for that.

Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
8 years agostaging: rtl8188eu: replace open-coded print_hex_dump()
Andy Shevchenko [Thu, 10 Dec 2015 15:43:54 +0000 (17:43 +0200)]
staging: rtl8188eu: replace open-coded print_hex_dump()

No need to reinvent a wheel, i.e. print_hex_dump(). Replace an open-coded
variant by generic kernel helper.

Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
8 years agostaging: rtl8188eu: provide an absolute path to include folder
Andy Shevchenko [Thu, 10 Dec 2015 15:43:53 +0000 (17:43 +0200)]
staging: rtl8188eu: provide an absolute path to include folder

Otherwise compiler will complain as follows

  CC [M]  drivers/staging/rtl8188eu/core/rtw_ap.o
cc1: warning: drivers/staging/rtl8188eu/include: No such file or directory [-Wmissing-include-dirs]

Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
8 years agoStaging: rtl8188eu: core: rtw_debug: fixed a parentheses coding style issue
Chris Elliott [Mon, 7 Dec 2015 22:02:27 +0000 (22:02 +0000)]
Staging: rtl8188eu: core: rtw_debug: fixed a parentheses coding style issue

Removed unnecessary parentheses.

Signed-off-by: Chris Elliott <chris@uksysadmin.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
8 years agostaging: rtl8188eu: remove an extra space
Alexey Tulia [Sat, 21 Nov 2015 10:06:37 +0000 (13:06 +0300)]
staging: rtl8188eu: remove an extra space

drivers/staging/rtl8188eu/core/rtw_wlan_util.c:1377 check_assoc_AP() warn: inconsistent indenting

Signed-off-by: Alexey Tulia <alexey.tulia@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
8 years agostaging: rtl8188eu: rtw_mlme_ext.c: simplify call to issue_action_BA()
Luca Ceresoli [Wed, 2 Dec 2015 21:54:05 +0000 (22:54 +0100)]
staging: rtl8188eu: rtw_mlme_ext.c: simplify call to issue_action_BA()

Using the ternary operator allows to more concisely write the same
code, and to stay within 80 characters without even increasing the
number of lines.

Signed-off-by: Luca Ceresoli <luca@lucaceresoli.net>
Cc: Larry Finger <Larry.Finger@lwfinger.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
8 years agostaging: rtl8188eu: rename camelcase bAcceptAddbaReq
Luca Ceresoli [Wed, 2 Dec 2015 21:54:04 +0000 (22:54 +0100)]
staging: rtl8188eu: rename camelcase bAcceptAddbaReq

There is such a field both in struct mlme_ext_info and in struct
registry_priv. Rename both.

Also fix checkpatch issue in the lines touched:
  WARNING: line over 80 characters

Signed-off-by: Luca Ceresoli <luca@lucaceresoli.net>
Cc: Larry Finger <Larry.Finger@lwfinger.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
8 years agostaging: rtl8188eu: remove useless variable rtw_AcceptAddbaReq
Luca Ceresoli [Wed, 2 Dec 2015 21:54:03 +0000 (22:54 +0100)]
staging: rtl8188eu: remove useless variable rtw_AcceptAddbaReq

rtw_AcceptAddbaReq is a static variable, it is set once and never
modified. It is referenced only once, to assign its value to a member
of struct registry_priv with practically the same name.

Get rid of the variable, and move the meaningful part of the comment
near the declaration of the relevant field of struct registry_priv.

Raises a new checkpatch issue, which is fixed in a later commit:
  CHECK: Avoid CamelCase: <bAcceptAddbaReq>

Signed-off-by: Luca Ceresoli <luca@lucaceresoli.net>
Cc: Larry Finger <Larry.Finger@lwfinger.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
8 years agostaging: rtl8188eu: rtw_mlme_ext.c: remove commented code
Luca Ceresoli [Wed, 2 Dec 2015 21:54:02 +0000 (22:54 +0100)]
staging: rtl8188eu: rtw_mlme_ext.c: remove commented code

This line is connented since the initial import in commit 7b464c9fa5cc
("staging: r8188eu: Add files for new driver - part 4") and there's no
comment stating how it could ever be useful.

Signed-off-by: Luca Ceresoli <luca@lucaceresoli.net>
Cc: Larry Finger <Larry.Finger@lwfinger.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
8 years agostaging: rtl8188eu: don't cast to void* when calling memset()
Luca Ceresoli [Wed, 2 Dec 2015 21:54:01 +0000 (22:54 +0100)]
staging: rtl8188eu: don't cast to void* when calling memset()

The first argument to memset() is (void *), the explicit typecasts are
not needed. They just make code less readable.

Signed-off-by: Luca Ceresoli <luca@lucaceresoli.net>
Cc: Larry Finger <Larry.Finger@lwfinger.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
8 years agostaging: rtl8188eu: add spaces around binary '*'
Luca Ceresoli [Wed, 2 Dec 2015 21:54:00 +0000 (22:54 +0100)]
staging: rtl8188eu: add spaces around binary '*'

Fix checkpatch issue:
  CHECK: spaces preferred around that '*' (ctx:VxV)

Signed-off-by: Luca Ceresoli <luca@lucaceresoli.net>
Cc: Larry Finger <Larry.Finger@lwfinger.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
8 years agostaging: sm750fb, fix typos
Matej Vasek [Mon, 25 Jan 2016 15:02:33 +0000 (16:02 +0100)]
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>
8 years agodrivers:staging:sm750fb Fix all space preferred around messages
Bogicevic Sasa [Wed, 25 Nov 2015 21:56:30 +0000 (22:56 +0100)]
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>
8 years agostaging: sm750fb: fix style for if clause
Othmar Pasteka [Sun, 8 Nov 2015 10:58:51 +0000 (11:58 +0100)]
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>
8 years agostaging: sm750fb: change definition of POWER_MODE_CTRL multi-bit field
Mike Rapoport [Sun, 17 Jan 2016 18:04:31 +0000 (20:04 +0200)]
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>
8 years agostaging: sm750fb: use BIT macro for POWER_MODE_CTRL single-bit fields
Mike Rapoport [Sun, 17 Jan 2016 18:04:30 +0000 (20:04 +0200)]
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>
8 years agostaging: sm750fb: change definition of MODE0_GATE multi-bit fields
Mike Rapoport [Sun, 17 Jan 2016 18:04:29 +0000 (20:04 +0200)]
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>
8 years agostaging: sm750fb: use BIT macro for MODE0_GATE single-bit fields
Mike Rapoport [Sun, 17 Jan 2016 18:04:28 +0000 (20:04 +0200)]
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>
8 years agostaging: sm750fb: change definition of CURRENT_GATE multi-bit fields
Mike Rapoport [Sun, 17 Jan 2016 18:04:27 +0000 (20:04 +0200)]
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>
8 years agostaging: sm750fb: set{Memory, Master}Clock: rename ulReg to reg
Mike Rapoport [Sun, 17 Jan 2016 18:04:26 +0000 (20:04 +0200)]
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>
8 years agostaging: sm750fb: use BIT macro for CURRENT_GATE single-bit fields
Mike Rapoport [Sun, 17 Jan 2016 18:04:25 +0000 (20:04 +0200)]
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>
8 years agostaging: sm750fb: change definition of MISC_CTRL multi-bit fields
Mike Rapoport [Sun, 17 Jan 2016 18:04:24 +0000 (20:04 +0200)]
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>
8 years agostaging: sm750fb: use BIT macro for GPIO_MUX single-bit fields
Mike Rapoport [Sun, 17 Jan 2016 18:04:23 +0000 (20:04 +0200)]
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>
8 years agostaging: sm750fb: ddk750_sii164: fix defines for i2c{Read, Write}reg
Mike Rapoport [Sun, 17 Jan 2016 18:04:22 +0000 (20:04 +0200)]
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>
8 years agostaging: sm750fb: use BIT macro for MISC_CTRL single-bit fields
Mike Rapoport [Sun, 17 Jan 2016 18:04:21 +0000 (20:04 +0200)]
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>
8 years agostaging: sm750fb: ddk750_initHw: rename ulReg to reg
Mike Rapoport [Sun, 17 Jan 2016 18:04:20 +0000 (20:04 +0200)]
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>
8 years agostaging: sm750fb: change definition of SYSTEM_CTRL multi-bit fields
Mike Rapoport [Sun, 17 Jan 2016 18:04:19 +0000 (20:04 +0200)]
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>
8 years agostaging: sm750fb: use BIT macro for SYSTEM_CTRL single-bit fields
Mike Rapoport [Sun, 17 Jan 2016 18:04:18 +0000 (20:04 +0200)]
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>
8 years agostaging: sm750fb: remove unused DE_STATE2_DE_RESERVED
Mike Rapoport [Sun, 17 Jan 2016 18:04:17 +0000 (20:04 +0200)]
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>
8 years agostaging: sm750fb: use BIT macro for DE_STATE2 single-bit fields
Mike Rapoport [Sun, 17 Jan 2016 18:04:16 +0000 (20:04 +0200)]
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>
8 years agostaging: sm750fb: use BIT macro for DE_STATE1 single-bit field
Mike Rapoport [Sun, 17 Jan 2016 18:04:15 +0000 (20:04 +0200)]
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>
8 years agostaging: sm750fb: hw_sm750(le)_deWait: rename dwVal to val
Mike Rapoport [Sun, 17 Jan 2016 18:04:14 +0000 (20:04 +0200)]
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>
8 years agostaging: sm750fb: lynxfb_pci_probe: remove some pr_info
Mike Rapoport [Sun, 17 Jan 2016 17:59:55 +0000 (19:59 +0200)]
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>
8 years agostaging: sm750fb: introduce sm750fb_frambuffer_alloc
Mike Rapoport [Sun, 17 Jan 2016 17:59:54 +0000 (19:59 +0200)]
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>
8 years agostaging: sm750fb: introduce sm750fb_frambuffer_release
Mike Rapoport [Sun, 17 Jan 2016 17:59:53 +0000 (19:59 +0200)]
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>
8 years agostaging: sm750fb: replace dual member of sm750_dev with fb_count
Mike Rapoport [Sun, 17 Jan 2016 17:59:52 +0000 (19:59 +0200)]
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>
8 years agostaging: sm750fb: lynxfb_pci_remove: remove unused variable
Mike Rapoport [Sun, 17 Jan 2016 17:59:51 +0000 (19:59 +0200)]
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>
8 years agostaging: sm750fb: lynxfb_pci_probe: return actual errors
Mike Rapoport [Sun, 17 Jan 2016 17:59:50 +0000 (19:59 +0200)]
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>
8 years agostaging: sm750fb: disable PCI device if lynxfb_pci_probe fails
Mike Rapoport [Sun, 17 Jan 2016 17:59:49 +0000 (19:59 +0200)]
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>
8 years agostaging/rdma/hfi1: Fix Xmit Wait calculation
Ira Weiny [Tue, 22 Dec 2015 02:57:45 +0000 (21:57 -0500)]
staging/rdma/hfi1: Fix Xmit Wait calculation

Total XMIT wait needs to sum the xmit wait values of all the VLs not just
those requested in the query.  Also, make the algorithm used for both
PortStatus and PortDataCounters the same.

Reviewed-by: Arthur Kepner <arthur.kepner@intel.com>
Reviewed-by: Breyer, Scott J <scott.j.breyer@intel.com>
Signed-off-by: Ira Weiny <iweiny@gmail.com>
Signed-off-by: Jubin John <jubin.john@intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
8 years agostaging/rdma/hfi1: Clean up comments
Edward Mascarenhas [Tue, 22 Dec 2015 02:57:44 +0000 (21:57 -0500)]
staging/rdma/hfi1: Clean up comments

Clean up comments by deleting numbering and terms internal to Intel.

The information on the actual bugs is not deleted.

Reviewed-by: Mike Marciniszyn <mike.marciniszyn@intel.com>
Signed-off-by: Edward Mascarenhas <edward.mascarenhas@intel.com>
Signed-off-by: Jubin John <jubin.john@intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
8 years agostaging: rdma: hfi1: diag: constify hfi1_filter_array structure
Julia Lawall [Wed, 23 Dec 2015 20:42:57 +0000 (21:42 +0100)]
staging: rdma: hfi1: diag: constify hfi1_filter_array structure

The hfi1_filter_array structure is never modified, so declare it as const.

Done with the help of Coccinelle.

Signed-off-by: Julia Lawall <Julia.Lawall@lip6.fr>
Acked-by: Mike Marciniszyn <mike.marciniszyn@intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
8 years agostaging/rdma/hfi1: add dd_dev_dbg
Ira Weiny [Tue, 22 Dec 2015 01:31:52 +0000 (20:31 -0500)]
staging/rdma/hfi1: add dd_dev_dbg

To be used in future patches add dd_dev_dbg.  dd_* functions properly decode
the hfi1_devdata structure used throughout the driver

Signed-off-by: Ira Weiny <ira.weiny@intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
8 years agostaging/rdma/hfi1: set Gen3 half-swing for integrated devices
Dean Luick [Tue, 22 Dec 2015 01:31:53 +0000 (20:31 -0500)]
staging/rdma/hfi1: set Gen3 half-swing for integrated devices

Correctly set half-swing for integrated devices.  A0 needs all fields set for
CcePcieCtrl.  B0 and later only need a few fields set.

Reviewed-by: Stuart Summers <john.s.summers@intel.com>
Signed-off-by: Dean Luick <dean.luick@intel.com>
Signed-off-by: Ira Weiny <ira.weiny@intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
8 years agostaging: drop kbuild workaround dummy module from top dir
Paul Gortmaker [Tue, 17 Nov 2015 00:58:49 +0000 (19:58 -0500)]
staging: drop kbuild workaround dummy module from top dir

This is essentially a revert of 86f69fe9c069dd8608d238581eea259caa1dfc99
("Staging: workaround build system bug"), but to call it a revert would
imply it was wrong -- rather it seems more like it is just no longer
required anymore.

It doesn't list the full details of the failing use case, but the most
obvious would appear to be a "make allnoconfig" that subsequently had set
just CONFIG_STAGING=y in the .config file, to give:

  paul@builder:~/git/linux-head$ grep STAGING ../staging-allno/.config
  CONFIG_STAGING=y
  # CONFIG_STAGING_MEDIA is not set
  # CONFIG_STAGING_BOARD is not set
  paul@builder:~/git/linux-head$

After building this .config (on ARM, just to be different), we see that
built-in.o is created, and the final vmlinux links OK:

  paul@builder:~/git/linux-head$ ls -l ../staging-allno/drivers/staging/built-in.o
  -rw-rw-r-- 1 paul paul 257 Nov 16 18:06 ../staging-allno/drivers/staging/built-in.o
  paul@builder:~/git/linux-head$ file ../staging-allno/drivers/staging/built-in.o
  ../staging-allno/drivers/staging/built-in.o: ELF 32-bit LSB relocatable, ARM, version 1, not stripped
  paul@builder:~/git/linux-head$ nm ../staging-allno/drivers/staging/built-in.o
  nm: ../staging-allno/drivers/staging/built-in.o: no symbols
  paul@builder:~/git/linux-head$ ls -l ../staging-allno/vmlinux
  -rwxrwxr-x 1 paul paul 1236326 Nov 16 18:07 ../staging-allno/vmlinux
  paul@builder:~/git/linux-head$

I also tested an "allmodconfig" and did not see any problems there
either.  Switching back to x86-64 and testing several things there didn't
show any issues either.  So it appears we do not need to carry the
workaround in tree any longer.

Cc: linux-kbuild@vger.kernel.org
Signed-off-by: Paul Gortmaker <paul.gortmaker@windriver.com>
Acked-by: Michal Marek <mmarek@suse.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
8 years agoSTAGING: COMEDI: Wrap line over 80 characters
Pablo G. Gallardo [Thu, 4 Feb 2016 23:43:14 +0000 (21:43 -0200)]
STAGING: COMEDI: Wrap line over 80 characters

This patch wraps lines over 80 characters.

Signed-off-by: Pablo G. Gallardo <pggllrd@gmail.com>
Reviewed-by: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
8 years agoSTAGING: COMEDI: Remove unnecessary typecast of c90 int constant
Pablo G. Gallardo [Thu, 4 Feb 2016 23:43:13 +0000 (21:43 -0200)]
STAGING: COMEDI: Remove unnecessary typecast of c90 int constant

This patch removes unnecessary typecast of c90 int constant.

Signed-off-by: Pablo G. Gallardo <pggllrd@gmail.com>
Reviewed-by: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
8 years agostaging: comedi: ni_mio_common: add finite regeneration to dio output
Spencer E. Olson [Wed, 27 Jan 2016 21:28:29 +0000 (14:28 -0700)]
staging: comedi: ni_mio_common: add finite regeneration to dio output

This patch continues the implementation of reinterpreting stop_arg when
stop_src == TRIG_NONE for national instruments cdio output on e/m-series
devices.  This is part of a series of patches that allow a user to have a
specific buffer repeated as-is indefinitely.  The contents of the DMA
buffer can be left static or changed by the user via mmap access to the DMA
buffer.  If the contents are changed by the user, additional munging is not
performed by the driver and only a single call to
comedi_mark_buffer_written should be done.  The original behavior is
preserved when stop_arg == 0, as would be the prior use case.

As opposed to analog output, this patch is relatively simple.  First, the
digital output capabilities are much more limited/simple as compared to the
analog output device on NI e/m-series hardware, and second, this patch
relies on changes made with the earlier patch to accomplish limiting the
DMA buffer transfer.

Signed-off-by: Spencer E. Olson <olsonse@umich.edu>
Reviewed-by: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
8 years agostaging: comedi: ni_mio_common: adds finite regeneration to AO output
Spencer E. Olson [Wed, 27 Jan 2016 21:28:28 +0000 (14:28 -0700)]
staging: comedi: ni_mio_common: adds finite regeneration to AO output

This patch implements for analog output the reinterpretation of stop_arg
when stop_src == TRIG_NONE to allow the user to specify the length of the
buffer that should be repeated.  The intent is to allow a user to have a
specific buffer repeated as-is indefinitely.  The contents of the DMA
buffer can be left static or changed by the user via mmap access to the DMA
buffer.  If the contents are changed by the user, additional munging is not
performed by the driver and only a single call to
comedi_mark_buffer_written should be done.

Signed-off-by: Spencer E. Olson <olsonse@umich.edu>
Reviewed-by: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
8 years agostaging: comedi: ni_mio_common: Cleans up/clarifies ni_ao_cmd
Spencer E. Olson [Wed, 27 Jan 2016 21:28:27 +0000 (14:28 -0700)]
staging: comedi: ni_mio_common: Cleans up/clarifies ni_ao_cmd

This patch implements ni_ao_cmd much more closely organized like NI MHDDK
examples and DAQ-STC pseudo-code.  Adds comments with some more specific
references to the DAQ-STC.

For stop_src==TRIG_NONE (continuous output mode of entire buffer), the
count for the UC counter was corrected to represent the maximum count
possible (0xffffff).  Prior behavior for stop_src=TRIG_NONE did not
actually follow the DAQ-STC.  Furthermore, stop_src==TRIG_NONE now
correctly uses code specialized for either m-series or e-series devices.

It should be noted that stop_src==TRIG_NONE does _not_ with this patch
(or with prior behavior in ni_mio_common) actually implement true
continuous output.  Rather, the output is simply configured to operate as a
single buffer output, but where the buffer is as large as is possible with
NI-STC hardware.

Signed-off-by: Spencer E. Olson <olsonse@umich.edu>
Reviewed-by: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
8 years agostaging: comedi: ni_mio_common: make more bits in ao_cmd1 reg be stateful
Spencer E. Olson [Wed, 27 Jan 2016 21:28:26 +0000 (14:28 -0700)]
staging: comedi: ni_mio_common: make more bits in ao_cmd1 reg be stateful

Bits NISTC_AO_CMD1_DAC0_UPDATE_MODE and NISTC_AO_CMD1_DAC1_UPDATE_MODE are
now saved in the local copy of the AO_CMD1 register.  This is more
appropriate than prior methods of setting these bits specifically _both_
in the ni_ao_cmd configuration function _and_ the ni_ao_inttrig trigger
function.  With this patch, the bits are only specifically called out now
in the ni_ao_cmd configuration function.  In the ni_ao_inttrig trigger
function, only the UI_ARM, UC_ARM, BC_ARM bits of the ao_cmd1 register are
specifically called out.  Each of these bits is a strobe bit, while the
DAC[0-1]_UPDATE_MODE bits are simple write bits.

Signed-off-by: Spencer E. Olson <olsonse@umich.edu>
Reviewed-by: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
8 years agostaging: comedi: ni_mio_common: Cleans up/clarifies ni_ao_reset
Spencer E. Olson [Wed, 27 Jan 2016 21:28:25 +0000 (14:28 -0700)]
staging: comedi: ni_mio_common: Cleans up/clarifies ni_ao_reset

This patch implements ni_ao_reset much more closely organized like NI MHDDK
examples and DAQ-STC pseudo-code.  Adds comments with some more specific
references to the DAQ-STC.

Signed-off-by: Spencer E. Olson <olsonse@umich.edu>
Reviewed-by: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
8 years agostaging: comedi: mite: enable continuous regeneration of finite samples
Spencer E. Olson [Wed, 27 Jan 2016 21:28:24 +0000 (14:28 -0700)]
staging: comedi: mite: enable continuous regeneration of finite samples

This change enables the mite DMA controller to only transfer the amount of
data needed by a command.  By default, the old behavior of transferring the
entire comedi DMA data buffer is still in effect.  These changes allow a
command to only transmit a limited portion of that data buffer as needed.

This patch begins to reinterprets stop_arg when stop_src == TRIG_NONE to
allow the user to specify the length of the buffer that should be repeated.
The intent is to allow a user to have a specific buffer repeated as-is
indefinitely.  The contents of the DMA buffer can be left static or changed
by the user via mmap access to the DMA buffer.  If the contents are changed
by the user, additional munging is not performed by the driver and only a
single call to comedi_mark_buffer_written should be done.

Signed-off-by: Spencer E. Olson <olsonse@umich.edu>
Reviewed-by: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
8 years agostaging: comedi: ni_mio_common: use CR_CHAN more consistently
Spencer E. Olson [Tue, 12 Jan 2016 18:05:10 +0000 (11:05 -0700)]
staging: comedi: ni_mio_common: use CR_CHAN more consistently

Generally, the CR_CHAN macro is/should be used to access the relevant bits
for channel identification in cmd->*_arg when the corresponding
cmd->*_src==TRIG_EXT, including cmd->convert_arg in this case.

This patch does not fix a bug per se, as NISTC_AI_MODE1_CONVERT_SRC() already
masks the value sufficiently, but using CR_CHAN() here makes the code clearer as
it avoids passing some irrelevant bits to NISTC_AI_MODE1_CONVERT_SRC() in the
first place.

Signed-off-by: Spencer E. Olson <olsonse@umich.edu>
Reviewed-by: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
8 years agostaging: comedi: ni_tiocmd: change mistaken use of start_src for start_arg
Spencer E. Olson [Tue, 12 Jan 2016 17:33:18 +0000 (10:33 -0700)]
staging: comedi: ni_tiocmd: change mistaken use of start_src for start_arg

This fixes a bug in function ni_tio_input_inttrig().  The trigger number
should be compared to cmd->start_arg, not cmd->start_src.

Fixes: 6a760394d7eb ("staging: comedi: ni_tiocmd: clarify the cmd->start_arg validation and use")
Cc: <stable@vger.kernel.org> # 3.17+
Signed-off-by: Spencer E. Olson <olsonse@umich.edu>
Reviewed-by: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
8 years agostaging: comedi: ni_pcimio: Adds PXI-6251 to supported boards
Spencer E. Olson [Tue, 12 Jan 2016 06:29:33 +0000 (23:29 -0700)]
staging: comedi: ni_pcimio: Adds PXI-6251 to supported boards

Signed-off-by: Spencer E. Olson <olsonse@umich.edu>
Reviewed-by: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
8 years agostaging: comedi: dt2801: Prefer using the BIT macro
Bhaktipriya Shridhar [Mon, 11 Jan 2016 16:04:28 +0000 (21:34 +0530)]
staging: comedi: dt2801: Prefer using the BIT macro

As suggested by checkpatch.pl, this patch replaces bit shifting on 1 with the
BIT(x) macro.

Signed-off-by: Bhaktipriya Shridhar <bhaktipriya96@gmail.com>
Reviewed-by: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
8 years agoion:synchronize debugfs callback and ion_client_destroy
Neil Zhang [Tue, 26 Jan 2016 09:39:06 +0000 (17:39 +0800)]
ion:synchronize debugfs callback and ion_client_destroy

There are race condition B/T ion_client_destroy and debugfs callbacks.
Let's use a mutex to synchronize them.

Signed-off-by: Neil Zhang <neilzhang1123@hotmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
8 years agostaging/ion: Add support to get ion handle from dma buf
Rohit kumar [Tue, 12 Jan 2016 04:01:46 +0000 (09:31 +0530)]
staging/ion: Add support to get ion handle from dma buf

Currently we can only import dma buf fd's to get ion_handle.
Adding support to import dma buf handles to support kernel
specific use cases.

An example use case is in linux platforms such as Tizen, in which
DRM-GEM is used for buffer management for graphics. It has gem_handle
corresponding to a buffer and uses gem_name for sharing the buffer
with other processes. However,it also uses dma_buf fd for 3d operations.
For wayland, there are multiple calls for gem_handle to dma_buf fd
conversion. So, we store dma_buf associated with buffer. But, there is
no api for getting ion_handle from dma_buf. This patch exposes api to
retrieve the ion handle from dma_buf for similar use cases. With this
patch, we can integrate ION within DRM-GEM for buffer management and
dma_buf sharing.

Signed-off-by: Rohit kumar <rohit.kr@samsung.com>
Reviewed-by: Laura Abbott <labbott@redhat.com>
Reviewed-by: Sumit Semwal <sumit.semwal@linaro.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
8 years agostaging/android: remove len field from struct sync_fence_info
Gustavo Padovan [Wed, 3 Feb 2016 13:25:34 +0000 (11:25 -0200)]
staging/android: remove len field from struct sync_fence_info

After removing driver_data struct sync_fence_info has now a fixed size,
thus it doesn't need any field to tell its size, it is already known.

Signed-off-by: Gustavo Padovan <gustavo.padovan@collabora.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
8 years agostaging/android: remove driver_data from struct sync_fence_info
Gustavo Padovan [Wed, 3 Feb 2016 13:25:33 +0000 (11:25 -0200)]
staging/android: remove driver_data from struct sync_fence_info

It is unclear in what situations driver_data should be used thus better do
not upstream it for now. If a need arises in the future a discussion can
be started to re-add it.

Signed-off-by: Gustavo Padovan <gustavo.padovan@collabora.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
8 years agostaging/android: rename sync_file_info_data to sync_file_info
Gustavo Padovan [Wed, 3 Feb 2016 13:25:32 +0000 (11:25 -0200)]
staging/android: rename sync_file_info_data to sync_file_info

info_data is a bit redundant, let's keep it as only sync_file_info. It is
also smaller.

Signed-off-by: Gustavo Padovan <gustavo.padovan@collabora.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
8 years agostaging/android: rename sync_pt_info to sync_fence_info
Gustavo Padovan [Wed, 3 Feb 2016 13:25:31 +0000 (11:25 -0200)]
staging/android: rename sync_pt_info to sync_fence_info

As struct sync_pt doesn't exist anymore it is a good idea remove any
reference to it in the sync_framework. sync_pts were replaced directly by
fences and here we rename it to sync_fence_info to let the fence namespace
clean.

v2: rename fence_info to sync_fence_info (Maarten)

Signed-off-by: Gustavo Padovan <gustavo.padovan@collabora.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
8 years agostaging/android: remove SYNC_WAIT ioctl
Gustavo Padovan [Wed, 3 Feb 2016 13:25:30 +0000 (11:25 -0200)]
staging/android: remove SYNC_WAIT ioctl

This ioctl is replicating the work of poll() syscall so let's take the
opportunity that this is still on staging tree and remove the duplication
and force new users to use the poll() standard interface.

Signed-off-by: Gustavo Padovan <gustavo.padovan@collabora.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
8 years agoStaging: Android: memory allocation style change in ion_page_pool.c
Ben Marsh [Mon, 1 Feb 2016 13:12:32 +0000 (14:12 +0100)]
Staging: Android: memory allocation style change in ion_page_pool.c

This is a patch to ion_page_pool.c that changes a memory allocation
style issue as found by checkpatch.pl.

Signed-off-by: Ben Marsh <bmarsh94@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
8 years agostaging/android: remove sync_fence_create_dma()
Gustavo Padovan [Thu, 21 Jan 2016 12:49:24 +0000 (10:49 -0200)]
staging/android: remove sync_fence_create_dma()

With the removal of struct sync_pt sync_fence_create_dma() now takes
the same arguments as sync_fence_create() so let's keep only
sync_fence_create().

Signed-off-by: Gustavo Padovan <gustavo.padovan@collabora.co.uk>
Reviewed-by: Maarten Lankhorst <maarten.lankhorst@linux.intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
8 years agostaging/android: remove pointless sync_timeline_signal at destroy phase
Gustavo Padovan [Thu, 21 Jan 2016 12:49:23 +0000 (10:49 -0200)]
staging/android: remove pointless sync_timeline_signal at destroy phase

All changes to timeline value come through the user via
sync_timeline_signal() calls. When sync_timeline_destroy() is called no
changes on timeline->value happens hence call sync_timeline_signal() with
no increment is pointless.

Signed-off-by: Gustavo Padovan <gustavo.padovan@collabora.co.uk>
Reviewed-by: Maarten Lankhorst <maarten.lankhorst@linux.intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
8 years agostaging/android: remove unused var from sync_timeline_signal()
Gustavo Padovan [Thu, 21 Jan 2016 12:49:22 +0000 (10:49 -0200)]
staging/android: remove unused var from sync_timeline_signal()

signaled_pts is not used in this function.

Signed-off-by: Gustavo Padovan <gustavo.padovan@collabora.co.uk>
Reviewed-by: Maarten Lankhorst <maarten.lankhorst@linux.intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>