]> git.proxmox.com Git - mirror_ubuntu-focal-kernel.git/log
mirror_ubuntu-focal-kernel.git
13 years agostaging: et131x: Amend README file
Mark Einon [Sat, 3 Sep 2011 11:49:07 +0000 (12:49 +0100)]
staging: et131x: Amend README file

I think the kernel style cleanups are done now.
Adding myself as a recipient of patches.

Signed-off-by: Mark Einon <mark.einon@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
13 years agostaging: et131x: Fix checkpatch whitespace warnings
Mark Einon [Sat, 3 Sep 2011 11:49:06 +0000 (12:49 +0100)]
staging: et131x: Fix checkpatch whitespace warnings

Some of my previous hacking attempts have not been following the rules.
All fixes either lines > 80 chars or whitespace corrections (spaces->tabs etc).

Signed-off-by: Mark Einon <mark.einon@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
13 years agostaging: rtl8192e: Fix format warning
Larry Finger [Thu, 1 Sep 2011 17:32:28 +0000 (12:32 -0500)]
staging: rtl8192e: Fix format warning

Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
13 years agostaging: et131x: Use MII register defines from mii.h
Mark Einon [Wed, 31 Aug 2011 16:46:41 +0000 (17:46 +0100)]
staging: et131x: Use MII register defines from mii.h

Use defines from include/linux/mii.h instead of et131x_phy.h and delete the latter defines.

Signed-off-by: Mark Einon <mark.einon@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
13 years agostaging/cxt1e1: Header cleanup
Michal Marek [Wed, 31 Aug 2011 13:31:01 +0000 (15:31 +0200)]
staging/cxt1e1: Header cleanup

Remove dead and unused code in sbecom_inline_linux.h. This also fixes a
build failure under Turkish locale, where include/config/modversions.h
is incorrectly named as modversIons.h (an unrelated kbuild bug) and the
driver tries to needlessly include the empty file.

Reported-by: Serdar KÖYLÜ <s.koylux@gmail.com>
Cc: Bob Beers <bob.beers@gmail.com>
Signed-off-by: Michal Marek <mmarek@suse.cz>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
13 years agostaging: sep: call to sep_ioctl() may leave driver in unusable state
Alexey Khoroshilov [Tue, 30 Aug 2011 21:57:10 +0000 (01:57 +0400)]
staging: sep: call to sep_ioctl() may leave driver in unusable state

If sep_ioctl() is called from a process that does not own
current transaction, it unlocks unheld sep->ioctl_mutex and
returns -EACCES leaving sep->sep_mutex acquired.

The patch fixes the mutex lock-unlock mismatch.

Found by Linux Driver Verification project (linuxtesting.org).

Signed-off-by: Alexey Khoroshilov <khoroshilov@ispras.ru>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
13 years agostaging: panel: Fixed checkpatch warning about simple_strtoul()
Pelle Windestam [Tue, 30 Aug 2011 18:29:24 +0000 (20:29 +0200)]
staging: panel: Fixed checkpatch warning about simple_strtoul()

Fixed the checkpatch warning about sing simple_strtoul instead of
kstrtoul() in panel.c.

Signed-off-by: Pelle Windestam <iceaway@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
13 years agostaging: et131x: Remove redundant phy code
Mark Einon [Tue, 30 Aug 2011 11:47:24 +0000 (12:47 +0100)]
staging: et131x: Remove redundant phy code

Now we are using a phy_device, remove driver functionality that is now handled by the phydev.

Signed-off-by: Mark Einon <mark.einon@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
13 years agostaging: et131x: Remove xcvr_addr and et131x_xcvr_find
Mark Einon [Tue, 30 Aug 2011 11:47:23 +0000 (12:47 +0100)]
staging: et131x: Remove xcvr_addr and et131x_xcvr_find

Use the phy_device equivalents instead.

Signed-off-by: Mark Einon <mark.einon@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
13 years agostaging: et131x: converting et131x_ioctl to use phy_mii_ioctl
Mark Einon [Tue, 30 Aug 2011 11:47:22 +0000 (12:47 +0100)]
staging: et131x: converting et131x_ioctl to use phy_mii_ioctl

Handing over ioctls handled by the driver to the phydev.

Signed-off-by: Mark Einon <mark.einon@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
13 years agostaging: mei: unlock dev->device_lock mutex on error path in mei_open()
Alexey Khoroshilov [Tue, 30 Aug 2011 20:41:14 +0000 (00:41 +0400)]
staging: mei: unlock dev->device_lock mutex on error path in mei_open()

mei_open() acquires dev->device_lock mutex and try to allocate mei_cl,
but if the allocation fails it goes to return statement. As a result
dev->device_lock left locked.

The patch fixes goto to unlock dev->device_lock mutex on this path.

Found by Linux Driver Verification project (linuxtesting.org).

Signed-off-by: Alexey Khoroshilov <khoroshilov@ispras.ru>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
13 years agostaging: brcm80211: cleaned up softmac srom macro
Roland Vossen [Mon, 5 Sep 2011 08:47:35 +0000 (10:47 +0200)]
staging: brcm80211: cleaned up softmac srom macro

Substituted macro.

Reported-by: Johannes Berg <johannes@sipsolutions.net>
Reported-by: Joe Perches <joe@perches.com>
Reviewed-by: Pieter-Paul Giesberts <pieterpg@broadcom.com>
Reviewed-by: Arend van Spriel <arend@broadcom.com>
Signed-off-by: Roland Vossen <rvossen@broadcom.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
13 years agostaging: brcm80211: cleaned up softmac scb.h macro's
Roland Vossen [Fri, 2 Sep 2011 14:00:38 +0000 (16:00 +0200)]
staging: brcm80211: cleaned up softmac scb.h macro's

Substituted/removed macro's.

Reported-by: Johannes Berg <johannes@sipsolutions.net>
Reviewed-by: Pieter-Paul Giesberts <pieterpg@broadcom.com>
Reviewed-by: Arend van Spriel <arend@broadcom.com>
Signed-off-by: Roland Vossen <rvossen@broadcom.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
13 years agostaging: brcm80211: cleaned up softmac pub.h macro's
Roland Vossen [Fri, 2 Sep 2011 14:00:37 +0000 (16:00 +0200)]
staging: brcm80211: cleaned up softmac pub.h macro's

Substituted/removed macro's.

Reported-by: Johannes Berg <johannes@sipsolutions.net>
Reviewed-by: Pieter-Paul Giesberts <pieterpg@broadcom.com>
Reviewed-by: Arend van Spriel <arend@broadcom.com>
Signed-off-by: Roland Vossen <rvossen@broadcom.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
13 years agostaging: brcm80211: remove AP related code from softmac
Roland Vossen [Fri, 2 Sep 2011 14:00:36 +0000 (16:00 +0200)]
staging: brcm80211: remove AP related code from softmac

AP support was only partially implemented and never invoked.
AP related code sections removed.

