summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* staging: "wlags49_h25" Fix typos.Justin P. Mattock2012-09-172-5/+5
| | | | | Signed-off-by: Justin P. Mattock <justinmattock@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* staging: csr: wait for the exec in usermodehelperLauri Hintsala2012-09-171-1/+1
| | | | | | | | | The order of wait values has been changed by commit 9d944ef32e. Fix the wait parameter and start to use a define instead of "magic number". Signed-off-by: Lauri Hintsala <lauri.hintsala@bluegiga.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* staging: fix csr printk format warningRandy Dunlap2012-09-171-1/+1
| | | | | | | | | | | Fix printk format warning on i386/X86_32 by using 't' for ptrdiff_t. Also builds cleanly on x86_64. drivers/staging/csr/csr_wifi_hip_udi.c: In function 'unifi_print_status': drivers/staging/csr/csr_wifi_hip_udi.c:151:27: warning: format '%ld' expects type 'long int', but argument 5 has type 'int' Signed-off-by: Randy Dunlap <rdunlap@xenotime.net> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* Merge tag 'iio-for-v3.7d' of ↵Greg Kroah-Hartman2012-09-1720-273/+1233
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | git://git.kernel.org/pub/scm/linux/kernel/git/jic23/iio into staging-next IIO new drivers, features and rework for the 3.7 cycle, 4th set. Here we have 1) a set cleaning up and moving the ad7476 driver out of staging. Support for a number of additional parts is also added to that driver. 2) cleanups from various people for the in kernel interface code as that is getting more an more real use and hence people are picking up on minor issues that made it through review. Also a related useful set of utility functions to avoid duplicate code for converting IIO representations to other forms. 3) a new fractional type for our read_raw / write_raw functions. This allows avoiding loss of accuracy via the in kernel interfaces in some cases as well as being rather convenient for a lot of range -> scale conversions. 4) New AD5755 DAC driver. 5) Some Blackfin timer trigger improvements including hardware pulse control for device triggering. 6) Support for the ad7091r in the ad7476 driver.
| * iio: ad7476: Add support for the ad7091rLars-Peter Clausen2012-09-171-4/+26
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Add support for the ad7091r 12 bit ADC to the ad7476 driver. Although the ad7091r is not really related to any of the other devices supported by this driver, luckily for us there are not so many ways (which are not totally insane) how sampling a single channel ADC via SPI can be implemented and support for the ad7091r can be added to the driver with just a few adjustments. The ad7091r requires an external "conversion start" pulse to start a sample conversion. After the conversion has finished the result can be read via SPI. We depend on a IIO trigger to generate this signal, as a result only sampling in buffered mode and not in manual mode is available. Signed-off-by: Lars-Peter Clausen <lars@metafoo.de> Signed-off-by: Jonathan Cameron <jic23@kernel.org>
| * staging:iio:trigger:bfintmr Add output supportLars-Peter Clausen2012-09-172-16/+80
| | | | | | | | | | | | | | | | Some converters require an external signal to start the conversion. This patch adds support to the bfintmr trigger driver to generate such a signal. Signed-off-by: Lars-Peter Clausen <lars@metafoo.de> Signed-off-by: Jonathan Cameron <jic23@kernel.org>
| * staging:iio:trigger:bfintmr: Only enable timer when necessaryLars-Peter Clausen2012-09-171-3/+24
| | | | | | | | | | | | | | | | | | | | This patch hooks up the set_trigger_state callback for the blackfin timer trigger driver and only enables the timer when a trigger consumer requests it to be enabled. There really is no reason to keep the timer running and generate interrupts if nobody is listening to them. Signed-off-by: Lars-Peter Clausen <lars@metafoo.de> Signed-off-by: Jonathan Cameron <jic23@kernel.org>
| * staging:iio:trigger:bfintmr: Avoid divide by zeroLars-Peter Clausen2012-09-171-2/+8
| | | | | | | | | | | | | | | | If the timer frequency has not been configured yet get_gptimer_period() will return 0. Handle this case instead of blindly dividing by the returned value. Signed-off-by: Lars-Peter Clausen <lars@metafoo.de> Signed-off-by: Jonathan Cameron <jic23@kernel.org>
| * staging:iio:hwmon bridge: Use iio_read_channel_processedLars-Peter Clausen2012-09-171-28/+5
| | | | | | | | | | | | | | | | | | Use the iio_read_channel_processed function to read the sample value in the proper unit instead of using iio_read_channel_raw and iio_read_channel_scale and doing the unit conversion manually. Signed-off-by: Lars-Peter Clausen <lars@metafoo.de> Signed-off-by: Jonathan Cameron <jic23@kernel.org>
| * iio:inkern: Add function to read the processed valueLars-Peter Clausen2012-09-173-9/+164
| | | | | | | | | | | | | | | | | | | | | | | | | | Add a function to read a processed value from a channel. The function will first attempt to read the IIO_CHAN_INFO_PROCESSED attribute. If that fails it will read the IIO_CHAN_INFO_RAW attribute and convert the result from a raw value to a processed value. The patch also introduces a function to convert raw value to a processed value and exports it, in case a user needs or wants to do the conversion by itself. Signed-off-by: Lars-Peter Clausen <lars@metafoo.de> Signed-off-by: Jonathan Cameron <jic23@kernel.org>
| * iio: consumer.h: Fix kernel doc incosistencyLars-Peter Clausen2012-09-171-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | For the iio_read_channel_raw and iio_read_channel_scale the kerneldoc comment refers to an argument called "channel", while the argument is called "chan" in the function signature. This leads to the following warnings from kerneldoc: Warning(include/linux/iio/consumer.h:71): No description found for parameter 'chan' Warning(include/linux/iio/consumer.h:71): Excess function parameter 'channel' description in 'iio_read_channel_raw' Warning(include/linux/iio/consumer.h:109): No description found for parameter 'chan' Warning(include/linux/iio/consumer.h:109): Excess function parameter 'channel' description in 'iio_read_channel_scale' This patch fixes the warnings by naming them consistently. Signed-off-by: Lars-Peter Clausen <lars@metafoo.de> Signed-off-by: Jonathan Cameron <jic23@kernel.org>
| * iio:dac: Add ad5755 driverLars-Peter Clausen2012-09-174-0/+765
| | | | | | | | | | | | | | | | | | | | | | | | | | | | This patch adds support for the AD5755, AD5755-1, AD5757, AD5735, AD5737 16 and 14 bit quad-channel DACs. The AD5757/AD5737 only have current outputs, but for the AD5755/AD5757 each of the outputs can be configured to either be a voltage or a current output. We only allow to configure this at device probe time since usually this needs to match the external circuitry and should not be changed on the fly. A few trivial formatting changes on merge. Signed-off-by: Lars-Peter Clausen <lars@metafoo.de> Signed-off-by: Jonathan Cameron <jic23@kernel.org>
| * iio: inkern: add error case in iio_channel_get()Kim, Milo2012-09-171-1/+10
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The datasheet name is defined in the IIO driver. On the other hand, the adc_channel_label is configured in the platform side. If the datasheet name is not matched with any adc_channel_label, the iio_channel_get() should be returned as error for preventing invalid channel data access. This can be handled either way. (a) checking null data when using it : in the xxx_read_raw() or (b) error returns when the channel is requested : this patch The IIO consumer can't use the channel with invalid channel spec. Therefore case (b) is more reasonable. Signed-off-by: Milo(Woogyom) Kim <milo.kim@ti.com> Signed-off-by: Jonathan Cameron <jic23@kernel.org>
| * iio: inkern: allocate zeroed memoryKim, Milo2012-09-151-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Use kzalloc() rather than kmalloc() for initializing the iio_channel structure. This patch enables the iio_dev and iio_chan_spec are set to NULL. This may prevent the page fault problem because the pointer of iio_chan_spec is initialized as NULL. The iio_chan_spec is updated only in case that the IIO map has specific channel label. When the map has no ADC channel label, then the value of iio_chan_spec remains as invalid pointer. To prevent this problem, the pointer should be initialized as NULL. Signed-off-by: Milo(Woogyom) Kim <milo.kim@ti.com> Signed-off-by: Jonathan Cameron <jic23@kernel.org>
| * iio: Introduce a new fractional value typeLars-Peter Clausen2012-09-152-0/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Currently IIO uses a decimal fixed point representations for real type numbers. This patch introduces a new representation for rational type numbers. The number will be expressed by specifying a numerator and denominator. For converting a raw value to a processed value multiply it by the numerator and divide it by the denominator. The reasoning for introducing this new type is that for a lot of devices the scale can be represented easily by a fractional number, but it is not possible to represent it as fixed point number without rounding. E.g. for a simple DAC the scale is often the reference voltage divided by the number of possible values (Usually 2**n_bits - 1). Each driver currently implements the conversion of this fraction to a fixed point number on its own. Also when it comes to the in-kernel interface this allows to directly use the fractional factors to convert a raw value to a processed value. This should on one hand require less instructions and on the other hand increase the precision. Signed-off-by: Lars-Peter Clausen <lars@metafoo.de> Signed-off-by: Jonathan Cameron <jic23@kernel.org>
| * iio: Documentation change for inkern interface.anish kumar2012-09-151-3/+3
| | | | | | | | | | | | | | | | | | | | This commit- 314be14bb renamed the _st_ functions to loose the bit that was meant for staging version but forgot to change the documentation which still have _st_ sprinkled in some of the places. Signed-off-by: anish kumar <anish198519851985@gmail.com> Signed-off-by: Jonathan Cameron <jic23@kernel.org>
| * iio:ad7476: Add support for ad7273/ad7274/ad7276/ad7277/ad7278Lars-Peter Clausen2012-09-152-3/+23
| | | | | | | | | | | | | | | | | | | | The ad7276/ad7277/ad7278 are similar to the ad7476/ad7477/ad7478 but have the same number of leading zeros as the ad7940. The ad7273/ad7274 have a extra pin for VREF where as for the ad7276/ad7277/ad7278 VREF is taken from VDD, but otherwise they are compatible to the ad7276/ad7277. Signed-off-by: Lars-Peter Clausen <lars@metafoo.de> Signed-off-by: Jonathan Cameron <jic23@kernel.org>
| * iio:ad7476: Add ad7940 supportLars-Peter Clausen2012-09-152-6/+16
| | | | | | | | | | | | | | | | The AD7940 is a single channel 14 bit ADC similar to the ADCs already supported by the ad7476 driver, but it does have a different shift factor. Signed-off-by: Lars-Peter Clausen <lars@metafoo.de> Signed-off-by: Jonathan Cameron <jic23@kernel.org>
| * iio:ad7476: Add ad7910/ad7920 device table entriesLars-Peter Clausen2012-09-152-5/+8
| | | | | | | | | | | | | | The ad7910/ad7920 are software compatible to the ad7467/ad7466. Signed-off-by: Lars-Peter Clausen <lars@metafoo.de> Signed-off-by: Jonathan Cameron <jic23@kernel.org>
| * iio: Move ad7476 driver out of stagingLars-Peter Clausen2012-09-155-16/+15
| | | | | | | | | | | | | | | | | | The ad7476 driver is a driver for simple single channel ADCs. The driver does not export any experimental or custom ABI files nor do the static code check tools report any issues, so move the driver out of staging. Signed-off-by: Lars-Peter Clausen <lars@metafoo.de> Signed-off-by: Jonathan Cameron <jic23@kernel.org>
| * staging:iio:ad7476: Use be16_to_cpup instead of open-coding itLars-Peter Clausen2012-09-151-1/+1
| | | | | | | | | | Signed-off-by: Lars-Peter Clausen <lars@metafoo.de> Signed-off-by: Jonathan Cameron <jic23@kernel.org>
| * staging:iio:ad7476: Squash driver into a single file.Lars-Peter Clausen2012-09-154-118/+59
| | | | | | | | | | | | | | | | | | | | | | After the recent cleanups the buffer support is just a single 23 line function. This does not really justify a file on its own, so move it to the main driver file. And with only one source file left the header file containing the device state struct becomes superflousious so move the content of the header file to the main driver source file as well. Signed-off-by: Lars-Peter Clausen <lars@metafoo.de> Signed-off-by: Jonathan Cameron <jic23@kernel.org>
| * staging:iio:ad7476: Rework reference voltage handlingLars-Peter Clausen2012-09-152-42/+28
| | | | | | | | | | | | | | | | | | | | | | | | | | Slightly rework the reference voltage handling for the ad7476 driver. Now the only way to specify a external reference voltage is to use the regulator API, previously it was possible to use either platform_data or the regulator API. The new way is more consistent with what other drivers do. Also do not ignore errors when requesting the regulator, since this will cope very poorly with e.g. deferred probing. Signed-off-by: Lars-Peter Clausen <lars@metafoo.de> Signed-off-by: Jonathan Cameron <jic23@kernel.org>
| * staging:iio:ad7476: Avoid alloc/free for each sample in buffered modeLars-Peter Clausen2012-09-132-12/+7
| | | | | | | | | | | | | | | | | | | | The ad7476 driver has only support for 1 channel ADCs. So the upper limit for the buffer size is the size of one sample plus the size of the timestamp. Preallocate a buffer large enough to hold this to avoid having to allocate and free a new buffer for each sample being captured. Signed-off-by: Lars-Peter Clausen <lars@metafoo.de> Signed-off-by: Jonathan Cameron <jic23@kernel.org>
| * staging:iio:ad7476: Remove duplicated chip info entriesLars-Peter Clausen2012-09-132-27/+7
| | | | | | | | | | | | | | | | | | Some of the parts supported by this driver are software compatible. The difference between them is only in the operating voltage range. So we do not need extra chip info entries for them. Signed-off-by: Lars-Peter Clausen <lars@metafoo.de> Signed-off-by: Jonathan Cameron <jic23@kernel.org>
| * staging:iio:ad7476: Fix off by one error for channel shiftLars-Peter Clausen2012-09-121-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | The datasheet is a bit confusing about this. It says that a dataword has 4 leading zeros, but the first zero is already put on the bus when CS is pulled low and the second zero is put on the bus on the first leading edge of SCLK, so when the first bit is sampled on the first trailing edge it will sample what the datasheet refers to as the second leading zero. Subsequently we only see 3 leading zeros in the 16 bit dataword and the result we get is shifted to the left by one bit. Fix this by adjusting the channel shift by 1. Signed-off-by: Lars-Peter Clausen <lars@metafoo.de> Signed-off-by: Jonathan Cameron <jic23@kernel.org>
* | staging/gdm72xx: usb_boot: replace firmware upgrade API in em_downloadMacpaul Lin2012-09-171-40/+37
| | | | | | | | | | | | | | | | | | | | | | | | Replace firmware upgrade API in em_download_image(). Signed-off-by: Macpaul Lin <macpaul@gmail.com> Cc: Paul Stewart <pstew@chromium.org> Cc: Ben Chan <benchan@chromium.org> Cc: Sage Ahn <syahn@gctsemi.com> Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org> Cc: Dan Carpenter <dan.carpenter@oracle.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* | staging/rts_pstor: Use pr_ or dev_ printks in rtsx.cToshiaki Yamane2012-09-171-49/+57
| | | | | | | | | | | | | | | | | | | | | | | | fixed some checkpatch warnings. -WARNING: Prefer pr_info(... to printk(KERN_INFO, ... -WARNING: Prefer pr_err(... to printk(KERN_ERR, ... -WARNING: quoted string split across lines And added pr_fmt. Signed-off-by: Toshiaki Yamane <yamanetoshi@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* | Staging: silicom: checkpatch.pl cleanup: pretty pointersDaniel Cotey2012-09-171-35/+35
| | | | | | | | | | | | | | last of the unstylistic pointers cleaned up Signed-off-by: Daniel Cotey <puff65537@bansheeslibrary.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* | Staging: silicom: checkpatch.pl cleanup: pretty pointersDaniel Cotey2012-09-171-41/+41
| | | | | | | | | | | | | | pointer style cleanup Signed-off-by: Daniel Cotey <puff65537@bansheeslibrary.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* | Staging: silicom: checkpatch.pl cleanup: pretty pointersDaniel Cotey2012-09-171-33/+33
| | | | | | | | | | | | | | more checkpatch cleanups of pointers. Signed-off-by: Daniel Cotey <puff65537@bansheeslibrary.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* | Staging: silicom: checkpatch.pl cleanup: pretty pointersDaniel Cotey2012-09-171-33/+33
| | | | | | | | | | | | | | More pointer style cleanup Signed-off-by: Daniel Cotey <puff65537@bansheeslibrary.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* | Staging: silicom: checkpatch.pl cleanup: pretty pointersDaniel Cotey2012-09-171-32/+32
| | | | | | | | | | | | | | More notation fixes Signed-off-by: Daniel Cotey <puff65537@bansheeslibrary.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* | Staging: silicom: checkpatch.pl cleanup: pretty pointersDaniel Cotey2012-09-171-23/+23
| | | | | | | | | | | | | | first chunk, straighten up the pointer notation Signed-off-by: Daniel Cotey <puff65537@bansheeslibrary.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* | Staging: silicom: checkpatch cleanup: fix includesDaniel Cotey2012-09-171-4/+1
| | | | | | | | | | | | | | checkpatch fixups Signed-off-by: Daniel Cotey <puff65537@bansheeslibrary.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* | Staging: silicom: checkpatch cleanup: header file whitespaceDaniel Cotey2012-09-171-26/+26
| | | | | | | | | | | | | | Finish trailing spaces in libbp_sd.h Signed-off-by: Daniel Cotey <puff65537@bansheeslibrary.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* | Staging: silicom: checkpatch cleanup: header file whitespaceDaniel Cotey2012-09-171-71/+71
| | | | | | | | | | | | | | Whack all the line ending spaces so checkpatch.pl is happy. Signed-off-by: Daniel Cotey <puff65537@bansheeslibrary.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* | Staging: silicom: bypass.h: checkpatch whitespaceDaniel Cotey2012-09-171-27/+27
| | | | | | | | | | | | | | Remove trailing spaces, second chunk Signed-off-by: Daniel Cotey <puff65537@bansheeslibrary.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* | Staging: silicom: bypass.h: checkpatch whitespaceDaniel Cotey2012-09-171-2/+2
| | | | | | | | | | | | | | Remove trailing spaces, first chunk Signed-off-by: Daniel Cotey <puff65537@bansheeslibrary.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* | Staging: silicom: bp_mod.h: checkpatch tab and space cleanupDaniel Cotey2012-09-171-5/+5
| | | | | | | | | | | | | | twelfth chunk of bp_mod.h's cleanup Signed-off-by: Daniel Cotey <puff65537@bansheeslibrary.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* | Staging: silicom: bp_mod.h: checkpatch tab and space cleanupDaniel Cotey2012-09-171-22/+22
| | | | | | | | | | | | | | eleventh chunk of bp_mod.h's cleanup Signed-off-by: Daniel Cotey <puff65537@bansheeslibrary.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* | Staging: silicom: bp_mod.h: checkpatch tab and space cleanupDaniel Cotey2012-09-171-16/+16
| | | | | | | | | | | | | | tenth chunk of bp_mod.h's cleanup Signed-off-by: Daniel Cotey <puff65537@bansheeslibrary.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* | Staging: silicom: bp_mod.h: checkpatch tab and space cleanupDaniel Cotey2012-09-171-24/+24
| | | | | | | | | | | | | | ninth chunk of bp_mod.h's cleanup Signed-off-by: Daniel Cotey <puff65537@bansheeslibrary.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* | Staging: silicom: bp_mod.h: checkpatch tab and space cleanupDaniel Cotey2012-09-171-15/+15
| | | | | | | | | | | | | | eighth chunk of bp_mod.h's cleanup Signed-off-by: Daniel Cotey <puff65537@bansheeslibrary.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* | Staging: silicom: bp_mod.h: checkpatch tab and space cleanupDaniel Cotey2012-09-171-27/+27
| | | | | | | | | | | | | | seventh chunk of bp_mod.h's cleanup Signed-off-by: Daniel Cotey <puff65537@bansheeslibrary.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* | Staging: silicom: bp_mod.h: checkpatch tab and space cleanupDaniel Cotey2012-09-171-5/+5
| | | | | | | | | | | | | | sixth chunk of bp_mod.h's cleanup Signed-off-by: Daniel Cotey <puff65537@bansheeslibrary.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* | Staging: silicom: bp_mod.h: checkpatch tab and space cleanupDaniel Cotey2012-09-171-6/+6
| | | | | | | | | | | | | | fifth chunk of bp_mod.h's cleanup Signed-off-by: Daniel Cotey <puff65537@bansheeslibrary.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* | Staging: silicom: bp_mod.h: checkpatch tab and space cleanupDaniel Cotey2012-09-171-15/+15
| | | | | | | | | | | | | | fourth chunk of bp_mod.h's cleanup Signed-off-by: Daniel Cotey <puff65537@bansheeslibrary.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* | Staging: silicom: bp_mod.h: checkpatch tab and space cleanupDaniel Cotey2012-09-171-13/+13
| | | | | | | | | | | | | | third chunk of bp_mod.h's cleanup Signed-off-by: Daniel Cotey <puff65537@bansheeslibrary.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* | Staging: silicom: bp_mod.h: checkpatch tab and space cleanupDaniel Cotey2012-09-171-8/+8
| | | | | | | | | | | | | | second chunk of bp_mod.h's cleanup Signed-off-by: Daniel Cotey <puff65537@bansheeslibrary.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
OpenPOWER on IntegriCloud