]> git.karo-electronics.de Git - linux-beck.git/log
linux-beck.git
8 years agostaging/lustre: Update FID documentation link.
Oleg Drokin [Sun, 19 Jun 2016 03:53:13 +0000 (23:53 -0400)]
staging/lustre: Update FID documentation link.

When OpenSFS took over lustre.org, there was some reshuffling.
FIDs on ZFS document is now at
http://wiki.old.lustre.org/index.php/Architecture_-_Interoperability_fids_zfs
instead of the old location, so update comments accordingly.

Signed-off-by: Oleg Drokin <green@linuxhacker.ru>
Reported-by: Xose Vazquez Perez <xose.vazquez@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
8 years agostaging/lustre: Remove unnecessary space after a cast
Oleg Drokin [Sun, 19 Jun 2016 03:53:12 +0000 (23:53 -0400)]
staging/lustre: Remove unnecessary space after a cast

This patch fixes all checkpatch occurences of
"CHECK: No space is necessary after a cast"
in Lustre code.

Signed-off-by: Emoly Liu <emoly.liu@intel.com>
Signed-off-by: Oleg Drokin <green@linuxhacker.ru>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
8 years agostaging/lustre: Keep logical continuations on the previous line
Emoly Liu [Sun, 19 Jun 2016 03:53:11 +0000 (23:53 -0400)]
staging/lustre: Keep logical continuations on the previous line

This patch fixes all checkpatch occurences of
"CHECK: Logical continuations should be on the previous line"
in Lustre code.

Signed-off-by: Emoly Liu <emoly.liu@intel.com>
Signed-off-by: Oleg Drokin <green@linuxhacker.ru>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
8 years agostaging/lustre: Fix blank line before EXPORT_SYMBOL()
Emoly Liu [Sun, 19 Jun 2016 03:53:10 +0000 (23:53 -0400)]
staging/lustre: Fix blank line before EXPORT_SYMBOL()

This patch fixes one checkpatch warning in lustre:
WARNING: EXPORT_SYMBOL(foo); should immediately follow its function/variable

Signed-off-by: Emoly Liu <emoly.liu@intel.com>
Signed-off-by: Oleg Drokin <green@linuxhacker.ru>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
8 years agortl8192u: Remove unused semaphore rf_sem
Binoy Jayan [Thu, 2 Jun 2016 10:53:02 +0000 (16:23 +0530)]
rtl8192u: Remove unused semaphore rf_sem

The semaphore 'rf_sem' in rtl8192u has no users, hence removing it.

Signed-off-by: Binoy Jayan <binoy.jayan@linaro.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
8 years agortl8192u: Replace semaphore scan_sem with mutex
Binoy Jayan [Thu, 2 Jun 2016 10:53:01 +0000 (16:23 +0530)]
rtl8192u: Replace semaphore scan_sem with mutex

The semaphore 'scan_sem' in rtl8192u is a simple mutex, so it should
be written as one. Semaphores are going away in the future.

Signed-off-by: Binoy Jayan <binoy.jayan@linaro.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
8 years agortl8192u: ieee80211_device: Replace semaphore wx_sem with mutex
Binoy Jayan [Thu, 2 Jun 2016 10:53:00 +0000 (16:23 +0530)]
rtl8192u: ieee80211_device: Replace semaphore wx_sem with mutex

The semaphore 'wx_sem' in ieee80211_device is a simple mutex,
so it should be written as one. Semaphores are going away in the future.

Signed-off-by: Binoy Jayan <binoy.jayan@linaro.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
8 years agortl8192u: r8192_priv: Replace semaphore wx_sem with mutex
Binoy Jayan [Thu, 2 Jun 2016 10:52:59 +0000 (16:22 +0530)]
rtl8192u: r8192_priv: Replace semaphore wx_sem with mutex

The semaphore 'wx_sem' in r8192_priv is a simple mutex, so
it should be written as one. Semaphores are going away in the future.

Signed-off-by: Binoy Jayan <binoy.jayan@linaro.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
8 years agostaging: rtl8192u: propagate errors in write_nic_dword
Salah Triki [Wed, 4 May 2016 03:42:48 +0000 (04:42 +0100)]
staging: rtl8192u: propagate errors in write_nic_dword

Propagate errors from kzalloc and usb_control_msg and change the
return type of write_nic_dword from void to int.

Signed-off-by: Salah Triki <salah.triki@acm.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
8 years agostaging: rtl8192u: propagate errors in write_nic_word
Salah Triki [Wed, 4 May 2016 03:42:47 +0000 (04:42 +0100)]
staging: rtl8192u: propagate errors in write_nic_word

Propagate errors from kzalloc and usb_control_msg and change the
return type of write_nic_word from void to int.

Signed-off-by: Salah Triki <salah.triki@acm.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
8 years agostaging: rtl8192u: propagate errors in write_nic_byte_E
Salah Triki [Wed, 4 May 2016 03:42:46 +0000 (04:42 +0100)]
staging: rtl8192u: propagate errors in write_nic_byte_E

Propagate errors from  kzalloc and usb_control_msg and change the
return type of write_nic_byte_E from void to int.

Signed-off-by: Salah Triki <salah.triki@acm.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
8 years agostaging: rtl8192u: propagate errors in write_nic_byte
Salah Triki [Wed, 4 May 2016 03:42:45 +0000 (04:42 +0100)]
staging: rtl8192u: propagate errors in write_nic_byte

Propagate errors from  kzalloc and usb_control_msg and change the
return type of write_nic_byte from void to int.

Signed-off-by: Salah Triki <salah.triki@acm.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
8 years agostaging: rtl8192u: check return value of rtl8192_read_eeprom_info
Salah Triki [Wed, 4 May 2016 03:42:44 +0000 (04:42 +0100)]
staging: rtl8192u: check return value of rtl8192_read_eeprom_info

The call of rtl8192_read_eeprom_info may fail, therefore its return
value must be checked and propagated in the case of error

Signed-off-by: Salah Triki <salah.triki@acm.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
8 years agostaging: rtl8192u: propagate errors in rtl8192_read_eeprom_info
Salah Triki [Wed, 4 May 2016 03:42:43 +0000 (04:42 +0100)]
staging: rtl8192u: propagate errors in rtl8192_read_eeprom_info

Propagate error from eprom_read and change the return type of
rtl8192_read_eeprom_info from void to int.

Signed-off-by: Salah Triki <salah.triki@acm.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
8 years agostaging: rtl8192u: check return value eprom_read
Salah Triki [Wed, 4 May 2016 03:42:42 +0000 (04:42 +0100)]
staging: rtl8192u: check return value eprom_read

The call of eprom_read may fail, therefore its return value must be
checked

Signed-off-by: Salah Triki <salah.triki@acm.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
8 years agostaging: rtl8192u: propagate errors in eprom_read
Salah Triki [Wed, 4 May 2016 03:42:41 +0000 (04:42 +0100)]
staging: rtl8192u: propagate errors in eprom_read