Reported-by: Johannes Berg <johannes@sipsolutions.net>
Reviewed-by: Pieter-Paul Giesberts <pieterpg@broadcom.com>
Reviewed-by: Arend van Spriel <arend@broadcom.com>
Signed-off-by: Roland Vossen <rvossen@broadcom.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
13 years agostaging: brcm80211: cleaned up more softmac macro's
Roland Vossen [Fri, 2 Sep 2011 14:00:35 +0000 (16:00 +0200)]
staging: brcm80211: cleaned up more softmac macro's

Substituted/removed macro's.

Reported-by: Johannes Berg <johannes@sipsolutions.net>
Reviewed-by: Pieter-Paul Giesberts <pieterpg@broadcom.com>
Reviewed-by: Arend van Spriel <arend@broadcom.com>
Signed-off-by: Roland Vossen <rvossen@broadcom.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
13 years agostaging: brcm80211: cleaned up softmac nicpci.c/nicpci.h macro's
Roland Vossen [Fri, 2 Sep 2011 14:00:34 +0000 (16:00 +0200)]
staging: brcm80211: cleaned up softmac nicpci.c/nicpci.h macro's

Substituted macro's.

Reported-by: Johannes Berg <johannes@sipsolutions.net>
Reviewed-by: Pieter-Paul Giesberts <pieterpg@broadcom.com>
Reviewed-by: Arend van Spriel <arend@broadcom.com>
Signed-off-by: Roland Vossen <rvossen@broadcom.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
13 years agostaging: brcm80211: cleaned up softmac phy macro's affecting code flow
Roland Vossen [Fri, 2 Sep 2011 14:00:33 +0000 (16:00 +0200)]
staging: brcm80211: cleaned up softmac phy macro's affecting code flow

Substituted macro's.

Reported-by: Johannes Berg <johannes@sipsolutions.net>
Reviewed-by: Pieter-Paul Giesberts <pieterpg@broadcom.com>
Reviewed-by: Arend van Spriel <arend@broadcom.com>
Signed-off-by: Roland Vossen <rvossen@broadcom.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
13 years agostaging: brcm80211: remove 'default n' from Kconfig
Arend van Spriel [Fri, 2 Sep 2011 14:00:32 +0000 (16:00 +0200)]
staging: brcm80211: remove 'default n' from Kconfig

Kconfig options are by default not selected so adding the
statement 'default n' to the option is not needed.

Reported-by: Johannes Berg <johannes@sipsolutions.net>
Reviewed-by: Roland Vossen <rvossen@broadcom.com>
Reviewed-by: Pieter-Paul Giesberts <pieterpg@broadcom.com>
Signed-off-by: Roland Vossen <rvossen@broadcom.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
13 years agostaging: brcm80211: remove sparse warning from main.c
Arend van Spriel [Fri, 2 Sep 2011 14:00:31 +0000 (16:00 +0200)]
staging: brcm80211: remove sparse warning from main.c

The source file main.c contained several sparse warnings which
have been cleaned up.

Reported-by: Aaro Koskinen <aaro.koskinen@iki.fi>
Reviewed-by: Franky (Zhenhui) Lin <frankyl@broadcom.com>
Reviewed-by: Roland Vossen <rvossen@broadcom.com>
Signed-off-by: Roland Vossen <rvossen@broadcom.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
13 years agostaging: brcm80211: use address space qualifier in brcmfmac
Arend van Spriel [Fri, 2 Sep 2011 14:00:30 +0000 (16:00 +0200)]
staging: brcm80211: use address space qualifier in brcmfmac

Several sparse warning were issued due to missing __user qualifier
for brcmfmac variables. This patch adds those.

Reported-by: Aaro Koskinen <aaro.koskinen@iki.fi>
Reviewed-by: Franky (Zhenhui) Lin <frankyl@broadcom.com>
Reviewed-by: Roland Vossen <rvossen@broadcom.com>
Signed-off-by: Roland Vossen <rvossen@broadcom.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
13 years agostaging: brcm80211: replace 0 integer with NULL pointer
Arend van Spriel [Fri, 2 Sep 2011 14:00:29 +0000 (16:00 +0200)]
staging: brcm80211: replace 0 integer with NULL pointer

Running sparse showed following warning: Using plain integer as NULL
pointer. This has been fixed.

Reported-by: Aaro Koskinen <aaro.koskinen@iki.fi>
Reviewed-by: Franky (Zhenhui) Lin <frankyl@broadcom.com>
Reviewed-by: Roland Vossen <rvossen@broadcom.com>
Signed-off-by: Roland Vossen <rvossen@broadcom.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
13 years agostaging: brcm80211: remove extern keyword from function definition
Arend van Spriel [Fri, 2 Sep 2011 14:00:28 +0000 (16:00 +0200)]
staging: brcm80211: remove extern keyword from function definition

Sparse warning was given when using the extern keyword in the function
definition. This patch removes those instances.

Reported-by: Aaro Koskinen <aaro.koskinen@iki.fi>
Reviewed-by: Franky (Zhenhui) Lin <frankyl@broadcom.com>
Reviewed-by: Roland Vossen <rvossen@broadcom.com>
Signed-off-by: Roland Vossen <rvossen@broadcom.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
13 years agostaging: brcm80211: cleaned up several main.h/main.c related macro's
Roland Vossen [Thu, 1 Sep 2011 09:17:20 +0000 (11:17 +0200)]
staging: brcm80211: cleaned up several main.h/main.c related macro's

Moved, deleted or substituted macro's.

Reported-by: Johannes Berg <johannes@sipsolutions.net>
Reviewed-by: Arend van Spriel <arend@broadcom.com>
Reviewed-by: Pieter-Paul Giesberts <pieterpg@broadcom.com>
Signed-off-by: Roland Vossen <rvossen@broadcom.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
13 years agostaging: brcm80211: cleaned up several softmac macro's
Roland Vossen [Thu, 1 Sep 2011 09:17:19 +0000 (11:17 +0200)]
staging: brcm80211: cleaned up several softmac macro's

Moved, deleted or substituted macro's.

Reported-by: Johannes Berg <johannes@sipsolutions.net>
Reviewed-by: Arend van Spriel <arend@broadcom.com>
Reviewed-by: Pieter-Paul Giesberts <pieterpg@broadcom.com>
Signed-off-by: Roland Vossen <rvossen@broadcom.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
13 years agostaging: brcm80211: cleaned up softmac channel related macro's
Roland Vossen [Thu, 1 Sep 2011 09:17:18 +0000 (11:17 +0200)]
staging: brcm80211: cleaned up softmac channel related macro's

Moved, deleted or substituted macro's.

Reported-by: Johannes Berg <johannes@sipsolutions.net>
Reviewed-by: Arend van Spriel <arend@broadcom.com>
Reviewed-by: Pieter-Paul Giesberts <pieterpg@broadcom.com>
Signed-off-by: Roland Vossen <rvossen@broadcom.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
13 years agostaging: brcm80211: macro cleanup in softmac ampdu.c
Roland Vossen [Thu, 1 Sep 2011 09:17:17 +0000 (11:17 +0200)]
staging: brcm80211: macro cleanup in softmac ampdu.c

