Andres Salomon [Fri, 22 Jul 2011 03:37:43 +0000 (20:37 -0700)]
staging: olpc_dcon: remove noinit module variable
This came from Jordan's original 2007 gxfb_dcon commit. I've never
seen or heard of it actually being used. Presumably it was once
useful for skipping hardware initialization when reloading the module
over and over during driver development..
Signed-off-by: Andres Salomon <dilinger@queued.net> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Kalle Valo [Fri, 12 Aug 2011 19:08:00 +0000 (22:08 +0300)]
staging: remove ath6kl
ath6kl is now in drivers/net/wireless/ath so the staging driver
is not supported anymore and should be removed.
Reported-by: Stephen Rothwell <sfr@canb.auug.org.au> Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
IIO: ADC: New driver for AD7190/AD7192/AD7195 4 Channel SPI ADC
New driver for AD7190/AD7192/AD7195 4.8 kHz, Ultralow Noise, 24-Bit
Sigma-Delta ADC with PGA
These devices features a dual use data out ready DOUT/RDY output.
In order to avoid contentions on the SPI bus, it's necessary to use
spi bus locking. The DOUT/RDY output must also be wired to an
interrupt capable GPIO.
In INDIO_RING_TRIGGERED mode, this driver may block its SPI bus segment
for an extended period of time.
Changes since V1:
Add missing documentation.
Remove obsoleted include files.
Fix typos and style issues.
Fix buffer size.
Split ad7192_show() into two functions.
Avoid race condition add mutex.
Abandon IIO_CHAN macro.
Reorder elements in ad7192_platform_data.
Remove driver bus type.
Signed-off-by: Michael Hennerich <michael.hennerich@analog.com> Acked-by: Jonathan Cameron <jic23@cam.ac.uk> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Grant Grundler [Tue, 9 Aug 2011 22:18:14 +0000 (15:18 -0700)]
STAGING:iio:light: fix ISL29018 init to handle brownout
After a voltage brownout, sensor will now operate correctly.
Page 10 of ISL29018 data sheet and the Intersil Application Note 1534
describe the required initialization sequence:
1. Write 0x00 to register 0x08 (TEST)
2. Write 0x00 to register 0x00 (CMD1)
3. msleep(1)
4. program remaining registers as before
Signed-off-by: Grant Grundler <grundler@chromium.org> Reviewed-by: Bryan Freed <bfreed@chromium.org> Acked-by: Jonathan Cameron <jic23@cam.ac.uk> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
iio: impedance-analyzer: New driver for AD5933/4 Impedance Converter, Network Analyzer
The AD5933 is a high precision impedance converter system solution
that combines an on-board frequency generator with a 12-bit, 1 MSPS,
analog-to-digital converter (ADC). The frequency generator allows an
external complex impedance to be excited with a known frequency.
The response signal from the impedance is sampled by the on-board ADC
and a discrete Fourier transform (DFT) is processed by an on-chip DSP engine.
The DFT algorithm returns a real (R) and imaginary (I) data-word at each
output frequency.
Changes since V1:
Apply list review feedback:
Consistently use poll_time_jiffies.
Use be|le cpu endian helpers where applicable.
Add various comments.
Changes since V2:
Fix KernelVersion tag in Documentation.
Declare ad5933_default_pdata static.
Fix typos.
Signed-off-by: Michael Hennerich <michael.hennerich@analog.com> Acked-by: Jonathan Cameron <jic23@cam.ac.uk> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
iio: adc: New driver for AD7280A Lithium Ion Battery Monitoring System
The AD7280A monitoring system contains all the functions required for
general purpose monitoring and maintenance of stacked
lithium ion batteries as used in hybrid electric vehicles,
battery backup applications, etc.
Changes since V1:
Make cell channels all type IIO_IN_DIFF, update documentation accordingly.
Remove unused and redundant defines.
Use SI units where applicable.
Remove unnecessary wrapper function.
Remove redundant initialization.
Add comments where requested.
Revise event handler.
Use const where applicable.
Changes since V2:
Remove redundant adc.h include file, scheduled for removal.
Signed-off-by: Michael Hennerich <michael.hennerich@analog.com> Acked-by: Jonathan Cameron <jic23@cam.ac.uk> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Jonathan Cameron [Fri, 12 Aug 2011 16:56:04 +0000 (17:56 +0100)]
staging:iio:events: use IIO_<TYPE> and IIO_MOD_<> instead of IIO_EV_CLASS_<TYPE> etc
The original definitions were duplicated to reduce tree churn during introduction of chan_spec
registration. Now there is no point in maintaining the two sets of definitions.
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>
Jonathan Cameron [Fri, 12 Aug 2011 16:48:03 +0000 (17:48 +0100)]
staging:iio:magnetometer:ak8975 convert to iio_chan_spec + cleanups.
iio_chan_spec conversion is straight forward.
Other changes:
* use i2c_smbus_write_byte_data in write_data
* c99 isms to setup various structures.
* move the comment about the scale factor and kill off trivial access func.
* make mode setting code use a bool rather than a ulong.
Ultimately I'd like to get rid of that mode bit entirely and handle it through
core pm routines, but have left it for now.
Signed-off-by: Jonathan Cameron <jic23@cam.ac.uk> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Jonathan Cameron [Fri, 12 Aug 2011 16:48:01 +0000 (17:48 +0100)]
staging:iio:accel:adis16204: use peak_raw info_mask element + push some defs down from header.
Currently this is the only driver using some of the defines in accel.h.
If these become common we'll just add them to the channel_spec options,
for now push down into this driver.
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>
Jonathan Cameron [Fri, 12 Aug 2011 16:08:53 +0000 (17:08 +0100)]
staging:iio: Remove deprecated dev_data from iio_dev.
The equivalent should always be done using iio_alllocate_device
with to create a private area for the driver and then iio_priv
to access it. There may be other uses for a private data pointer
but right now it just leads driver writers astray.
Signed-off-by: Jonathan Cameron <jic23@cam.ac.uk> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Jonathan Cameron [Fri, 12 Aug 2011 16:08:41 +0000 (17:08 +0100)]
staging:iio:gyro:adis16130 drop control of adc resolution.
There is no clear use case for this functionality in a driver
that only supports slow reading via sysfs. The interface
use was non compliant with the abi motiving it being dropped.
It can go back in if anyone ever implements buffered reading
support for this device. Then it will be controlled as
part of the buffering abi where this should indeed be correctly
supported.
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>
Jonathan Cameron [Fri, 12 Aug 2011 16:08:38 +0000 (17:08 +0100)]
staging:iio:triggers introduce iio_trigger_ops to take const bits out of iio_trig_structure.
Right now this results in increased code, but I still think it is worth doing to avoid
replication across instances of drivers etc and move as much stuff as possible to constant.
Ops structure is optional for the occasional driver that uses none of it (currently
only the ad7793).
Signed-off-by: Jonathan Cameron <jic23@cam.ac.uk> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Jonathan Cameron [Fri, 12 Aug 2011 15:55:30 +0000 (16:55 +0100)]
staging:iio:core simplify and fix a bug in iio_device_(un)register_event_set.
The unwinding index was j, not i and it is much simpler to do these as a single
loop unwinding those elements necessary in before jumping to the error handler.
Signed-off-by: Jonathan Cameron <jic23@cam.ac.uk> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Thomas Meyer [Sat, 6 Aug 2011 11:26:29 +0000 (13:26 +0200)]
staging: brcm80211: use kzalloc()
Use kzalloc rather than kmalloc followed by memset with 0
This considers some simple cases that are common and easy to validate
Note in particular that there are no ...s in the rule, so all of the
matched code has to be contiguous
The semantic patch that makes this output is available
in scripts/coccinelle/api/alloc/kzalloc-simple.cocci.
More information about semantic patching is available at
http://coccinelle.lip6.fr/
Signed-off-by: Thomas Meyer <thomas@m3y3r.de> Acked-by: Roland Vossen <rvossen@broadcom.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Arend van Spriel [Tue, 23 Aug 2011 12:14:00 +0000 (14:14 +0200)]
staging: brcm80211: fill in proper rx rate in mac80211 rx status
The brcmsmac driver supports different rates on 5GHz but this is not
taken into account when providing the rate index in the receive
status information passed to mac80211.
Reviewed-by: Roland Vossen <rvossen@broadcom.com> Reviewed-by: Pieter-Paul Giesberts <pieterpg@broadcom.com> Reviewed-by: Henry Ptasinski <henryp@broadcom.com> Signed-off-by: Arend van Spriel <arend@broadcom.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Roland Vossen [Tue, 23 Aug 2011 12:13:59 +0000 (14:13 +0200)]
staging: brcm80211: bugfix for fifo problem on 64 bits platforms.
Message 'receive fifo overflow' appeared in the log. Root cause was an
invalid physical address being programmed into the DMA engine. This was
caused by an invalid pointer cast in the dma code. Issue was observed on
a Sparc (Sun Fire V120) machine but could theoretically also pop up
on other architectures.
Driver was tested to scan and ping on aforementioned machine.
Reviewed-by: Arend van Spriel <arend@broadcom.com> Reviewed-by: Pieter-Paul Giesberts <pieterpg@broadcom.com> Signed-off-by: Arend van Spriel <arend@broadcom.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Roland Vossen [Tue, 23 Aug 2011 12:13:58 +0000 (14:13 +0200)]
staging: brcm80211: bugfix for exception on Sparc platforms
Problem would pop up during driver load on a Sun Fire V120 and manifested
itself as an exception. This was caused by int* pointers provided to memcpy()
that were not aligned on an int boundary. The pointer type provided to
memcpy() is used by the compiler for optimization purposes. Fix was to cast
the int* pointers to void* pointers.
Bernhard R. Link and David S. Miller provided valuable feedback, thanks gents.
Reviewed-by: Arend van Spriel <arend@broadcom.com> Reviewed-by: Pieter-Paul Giesberts <pieterpg@broadcom.com> Signed-off-by: Arend van Spriel <arend@broadcom.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Arend van Spriel [Tue, 23 Aug 2011 12:13:57 +0000 (14:13 +0200)]
staging: brcm80211: fix rtnl_lock issue when bringing down brcmfmac
When bringing down the netdevice interface a deadlock occurred
sporadically due to the rtnl_lock being held by a task that was
waiting for another task trying to get the lock. This patch fixes
that issue.
Reviewed-by: Franky (Zhenhui) Lin <frankyl@broadcom.com> Reviewed-by: Roland Vossen <rvossen@broadcom.com> Signed-off-by: Arend van Spriel <arend@broadcom.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Arend van Spriel [Tue, 23 Aug 2011 12:13:55 +0000 (14:13 +0200)]
staging: brcm80211: make use of cordic library function
The cordic function which calculates cosine and sine values for given
angle is now provided in library module. The phy code now uses this
module function.
Reviewed-by: Henry Ptasinski <henryp@broadcom.com> Reviewed-by: Roland Vossen <rvossen@broadcom.com> Reviewed-by: Pieter-Paul Giesberts <pieterpg@broadcom.com> Signed-off-by: Arend van Spriel <arend@broadcom.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Arend van Spriel [Tue, 23 Aug 2011 12:13:54 +0000 (14:13 +0200)]
staging: brcm80211: make use of crc8 library function
The crc8 function is now available as a library function provided
by kernel module crc8.ko. The function has been removed from brcmutil
module and srom.c now uses crc8 library function.
Reviewed-by: Henry Ptasinski <henryp@broadcom.com> Reviewed-by: Roland Vossen <rvossen@broadcom.com> Reviewed-by: Pieter-Paul Giesberts <pieterpg@broadcom.com> Signed-off-by: Arend van Spriel <arend@broadcom.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Roland Vossen [Mon, 15 Aug 2011 13:34:27 +0000 (15:34 +0200)]
staging: brcm80211: removed unused MIPS specific SDRAM swap window
Certain Mips based, big endian Broadcom products contain a memory window
for endianness swap purposes. However, this is too system specific for
this driver as there are more big endian platforms to support. Thus, this
'window' functionality is not to be used and can be removed.
The swap window would be a performance improvement and could be provided
with a dedicated mapping function in the platform specific code.
Tested on BCM63281.
Reviewed-by: Henry Ptasinski <henryp@broadcom.com> Reviewed-by: Arend van Spriel <arend@broadcom.com> Tested-by: Jonas Gorski <jonas.gorski@gmail.com> Signed-off-by: Arend van Spriel <arend@broadcom.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Arend van Spriel [Mon, 15 Aug 2011 13:34:26 +0000 (15:34 +0200)]
staging: brcm80211: restrict MIPS dma bug workaround to BCM47XX
The inline function dma_spin_for_len() was defined for MIPS platforms
but the problem only occurs with dma of the PCI core in bcm47xx chips.
This patch restricts the function further to BCM47XX platforms only.
Tested on BCM63281.
Reviewed-by: Pieter-Paul Giesberts <pieterpg@broadcom.com> Reviewed-by: Henry Ptasinski <henryp@broadcom.com> Reviewed-by: Roland Vossen <rvossen@broadcom.com> Tested-by: Jonas Gorski <jonas.gorski@gmail.com> Signed-off-by: Arend van Spriel <arend@broadcom.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Arend van Spriel [Mon, 15 Aug 2011 13:34:25 +0000 (15:34 +0200)]
staging: brcm80211: restrict register access method for bcm47xx
The driver contained conditional code for resolving issue with
dma transaction reordering. This code was conditionalized using
__mips__ macro, but it actually is specific to bcm47xx chips.
This patch replaces it for the more speficic CONFIG_BCM47XX macro.
Tested on BCM63281.
Reviewed-by: Henry Ptasinski <henryp@broadcom.com> Reviewed-by: Roland Vossen <rvossen@broadcom.com> Tested-by: Jonas Gorski <jonas.gorski@gmail.com> Signed-off-by: Arend van Spriel <arend@broadcom.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Arend van Spriel [Mon, 15 Aug 2011 13:34:20 +0000 (15:34 +0200)]
staging: brcm80211: replace BUS_SWAP32 macro with cpu_to_le32()
The macro BUS_SWAP32(a) expanded to (a) which was fine for a little
endian system. For big endian platform this should do as the name
implies. As the driver is intended for PCI which is little-endian
the macro cpu_to_le32() can be used instead.
Reviewed-by: Pieter-Paul Giesberts <pieterpg@broadcom.com> Reviewed-by: Henry Ptasinski <henryp@broadcom.com> Reviewed-by: Roland Vossen <rvossen@broadcom.com> Signed-off-by: Arend van Spriel <arend@broadcom.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Arend van Spriel [Mon, 15 Aug 2011 13:34:19 +0000 (15:34 +0200)]
staging: brcm80211: remove PHYSADDR macro from dma.c
Four macros with PHYSADDR name prefix are not doing a lot and
complicate code readability. These have been expanded in the source
code and consequently removed the definitions.
Reviewed-by: Pieter-Paul Giesberts <pieterpg@broadcom.com> Reviewed-by: Henry Ptasinski <henryp@broadcom.com> Reviewed-by: Roland Vossen <rvossen@broadcom.com> Signed-off-by: Arend van Spriel <arend@broadcom.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Arend van Spriel [Mon, 15 Aug 2011 13:34:18 +0000 (15:34 +0200)]
staging: brcm80211: remove W_SM and R_SM macros from dma.c
The macros W_SM and R_SM are not doing much conversion of the macro
parameters and complicate code readability without good cause. It
is more clear to remove usage of the macros expanding it in the source
code.
Reviewed-by: Pieter-Paul Giesberts <pieterpg@broadcom.com> Reviewed-by: Henry Ptasinski <henryp@broadcom.com> Reviewed-by: Roland Vossen <rvossen@broadcom.com> Signed-off-by: Arend van Spriel <arend@broadcom.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>