Propagate error from eprom_r and change the return type of eprom_read
from u32 to int.

Signed-off-by: Salah Triki <salah.triki@acm.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
8 years agostaging: rtl8192u: check return value of read_nic_word_E
Salah Triki [Wed, 4 May 2016 03:42:40 +0000 (04:42 +0100)]
staging: rtl8192u: check return value of read_nic_word_E

The call of read_nic_word_E may fail, therefore its return value must be
checked and propagated in the case of error.

Signed-off-by: Salah Triki <salah.triki@acm.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
8 years agostaging: ks7010: remove bogus NULL checks
Dan Carpenter [Tue, 14 Jun 2016 11:17:02 +0000 (14:17 +0300)]
staging: ks7010: remove bogus NULL checks

enc->rx_seq[] and enc->key[] are arrays, not pointers and they can't be
NULL.  Let's remove these NULL checks.

Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
8 years agostaging: ks7010: drop private handler for driver version
Wolfram Sang [Fri, 17 Jun 2016 08:47:00 +0000 (10:47 +0200)]
staging: ks7010: drop private handler for driver version

We are upstream now, we don't need seperate driver versioning.

Signed-off-by: Wolfram Sang <wsa@the-dreams.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
8 years agostaging: ks7010: report interface as wlan not eth
Wolfram Sang [Fri, 17 Jun 2016 08:46:59 +0000 (10:46 +0200)]
staging: ks7010: report interface as wlan not eth

Until we switch to cfg80211 (if ever), we must do this manually.

Signed-off-by: Wolfram Sang <wsa@the-dreams.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
8 years agostaging: ks7010: bail out when registering netdevice fails
Wolfram Sang [Fri, 17 Jun 2016 08:46:58 +0000 (10:46 +0200)]
staging: ks7010: bail out when registering netdevice fails

There is no need to continue then. Also, this enables us to remove an
ugly static variable.

Signed-off-by: Wolfram Sang <wsa@the-dreams.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
8 years agostaging: ks7010: sdio: remove forward declarations
Wolfram Sang [Fri, 17 Jun 2016 08:46:57 +0000 (10:46 +0200)]
staging: ks7010: sdio: remove forward declarations

Move read/write functions to the top and driver struct to the end, so we
can remove all forward declarations.

Signed-off-by: Wolfram Sang <wsa@the-dreams.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
8 years agostaging: ks7010: unify naming to ks7010
Wolfram Sang [Fri, 17 Jun 2016 08:46:56 +0000 (10:46 +0200)]
staging: ks7010: unify naming to ks7010

No 79xx anymore, this is confusing. Add a comment saying that old
versions were probably named 7910/79xx.

Signed-off-by: Wolfram Sang <wsa@the-dreams.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
8 years agostaging: ks7010: export sdio ids
Wolfram Sang [Fri, 17 Jun 2016 08:46:55 +0000 (10:46 +0200)]
staging: ks7010: export sdio ids

So the module will be loaded automatically on card insertion. Rename the
array while here.

Signed-off-by: Wolfram Sang <wsa@the-dreams.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
8 years agostaging: ks7010: collect all includes and sort them
Wolfram Sang [Fri, 17 Jun 2016 08:46:54 +0000 (10:46 +0200)]
staging: ks7010: collect all includes and sort them

Includes probably need a driver-wide clean up, but for now let's at
least group all includes from the sdio file together.

Signed-off-by: Wolfram Sang <wsa@the-dreams.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
8 years agostaging: ks7010: function declaration should be in a header file
Wolfram Sang [Fri, 17 Jun 2016 08:46:53 +0000 (10:46 +0200)]
staging: ks7010: function declaration should be in a header file

Signed-off-by: Wolfram Sang <wsa@the-dreams.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
8 years agostaging: ks7010: remove cfg file handling
Wolfram Sang [Fri, 17 Jun 2016 08:46:52 +0000 (10:46 +0200)]
staging: ks7010: remove cfg file handling

I verified that all but two settings from the config file can be set up
also via 'iwconfig' or 'iwpriv'. The two missing are ROM_FILE and
PhyInformationTimer. ROM_FILE can be easily dropped. There is only one
known firmware floating on the net, so, the name is fix and we can make
this constant. Frankly, I don't know when PhyInformationTimer needs to
be set to non-zero. But if we need it somewhen, there is already
(currently commented out) code to add this as another private method, so
we could use that. Summa summarum: We can remove the config file
handling and the example config file. The only useful action,
initialization of the configuration struct, is now moved to the sdio
main file.

Signed-off-by: Wolfram Sang <wsa@the-dreams.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
8 years agostaging/android: sync_debug: unproxify debugfs files' fops
Nicolai Stange [Fri, 27 May 2016 18:03:54 +0000 (20:03 +0200)]
staging/android: sync_debug: unproxify debugfs files' fops