Moved, deleted or substituted macro's.

Reported-by: Johannes Berg <johannes@sipsolutions.net>
Reviewed-by: Arend van Spriel <arend@broadcom.com>
Reviewed-by: Pieter-Paul Giesberts <pieterpg@broadcom.com>
Signed-off-by: Roland Vossen <rvossen@broadcom.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
13 years agostaging: brcm80211: macro cleanup in softmac aiutils.h
Roland Vossen [Thu, 1 Sep 2011 09:17:16 +0000 (11:17 +0200)]
staging: brcm80211: macro cleanup in softmac aiutils.h

Moved, deleted or substituted macro's.

Reported-by: Johannes Berg <johannes@sipsolutions.net>
Reviewed-by: Arend van Spriel <arend@broadcom.com>
Reviewed-by: Pieter-Paul Giesberts <pieterpg@broadcom.com>
Signed-off-by: Roland Vossen <rvossen@broadcom.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
13 years agostaging: brcm80211: removed redundant SI_INFO() macro from softmac
Roland Vossen [Thu, 1 Sep 2011 09:17:15 +0000 (11:17 +0200)]
staging: brcm80211: removed redundant SI_INFO() macro from softmac

Reported-by: Johannes Berg <johannes@sipsolutions.net>
Reviewed-by: Arend van Spriel <arend@broadcom.com>
Reviewed-by: Pieter-Paul Giesberts <pieterpg@broadcom.com>
Signed-off-by: Roland Vossen <rvossen@broadcom.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
13 years agostaging: brcm80211: removed redundant macro's in softmac
Roland Vossen [Thu, 1 Sep 2011 09:17:14 +0000 (11:17 +0200)]
staging: brcm80211: removed redundant macro's in softmac

Reported-by: Johannes Berg <johannes@sipsolutions.net>
Signed-off-by: Roland Vossen <rvossen@broadcom.com>
Reviewed-by: Arend van Spriel <arend@broadcom.com>
Reviewed-by: Pieter-Paul Giesberts <pieterpg@broadcom.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
13 years agostaging: brcm80211: use static qualifier for local symbols in brcmsmac
Arend van Spriel [Thu, 1 Sep 2011 09:17:13 +0000 (11:17 +0200)]
staging: brcm80211: use static qualifier for local symbols in brcmsmac

Cleanup resulted in merging several files and made several symbols
local to a source file. These were found by running sparse as it
gave the warning: symbol 'foo' was not declared. Should it be static?

Reported-by: Aaro Koskinen <aaro.koskinen@iki.fi>
Reviewed-by: Roland Vossen <rvossen@broadcom.com>
Reviewed-by: Pieter-Paul Giesberts <pieterpg@broadcom.com>
Signed-off-by: Roland Vossen <rvossen@broadcom.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
13 years agostaging: brcm80211: remove sparse warnings from mac80211_if.c
Arend van Spriel [Thu, 1 Sep 2011 09:17:12 +0000 (11:17 +0200)]
staging: brcm80211: remove sparse warnings from mac80211_if.c

Some changes have been made to get rid of sparse warnings in the
source file mac80211_if.c.

Reported-by: Aaro Koskinen <aaro.koskinen@iki.fi>
Reviewed-by: Roland Vossen <rvossen@broadcom.com>
Reviewed-by: Pieter-Paul Giesberts <pieterpg@broadcom.com>
Signed-off-by: Roland Vossen <rvossen@broadcom.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
13 years agostaging: brcm80211: reduce sparse messages on brcmsmac sources
Arend van Spriel [Thu, 1 Sep 2011 09:17:11 +0000 (11:17 +0200)]
staging: brcm80211: reduce sparse messages on brcmsmac sources

Running sparse over the driver sources showed 1356 sparse messages
and quite a number are due to missing __iomem attribute in some
places. This patch reduces the number significantly.

Reported-by: Aaro Koskinen <aaro.koskinen@iki.fi>
Reviewed-by: Roland Vossen <rvossen@broadcom.com>
Reviewed-by: Pieter-Paul Giesberts <pieterpg@broadcom.com>
Signed-off-by: Roland Vossen <rvossen@broadcom.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
13 years agostaging: brcm80211: use static qualifier for local symbols in brcmfmac
Arend van Spriel [Thu, 1 Sep 2011 09:17:10 +0000 (11:17 +0200)]
staging: brcm80211: use static qualifier for local symbols in brcmfmac

Cleanup resulted in merging several files and made several symbols
local to a source file. These were found by running sparse as it
gave the warning: symbol 'foo' was not declared. Should it be static?

Reported-by: Aaro Koskinen <aaro.koskinen@iki.fi>
Reviewed-by: Franky (Zhenhui) Lin <frankyl@broadcom.com>
Reviewed-by: Roland Vossen <rvossen@broadcom.com>
Signed-off-by: Roland Vossen <rvossen@broadcom.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
13 years agostaging: brcm80211: remove static function declaration in dhd_linux
Franky Lin [Thu, 1 Sep 2011 09:17:09 +0000 (11:17 +0200)]
staging: brcm80211: remove static function declaration in dhd_linux

Reshuffle function order in dhd_linux of fullmac to get rid of
static function declaration

Reported-by: Johannes Berg <johannes@sipsolutions.net>
Reviewed-by: Roland Vossen <rvossen@broadcom.com>
Reviewed-by: Arend van Spriel <arend@broadcom.com>
Signed-off-by: Roland Vossen <rvossen@broadcom.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
13 years agostaging: brcm80211: remove static function declaration in bcmsdh_sdmmc
Franky Lin [Thu, 1 Sep 2011 09:17:08 +0000 (11:17 +0200)]
staging: brcm80211: remove static function declaration in bcmsdh_sdmmc

Reshuffle function order in bcmsdh_sdmmc of fullmac to get rid of
static function declaration

Reported-by: Johannes Berg <johannes@sipsolutions.net>
Reviewed-by: Roland Vossen <rvossen@broadcom.com>
Reviewed-by: Arend van Spriel <arend@broadcom.com>
Signed-off-by: Roland Vossen <rvossen@broadcom.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
13 years agostaging: brcm80211: remove unused sdioh command type code in fullmac
Franky Lin [Thu, 1 Sep 2011 09:17:07 +0000 (11:17 +0200)]
staging: brcm80211: remove unused sdioh command type code in fullmac

sdioh command type is not used in brcmf_sdioh_request_word. This patch
removes the related code.

Reviewed-by: Roland Vossen <rvossen@broadcom.com>
Reviewed-by: Arend van Spriel <arend@broadcom.com>
Signed-off-by: Roland Vossen <rvossen@broadcom.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
13 years agostaging: brcm80211: remove unused sdioh data mode code in fullmac
Franky Lin [Thu, 1 Sep 2011 09:17:06 +0000 (11:17 +0200)]
staging: brcm80211: remove unused sdioh data mode code in fullmac

