Checking the channel number is useless since mxs_lradc_read_raw() is called from
a controlled environment and the driver is responsible for filing the struct
iio_chan_spec.
Signed-off-by: Alexandre Belloni <alexandre.belloni@free-electrons.com> Acked-by: Marek Vasut <marex@denx.de> Signed-off-by: Jonathan Cameron <jic23@kernel.org>
combined ambient light (two channels) and proximity sensor with I2C
interface; the ALS channels are visible+IR and IR
datasheet is here
http://optoelectronics.liteon.com/upload/download/DS86-2012-0006/P_100_LTR-501ALS-01_PrelimDS_ver1.1.pdf
v3:
* fix use of sizeof in _read_als()
v2: (thanks to Lars-Peter Clausen)
* cannot use devm_iio_device_register() due to cleanup order in _remove()
* mutex around data wait/read
* turn info message in _probe() into check for part number
* change copyright year to 2014
Signed-off-by: Peter Meerwald <pmeerw@pmeerw.net> Reviewed-by: Lars-Peter Clausen <lars@metafoo.de> Signed-off-by: Jonathan Cameron <jic23@kernel.org>
Boris BREZILLON [Tue, 17 Dec 2013 16:16:00 +0000 (16:16 +0000)]
iio: at91: document ADC clock properties
Document the clock properties required by the at91 ADC driver.
Signed-off-by: Boris Brezillon <b.brezillon@overkiz.com> Acked-by: Nicolas Ferre <nicolas.ferre@atmel.com> Signed-off-by: Jonathan Cameron <jic23@kernel.org>
Peter Meerwald [Sat, 1 Nov 2014 14:54:00 +0000 (14:54 +0000)]
iio:pressure:mpl3115: Fix sparse cast to restricted __be32 warning
>> >> drivers/iio/pressure/mpl3115.c:101:46: sparse: cast to restricted __be32
>> >> drivers/iio/pressure/mpl3115.c:115:46: sparse: cast to restricted __be32
Signed-off-by: Peter Meerwald <pmeerw@pmeerw.net> Reported-by: kbuild test robot <fengguang.wu@intel.com> Signed-off-by: Jonathan Cameron <jic23@kernel.org>
Paul Gortmaker [Mon, 1 Sep 2014 14:15:00 +0000 (15:15 +0100)]
iio: delete non-required instances of include <linux/init.h>
None of these files are actually using any __init type directives
and hence don't need to include <linux/init.h>. Most are just a
left over from __devinit and __cpuinit removal, or simply due to
code getting copied from one driver to the next.
Signed-off-by: Paul Gortmaker <paul.gortmaker@windriver.com> Signed-off-by: Jonathan Cameron <jic23@kernel.org>
Vivien Didelot [Wed, 1 Oct 2014 19:59:00 +0000 (20:59 +0100)]
iio:adc:max1363 clear list of missing features
Remove "Control of internal reference" from the list of unimplemented
features, since as of commit a405b00, external reference is supported if
the device has a regulator and falls back to internal if it doesn't.
While we are modifying the header, let's make it more concise and remove
a redundant filename.
Signed-off-by: Vivien Didelot <vivien.didelot@savoirfairelinux.com> Signed-off-by: Jonathan Cameron <jic23@kernel.org>
John Stultz [Fri, 10 Jan 2014 05:08:38 +0000 (21:08 -0800)]
ion: Add carveout and chunk heaps to dummy driver
Add support to the dummy driver for basic carveout and chunk heaps.
Since we're generating these heaps at module_init, and we want
this driver to be generic enough to be tested on any arch, we
don't have the ability to alloc bootmem, so both of these heaps
are conventionally allocated using alloc_pages(), which limits us
to 4M in size.
Should look into using CMA for heap allocation eventually, but
this provides enough to test the basic functionality of the
heaps.
Cc: Colin Cross <ccross@android.com> Cc: Greg KH <gregkh@linuxfoundation.org> Cc: Jesse Barker <jesse.barker@arm.com> Cc: Android Kernel Team <kernel-team@android.com> Signed-off-by: John Stultz <john.stultz@linaro.org> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Bernd Porr [Tue, 7 Jan 2014 21:43:43 +0000 (21:43 +0000)]
staging: comedi: usbduxsigma: removing unneccesay attached info
Comedi core now reports that a device has been attached so that
the driver itself won't need to do it any longer. The driver now
just outputs the offset of the ADC converter which is a soft indicator
of the health of the board and also the user can grep this value
from the kernel log easier for debugging purposes.
Bernd Porr [Tue, 7 Jan 2014 21:43:10 +0000 (21:43 +0000)]
staging: comedi: usbduxsigma: return failure of auto attach
The function usbduxsigma_getstatusinfo() returns a negative
value in case there has been a communication error with
the board. This should always work and if this communication
fails then there is something seriously wrong with the board.
This is now returned to the caller so that it can
terminte the auto attachement. The return command also prevents
printing out the offset value in case of a fault.
Bernd Porr [Tue, 7 Jan 2014 21:42:25 +0000 (21:42 +0000)]
staging: comedi: report success/failure of autoconfig
Added success message to the driver autoconfig and error
message in case it fails. A success message is required
so that the user can find out which comedi driver has been
associated with which udev device. This also makes troubleshooting
much easier when more than one card is in the computer or
there is a mix of USB and PCI devices.
As Ian suggested we should report both the driver and the board
which might have different names, especially if one driver covers a
range of different boards.
Ian Abbott [Tue, 7 Jan 2014 12:38:32 +0000 (12:38 +0000)]
staging: comedi: fix bug destroying subdevice files after parent
`comedi_free_board_dev()` is called (via `comedi_auto_unconfig()` -->
`comedi_release_hardware_device()`) when an auto-configured comedi
device is removed. This destroys the main sysfs class device and then
calls `comedi_device_cleanup()` to clean up the comedi device. For
comedi devices that have comedi subdevices that asynchronous commands,
the clean up involves destroying the sysfs class devices associated with
those subdevices.
There is a bug in the above sequence because the sysfs class devices
associated with the comedi subdevices are children of the sysfs class
device associated with the main comedi device. Therefore they will have
been automatically destroyed when the main sysfs class device is
destroyed. When they are destroyed again as part of the clean-up, they
will not be found, leading to a warning and a stack trace similar to
this:
Eli Billauer [Mon, 30 Dec 2013 21:16:25 +0000 (23:16 +0200)]
staging: xillybus: Open Firmware driver supporting coherent DMA
If the "dma-coherent" property is present in the device tree, the driver will
not perform cache invalidations. This feature significantly improves data
throughput and reduces CPU load.
Signed-off-by: Eli Billauer <eli.billauer@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Arnd Bergmann [Thu, 2 Jan 2014 12:07:33 +0000 (13:07 +0100)]
staging: serqt_usb2: don't use sleep_on
sleep_on and related functions are going away and should not be used
in this driver any more.
This removes the call to interruptible_sleep_on for a wait queue that
is never woken up, and replaces an interruptible_sleep_on_timeout
call with the equivalent wait_event_interruptible_timeout() to
avoid a small race.
Both call sites still look fishy and need more work.
Vincent Stehlé [Tue, 31 Dec 2013 10:55:08 +0000 (11:55 +0100)]
staging: dgap: fix missing header inclusion
Include slab.h to fix the following compilation error:
drivers/staging/dgap/dgap_fep5.c: In function ‘dgap_do_config_load’:
drivers/staging/dgap/dgap_fep5.c:78:2: error: implicit declaration of function ‘kzalloc’ [-Werror=implicit-function-declaration]
Signed-off-by: Vincent Stehlé <vincent.stehle@laposte.net> Cc: Lidza Louina <lidza.louina@gmail.com> Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org> Cc: Scott H Kilau <Scott_Kilau@digi.com> Cc: Eng.Linux@digi.com Cc: trivial@kernel.org Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Dan LaManna [Mon, 6 Jan 2014 05:38:51 +0000 (00:38 -0500)]
Staging: rtl8187se: fix styling issues in r8180_wx.c
This is a patch to the r8180_wx.c which fixes various whitespace issues,
brace issues, casting/declaration syntax issues, and increases
clarity in multi-line return statement.
Signed-off-by: Dan LaManna <dan.lamanna@gmail.com> Reviewed-by: Dan Carpenter <dan.carpenter@oracle.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Wei Yongjun [Tue, 24 Dec 2013 00:54:40 +0000 (08:54 +0800)]
Staging: silicom: fix sparse non static symbol warnings
Fixes the following sparse warnings:
drivers/staging/silicom/bypasslib/bypass.c:528:12: warning: symbol 'init_lib_module' was not declared. Should it be static?
drivers/staging/silicom/bypasslib/bypass.c:534:13: warning: symbol 'cleanup_lib_module' was not declared. Should it be static?
Josh Triplett [Mon, 23 Dec 2013 21:55:13 +0000 (13:55 -0800)]
staging: rtl8188eu: Drop print of build date/time
The kernel already has this information, and individual drivers
shouldn't duplicate that. This also eliminates the use of __DATE__ and
__TIME__, which make the build non-deterministic.
Josh Triplett [Mon, 23 Dec 2013 21:55:19 +0000 (13:55 -0800)]
staging: rts5139: Drop print of build time
The kernel already has this information, and individual drivers
shouldn't duplicate that. This also eliminates the use of __TIME__,
which makes the build non-deterministic. (And, without __DATE__,
__TIME__ provided little useful information to begin with.)
Josh Triplett [Mon, 23 Dec 2013 21:55:33 +0000 (13:55 -0800)]
staging: wlags49_h2: Drop debug macro recording build date/time
The kernel already has this information, and individual drivers
shouldn't duplicate that. This also eliminates the use of __DATE__ and
__TIME__, which make the build non-deterministic.
Valentina Manea [Tue, 7 Jan 2014 19:05:56 +0000 (21:05 +0200)]
staging: usbip: userspace: add support for viewing imported devices
As of Matt Mooney's major refactoring in 2011, usbip port
option was left out. Add support for this option in
a manner similar to the old implementation.
Sample output:
Imported USB devices
====================
Port 00: <Port in Use> at Full Speed(12Mbps)
unknown vendor : unknown product (1687:6211)
2-1 -> usbip://192.168.122.152:3240/1-1
-> remote bus/dev 001/002
Larry Finger [Sun, 22 Dec 2013 23:37:01 +0000 (17:37 -0600)]
staging: r8188eu: Fix sparse warnings in core/rtw_br_ext.c
Sparse lists the following:
CHECK drivers/staging/rtl8188eu/core/rtw_br_ext.c
drivers/staging/rtl8188eu/core/rtw_br_ext.c:700:101: warning: incorrect type in argument 2 (different base types)
drivers/staging/rtl8188eu/core/rtw_br_ext.c:700:101: expected unsigned int *ipxNetAddr
drivers/staging/rtl8188eu/core/rtw_br_ext.c:700:101: got restricted __be32 *<noident>
drivers/staging/rtl8188eu/core/rtw_br_ext.c:700:123: warning: incorrect type in argument 3 (different base types)
drivers/staging/rtl8188eu/core/rtw_br_ext.c:700:123: expected unsigned short *ipxSocketAddr
drivers/staging/rtl8188eu/core/rtw_br_ext.c:700:123: got restricted __be16 *<noident>
drivers/staging/rtl8188eu/core/rtw_br_ext.c:705:99: warning: incorrect type in argument 2 (different base types)
drivers/staging/rtl8188eu/core/rtw_br_ext.c:705:99: expected unsigned int *ipxNetAddr
drivers/staging/rtl8188eu/core/rtw_br_ext.c:705:99: got restricted __be32 *<noident>
drivers/staging/rtl8188eu/core/rtw_br_ext.c:714:101: warning: incorrect type in argument 2 (different base types)
drivers/staging/rtl8188eu/core/rtw_br_ext.c:714:101: expected unsigned int *ipxNetAddr
drivers/staging/rtl8188eu/core/rtw_br_ext.c:714:101: got restricted __be32 *<noident>
drivers/staging/rtl8188eu/core/rtw_br_ext.c:714:121: warning: incorrect type in argument 3 (different base types)
drivers/staging/rtl8188eu/core/rtw_br_ext.c:714:121: expected unsigned short *ipxSocketAddr
drivers/staging/rtl8188eu/core/rtw_br_ext.c:714:121: got restricted __be16 *<noident>
drivers/staging/rtl8188eu/core/rtw_br_ext.c:721:99: warning: incorrect type in argument 2 (different base types)
drivers/staging/rtl8188eu/core/rtw_br_ext.c:721:99: expected unsigned int *ipxNetAddr
drivers/staging/rtl8188eu/core/rtw_br_ext.c:721:99: got restricted __be32 *<noident>
drivers/staging/rtl8188eu/core/rtw_br_ext.c:749:83: warning: incorrect type in argument 2 (different base types)
drivers/staging/rtl8188eu/core/rtw_br_ext.c:749:83: expected unsigned short *network
drivers/staging/rtl8188eu/core/rtw_br_ext.c:749:83: got restricted __be16 *<noident>
drivers/staging/rtl8188eu/core/rtw_br_ext.c:762:83: warning: incorrect type in argument 2 (different base types)
drivers/staging/rtl8188eu/core/rtw_br_ext.c:762:83: expected unsigned short *network
drivers/staging/rtl8188eu/core/rtw_br_ext.c:762:83: got restricted __be16 *<noident>
drivers/staging/rtl8188eu/core/rtw_br_ext.c:783:83: warning: incorrect type in argument 2 (different base types)
drivers/staging/rtl8188eu/core/rtw_br_ext.c:783:83: expected unsigned short *network
drivers/staging/rtl8188eu/core/rtw_br_ext.c:783:83: got restricted __be16 *<noident>
drivers/staging/rtl8188eu/core/rtw_br_ext.c:795:83: warning: incorrect type in argument 2 (different base types)
drivers/staging/rtl8188eu/core/rtw_br_ext.c:795:83: expected unsigned short *network
drivers/staging/rtl8188eu/core/rtw_br_ext.c:795:83: got restricted __be16 *<noident>
drivers/staging/rtl8188eu/core/rtw_br_ext.c:849:57: warning: incorrect type in assignment (different base types)
drivers/staging/rtl8188eu/core/rtw_br_ext.c:849:57: expected unsigned short [unsigned] [short] <noident>
drivers/staging/rtl8188eu/core/rtw_br_ext.c:849:57: got restricted __be16 [usertype] <noident>
drivers/staging/rtl8188eu/core/rtw_br_ext.c:92:23: warning: restricted __be16 degrades to integer
drivers/staging/rtl8188eu/core/rtw_br_ext.c:876:95: warning: incorrect type in argument 3 (different base types)
drivers/staging/rtl8188eu/core/rtw_br_ext.c:876:95: expected unsigned short *sid
drivers/staging/rtl8188eu/core/rtw_br_ext.c:876:95: got restricted __be16 *<noident>
drivers/staging/rtl8188eu/core/rtw_br_ext.c:912:45: warning: cast to restricted __be16
drivers/staging/rtl8188eu/core/rtw_br_ext.c:912:45: warning: cast to restricted __be16
drivers/staging/rtl8188eu/core/rtw_br_ext.c:912:45: warning: cast to restricted __be16
drivers/staging/rtl8188eu/core/rtw_br_ext.c:912:45: warning: cast to restricted __be16
drivers/staging/rtl8188eu/core/rtw_br_ext.c:944:112: warning: incorrect type in argument 3 (different base types)
drivers/staging/rtl8188eu/core/rtw_br_ext.c:944:112: expected unsigned short *sid
drivers/staging/rtl8188eu/core/rtw_br_ext.c:944:112: got restricted __be16 *<noident>
drivers/staging/rtl8188eu/core/rtw_br_ext.c:1019:84: warning: incorrect type in argument 3 (different base types)
drivers/staging/rtl8188eu/core/rtw_br_ext.c:1019:84: expected unsigned int [unsigned] [usertype] len
drivers/staging/rtl8188eu/core/rtw_br_ext.c:1019:84: got restricted __be16 [usertype] payload_len
drivers/staging/rtl8188eu/core/rtw_br_ext.c:1021:110: warning: incorrect type in argument 2 (different base types)
drivers/staging/rtl8188eu/core/rtw_br_ext.c:1021:110: expected int [signed] len
drivers/staging/rtl8188eu/core/rtw_br_ext.c:1021:110: got restricted __be16 [usertype] payload_len
drivers/staging/rtl8188eu/core/rtw_br_ext.c:1145:54: warning: cast to restricted __be32
drivers/staging/rtl8188eu/core/rtw_br_ext.c:1145:54: warning: cast to restricted __be32
drivers/staging/rtl8188eu/core/rtw_br_ext.c:1145:54: warning: cast to restricted __be32
drivers/staging/rtl8188eu/core/rtw_br_ext.c:1145:54: warning: cast to restricted __be32
drivers/staging/rtl8188eu/core/rtw_br_ext.c:1145:54: warning: cast to restricted __be32
drivers/staging/rtl8188eu/core/rtw_br_ext.c:1145:54: warning: cast to restricted __be32
drivers/staging/rtl8188eu/core/rtw_br_ext.c:1148:70: warning: restricted __be16 degrades to integer
drivers/staging/rtl8188eu/core/rtw_br_ext.c:1154:70: warning: invalid assignment: |=
drivers/staging/rtl8188eu/core/rtw_br_ext.c:1154:70: left side has type unsigned short
drivers/staging/rtl8188eu/core/rtw_br_ext.c:1154:70: right side has type restricted __be16
drivers/staging/rtl8188eu/core/rtw_br_ext.c:1157:64: warning: cast to restricted __be16
drivers/staging/rtl8188eu/core/rtw_br_ext.c:1157:64: warning: cast to restricted __be16
drivers/staging/rtl8188eu/core/rtw_br_ext.c:1157:64: warning: cast to restricted __be16
drivers/staging/rtl8188eu/core/rtw_br_ext.c:1157:64: warning: cast to restricted __be16
Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Larry Finger [Sun, 22 Dec 2013 23:36:59 +0000 (17:36 -0600)]
staging: r8188eu: Fix sparse warning in core/rtw_pwrctrl.c
Sparse reports the following:
CHECK drivers/staging/rtl8188eu/core/rtw_pwrctrl.c
drivers/staging/rtl8188eu/core/rtw_pwrctrl.c:525:6: warning: symbol 'rtw_free_pwrctrl_priv' was not declared. Should it be static?
That routine is not used and has been deleted.
Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Larry Finger [Sun, 22 Dec 2013 23:36:58 +0000 (17:36 -0600)]
staging: r8188eu: Fix sparse warning in core/rtw_sta_mgt.c
Sparse reports the following:
CHECK drivers/staging/rtl8188eu/core/rtw_sta_mgt.c
drivers/staging/rtl8188eu/core/rtw_sta_mgt.c:152:6: warning: symbol 'rtw_mfree_all_stainfo' was not declared. Should it be static?
Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Larry Finger [Sun, 22 Dec 2013 23:36:55 +0000 (17:36 -0600)]
staging: r8188eu: Additional cleanup of include/odm.h
This driver only works with the USB bus. Accordingly, enum odm_interface_def
can be removed along with all code that uses ODM_ITRF_XXX, where XXX is not USB.
In enum odm_ic_type, only ODM_RTL8188E is used. Remove the enum, all references
to the others, and define the needed value.
Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Larry Finger [Sun, 22 Dec 2013 23:36:54 +0000 (17:36 -0600)]
staging: r8188eu: Remove unneeded prototypes from include/odm.h
This header contains a number of routines that do not to be available
globally. Once this change was made, a number of the routines were not
used, and could be removed.
Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Larry Finger [Sun, 22 Dec 2013 23:36:53 +0000 (17:36 -0600)]
staging: r8188eu: Simplify code related to SupportICType
This member of struct odm_dm_struct is always set to ODM_RTL8188E for this
driver. Accordingly, the code can be simplified. A number of routines
now are no longer needed and are deleted.
Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
This member of struct odm_dm_struct is always set to ODM_CE in this driver.
As a result, a number of switch and if statements can be simplified. In
addition, a number of routines are no longer used and can be removed.
Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
beeceem: Replace C99 comments with C89 ones and remove unneeded comments in InterfaceRx.c
This patch replaces C99-style with C89-style comments.
Additionally, code fragments that have been commented out are removed;
the same applies to meaningless comments.
beeceem: Fix newline issues at opening braces of conditional statements in InterfaceRx.c
In InterfaceRx.c, opening braces of (if-)conditionals are mostly
dislocated, meaning they are found behind an extra line break after the
conditional statement. This patch moves the opening braces accordingly
as specified by the official conding style guidelines.
beeceem: Fix missing spaces around operators and unwanted spaces around semicolons in InterfaceRx.c
Checkpatch reports missing spaces around operators; this patch
introduces spaces where needed.
Spaces before semicolons are prohibited by the official coding style
guidelines, those have been fixed as well.