Since commit 49d200deaa68 ("debugfs: prevent access to removed files'
private data"), a debugfs file's file_operations methods get proxied
through lifetime aware wrappers.

However, only a certain subset of the file_operations members is supported
by debugfs and ->compat_ioctl isn't among them -- it appears to be NULL
from the VFS layer's perspective.

This behaviour breaks the /sys/kernel/debug/sync/sw_sync file introduced
concurrently with commit a44eb74cd413 ("staging/android: move SW_SYNC_USER
to a debugfs file").

Since that file never gets removed, there is no file removal race and thus,
a lifetime checking proxy isn't needed.

Avoid the proxying for /sys/kernel/debug/sync/sw_sync by creating it via
debugfs_create_file_unsafe() rather than debugfs_create_file().
For consistency, do the same for /sys/kernel/debug/sync/info.

Fixes: 49d200deaa68 ("debugfs: prevent access to removed files' private data")
Fixes: a44eb74cd413 ("staging/android: move SW_SYNC_USER to a debugfs file")
Signed-off-by: Nicolai Stange <nicstange@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
8 years agostaging/android: add DEBUG_FS dependence on Kconfig
Gustavo Padovan [Tue, 31 May 2016 19:59:13 +0000 (16:59 -0300)]
staging/android: add DEBUG_FS dependence on Kconfig

SW_SYNC only works with DEBUG_FS so state it in the Kconfig file.

Signed-off-by: Gustavo Padovan <gustavo.padovan@collabora.co.uk>
Reviewed-by: Daniel Vetter <daniel.vetter@ffwll.ch>
Reviewed-by: Sumit Semwal <sumit.semwal@linaro.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
8 years agostaging/android: rename sync.h to sync_debug.h
Gustavo Padovan [Tue, 31 May 2016 19:59:12 +0000 (16:59 -0300)]
staging/android: rename sync.h to sync_debug.h

This header file only contains information for debugging and SW_SYNC, so
rename it to sync_debug.h instead of having a more generic name.

Signed-off-by: Gustavo Padovan <gustavo.padovan@collabora.co.uk>
Reviewed-by: Daniel Vetter <daniel.vetter@ffwll.ch>
Reviewed-by: Sumit Semwal <sumit.semwal@linaro.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
8 years agostaging/android: remove drv_name from sync_timeline
Gustavo Padovan [Tue, 31 May 2016 19:59:11 +0000 (16:59 -0300)]
staging/android: remove drv_name from sync_timeline

As it is internal to sw_sync now this value will always be "sw_sync".

Signed-off-by: Gustavo Padovan <gustavo.padovan@collabora.co.uk>
Reviewed-by: Daniel Vetter <daniel.vetter@ffwll.ch>
Reviewed-by: Sumit Semwal <sumit.semwal@linaro.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
8 years agostaging/android: remove sync_timeline_destroy()
Gustavo Padovan [Tue, 31 May 2016 19:59:10 +0000 (16:59 -0300)]
staging/android: remove sync_timeline_destroy()

This function was just used by the file release function, so we just fold
its content there and remove sync_timeline_destroy().

Signed-off-by: Gustavo Padovan <gustavo.padovan@collabora.co.uk>
Reviewed-by: Daniel Vetter <daniel.vetter@ffwll.ch>
Reviewed-by: Sumit Semwal <sumit.semwal@linaro.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
8 years agostaging/android: remove 'destroyed' member from struct sync_timeline
Gustavo Padovan [Tue, 31 May 2016 19:59:09 +0000 (16:59 -0300)]
staging/android: remove 'destroyed' member from struct sync_timeline

'destroyed' was set but not used ny anyone.

Signed-off-by: Gustavo Padovan <gustavo.padovan@collabora.co.uk>
Reviewed-by: Daniel Vetter <daniel.vetter@ffwll.ch>
Reviewed-by: Sumit Semwal <sumit.semwal@linaro.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
8 years agostaging/android: make sw_ioctl info internal to sw_sync.c
Gustavo Padovan [Tue, 31 May 2016 19:59:08 +0000 (16:59 -0300)]
staging/android: make sw_ioctl info internal to sw_sync.c

We don't want to export this from the kernel. This is interface is only
for testing and debug. So testers shall copy the ioctl info in their own
projects.

Signed-off-by: Gustavo Padovan <gustavo.padovan@collabora.co.uk>
Reviewed-by: Daniel Vetter <daniel.vetter@ffwll.ch>
Reviewed-by: Sumit Semwal <sumit.semwal@linaro.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
8 years agostaging/android: make sync_timeline internal to sw_sync
Gustavo Padovan [Tue, 31 May 2016 19:59:07 +0000 (16:59 -0300)]
staging/android: make sync_timeline internal to sw_sync

The only use sync_timeline will have in upstream kernel is for debugging
through the SW_SYNC interface. So make it internal to SW_SYNC to avoid
people use it in the future.

Signed-off-by: Gustavo Padovan <gustavo.padovan@collabora.co.uk>
Reviewed-by: Daniel Vetter <daniel.vetter@ffwll.ch>
Reviewed-by: Sumit Semwal <sumit.semwal@linaro.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
8 years agostaging/android: clean up #includes in the sync framework
Gustavo Padovan [Tue, 31 May 2016 19:59:06 +0000 (16:59 -0300)]
staging/android: clean up #includes in the sync framework

Most of the includes there are not necessary anymore.

Signed-off-by: Gustavo Padovan <gustavo.padovan@collabora.co.uk>
Reviewed-by: Daniel Vetter <daniel.vetter@ffwll.ch>
Reviewed-by: Sumit Semwal <sumit.semwal@linaro.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
8 years agostaging/android: move sw_sync related code to sw_sync.c
Gustavo Padovan [Tue, 31 May 2016 19:59:05 +0000 (16:59 -0300)]
staging/android: move sw_sync related code to sw_sync.c

Split sync_debug and sw_sync in two different files.

Signed-off-by: Gustavo Padovan <gustavo.padovan@collabora.co.uk>
Reviewed-by: Daniel Vetter <daniel.vetter@ffwll.ch>
Reviewed-by: Sumit Semwal <sumit.semwal@linaro.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
8 years agostaging/android: bring struct sync_pt back
Gustavo Padovan [Tue, 31 May 2016 19:59:04 +0000 (16:59 -0300)]
staging/android: bring struct sync_pt back

Move the list_head members from sync_pt to struct fence was a mistake,
they will not be used by struct fence as planned before, so here we create
sync_pt again to bring the list heads back.

Signed-off-by: Gustavo Padovan <gustavo.padovan@collabora.co.uk>
Reviewed-by: Daniel Vetter <daniel.vetter@ffwll.ch>
Reviewed-by: Sumit Semwal <sumit.semwal@linaro.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
8 years agostaging/android: remove size arg of sync_timeline_create()
Gustavo Padovan [Tue, 31 May 2016 19:59:03 +0000 (16:59 -0300)]
staging/android: remove size arg of sync_timeline_create()

After we removed sw_sync_timeline this arg has not been really used by
anyone, all its users pass the size of struct sync_timeline there.

So simplify this function but not requiring the size anymore.

Signed-off-by: Gustavo Padovan <gustavo.padovan@collabora.co.uk>
Reviewed-by: Daniel Vetter <daniel.vetter@ffwll.ch>
Reviewed-by: Sumit Semwal <sumit.semwal@linaro.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
8 years agostaging/android: remove unnecessary check for fence
Gustavo Padovan [Tue, 31 May 2016 19:59:02 +0000 (16:59 -0300)]
staging/android: remove unnecessary check for fence

When we call sync_print_fence() fence is always valid.

Signed-off-by: Gustavo Padovan <gustavo.padovan@collabora.co.uk>
Reviewed-by: Daniel Vetter <daniel.vetter@ffwll.ch>
Reviewed-by: Sumit Semwal <sumit.semwal@linaro.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
8 years agostaging/android: rename android_fence to timeline_fence
Gustavo Padovan [Tue, 31 May 2016 19:59:01 +0000 (16:59 -0300)]
staging/android: rename android_fence to timeline_fence

We are moving out of staging/android so rename it to a name that is not
related to android anymore.

Signed-off-by: Gustavo Padovan <gustavo.padovan@collabora.co.uk>
Reviewed-by: Daniel Vetter <daniel.vetter@ffwll.ch>
Reviewed-by: Sumit Semwal <sumit.semwal@linaro.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
8 years agostaging/android: remove sw_sync.[ch] files
Gustavo Padovan [Tue, 31 May 2016 19:59:00 +0000 (16:59 -0300)]
staging/android: remove sw_sync.[ch] files

We can glue the sw_sync file operations directly on the sync framework
without the need to pass through sw_sync wrappers.

It only builds sw_sync debugfs file support if CONFIG_SW_SYNC is enabled.

Signed-off-by: Gustavo Padovan <gustavo.padovan@collabora.co.uk>
Reviewed-by: Daniel Vetter <daniel.vetter@ffwll.ch>
Reviewed-by: Sumit Semwal <sumit.semwal@linaro.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
8 years agostaging/android: remove sw_sync_timeline and sw_sync_pt
Gustavo Padovan [Tue, 31 May 2016 19:58:59 +0000 (16:58 -0300)]
staging/android: remove sw_sync_timeline and sw_sync_pt

As we moved value storage to sync_timeline and fence those two structs
became useless and can be removed now.

Signed-off-by: Gustavo Padovan <gustavo.padovan@collabora.co.uk>
Reviewed-by: Daniel Vetter <daniel.vetter@ffwll.ch>
Reviewed-by: Sumit Semwal <sumit.semwal@linaro.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
8 years agostaging/android: remove struct sync_timeline_ops
Gustavo Padovan [Tue, 31 May 2016 19:58:58 +0000 (16:58 -0300)]
staging/android: remove struct sync_timeline_ops

Move drv_name, the last field of sync_timeline_ops, to sync_timeline
and remove sync_timeline_ops.

struct sync_timeline_ops was just an extra abstraction on top of
fence_ops, and in the last few commits we removed all it ops in favor
of cleaner fence_ops.

Signed-off-by: Gustavo Padovan <gustavo.padovan@collabora.co.uk>
Reviewed-by: Daniel Vetter <daniel.vetter@ffwll.ch>
Reviewed-by: Sumit Semwal <sumit.semwal@linaro.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
8 years agostaging/android: remove .{fence, timeline}_value_str() from timeline_ops
Gustavo Padovan [Tue, 31 May 2016 19:58:57 +0000 (16:58 -0300)]
staging/android: remove .{fence, timeline}_value_str() from timeline_ops

Now that the value of fence and the timeline are not stored by sw_sync
anymore we can remove this extra abstraction to retrieve this data.

This patch changes both fence_ops (.fence_value_str and
.timeline_value_str) to return the str directly.

It also clean up struct sync_timeline_ops by removing both ops from there.

Signed-off-by: Gustavo Padovan <gustavo.padovan@collabora.co.uk>
Reviewed-by: Daniel Vetter <daniel.vetter@ffwll.ch>
Reviewed-by: Sumit Semwal <sumit.semwal@linaro.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
8 years agostaging/android: store last signaled value on sync timeline
Gustavo Padovan [Tue, 31 May 2016 19:58:56 +0000 (16:58 -0300)]
staging/android: store last signaled value on sync timeline

Now fence timeline is aware of the last signaled fence, as it
receives the increment to the current value in sync_timeline_signal().

That allow us to remove .has_signaled() from timeline_ops as we can
directly compare using timeline->value and fence->seqno in sync.c

Signed-off-by: Gustavo Padovan <gustavo.padovan@collabora.co.uk>
Reviewed-by: Daniel Vetter <daniel.vetter@ffwll.ch>
Reviewed-by: Sumit Semwal <sumit.semwal@linaro.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
8 years agostaging: comedi: avoid using timeval
Arnd Bergmann [Fri, 17 Jun 2016 19:56:15 +0000 (21:56 +0200)]
staging: comedi: avoid using timeval

Comedi uses 32-bit seconds for its timestamps, on both 32-bit and
64-bit machines. For all I can tell, this was originally meant as
a 'timespec', which would overflow in 2038 because of the use of
a signed 'long' on 32-bit machines, but it is now used as an
array of two unsigned 'lsampl_t' values in comedilib, which will
only overflow in 2106, on both 32-bit and 64-bit machines.

In an effort to get rid of all uses of 'struct timeval' in the kernel,
this replaces the internal code with a call to ktime_get_real_ts64()
and a comment at the location of the conversion.

Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
8 years agoStaging: comedi: dt2817: Coding style issue fixed.
Ravishankar Karkala Mallikarjunayya [Fri, 17 Jun 2016 11:26:20 +0000 (16:56 +0530)]
Staging: comedi: dt2817: Coding style issue fixed.

This fixes up a WARNING: 'Block comments use a trailing */ on a
separate line' found by the checkpatch.pl tool.

Signed-off-by: Ravishankar Karkala Mallikarjunayya <ravishankarkm32@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
8 years agoStaging: comedi: dt2815: Comment issue fixed
Ravishankar Karkala Mallikarjunayya [Fri, 17 Jun 2016 11:26:18 +0000 (16:56 +0530)]
Staging: comedi: dt2815: Comment issue fixed

This fixes up a WARNING: 'Block comments use a trailing */ on a
separate line' found by the checkpatch.pl tool.

Signed-off-by: Ravishankar Karkala Mallikarjunayya <ravishankarkm32@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
8 years agoStaging: comedi: dt2814: Block comment issue fixed
Ravishankar Karkala Mallikarjunayya [Fri, 17 Jun 2016 11:26:17 +0000 (16:56 +0530)]
Staging: comedi: dt2814: Block comment issue fixed

This fixes up a WARNING: 'Block comments use a trailing */ on a
separate line' found by the checkpatch.pl tool.

Signed-off-by: Ravishankar Karkala Mallikarjunayya <ravishankarkm32@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
8 years agostaging: comedi: serial2002: Fix unnecessary cast styling issue
Chris Cesare [Thu, 9 Jun 2016 19:39:03 +0000 (15:39 -0400)]
staging: comedi: serial2002: Fix unnecessary cast styling issue

checkpatch.pl warns that a cast of 1 to (long long) is unnecessary.
Remove the cast and also add code to check and make sure that
maxdata_list[chan] is not shifted too far, as suggested by Ian
Abbott.

Signed-off-by Chris Cesare <chris.cesare@gmail.com>
Reviewed-by: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
8 years agostaging: comedi: serial2002: Fix bare unsigned styling issue
Chris Cesare [Thu, 9 Jun 2016 19:39:02 +0000 (15:39 -0400)]
staging: comedi: serial2002: Fix bare unsigned styling issue

checkpatch.pl warns about a bare unsigned. Add type int to make
explicit and suit the coding style.

Signed-off-by Chris Cesare <chris.cesare@gmail.com>
Reviewed-by: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
8 years agoStaging: comedi: fix comment issue fixed for das800.c
Ravishankar Karkala Mallikarjunayya [Tue, 7 Jun 2016 08:36:18 +0000 (14:06 +0530)]
Staging: comedi: fix comment issue fixed for das800.c

This is a patch to the das800.c file that fixes up a
WARNING: 'Block comments use a trailing */ on a separate line'
found by the checkpatch.pl tool

Signed-off-by: Ravishankar Karkala Mallikarjunayya <ravishankarkm32@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
8 years agoStaging: comedi: Block comment issue fixed for das16.c
Ravishankar Karkala Mallikarjunayya [Tue, 7 Jun 2016 08:36:17 +0000 (14:06 +0530)]
Staging: comedi: Block comment issue fixed for das16.c

This is a patch to the das16.c file that fixes up a
WARNING: 'Block comments use a trailing */ on a separate line'
found by the checkpatch.pl tool.

Signed-off-by: Ravishankar Karkala Mallikarjunayya <ravishankarkm32@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
8 years agoStaging: comedi: fix blank line issue in das16.c
Ravishankar Karkala Mallikarjunayya [Tue, 7 Jun 2016 08:36:16 +0000 (14:06 +0530)]
Staging: comedi: fix blank line issue in das16.c

This is a patch to the das16.c file that fixes up a blank line after
function/struct/union/enum  check found by the checkpatch.pl tool

Signed-off-by: Ravishankar Karkala Mallikarjunayya <ravishankarkm32@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
8 years agoStaging: comedi: dmm32at: fix BIT macro issue.
Ravishankar Karkala Mallikarjunayya [Tue, 14 Jun 2016 05:53:22 +0000 (11:23 +0530)]
Staging: comedi: dmm32at: fix BIT macro issue.

This Replace all occurences of (1<<x) by BIT(x) and DMM32AT_CTRL_PAGE(x),
DMM32AT_AI_CFG_SCINT(x) macros to get rid of checkpatch.pl
"CHECK" output "Prefer using the BIT macro"

Signed-off-by: Ravishankar Karkala Mallikarjunayya <ravishankarkm32@gmail.com>
Reviewed-by: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
8 years agoStaging: comedi: Used unsigned int instead of unsigned issue in jr3_pci.c
Ravishankar Karkala Mallikarjunayya [Mon, 6 Jun 2016 11:01:23 +0000 (16:31 +0530)]
Staging: comedi: Used unsigned int instead of unsigned issue in jr3_pci.c

This is a patch to the jr3_pci.c file that fixes up a
WARNING: Prefer 'unsigned int' to bare use of 'unsigned'
found by the checkpatch.pl tool.

Signed-off-by: Ravishankar Karkala Mallikarjunayya <ravishankarkm32@gmail.com>
Reviewed-by: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
8 years agoStaging: comedi: fix BIT macro issue in das6402.c
Ravishankar Karkala Mallikarjunayya [Mon, 6 Jun 2016 11:01:20 +0000 (16:31 +0530)]
Staging: comedi: fix BIT macro issue in das6402.c

This patch Replace all occurences of (1<<x) by BIT(x) and DAS6402_CTRL_TRIG(x),
DAS6402_MODE_RANGE(x), DAS6402_MODE_DMA(x) macros in the file das6402.c
to get rid of checkpatch.pl "CHECK" output "Prefer using the BIT macro"

Signed-off-by: Ravishankar Karkala Mallikarjunayya <ravishankarkm32@gmail.com>
Reviewed-by: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
8 years agoStaging: comedi: Prefer using the BIT macro issue in das16.c
Ravishankar Karkala Mallikarjunayya [Mon, 6 Jun 2016 11:01:18 +0000 (16:31 +0530)]
Staging: comedi: Prefer using the BIT macro issue in das16.c

This patch Replace all occurences of (1<<x) by BIT(x) in the file das16.c
to get rid of checkpatch.pl "CHECK" output "Prefer using the BIT macro"

Signed-off-by: Ravishankar Karkala Mallikarjunayya <ravishankarkm32@gmail.com>
Reviewed-by: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
8 years agoStaging: comedi: Fix comment issues in jr3_pci.c
Ravishankar Karkala Mallikarjunayya [Mon, 6 Jun 2016 11:01:17 +0000 (16:31 +0530)]
Staging: comedi: Fix comment issues in jr3_pci.c

This is a patch to the jr3_pci.c file that fixes up a
WARNING: 'Block comments use a trailing */ on a separate line'
found by the checkpatch.pl tool.

Signed-off-by: Ravishankar Karkala Mallikarjunayya <ravishankarkm32@gmail.com>
Reviewed-by: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
8 years agoStaging: comedi:Fix a warning issues in me_daq.c
Ravishankar Karkala Mallikarjunayya [Mon, 6 Jun 2016 11:01:16 +0000 (16:31 +0530)]
Staging: comedi:Fix a warning issues in me_daq.c

This is a patch to the me_daq.c file that fixes up a
WARNING: Prefer 'unsigned int' to bare use of 'unsigned'
found by the checkpatch.pl tool.

Signed-off-by: Ravishankar Karkala Mallikarjunayya <ravishankarkm32@gmail.com>
Reviewed-by: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
8 years agoStaging: comedi: Indentation issue in mpc624.c
Ravishankar Karkala Mallikarjunayya [Mon, 6 Jun 2016 11:01:15 +0000 (16:31 +0530)]
Staging: comedi: Indentation issue in mpc624.c

This is a patch to the mpc624.c file that fixes up a
WARNING: 'Statements should start on a tabstop' found by
the checkpatch.pl tool.

Signed-off-by: Ravishankar Karkala Mallikarjunayya <ravishankarkm32@gmail.com>
Reviewed-by: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
8 years agostaging: comedi: adl_pci9118: fix spelling mistake "acqusition" -> "acquisition"
Colin Ian King [Sat, 4 Jun 2016 05:35:20 +0000 (06:35 +0100)]
staging: comedi: adl_pci9118: fix spelling mistake "acqusition" -> "acquisition"

trivial fix to spelling mistake

Signed-off-by: Colin Ian King <colin.king@canonical.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
8 years agostaging: comedi: addi_apci_1564: remove unnecessary wdog register defines
H Hartley Sweeten [Wed, 8 Jun 2016 18:26:43 +0000 (11:26 -0700)]
staging: comedi: addi_apci_1564: remove unnecessary wdog register defines

The watchdog subdevice is supported using the addi_watchdog module and
it uses the register defines from addi_tcw.h. The only register define
needed it the iobase offset to the register block.

Remove the unnecessary defines and rename the iobase define.

Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Reviewed-by: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
8 years agostaging: comedi: addi_apci_1564: rewrite the counter subdevice support
H Hartley Sweeten [Wed, 8 Jun 2016 18:26:42 +0000 (11:26 -0700)]
staging: comedi: addi_apci_1564: rewrite the counter subdevice support

Like the timer, the support functions for the counter subdevice are broken.

Rewrite the code to follow the comedi API.

The new implementation is based on the (minimal) datasheet I have from
ADDI-DATA.

Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Reviewed-by: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
8 years agostaging: comedi: addi_apci_1564: rewrite the timer subdevice support
H Hartley Sweeten [Wed, 8 Jun 2016 18:26:41 +0000 (11:26 -0700)]
staging: comedi: addi_apci_1564: rewrite the timer subdevice support

The support functions for the timer subdevice are broken.

1) The (*insn_write) assumes that insn->n is always 2 (data[1] is used)
2) The (*insn_read) assumes that insn->n is always 2 (data can be returned in
   data[0] and data[1]).