sdioh data mode is not used in brcmf_sdioh_request_buffer. The patch
removes the related code.

Reviewed-by: Roland Vossen <rvossen@broadcom.com>
Reviewed-by: Arend van Spriel <arend@broadcom.com>
Signed-off-by: Roland Vossen <rvossen@broadcom.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
13 years agostaging: brcm80211: remove function wrapper of getting sb window address
Franky Lin [Thu, 1 Sep 2011 09:17:05 +0000 (11:17 +0200)]
staging: brcm80211: remove function wrapper of getting sb window address

The address stored in sdiodev can be used directly instead of using
the wrapper function brcmf_sdcard_cur_sbwad.

Reviewed-by: Roland Vossen <rvossen@broadcom.com>
Reviewed-by: Arend van Spriel <arend@broadcom.com>
Signed-off-by: Roland Vossen <rvossen@broadcom.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
13 years agostaging: brcm80211: remove duplicate set sb window address function
Franky Lin [Thu, 1 Sep 2011 09:17:04 +0000 (11:17 +0200)]
staging: brcm80211: remove duplicate set sb window address function

In fullmac, brcmf_sdbrcm_set_siaddr_window and brcmf_sdcard_set_sbaddr_window
have identical fucntionality. Remove the one in dhd_sdio.c

Reported-by: Rafal Milecki <zajec5@gmail.com>
Reviewed-by: Roland Vossen <rvossen@broadcom.com>
Reviewed-by: Arend van Spriel <arend@broadcom.com>
Signed-off-by: Roland Vossen <rvossen@broadcom.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
13 years agostaging: brcm80211: consolidate SHOW_EVENTS code under BCMDBG in fullmac
Franky Lin [Thu, 1 Sep 2011 09:17:03 +0000 (11:17 +0200)]
staging: brcm80211: consolidate SHOW_EVENTS code under BCMDBG in fullmac

Use unify config marco for debug info. Related event debug print out can be
enabled/disabled by the dedicated event message level.

Reported-by: Johannes Berg <johannes@sipsolutions.net>
Reviewed-by: Roland Vossen <rvossen@broadcom.com>
Reviewed-by: Arend van Spriel <arend@broadcom.com>
Signed-off-by: Roland Vossen <rvossen@broadcom.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
13 years agostaging: brcm80211: replaced fullmac BRCMF_PM_RESUME_WAIT macro with function
Roland Vossen [Thu, 1 Sep 2011 09:17:02 +0000 (11:17 +0200)]
staging: brcm80211: replaced fullmac BRCMF_PM_RESUME_WAIT macro with function

Code cleanup. Advantage is more readable code and better type checking.

Reported-by: Johannes Berg <johannes@sipsolutions.net>
Signed-off-by: Roland Vossen <rvossen@broadcom.com>
Reviewed-by: Franky Lin <frankyl@broadcom.com>
Reviewed-by: Arend van Spriel <arend@broadcom.com>
Reviewed-by: Pieter-Paul Giesberts <pieterpg@broadcom.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
13 years agostaging: brcm80211: cleaned up fullmac macro BRCMF_PM_RESUME_RETURN_ERROR
Roland Vossen [Thu, 1 Sep 2011 09:17:01 +0000 (11:17 +0200)]
staging: brcm80211: cleaned up fullmac macro BRCMF_PM_RESUME_RETURN_ERROR

Macros impacting the code flow are sort of frowned upon. No other macro's
in the source code impact the code flow. Replaced macro by function.

Reported-by: Johannes Berg <johannes@sipsolutions.net>
Signed-off-by: Roland Vossen <rvossen@broadcom.com>
Reviewed-by: Franky Lin <frankyl@broadcom.com>
Reviewed-by: Arend van Spriel <arend@broadcom.com>
Reviewed-by: Pieter-Paul Giesberts <pieterpg@broadcom.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
13 years agostaging: brcm80211: remove static function prototypes from main.c
Arend van Spriel [Thu, 1 Sep 2011 09:17:00 +0000 (11:17 +0200)]
staging: brcm80211: remove static function prototypes from main.c

Function prototypes for static functions are not strictly needed and
considered unwanted by linux community. This patch reorders the
functions in brcmsmac/main.c and gets rid of the prototypes.

Reported-by: Johannes Berg <johannes@sipsolutions.net>
Signed-off-by: Roland Vossen <rvossen@broadcom.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
13 years agostaging: brcm80211: use min_t() instead of min()
Henry Ptasinski [Thu, 1 Sep 2011 09:16:59 +0000 (11:16 +0200)]
staging: brcm80211: use min_t() instead of min()

Also eliminate a cast to int that could cause issues with very large values
of di->rxbufsize (as suggested by Dan Carpenter).

Signed-off-by: Henry Ptasinski <henryp@broadcom.com>
Signed-off-by: Roland Vossen <rvossen@broadcom.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
13 years agostaging: brcm80211: removed static function declarations in 3 files
Roland Vossen [Thu, 1 Sep 2011 09:16:58 +0000 (11:16 +0200)]
staging: brcm80211: removed static function declarations in 3 files

nicpci.c, srom.c and stf.c

Reported-by: Johannes Berg <johannes@sipsolutions.net>
Signed-off-by: Roland Vossen <rvossen@broadcom.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
13 years agostaging: brcm80211: removed static function declarations in mac80211_if.c
Roland Vossen [Thu, 1 Sep 2011 09:16:57 +0000 (11:16 +0200)]
staging: brcm80211: removed static function declarations in mac80211_if.c

Reported-by: Johannes Berg <johannes@sipsolutions.net>
Signed-off-by: Roland Vossen <rvossen@broadcom.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
13 years agostaging: brcm80211: removed static function declarations in dma.c
Roland Vossen [Thu, 1 Sep 2011 09:16:56 +0000 (11:16 +0200)]
staging: brcm80211: removed static function declarations in dma.c

Reported-by: Johannes Berg <johannes@sipsolutions.net>
Signed-off-by: Roland Vossen <rvossen@broadcom.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
13 years agostaging: brcm80211: removed static function declarations in channel.c
Roland Vossen [Thu, 1 Sep 2011 09:16:55 +0000 (11:16 +0200)]
staging: brcm80211: removed static function declarations in channel.c

Reported-by: Johannes Berg <johannes@sipsolutions.net>
Signed-off-by: Roland Vossen <rvossen@broadcom.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
13 years agostaging: brcm80211: removed static function declarations in antsel.c
Roland Vossen [Thu, 1 Sep 2011 09:16:54 +0000 (11:16 +0200)]
staging: brcm80211: removed static function declarations in antsel.c

