summaryrefslogtreecommitdiff
AgeCommit message (Collapse)Author
2015-03-29iio: mlx90614: Support devices with dual IR sensorVianney le Clément de Saint-Marcq
The model is detected by reading the EEPROM configuration during probing. Signed-off-by: Vianney le Clément de Saint-Marcq <vianney.leclement@essensium.com> Cc: Arnout Vandecappelle (Essensium/Mind) <arnout@mind.be> Signed-off-by: Jonathan Cameron <jic23@kernel.org>
2015-03-29iio: mlx90614: Add symbols for accessible registersVianney le Clément de Saint-Marcq
Add symbols for all accessible RAM and EEPROM registers, as well as the sleep command and timings defined in the datasheet. Signed-off-by: Vianney le Clément de Saint-Marcq <vianney.leclement@essensium.com> Cc: Arnout Vandecappelle (Essensium/Mind) <arnout@mind.be> Signed-off-by: Jonathan Cameron <jic23@kernel.org>
2015-03-29iio: bmc150_accel: add support for hardware fifoOctavian Purdila
We only advertise hardware fifo support if the I2C bus supports full I2C or smbus I2C block data reads since it is mandatory to read the full frame in one read (otherwise the rest of the frame is discarded). The hardware fifo is enabled only when triggers are not active because: (a) when using the any-motion trigger the user expects to see samples based on ROC events, but the fifo stores samples based on the sample frequency (b) the data-ready trigger is waking the CPU for for every sample, so using the hardware fifo does not have any benefit Signed-off-by: Octavian Purdila <octavian.purdila@intel.com> Reviewed-by: Lars-Peter Clausen <lars@metafoo.de> Signed-off-by: Jonathan Cameron <jic23@kernel.org>
2015-03-29iio: add support for hardware fifoOctavian Purdila
Some devices have hardware buffers that can store a number of samples for later consumption. Hardware usually provides interrupts to notify the processor when the FIFO is full or when it has reached a certain watermark level. This helps with reducing the number of interrupts to the host processor and thus it helps decreasing the power consumption. This patch enables usage of hardware FIFOs for IIO devices in conjunction with software device buffers. When the hardware FIFO is enabled the samples are stored in the hardware FIFO. The samples are later flushed to the device software buffer when the number of entries in the hardware FIFO reaches the hardware watermark or when a flush operation is triggered by the user when doing a non-blocking read on an empty software device buffer. In order to implement hardware FIFO support the device drivers must implement the following new operations: setting and getting the hardware FIFO watermark level, flushing the hardware FIFO to the software device buffer. The device must also expose information about the hardware FIFO such it's minimum and maximum watermark and if necessary a list of supported watermark values. Finally, the device driver must activate the hardware FIFO when the device buffer is enabled, if the current device settings allows it. The software device buffer watermark is passed by the IIO core to the device driver as a hint for the hardware FIFO watermark. The device driver can adjust this value to allow for hardware limitations (such as capping it to the maximum hardware watermark or adjust it to a value that is supported by the hardware). It can also disable the hardware watermark (and implicitly the hardware FIFO) it this value is below the minimum hardware watermark. Since a driver may support hardware FIFO only when not in triggered buffer mode (due to different semantics of hardware FIFO sampling and triggered sampling) this patch changes the IIO core code to allow falling back to non-triggered buffered mode if no trigger is enabled. Signed-off-by: Octavian Purdila <octavian.purdila@intel.com> Reviewed-by: Lars-Peter Clausen <lars@metafoo.de> Signed-off-by: Jonathan Cameron <jic23@kernel.org>
2015-03-29iio: add watermark logic to iio read and pollJosselin Costanzi
Currently the IIO buffer blocking read only wait until at least one data element is available. This patch makes the reader sleep until enough data is collected before returning to userspace. This should limit the read() calls count when trying to get data in batches. Co-author: Yannick Bedhomme <yannick.bedhomme@mobile-devices.fr> Signed-off-by: Josselin Costanzi <josselin.costanzi@mobile-devices.fr> [rebased and remove buffer timeout] Signed-off-by: Octavian Purdila <octavian.purdila@intel.com> Reviewed-by: Lars-Peter Clausen <lars@metafoo.de> Signed-off-by: Jonathan Cameron <jic23@kernel.org>
2015-03-28IIO: Add support for L3GD20H gyroscopeRobert Dolca
It can be used exactly like L3GD20 but it has a different WhoAmI register value. Signed-off-by: Robert Dolca <robert.dolca@intel.com> Reviewed-by: Linus Walleij <linus.walleij@linaro.org> Signed-off-by: Jonathan Cameron <jic23@kernel.org>
2015-03-28tools: iio: generic_buffer: Fix generic scale extractionIrina Tirdea
When using generic_buffer to read data, the scale is not properly detected for scale shared by type. This is caused by a problem with the generation of generic name out of the full name. E.g.: for current->name in_accel_z, the extracted generic name is "in" (when it should be "in_accel"). This is used in generic_buffer to generate scale and offset paths (in_accel_scale). Consider the in_ or out_ prefix when extracting the generic name from the full name. Signed-off-by: Irina Tirdea <irina.tirdea@intel.com> Reviewed-by: Daniel Baluta <daniel.baluta@intel.com> Signed-off-by: Jonathan Cameron <jic23@kernel.org>
2015-03-28iio: Add ABI documentation for in_rot offset valueHaneen Mohammed
This patch adds ABI documentation entries for in_rot_offset. At least one user for these is present that is the HID Sensors Driver. Signed-off-by: Haneen Mohammed <hamohammed.sa@gmail.com> Signed-off-by: Jonathan Cameron <jic23@kernel.org>
2015-03-28iio: max517: Add support for MAX520 and MAX521 chips.Antonio Fiol
MAX520 and MAX521 are protocol-compatible with the already supported chips, just have more channels. Signed-off-by: Antonio Fiol <antonio@fiol.es> Signed-off-by: Jonathan Cameron <jic23@kernel.org>
2015-03-28iio: constify of_device_id arrayFabian Frederick
of_device_id is always used as const. (See driver.of_match_table and open firmware functions) Signed-off-by: Fabian Frederick <fabf@skynet.be> Signed-off-by: Jonathan Cameron <jic23@kernel.org>
2015-03-28iio: Add ABI documentation for illuminance raw and scale values in lightDarshana Padmadas
This patchset adds ABI documentation for the following attributes: in_illuminance_scale, used atleast once in al3320a staging/iio/light/ in_illuminance_calibscale, used atleast once in cm32181 in_illuminance_input, used in cm3232 at least once in_illuminance_raw used atleast once in al3320a in_illuminance_clear_raw and in_illuminance_ir_raw exposed by gp2ap020a00f with modifiers IIO_MOD_LIGHT_CLEAR and IIO_MOD_LIGHT_IR respectively. Signed-off-by: Darshana Padmadas <darshanapadmadas@gmail.com> Signed-off-by: Jonathan Cameron <jic23@kernel.org>
2015-03-28iio: st-sensors: add support for lis3lv02d accelerometerLinus Walleij
This adds support for the LIS3LV02 accelerometer found in the ST Microelectronics Nomadik board series. Cc: devicetree@vger.kernel.org Cc: Denis CIOCCA <denis.ciocca@st.com> Acked-by: Lee Jones <lee.jones@linaro.org> Signed-off-by: Linus Walleij <linus.walleij@linaro.org> Signed-off-by: Jonathan Cameron <jic23@kernel.org>
2015-03-24staging: fbtft: Do not use binary constantsGeert Uytterhoeven
Gcc < 4.3 doesn't understand binary constants (0b*): drivers/staging/fbtft/fbtft-sysfs.c:156:19: error: invalid suffix "b111" on integer constant drivers/staging/fbtft/fb_hx8340bn.c:159:3: error: invalid suffix "b1111" on integer constant drivers/staging/fbtft/fb_hx8340bn.c:159:11: error: invalid suffix "b1111" on integer constant drivers/staging/fbtft/fb_hx8340bn.c:159:19: error: invalid suffix "b11111" on integer constant drivers/staging/fbtft/fb_hx8340bn.c:159:28: error: invalid suffix "b1111" on integer constant drivers/staging/fbtft/fb_hx8340bn.c:159:36: error: invalid suffix "b1111" on integer constant drivers/staging/fbtft/fb_hx8340bn.c:159:44: error: invalid suffix "b1111" on integer constant drivers/staging/fbtft/fb_hx8340bn.c:159:52: error: invalid suffix "b11111" on integer constant drivers/staging/fbtft/fb_hx8340bn.c:160:3: error: invalid suffix "b111" on integer constant ... Hence use hexadecimal constants (0x*) instead. Signed-off-by: Geert Uytterhoeven <geert@linux-m68k.org> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-03-24Merge tag 'iio-for-4.1a' of ↵Greg Kroah-Hartman
git://git.kernel.org/pub/scm/linux/kernel/git/jic23/iio into staging-next Jonathan writes: First set of new drivers, cleanups and functionality for IIO in the 4.1 cycle. New drivers * CM3323 color sensor. * MS5611 pressure and temperature sensor. New functionality * mup6050 - create mux clients for devices described via ACPI. The reasoning and approach taken in this patch are complex. Basically there is no otherway of finding out what is there than by some esoteric look ups in the ACPI data. * cm3232 - PM support * itg3200 - suspend/resume support * mcp320x - add more ADCs to the kconfig to reflect what the driver supports (this patch and the bindings got left behind when the support was added a while back). Docs / utils * ti-adc128s052 - DT bindings. * mcp3422 - DT bindings. * mcp320x - DT bindings * ABI docs for event threshold scale attributes, in_magn_offset, proximity scan_element and thresh falling/rising values for accelerometers. All elements long in use that have slipped by being explicitly documented. * Tidy up the tools previously in drivers/staging/iio/Documentation and move them out to /tools/iio. Yet another move that should have happened long ago. This time Roberta Dobrescu did the leg work. Thanks! Core Cleanups * Export userspace IIO headers. We should have done the appropriate header splitting a long time ago. Thanks to Daniel for sorting this out. * Refactor the registring of attributes for buffers to move all non-custom ones to a vector allowing easier additions to the current set in the future. Driver Cleanups * gpiod related cleanups. Make use of the additional parameter to specify initial direciton to avoid extra code. * bmc150 - Various refactorings to reduce code repitition and prepare for hardware buffer support. Some of these cleanups are good even without the new functionality. * kmx61 - direct use of index to an array avoiding a structure element which was always the index to an element in an array of that structure. * vf610 - avoid incorrect type for return from wait_for_completion_timeout. * gp2ap020a00f - use put_unaligned_le32 for slight code simplification. * ade7754 - improve error handling including suppressing some build warnings. * ade7759 - improve error handling including suppressing some build warnings. * hmc5843 - Long line and indentation fixes. Also some constifying of various constant data. * ade7854 - 80+ character line splitting. * ad2s1210 - fix wrong printf format string. * mxs-lradc - fix wrong printf format string. * ade7954-i2c - code alignment fixes and other trivial but worthwhile bits. * periodic rtc trigger - make the frequency type an unsigned int as it is always treated as such. * jsa1212 - constify struct regmap_config as it is constant. * ad7793 - typo in the MODULE_DESCRIPTION * mma9551 - check gpiod_to_irq errors. Note that this doesn't actually cause any trouble but is worth tidying up as obviously incorrect. * mlx90614 - refactor the register symbols to make it clear which reads are to RAM not PROM.
2015-03-24dgnc: Clean up dgnc_sysfs.hGiedrius Statkevičius
Remove redundant blank lines, move absolute include after relative include. Signed-off-by: Giedrius Statkevičius <giedrius.statkevicius@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-03-24dgnc: remove unused stuff from dgnc_cls.hGiedrius Statkevičius
Remove unused defines from dgnc_cls.h Signed-off-by: Giedrius Statkevičius <giedrius.statkevicius@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-03-24dgnc: remove old 2.4-2.6 compat kernel definesGiedrius Statkevičius
dgnc_kcompat.h contains some old legacy defines in case the kernel doesn't have __user defined but for current kernel versions these defines don't make sense and are useless so remove them. Move the TTY_FLIPBUF_SIZE define to digi.h because it's used in the code. Signed-off-by: Giedrius Statkevičius <giedrius.statkevicius@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-03-24dgnc: use linux/types.h instead of dgnc_types.hGiedrius Statkevičius
Dgnc_types.h unnecesarily defines TRUE as 1 and FALSE as 0 because we already have a widely used linux/types.h so convert all TRUE to true, FALSE to false and edit the dgnc_board struct to make sure it uses "bool". Signed-off-by: Giedrius Statkevičius <giedrius.statkevicius@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-03-24dgnc: get rid of dpacompat.h, move remaining stuff to digi.hGiedrius Statkevičius
Dpacompat.h contained a lot of unused #defines and only few things are used from it so since we've trimmed down digi.h, now we can delete dpacompat.h and move remaining stuff into digi.h. Signed-off-by: Giedrius Statkevičius <giedrius.statkevicius@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-03-24dgnc: clean up digi.hGiedrius Statkevičius
Remove a lot of unused structs and defines from digi.h. We still have to be careful with TIOCM_LE and TIOCMSET/TIOCMBIC because termios.h and ioctls.h respectfully redefine them. Signed-off-by: Giedrius Statkevičius <giedrius.statkevicius@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-03-24dgnc: remove unused dgnc_ioctl_name() commandGiedrius Statkevičius
dgnc_ioctl_name() is never used anywhere so remove it Signed-off-by: Giedrius Statkevičius <giedrius.statkevicius@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-03-24staging: dgnc: some off by one bugsDan Carpenter
"dgnc_NumBoards" is the number of filled out elements in the dgnc_Board[] array. "->nasync" and "->maxports" are the same value. They are the number of channels in the ->channels[] array so these tests should be ">=" instead of ">" so we avoid reading past the end of the arrays. I cleaned up the conditions in dgnc_mgmt_ioctl() a bit. There was a work around for the off by one bug in the case where there were no boards which is no longer needed. "channel" is unsigned so it can't be negative. Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-03-24stating: octeon-usb: cvmx_usb_initialize(): eliminate extra indentationAaro Koskinen
Eliminate extra indentation by putting all the code into the same block. Also delete a bogus comment. Signed-off-by: Aaro Koskinen <aaro.koskinen@iki.fi> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-03-24staging: octeon-usb: try to recover from failed hardware resetAaro Koskinen
On some hardware the USB fails to initialize to sane state after cold boot. We can detect this based on some unexpected interrupt bits, and recover by re-initializing. Signed-off-by: Aaro Koskinen <aaro.koskinen@iki.fi> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-03-24staging: octeon-usb: fail and warn if DMA counters are wrongAaro Koskinen
Fail and WARN if DMA counters are wrong. Signed-off-by: Aaro Koskinen <aaro.koskinen@iki.fi> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-03-24staging: octeon-usb: move cvmx_usb_shutdown()Aaro Koskinen
Move cvmx_usb_shutdown() to allow its use from some other functions. Signed-off-by: Aaro Koskinen <aaro.koskinen@iki.fi> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-03-24staging: octeon-usb: rewrite port resetAaro Koskinen
Don't disable port before resetting. Also perform reset unconditionally when requested. Signed-off-by: Aaro Koskinen <aaro.koskinen@iki.fi> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-03-24staging: octeon-usb: move fifo setup to controller reset from port resetAaro Koskinen
Move FIFO setup to controller reset from port reset. Signed-off-by: Aaro Koskinen <aaro.koskinen@iki.fi> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-03-24staging: octeon-usb: move fifo setup into a separate routineAaro Koskinen
Move FIFO setup into a separate routine. Signed-off-by: Aaro Koskinen <aaro.koskinen@iki.fi> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-03-24staging: octeon-usb: use USB stack to turn on powerAaro Koskinen
Use USB stack to turn on the power bit. It will also do the necessary delays. Signed-off-by: Aaro Koskinen <aaro.koskinen@iki.fi> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-03-24staging: octeon-usb: don't poll interrupts earlyAaro Koskinen
Don't poll interrupts before we have registered the HCD. Signed-off-by: Aaro Koskinen <aaro.koskinen@iki.fi> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-03-24staging: octeon-usb: refactor usbn block initAaro Koskinen
Move one-time state data structure initialization out of cvmx_usb_initialize(). This enables to re-initialize USBN HW block without messing up data structures. Signed-off-by: Aaro Koskinen <aaro.koskinen@iki.fi> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-03-24staging: octeon-usb: never retry after xacterrAaro Koskinen
Never retry after xacterr. The DMA engine cannot handle that properly and may result in wrong transfer count and hang. Signed-off-by: Aaro Koskinen <aaro.koskinen@iki.fi> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-03-24staging: octeon-usb: program DMA engine based on transfer directionAaro Koskinen
Program DMA engine based on transfer direction. We are only transferring to one direction at a time. Signed-off-by: Aaro Koskinen <aaro.koskinen@iki.fi> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-03-24staging: octeon-usb: use __BITFIELD_FIELDAaro Koskinen
Use __BITFIELD_FIELD to define bitfields. OCTEON can at least in theory run also in little-endian mode, so the bitfield definitions should not assume big-endian byte order. Signed-off-by: Aaro Koskinen <aaro.koskinen@iki.fi> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-03-24staging: octeon-usb: delete redundant field from octeon_temp_bufferAaro Koskinen
Since we are not moving/realigning the original pointer returned by kmalloc, we don't need to store the value in a separate field. Signed-off-by: Aaro Koskinen <aaro.koskinen@iki.fi> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-03-24staging: octeon-usb: remove useless prefix from pipe flagsAaro Koskinen
Remove useless prefix from pipe flags and adjust comments. Signed-off-by: Aaro Koskinen <aaro.koskinen@iki.fi> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-03-24staging: octeon-usb: remove useless prefix from internal routinesAaro Koskinen
Original CVMX code used "__" to distinguis internal USB functions from public ones. But in Linux all cvmx_usb routines are internal to this driver, so such separation is useless. Signed-off-by: Aaro Koskinen <aaro.koskinen@iki.fi> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-03-24staging: octeon-usb: eliminate 64-bit register access wrappersAaro Koskinen
Eliminate 64-bit register access wrappers. Since we don't implement register-level debugging outputs, these are useless. Signed-off-by: Aaro Koskinen <aaro.koskinen@iki.fi> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-03-24staging: octeon-usb: remove internal function parameter sanity checksAaro Koskinen
Remove some function parameter sanity checks from internal functions where we can rely them being called with sane parameters. Signed-off-by: Aaro Koskinen <aaro.koskinen@iki.fi> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-03-23Staging: rtl8192u: Remove function prototype from .c fileCristina Opriceana
Remove function prototype from r8192U_core.c since it is declared in the r8192U.h header and this is included in r8192U_core.c Signed-off-by: Cristina Opriceana <cristina.opriceana@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-03-23Staging: rtl8192u: Make function prototypes staticCristina Opriceana
Make functions static since they are used locally and no other files refer them. Signed-off-by: Cristina Opriceana <cristina.opriceana@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-03-23Staging: media: remove useless dev_info to avoid null ptr dereferenceHaneen Mohammed
Context is used in dev_info after it has been freed. This patch fix that issue by removing the dev_info itself, for msg doesn't look much necessary. Signed-off-by: Haneen Mohammed <hamohammed.sa@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-03-23Staging: rtl8723au: Remove unused function rtw_atimdone_event_callback23aSomya Anand
This patch fixes the following sparse warning: warning: symbol 'rtw_atimdone_event_callback23a' was not declared. Should it be static? rtw_atimdone_event_callback23a is local to the file rtw_mlme.c but it isn't exposed in a header file anywhere. Moreover it is never called from anywhere as well. So, this patch removes this function completely. Signed-off-by: Somya Anand <somyaanand214@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-03-23Staging: wlan-ng: Remove typedef prism2sta_accesslist_tVatika Harlalka
Remove typedef prism2sta_accesslist_t and replace its uses in the code. Signed-off-by: Vatika Harlalka <vatikaharlalka@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-03-23staging: rtl8723au: Do not byteswap timeout twiceJes Sorensen
Signed-off-by: Jes Sorensen <Jes.Sorensen@redhat.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-03-23staging: rtl8723au: update_txdesc(): bagg_pkt is always falseJes Sorensen
Signed-off-by: Jes Sorensen <Jes.Sorensen@redhat.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-03-23staging: rtl8723au: Fix trailing whitespaceJes Sorensen
Signed-off-by: Jes Sorensen <Jes.Sorensen@redhat.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-03-23staging: rtl8723au: Fix mis-placed breakJes Sorensen
In 7c3a8f2a5ec95e2b13704562f36321e20ddfc190 I made a mistake and moved a break below a bracket, causing a situation where the for loop would always exit when it shouldn't. This patch corrects that mistake. Signed-off-by: Jes Sorensen <Jes.Sorensen@redhat.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-03-23Staging: wlan-ng: Remove typedef prism2sta_authlist_tVatika Harlalka
Remove typdef prism2sta_authlist_t and replace its uses in the code. Signed-off-by: Vatika Harlalka <vatikaharlalka@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>