3) The (*insn_config) does not follow the API. It assumes insn->n is always 4
   (data[1], data[2] and data[3] are used). It also doesn't use data[0] to
   determine what the config "instruction" is.

Rewrite the code to follow the comedi API and add the missing comedi driver
comment block.

The new implementation is based on the (minimal) datasheet I have from
ADDI-DATA.

Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Reviewed-by: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
8 years agostaging: comedi: addi_apci_1564: use comedi_handle_event() for counters
H Hartley Sweeten [Wed, 8 Jun 2016 18:26:40 +0000 (11:26 -0700)]
staging: comedi: addi_apci_1564: use comedi_handle_event() for counters

The counter subdevice can generate an interrupt. Currently send_sig() is used
to let the task know when the interrupt occurs. Use the dev->read_subdev and
comedi_handle_events() instead.

Remove the, now unused, 'tsk_current' member from the private data and the
unnecessary include of <linux/sched.h>.

Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Reviewed-by: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
8 years agostaging: comedi: addi_apci_1564: use comedi_handle_event() for timer
H Hartley Sweeten [Wed, 8 Jun 2016 18:26:39 +0000 (11:26 -0700)]
staging: comedi: addi_apci_1564: use comedi_handle_event() for timer

The timer subdevice can generate an interrupt. Currently send_sig() is used
to let the task know when the interrupt occurs. Use the dev->read_subdev
and comedi_handle_events() instead.

Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Reviewed-by: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
8 years agostaging: comedi: addi_apci_1564: clarify change-of-state interrupt support
H Hartley Sweeten [Wed, 8 Jun 2016 18:26:38 +0000 (11:26 -0700)]
staging: comedi: addi_apci_1564: clarify change-of-state interrupt support