Reported-by: Johannes Berg <johannes@sipsolutions.net>
Signed-off-by: Roland Vossen <rvossen@broadcom.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
13 years agostaging: brcm80211: removed static function declarations in ampdu.c
Roland Vossen [Thu, 1 Sep 2011 09:16:53 +0000 (11:16 +0200)]
staging: brcm80211: removed static function declarations in ampdu.c

Reported-by: Johannes Berg <johannes@sipsolutions.net>
Signed-off-by: Roland Vossen <rvossen@broadcom.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
13 years agostaging: brcm80211: removed static function declarations in alloc.c
Roland Vossen [Thu, 1 Sep 2011 09:16:52 +0000 (11:16 +0200)]
staging: brcm80211: removed static function declarations in alloc.c

Reported-by: Johannes Berg <johannes@sipsolutions.net>
Signed-off-by: Roland Vossen <rvossen@broadcom.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
13 years agostaging: brcm80211: removed static function declarations in aiutils.c
Roland Vossen [Thu, 1 Sep 2011 09:16:51 +0000 (11:16 +0200)]
staging: brcm80211: removed static function declarations in aiutils.c

Reported-by: Johannes Berg <johannes@sipsolutions.net>
Signed-off-by: Roland Vossen <rvossen@broadcom.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
13 years agostaging: rtl8192e: Fix various problems noted by smatch
Larry Finger [Thu, 1 Sep 2011 17:23:21 +0000 (12:23 -0500)]
staging: rtl8192e: Fix various problems noted by smatch

Smatch reports the following problems:

  CHECK   drivers/staging/rtl8192e/rtllib_softmac.c
drivers/staging/rtl8192e/rtllib_softmac.c +3143 rtllib_softmac_free(4) info: redundant null check on ieee->pDot11dInfo calling kfree()

  CHECK   drivers/staging/rtl8192e/rtllib_module.c
drivers/staging/rtl8192e/rtllib_module.c +198 free_rtllib(6) info: redundant null check on ieee->pHTInfo calling kfree()

  CHECK   drivers/staging/rtl8192e/rtl819x_TSProc.c
drivers/staging/rtl8192e/rtl819x_TSProc.c +280 SearchAdmitTRStream(52) error: potential null derefence 'pRet'.

Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
13 years agostaging: rtl8192e: Fix smatch warnings regarding large arrays on stack
Larry Finger [Thu, 1 Sep 2011 17:23:20 +0000 (12:23 -0500)]
staging: rtl8192e: Fix smatch warnings regarding large arrays on stack

Smatch reports the follwing warnings:

  CHECK   drivers/staging/rtl8192e/rtllib_rx.c
drivers/staging/rtl8192e/rtllib_rx.c +552 RxReorderIndicatePacket(6) warn: 'prxbIndicateArray' puts 1024 bytes on stack

  CHECK   drivers/staging/rtl8192e/rtl819x_TSProc.c
drivers/staging/rtl8192e/rtl819x_TSProc.c +40 RxPktPendingTimeout(9) warn: 'stats_IndicateArray' puts 1024 bytes on stack

  CHECK   drivers/staging/rtl8192e/r8192E_phy.c
drivers/staging/rtl8192e/r8192E_phy.c +859 rtl8192_phy_SwChnlStepByStep(11) warn: function puts 797 bytes on stack

  CHECK   drivers/staging/rtl8192e/rtllib_rx.c
drivers/staging/rtl8192e/rtllib_rx.c +552 RxReorderIndicatePacket(6) warn: 'prxbIndicateArray' puts 1024 bytes on stack

These are fixed by adding the arrays in question as a union in a struct used
by nearly all routines.

Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
13 years agostaging: rtl8192e: Fix smatch error in r8192E_phy.c
Larry Finger [Thu, 1 Sep 2011 17:23:19 +0000 (12:23 -0500)]
staging: rtl8192e: Fix smatch error in r8192E_phy.c

Smatch reports the following:

  CHECK   drivers/staging/rtl8192e/r8192E_phy.c
drivers/staging/rtl8192e/r8192E_phy.c +940 rtl8192_phy_SwChnlStepByStep(92) error: potential null derefence 'CurrentCmd'.

Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
13 years agostaging: rtl8192e: Fix smatch warning in rtl819x_BAProc.c
Larry Finger [Thu, 1 Sep 2011 17:23:18 +0000 (12:23 -0500)]
staging: rtl8192e: Fix smatch warning in rtl819x_BAProc.c

Smatch outputs the following warning:

  CHECK   drivers/staging/rtl8192e/rtl819x_BAProc.c
drivers/staging/rtl8192e/rtl819x_BAProc.c +88 rtllib_ADDBA(12) warn: variable dereferenced before check 'ieee'

As ieee cannot be NULL at this point, remove all such checks.

Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
13 years agostaging: rtl8192e: Silence smatch info in r8192E_cmdpkt.c
Larry Finger [Thu, 1 Sep 2011 17:23:17 +0000 (12:23 -0500)]
staging: rtl8192e: Silence smatch info in r8192E_cmdpkt.c

Smatch outputs the following informational message:

  CHECK   drivers/staging/rtl8192e/r8192E_cmdpkt.c
drivers/staging/rtl8192e/r8192E_cmdpkt.c +419 cmpk_message_handle_rx(77) info: ignoring unreachable code.

Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
13 years agostaging: rtl8192e: Fix smatch warning in rtl_wx.c
Larry Finger [Thu, 1 Sep 2011 17:23:16 +0000 (12:23 -0500)]
staging: rtl8192e: Fix smatch warning in rtl_wx.c

Smatch reports the following warning:

  CHECK   drivers/staging/rtl8192e/rtl_wx.c

drivers/staging/rtl8192e/rtl_wx.c +262 r8192se_wx_set_radio(16) warn: inconsistent returns sem:&priv->wx_sem: locked (258) unlocked (262)

Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
13 years agostaging: rtl8192e: Fix smatch info output for r8192E_dev.c
Larry Finger [Thu, 1 Sep 2011 17:23:15 +0000 (12:23 -0500)]
staging: rtl8192e: Fix smatch info output for r8192E_dev.c

Smatch reports the following informational output:

  CHECK   drivers/staging/rtl8192e/r8192E_dev.c
drivers/staging/rtl8192e/r8192E_dev.c +2404 ActUpdateChannelAccessSetting(13) info: ignoring unreachable code.
drivers/staging/rtl8192e/r8192E_dev.c +2404 ActUpdateChannelAccessSetting(13) info: ignoring unreachable code.

Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
13 years agostaging: rtl8192e: Fix smatch error and warning in rtl_core.c
Larry Finger [Thu, 1 Sep 2011 17:23:14 +0000 (12:23 -0500)]
staging: rtl8192e: Fix smatch error and warning in rtl_core.c

Smatch shows the following errors:

  CHECK   drivers/staging/rtl8192e/rtl_core.c