This board supports change-of-state interrupts on digital inputs 4 to 19
not 0 to 15.

The current code "works" but it could set inappropriate bits in the mode1
and mode2 registers that setup which channels are enabled. It also doesn't
return the status of the upper 4 channels (19 to 16).

Fix the comment and mask the mode1/mode2 values so that only the interrupt
capable channels can be enabled.

Add the SDF_LSAMPL flag to the subdevice so that 32-bit samples are used
instead of 16-bit ones. This allows returning the upper 4 channels. Use
the remaining bits in the sample to return "event" flags to the user.

The timer and counter subdevices can also generate interrupts and are a bit
hacked. They don't currently follow the comedi API and they use send_sig()
to let the task that know that the interrupt occured. The "event" flags will
be used instead when these subdevices are fixed.

Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Reviewed-by: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
8 years agostaging: comedi: plx9080.h: include headers for declarations
Ian Abbott [Fri, 20 May 2016 13:49:22 +0000 (14:49 +0100)]
staging: comedi: plx9080.h: include headers for declarations

Add `#include` lines to declare stuff used by "plx9080.h" itself.

Signed-off-by: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
8 years agostaging: comedi: plx9080.h: Add kerneldoc comments
Ian Abbott [Fri, 20 May 2016 13:49:21 +0000 (14:49 +0100)]
staging: comedi: plx9080.h: Add kerneldoc comments

Document the DMA descriptor `struct plx_dma_desc`, and the DMA abort
function `plx9080_abort_dma()`.

Signed-off-by: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
8 years agostaging: comedi: plx9080.h: tidy up some comments
Ian Abbott [Fri, 20 May 2016 13:49:20 +0000 (14:49 +0100)]
staging: comedi: plx9080.h: tidy up some comments

Use the usual block comment style and remove some excess spaces from
single-line comments.  Remove some obvious stuff about register offsets
being zero relative.  Remove some text about the original history of the
file, as it bears hardly any resemblance to it now.

Signed-off-by: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
8 years agostaging: comedi: drivers: add PLX PCI 9080 DMATHR register values
Ian Abbott [Fri, 20 May 2016 13:49:19 +0000 (14:49 +0100)]
staging: comedi: drivers: add PLX PCI 9080 DMATHR register values

Add macros in "plx9080.h" that define values for the DMATHR register
values.  Use the prefix `PLX_DMATHR_` for the macros.  Make use of the
`BIT(x)` and `GENMASK(h,l)` macros to define the values.

Signed-off-by: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
8 years agostaging: comedi: drivers: re-do PLX PCI 9080 DMACSRx register values
Ian Abbott [Fri, 20 May 2016 13:49:18 +0000 (14:49 +0100)]
staging: comedi: drivers: re-do PLX PCI 9080 DMACSRx register values

Replace the existing macros in "plx9080.h" that define values for the
DMACSR0 and DMACSR0 registers.  Use the prefix `PLX_DMACSR_` for the
macros.  Make use of the `BIT(x)` macro to define the values.

Signed-off-by: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
8 years agostaging: comedi: drivers: re-do PLX PCI 9080 DMADPRx register values
Ian Abbott [Fri, 20 May 2016 13:49:17 +0000 (14:49 +0100)]
staging: comedi: drivers: re-do PLX PCI 9080 DMADPRx register values

Replace the existing macros in "plx9080.h" that define values for the
DMADPR0 and DMADPR1 registers.  (A little-endian version of the register
value is also placed in the `next` member of `struct plx_dma_desc`.)
Use the prefix `PLX_DMADPR_` for the macros.  Make use of the `BIT(x)`
and `GENMASK(h,l)` macros to define the values.

Signed-off-by: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
8 years agostaging: comedi: drivers: re-do PLX PCI 9080 DMAMODEx register values
Ian Abbott [Fri, 20 May 2016 13:49:16 +0000 (14:49 +0100)]
staging: comedi: drivers: re-do PLX PCI 9080 DMAMODEx register values

Replace the existing macros in "plx9080.h" that define values for the
DMAMODE0 and DMAMODE1 registers.  Use the prefix `PLX_DMAMODE_` for the
macros.  Make use of the `BIT(x)` and `GENMASK(h,l)` macros to define
the values.

Signed-off-by: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
8 years agostaging: comedi: plx9080.h: add hard-coded PCIHIDR register value
Ian Abbott [Fri, 20 May 2016 13:49:15 +0000 (14:49 +0100)]
staging: comedi: plx9080.h: add hard-coded PCIHIDR register value

For the PLX PCI 9080, the read-only PCIHIDR register is hard-coded with
the value `0x908010b5`.  Add a macro `PLX_PCIHIDR_9080` that expands to
this value.

Signed-off-by: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
8 years agostaging: comedi: drivers: re-do PLX PCI 9080 CNTRL register values
Ian Abbott [Fri, 20 May 2016 13:49:14 +0000 (14:49 +0100)]
staging: comedi: drivers: re-do PLX PCI 9080 CNTRL register values