drivers/staging/rtl8192e/rtl_core.c +600 rtl8192_qos_activate(7) warn: variable dereferenced before check 'priv'
drivers/staging/rtl8192e/rtl_core.c +1345 rtl8192_init(40) warn: 'dev->irq' was not released on error
drivers/staging/rtl8192e/rtl_core.c +2120 rtl8192_alloc_rx_desc_ring(43) error: potential null derefence 'entry'.
drivers/staging/rtl8192e/rtl_core.c +3010 rtl8192_pci_probe(153) warn: 'pmem_start' was not released on error

Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
13 years agostaging: rtl8192e: Remove dead code involving MOVE_INTO_HANDLER
Larry Finger [Thu, 1 Sep 2011 17:23:13 +0000 (12:23 -0500)]
staging: rtl8192e: Remove dead code involving MOVE_INTO_HANDLER

File rtl_core.c contains the statement "#define MOVE_INTO_HANDLER". As a
result, everything inside an "ifndef MOVE_INTO_HANDLER" is dead code and
can be removed.

Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
13 years agoStaging: hv: Add support for >2 TB LUN in storage driver.
Mike Sterling [Tue, 6 Sep 2011 23:10:55 +0000 (16:10 -0700)]
Staging: hv: Add support for >2 TB LUN in storage driver.

If a LUN larger than 2 TB is attached to a Linux VM on Hyper-V, we currently
report a maximum size of 2 TB. This patch resolves the issue in hv_storvsc.
Thanks to Robert Scheck <robert.scheck@etes.de> for reporting the issue.

Reported-by: Robert Scheck <robert.scheck@etes.de>
Signed-off-by: Mike Sterling <mike.sterling@microsoft.com>
Signed-off-by: K.Y. Srinivasan <kys@microsoft.com>
Signed-off-by: Haiyang Zhang <haiyangz@microsoft.com>
Cc: stable <stable@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
13 years agostaging:iio: ad7152: fix channel assignment for AD7153
Michael Hennerich [Fri, 2 Sep 2011 16:25:47 +0000 (17:25 +0100)]
staging:iio: ad7152: fix channel assignment for AD7153

In case the AD7153 is selected we need to make sure we provide channel info
for the first capacitance input in both single ended and differential
configuration.

Signed-off-by: Michael Hennerich <michael.hennerich@analog.com>
Signed-off-by: Jonathan Cameron <jic23@cam.ac.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
13 years agostaging:iio:adc:ad7192: return len and fix out of range checking
Michael Hennerich [Fri, 2 Sep 2011 16:25:46 +0000 (17:25 +0100)]
staging:iio:adc:ad7192: return len and fix out of range checking

Signed-off-by: Michael Hennerich <michael.hennerich@analog.com>
Signed-off-by: Jonathan Cameron <jic23@cam.ac.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
13 years agostaging:iio:adc:ad7192: add temp_scale attribute, change module description
Michael Hennerich [Fri, 2 Sep 2011 16:25:45 +0000 (17:25 +0100)]
staging:iio:adc:ad7192: add temp_scale attribute, change module description

Use KBUILD_MODNAME
Fix indention style

Signed-off-by: Michael Hennerich <michael.hennerich@analog.com>
Signed-off-by: Jonathan Cameron <jic23@cam.ac.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
13 years agostaging:iio:adc:ad7291: reset device and setup irq before it is enabled
Michael Hennerich [Fri, 2 Sep 2011 16:25:44 +0000 (17:25 +0100)]
staging:iio:adc:ad7291: reset device and setup irq before it is enabled

Signed-off-by: Michael Hennerich <michael.hennerich@analog.com>
Signed-off-by: Jonathan Cameron <jic23@cam.ac.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
13 years agostaging:iio:adc:ad7291: fix channel mapping for event enables
Michael Hennerich [Fri, 2 Sep 2011 16:25:43 +0000 (17:25 +0100)]
staging:iio:adc:ad7291: fix channel mapping for event enables

Signed-off-by: Michael Hennerich <michael.hennerich@analog.com>
Signed-off-by: Jonathan Cameron <jic23@cam.ac.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
13 years agostaging:iio:adc:ad7291: introduce IIO_EVENT_CODE_EXTRACT_CHAN_TYPE and use accordingly
Michael Hennerich [Fri, 2 Sep 2011 16:25:42 +0000 (17:25 +0100)]
staging:iio:adc:ad7291: introduce IIO_EVENT_CODE_EXTRACT_CHAN_TYPE and use accordingly

Fix channel type handling

Signed-off-by: Michael Hennerich <michael.hennerich@analog.com>
Signed-off-by: Jonathan Cameron <jic23@cam.ac.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
13 years agostaging:iio:adc:ad7291: fix mask bit generation
Michael Hennerich [Fri, 2 Sep 2011 16:25:41 +0000 (17:25 +0100)]
staging:iio:adc:ad7291: fix mask bit generation

Signed-off-by: Michael Hennerich <michael.hennerich@analog.com>
Signed-off-by: Jonathan Cameron <jic23@cam.ac.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
13 years agostaging:iio:adc:ad7291: don't swab results twice and introduce more register defines
Michael Hennerich [Fri, 2 Sep 2011 16:25:40 +0000 (17:25 +0100)]
staging:iio:adc:ad7291: don't swab results twice and introduce more register defines

Signed-off-by: Michael Hennerich <michael.hennerich@analog.com>
Signed-off-by: Jonathan Cameron <jic23@cam.ac.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
13 years agostaging:iio:adc:ad7291: Add regulator, reference voltage and scale handling
Michael Hennerich [Fri, 2 Sep 2011 16:25:39 +0000 (17:25 +0100)]
staging:iio:adc:ad7291: Add regulator, reference voltage and scale handling

Signed-off-by: Michael Hennerich <michael.hennerich@analog.com>
Signed-off-by: Jonathan Cameron <jic23@cam.ac.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
13 years agostaging:iio:adc:ad7291: Fix AD7291_T_SENSE_MASK
Michael Hennerich [Fri, 2 Sep 2011 16:25:38 +0000 (17:25 +0100)]
staging:iio:adc:ad7291: Fix AD7291_T_SENSE_MASK

AD7291_T_SENSE_MASK must set bit-7.
Change definition style.

Signed-off-by: Michael Hennerich <michael.hennerich@analog.com>
Signed-off-by: Jonathan Cameron <jic23@cam.ac.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
13 years agostaging:iio:adc:ad7291: Fix typos, change kconfig description and file header
Michael Hennerich [Fri, 2 Sep 2011 16:25:37 +0000 (17:25 +0100)]
staging:iio:adc:ad7291: Fix typos, change kconfig description and file header

Make clear the AD7291 is primarily an ADC, and not a temp sensor.

Signed-off-by: Michael Hennerich <michael.hennerich@analog.com>
Signed-off-by: Jonathan Cameron <jic23@cam.ac.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
13 years agostaging:iio:adc:ad7291: fix channel mapping
Michael Hennerich [Fri, 2 Sep 2011 16:25:36 +0000 (17:25 +0100)]
staging:iio:adc:ad7291: fix channel mapping