Replace the existing macros in "plx9080.h" that define values for the
CNTRL register.  Use the prefix `PLX_CNTRL_` for the macros.  Make use
of the `BIT(x)` and `GENMASK(h,l)` macros to define the values.

Signed-off-by: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
8 years agostaging: comedi: drivers: re-do PLX PCI 9080 INTCSR register values
Ian Abbott [Fri, 20 May 2016 13:49:13 +0000 (14:49 +0100)]
staging: comedi: drivers: re-do PLX PCI 9080 INTCSR register values

Replace the existing macros in "plx9080.h" that define values for the
INTCSR register.  Use the prefix `PLX_INTCSR_` for the macros.  Make use
of the `BIT(x)` and `GENMASK(h,l)` macros to define the values.

Signed-off-by: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
8 years agostaging: comedi: drivers: re-do PLX PCI 9080 DMCFGA register values
Ian Abbott [Fri, 20 May 2016 13:49:12 +0000 (14:49 +0100)]
staging: comedi: drivers: re-do PLX PCI 9080 DMCFGA register values

Replace the existing macros in "plx9080.h" that define values for the
DMCFGA register.  Use the prefix `PLX_DMCFGA_` for the macros.  Make use
of the `BIT(x)` and `GENMASK(h,l)` macros to define the values.

Signed-off-by: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
8 years agostaging: comedi: drivers: re-do PLX PCI 9080 DMPBAM register values
Ian Abbott [Fri, 20 May 2016 13:49:11 +0000 (14:49 +0100)]
staging: comedi: drivers: re-do PLX PCI 9080 DMPBAM register values

Replace the existing macros in "plx9080.h" that define values for the
DMPBAM register.  Use the prefix `PLX_DMPBAM_` for the macros.  Make use
of the `BIT(x)` and `GENMASK(h,l)` macros to define the values.

Signed-off-by: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
8 years agostaging: comedi: drivers: re-do PLX PCI 9080 LBRDx register values
Ian Abbott [Fri, 20 May 2016 13:49:10 +0000 (14:49 +0100)]
staging: comedi: drivers: re-do PLX PCI 9080 LBRDx register values

Replace the existing macros in "plx9080.h" that define values for the
LBRD0 and LBRD1 registers.  Use the prefix `PLX_LBRD_` for macros that
apply to both registers, `PLX_LBRD0_` for macros that apply only to the
LBRD0 register, and `PLX_LBRD1_` for macros that apply only to the LBRD1
register.  Make use of the `BIT(x)` and `GENMASK(h,l)` macros to define
the values.

Signed-off-by: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
8 years agostaging: comedi: drivers: re-do PLX PCI 9080 BIGEND register values
Ian Abbott [Fri, 20 May 2016 13:49:09 +0000 (14:49 +0100)]
staging: comedi: drivers: re-do PLX PCI 9080 BIGEND register values

Replace `enum bigend_bits` in "plx9080.h" with a bunch of macros
defining values for the BIGEND register.  Use the prefix `PLX_BIGEND_`
for the macro names.  Make use of the `BIT(x)` and `GENMASK(h,l)` macros
to define the values.

Signed-off-by: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
8 years agostaging: comedi: drivers: re-do PLX PCI 9080 MARBR register values
Ian Abbott [Fri, 20 May 2016 13:49:08 +0000 (14:49 +0100)]
staging: comedi: drivers: re-do PLX PCI 9080 MARBR register values

Replace `enum marb_bits` in "plx9080.h" with a bunch of macros defining
values for the MARBR and DMAARB registers (which are the same
Mode/Arbitation register at two different offsets).  Use the prefix
`PLX_MARBR_` for the macros.  Make use of the `BIT(x)` and
`GENMASK(h,l)` macros to define the values.

Signed-off-by: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
8 years agostaging: comedi: drivers: re-do macros for PLX PCI 9080 LASxBA values
Ian Abbott [Fri, 20 May 2016 13:49:07 +0000 (14:49 +0100)]
staging: comedi: drivers: re-do macros for PLX PCI 9080 LASxBA values

Replace the existing macros in "plx9080.h" that define values for the
LAS0BA and LAS1BA registers.  Use the prefix `PLX_LASBA_` for the
macros.  Make use of the `BIT(x)` and `GENMASK(h,l)` macros to define
the macros.

Signed-off-by: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
8 years agostaging: comedi: drivers: re-do macros for PLX PCI 9080 LASxRR values
Ian Abbott [Fri, 20 May 2016 13:49:06 +0000 (14:49 +0100)]
staging: comedi: drivers: re-do macros for PLX PCI 9080 LASxRR values

Rename the macros for the PLX PCI 9080 LAS0RR and LAS1RR registers in
"plx9080.h", using the prefix `PLX_LASRR_`.  Make use of the `BIT(x)`
and `GENMASK(h,l)` macros to define the values.

Define a macro `PLX_LASRR_PREFETCH` for the "prefetchable memory" bit in
this register, and define a macro `PLX_LASRR_MLOC_MASK` to mask the PCI
memory location control bits.

Signed-off-by: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
8 years agostaging: comedi: drivers: rename PLX PCI 9080 register offsets
Ian Abbott [Fri, 20 May 2016 13:49:05 +0000 (14:49 +0100)]
staging: comedi: drivers: rename PLX PCI 9080 register offsets

Rename the macros in "plx9080.h" that define the offsets of registers,
following the pattern `PLX_REG_<NAME>`, where `<NAME>` is the register
name from the PLX PCI 9080 Data Book.

Add defines for the "Mailbox" registers, and add parameterized macros
for the mailbox registers and the DMA control registers.  Make use of
the parameterized versions of the macros where it seems appropriate.

The registers for supporting the I2O (Intelligent Input/Output) feature
are largely left undefined, just defining enough to allow the I2O
feature to be disabled.

Signed-off-by: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
8 years agostaging: comedi: plx9080.h: remove Power-Up Test Suite stuff
Ian Abbott [Fri, 20 May 2016 13:49:04 +0000 (14:49 +0100)]
staging: comedi: plx9080.h: remove Power-Up Test Suite stuff

The defines related to the Power-Up Test Suite (PUTS) are just cruft that
has nothing to do with the PLX PCI-9080 chip.  They seem to have been
inherited from "drivers/net/plx9060.h" in the kernel 2.2.16 sources for
use by the "wanxl" driver.  Remove them.

Signed-off-by: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
8 years agostaging: comedi: plx9080.h: correct LRNG_IO_MASK and LMAP_IO_MASK
Ian Abbott [Fri, 20 May 2016 13:49:03 +0000 (14:49 +0100)]
staging: comedi: plx9080.h: correct LRNG_IO_MASK and LMAP_IO_MASK

For the PLX local address space range registers, LAS0RR and LAS1RR, bit
0 indicates whether the local address space will be mapped to memory
space or I/O space.  If mapped to I/O space, bit 1 must be set to 0, and
bits 31 to 2 form the address decoding mask, which should be -2^N mod
2^32 for a range of length 2^N.

The `LRNG_IO_MASK` macro is supposed to specify the address decoding
bits for I/O space.  It currently has the value `0xfffffffa`, but should
be `0xfffffffc`, or possibly `0xfffffffe` (it doesn't really matter,
since bit 1 is required to be set to 0).  Change it to `0xfffffffc`.

Similarly, for the PLX local address space local base address (remap)
registers, LAS0BA and LAS1BA, bits 31 to 2, masked with the
corresponding "range" register form the local base address for the local
address space.  The `LMAP_IO_MASK` macro is supposed to mask the valid
bits for I/O space.  Change its value from `0xfffffffa` to `0xfffffffc`
to match `LRNG_IO_MASK`.

Signed-off-by: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
8 years agostaging: comedi: daqboard2000: prefer usleep_range()
Ian Abbott [Thu, 19 May 2016 18:15:27 +0000 (19:15 +0100)]
staging: comedi: daqboard2000: prefer usleep_range()

The checkpatch.pl warns about two `udelay(x)` calls, one of 100
microseconds, and one of 10 microseconds.  The 100 microseconds one is
used when waiting for FPGA to become ready to accept firmware, and is
not that critical, so replace it with a call to `usleep_range(100,
1000)`.  The 10 microseconds one is called as each 16-bit word of
firmware data is written.  Replace it with a fairly tight
`usleep_range(10, 20)` to avoid slowing down firmware loading too much.
The firmware is fairly short, so this would only slow it down firmware
loading by about 20 milliseconds or so.

Signed-off-by: Ian Abbott <abbotti@mev.co.uk>
Reviewed-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
8 years agostaging: comedi: daqboard2000: rename CamelCase functions
Ian Abbott [Thu, 19 May 2016 18:15:26 +0000 (19:15 +0100)]
staging: comedi: daqboard2000: rename CamelCase functions

Rename functions to avoid CamelCase warnings from checkpatch, and to use
namespace associated with the driver.

Signed-off-by: Ian Abbott <abbotti@mev.co.uk>
Reviewed-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
8 years agostaging: comedi: daqboard2000: rename reference DACs register macros
Ian Abbott [Thu, 19 May 2016 18:15:25 +0000 (19:15 +0100)]
staging: comedi: daqboard2000: rename reference DACs register macros

Rename the macros that define values for the reference DACs register to
avoid CamelCase, and to make it clearer which register they are
associated with.  Add a macro `DB2K_REG_DACS_SET` for the value `0x0080`
that triggers setting one of the references.

Signed-off-by: Ian Abbott <abbotti@mev.co.uk>
Reviewed-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
8 years agostaging: comedi: daqboard2000: rename trigger control register macros
Ian Abbott [Thu, 19 May 2016 18:15:24 +0000 (19:15 +0100)]
staging: comedi: daqboard2000: rename trigger control register macros

Rename the macros that define values for the trigger control register to
avoid CamelCase, and to make it clearer which register they are
associated with.

Signed-off-by: Ian Abbott <abbotti@mev.co.uk>
Reviewed-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
8 years agostaging: comedi: daqboard2000: redo DAC status macros and fix busy
Ian Abbott [Thu, 19 May 2016 18:15:23 +0000 (19:15 +0100)]
staging: comedi: daqboard2000: redo DAC status macros and fix busy

Rename the macros defining values for the DAC status register to avoid
CamelCase, and to make it clear which register they are associated with.
Refactor the macros defining the regular DAC channel "busy" bits into a
single macro that takes the DAC channel number as a parameter.

Add a macro to define the offset of the read-only DAC status register.
It is the same offset as the DAC control register, which is write-only.

The code in `daqboard2000_ao_eoc()` that checks the status for
completion of the DAC conversion looks wrong.  The register has a "busy"
bit for each channel, but the existing code only works for channels 0
and 1.  The driver only supports two DAC channels at the moment, so the
bug is currently harmless, but fix it so we can support four DAC
channels on some board models.

Signed-off-by: Ian Abbott <abbotti@mev.co.uk>
Reviewed-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
8 years agostaging: comedi: daqboard2000: redo DAC control register macros
Ian Abbott [Thu, 19 May 2016 18:15:22 +0000 (19:15 +0100)]
staging: comedi: daqboard2000: redo DAC control register macros

Rename the macros used to define values for the DAC control register to
avoid CamelCase and to make it clearer which register they are
associated with.  Refactor the macros used to define values to enable or
disable DAC channels to use the channel number as a parameter.  None of
these macros are currently used by the driver.

Signed-off-by: Ian Abbott <abbotti@mev.co.uk>
Reviewed-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
8 years agostaging: comedi: daqboard2000: rename acq status register macros
Ian Abbott [Thu, 19 May 2016 18:15:21 +0000 (19:15 +0100)]
staging: comedi: daqboard2000: rename acq status register macros

Rename the macros associated with the acquisition status register to
avoid CamelCase and to make it clear which register they are associated
with.

Add a macro to define the offset of the read-only acquisition status
register.  It's the same offset as the acquisition control register,
which is write-only.

Signed-off-by: Ian Abbott <abbotti@mev.co.uk>
Reviewed-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
8 years agostaging: comedi: daqboard2000: rename acquisition control register macros
Ian Abbott [Thu, 19 May 2016 18:15:20 +0000 (19:15 +0100)]
staging: comedi: daqboard2000: rename acquisition control register macros

Rename the macros defining values for the acquisition control register
to avoid CamelCase, and to make it clearer which register they are
associated with.

Signed-off-by: Ian Abbott <abbotti@mev.co.uk>
Reviewed-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
8 years agostaging: comedi: daqboard2000: rename register offset macros
Ian Abbott [Thu, 19 May 2016 18:15:19 +0000 (19:15 +0100)]
staging: comedi: daqboard2000: rename register offset macros

Rename the macros defining register offsets to avoid CamelCase, and to
use namespace associated with the driver.

Signed-off-by: Ian Abbott <abbotti@mev.co.uk>
Reviewed-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
8 years agostaging: comedi: daqboard2000: rename serial EEPROM register macros
Ian Abbott [Thu, 19 May 2016 18:15:18 +0000 (19:15 +0100)]
staging: comedi: daqboard2000: rename serial EEPROM register macros

Rename the macros defining values for the Serial EEPROM Control Register
to avoid CamelCase.

Signed-off-by: Ian Abbott <abbotti@mev.co.uk>
Reviewed-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
8 years agostaging: comedi: daqboard2000: add blank line after struct declaration
Ian Abbott [Thu, 19 May 2016 18:15:17 +0000 (19:15 +0100)]
staging: comedi: daqboard2000: add blank line after struct declaration

Fix checkpatch issue: "CHECK: Please use a blank line after
function/struct/union/enum declarations".

Signed-off-by: Ian Abbott <abbotti@mev.co.uk>
Reviewed-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>