ideally in_voltageX_raw should map to AD7291 VINX.

Signed-off-by: Michael Hennerich <michael.hennerich@analog.com>
Signed-off-by: Jonathan Cameron <jic23@cam.ac.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
13 years agostaging:iio:accel:adis16209: Fix double registration of in_incli0_index
Michael Hennerich [Fri, 2 Sep 2011 16:25:35 +0000 (17:25 +0100)]
staging:iio:accel:adis16209: Fix double registration of in_incli0_index

iio (null): tried to double register : in_incli0_index

Signed-off-by: Michael Hennerich <michael.hennerich@analog.com>
Signed-off-by: Jonathan Cameron <jic23@cam.ac.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
13 years agostaging:iio:imu: adis16400: Avoid using printk facility
Michael Hennerich [Fri, 2 Sep 2011 16:25:34 +0000 (17:25 +0100)]
staging:iio:imu: adis16400: Avoid using printk facility

use dev_info() instead.

Signed-off-by: Michael Hennerich <michael.hennerich@analog.com>
Signed-off-by: Jonathan Cameron <jic23@cam.ac.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
13 years agostaging:iio:imu:adis16400 cleanups
Jonathan Cameron [Fri, 2 Sep 2011 16:25:33 +0000 (17:25 +0100)]
staging:iio:imu:adis16400 cleanups

a) remove irq is gpio requirement - No reason this needs to be true.
b) use actual part name in info message rather than adis16400 in all cases.
c) scrap use of IIO_CHAN to simplify move out of staging.

Signed-off-by: Jonathan Cameron <jic23@cam.ac.uk>
Acked-by: Michael Hennerich <Michael.Hennerich@analog.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
13 years agostaging:iio:adc:ad7291 bring into line with current abi + chan_spec conversion.
Jonathan Cameron [Fri, 2 Sep 2011 16:25:32 +0000 (17:25 +0100)]
staging:iio:adc:ad7291 bring into line with current abi + chan_spec conversion.

Also add some locking.

Some major changes to how this driver works.

For voltage channels it is currently either in single read mode or in
a monitor mode (events only). Could be much cleverer and allow
reading of any channels that happend to be monitored, but haven't
done that yet.

Signed-off-by: Jonathan Cameron <jic23@cam.ac.uk>
Acked-by: Michael Hennerich <Michael.Hennerich@analog.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
13 years agostaging:iio:adc:ad7152: Fix differential channel return value and increase delay.
Michael Hennerich [Fri, 2 Sep 2011 16:25:31 +0000 (17:25 +0100)]
staging:iio:adc:ad7152: Fix differential channel return value and increase delay.

In differential mode zero scale equals to 0x8000.
Increase readout delay by 1ms.

Signed-off-by: Michael Hennerich <michael.hennerich@analog.com>
Signed-off-by: Jonathan Cameron <jic23@cam.ac.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
13 years agostaging:iio:adc:ad7152: Update sample rate, conversion time, digital filter handling
Michael Hennerich [Fri, 2 Sep 2011 16:25:30 +0000 (17:25 +0100)]
staging:iio:adc:ad7152: Update sample rate, conversion time, digital filter handling

Rename attribute, use sampling_frequency instead.
Attribute now accepts values in Hz.
Delay readout accordingly.

Signed-off-by: Michael Hennerich <michael.hennerich@analog.com>
Signed-off-by: Jonathan Cameron <jic23@cam.ac.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
13 years agostaging:iio:adc:ad7152: Add proper locking
Michael Hennerich [Fri, 2 Sep 2011 16:25:29 +0000 (17:25 +0100)]
staging:iio:adc:ad7152: Add proper locking

Add proper locking.
Consistently use indio_dev.

Signed-off-by: Michael Hennerich <michael.hennerich@analog.com>
Signed-off-by: Jonathan Cameron <jic23@cam.ac.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
13 years agostaging:iio:adc:ad7152: update scale handling
Michael Hennerich [Fri, 2 Sep 2011 16:25:28 +0000 (17:25 +0100)]
staging:iio:adc:ad7152: update scale handling

Add scale_available attribute.
fix ad7152_scale_table, values are not sorted descending.
Use IIO_VAL_INT_PLUS_NANO, to increase granularity.
Update scale handling accordingly.

Signed-off-by: Michael Hennerich <michael.hennerich@analog.com>
Signed-off-by: Jonathan Cameron <jic23@cam.ac.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
13 years agostaging:iio:adc:ad7152: Miscellaneous fixes and touch-up
Michael Hennerich [Fri, 2 Sep 2011 16:25:27 +0000 (17:25 +0100)]
staging:iio:adc:ad7152: Miscellaneous fixes and touch-up

Remove unused define.
Introduce cached SETUP variables.
Wait until calibration finished. (Device returns to idle state)
IIO_CHAN_INFO_CALIBSCALE_SEPARATE use proper scales. (range 1.0 to 1.99999)
i2c_smbus word transactions expect low byte first, therefore swap bytes.
CAPDIFF is bit in SETUP not CFG.

Signed-off-by: Michael Hennerich <michael.hennerich@analog.com>
Signed-off-by: Jonathan Cameron <jic23@cam.ac.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
13 years agostaging:iio:adc:ad7152: increase readability by introducing proper bit defines
Michael Hennerich [Fri, 2 Sep 2011 16:25:26 +0000 (17:25 +0100)]
staging:iio:adc:ad7152: increase readability by introducing proper bit defines

Some other miscellaneous cleanup.

Signed-off-by: Michael Hennerich <michael.hennerich@analog.com>
Signed-off-by: Jonathan Cameron <jic23@cam.ac.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
13 years agostaging:iio:adc:ad7152 bring more into line with abi.
Jonathan Cameron [Fri, 2 Sep 2011 16:25:25 +0000 (17:25 +0100)]
staging:iio:adc:ad7152 bring more into line with abi.

Get rid of explicit writes to registers and conversion mode
control.

Couple of bits I'm unsure about.
* Do calibration modes self reset when done?  How do you tell they are
done?

* Should we poll the status register just to be sure we have a new conversion?

All done sans hardware.

Signed-off-by: Jonathan Cameron <jic23@cam.ac.uk>
Acked-by: Michael Hennerich <Michael.Hennerich@analog.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
13 years agostaging:iio:adc:ad7152 set correct number of channels for ad7153.
Jonathan Cameron [Fri, 2 Sep 2011 16:25:24 +0000 (17:25 +0100)]
staging:iio:adc:ad7152 set correct number of channels for ad7153.

Has been broken for some time.

Signed-off-by: Jonathan Cameron <jic23@cam.ac.uk>
Acked-by: Michael Hennerich <Michael.Hennerich@analog.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
13 years agostaging:iio:adc:ad7152 use smbus read / write functions + checkpatch fixes
Jonathan Cameron [Fri, 2 Sep 2011 16:25:23 +0000 (17:25 +0100)]
staging:iio:adc:ad7152 use smbus read / write functions + checkpatch fixes

This is fine IF I  have read the data sheet correctly.

Signed-off-by: Jonathan Cameron <jic23@cam.ac.uk>
Acked-by: Michael Hennerich <Michael.Hennerich@analog.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
13 years agostaging:iio:adc:ad7150: Add support for the second interrupt strobe.
Michael Hennerich [Fri, 2 Sep 2011 16:25:22 +0000 (17:25 +0100)]
staging:iio:adc:ad7150: Add support for the second interrupt strobe.

The AD7150 features two outputs that can be used as interrupt strobes
to the host processor. In order to receive all events independently,
both need to utilized.

Update copyright notice.

Signed-off-by: Michael Hennerich <michael.hennerich@analog.com>
Signed-off-by: Jonathan Cameron <jic23@cam.ac.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
13 years agostaging:iio:adc:ad7150: remove conversion mode handling.
Michael Hennerich [Fri, 2 Sep 2011 16:25:21 +0000 (17:25 +0100)]
staging:iio:adc:ad7150: remove conversion mode handling.

The AD7150 family of devices power up in continues conversion mode.
We can stay in this mode, unless power consumption becomes a real issue.
Actually the event generation as well as the running average
relies on continues conversion mode, so we better stay there.

Signed-off-by: Michael Hennerich <michael.hennerich@analog.com>
Signed-off-by: Jonathan Cameron <jic23@cam.ac.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
13 years agostaging:iio:adc:ad7150: chan_spec conv + i2c_smbus commands + drop unused poweroff...
Jonathan Cameron [Fri, 2 Sep 2011 16:25:20 +0000 (17:25 +0100)]
staging:iio:adc:ad7150: chan_spec conv + i2c_smbus commands + drop unused poweroff timeout control.

Minimal changes to code layout as going to do chan spec conversion shortly.
Otherwise, there are numerous code sharing opportunities in here and abi
elements that are uterly non compliant.

Signed-off-by: Jonathan Cameron <jic23@cam.ac.uk>
Acked-by: Michael Hennerich <Michael.Hennerich@analog.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
13 years agostaging:iio:dac:ad5791 chan spec conversion.
Jonathan Cameron [Fri, 2 Sep 2011 16:25:19 +0000 (17:25 +0100)]
staging:iio:dac:ad5791 chan spec conversion.

Signed-off-by: Jonathan Cameron <jic23@cam.ac.uk>
Acked-by: Michael Hennerich <Michael.Hennerich@analog.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
13 years agostaging:iio: Differential channel handling - use explicit flag rather than types.
Jonathan Cameron [Fri, 2 Sep 2011 16:14:45 +0000 (17:14 +0100)]
staging:iio: Differential channel handling - use explicit flag rather than types.

Straight forward change in the core, but required some drivers to not use
the IIO_CHAN macro as that doesn't allow setting this bit (and is
going away anyway). Hence the churn.

Tested on max1363 with a couple of supported parts.

V2: differential bit in code got 7 bits and direction 1. Reversed that.
Issue spotted by Michael - thanks!

Signed-off-by: Jonathan Cameron <jic23@cam.ac.uk>
Acked-by: Michael Hennerich <Michael.Hennerich@analog.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
13 years agostaging:iio:add adaptive event types and missing extract_type macro.
Jonathan Cameron [Fri, 2 Sep 2011 16:14:44 +0000 (17:14 +0100)]
staging:iio:add adaptive event types and missing extract_type macro.

I'm not entirely sure this is the right way to go. Suggestions of other
options welcome!

Signed-off-by: Jonathan Cameron <jic23@cam.ac.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
13 years agostaging:iio: Add capacitance type and average_raw chan info.
Jonathan Cameron [Fri, 2 Sep 2011 16:14:43 +0000 (17:14 +0100)]
staging:iio: Add capacitance type and average_raw chan info.

These are both needed for CAPADCs

Signed-off-by: Jonathan Cameron <jic23@cam.ac.uk>
Acked-by: Michael Hennerich <Michael.Hennerich@analog.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
13 years agostaging:iio:naming in the EV_BIT macro fix.
Jonathan Cameron [Fri, 2 Sep 2011 16:14:42 +0000 (17:14 +0100)]
staging:iio:naming in the EV_BIT macro fix.

Should always have been IIO_EV_DIR_MAX as that's what it actually controls.
Also reduced the number to 4 as not yet seen a case needing more and this
is not userspace visible anyway.

Signed-off-by: Jonathan Cameron <jic23@cam.ac.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
13 years agostaging:iio:attrs - make address a u64 to allow event codes to be used.
Jonathan Cameron [Fri, 2 Sep 2011 16:14:41 +0000 (17:14 +0100)]
staging:iio:attrs - make address a u64 to allow event codes to be used.

Makes unusual event related attributes look a lot more like the core ones.

V2: Make sure the utils that set these up can handle the codes.
V3: rebase

Reported-by: Michael Hennerich <michael.hennerich@analog.com>
Signed-off-by: Jonathan Cameron <jic23@cam.ac.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
13 years agostaging:iio: rework of attribute registration.
Jonathan Cameron [Fri, 2 Sep 2011 16:14:40 +0000 (17:14 +0100)]
staging:iio: rework of attribute registration.

This set also includes quite a number of bug fixes of particularly
remove functions.

Necessary due to issue pointed out in Bart Van Assche's patch:
docs/driver-model: Document device.groups

V2: Rebase due to patch reordering.
V3: Pull various error fixes and cleanups out into their own patches.

Signed-off-by: Jonathan Cameron <jic23@cam.ac.uk>
Acked-by: Michael Hennerich <Michael.Hennerich@analog.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
13 years agostaging:iio:events - new 64 bit code structure and push out drivers.
Jonathan Cameron [Fri, 2 Sep 2011 16:14:39 +0000 (17:14 +0100)]
staging:iio:events - new 64 bit code structure and push out drivers.

This costs us nothing in event storage (as we are carrying a 64 bit
timestamp in the structure) and gives us lots more room to play with.

Also allows for more channels which some parts need.

V2: Cleanup some loose ends (such as the switch with only one option now).

Signed-off-by: Jonathan Cameron <jic23@cam.ac.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
13 years agostaging:iio: Switch the channel masks to bitmaps so as to allow for more channels.
Jonathan Cameron [Fri, 2 Sep 2011 16:14:38 +0000 (17:14 +0100)]
staging:iio: Switch the channel masks to bitmaps so as to allow for more channels.

This is as light as possible on changes to current drivers.
Some drivers make assumptions that their masks fit in a single
long.  Given they were previously working this is clearly valid if
not tidy.

The max1363 is an example where there should be no such assumptions.

V2: Add the new ad5933

Signed-off-by: Jonathan Cameron <jic23@cam.ac.uk>
Acked-by: Michael Hennerich <Michael.Hennerich@analog.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>