summaryrefslogtreecommitdiffstats
path: root/drivers
Commit message (Collapse)AuthorAgeFilesLines
* iio: proximity: as3935: remove triggered buffer processingMatt Ranostay2016-05-221-1/+0
| | | | | | | | | | Triggered buffers shouldn't return processed data, and the respective conversion was overflowing the defined .realbits for the channel. Cc: george.mccollister@gmail.com Signed-off-by: Matt Ranostay <mranostay@gmail.com> Cc: <Stable@vger.kernel.org> Signed-off-by: Jonathan Cameron <jic23@kernel.org>
* iio: proximity: as3935: correct IIO_CHAN_INFO_RAW outputMatt Ranostay2016-05-221-2/+8
| | | | | | | | | IIO_CHAN_INFO_RAW was returning processed data which was incorrect. This also adds the IIO_CHAN_INFO_SCALE value to convert to a processed value. Signed-off-by: Matt Ranostay <mranostay@gmail.com> Cc: <Stable@vger.kernel.org> Signed-off-by: Jonathan Cameron <jic23@kernel.org>
* max44000: Remove scale from proximityCrestez Dan Leonard2016-05-211-1/+0
| | | | | | | | | | | | This is not implemented and doesn't really make sense because IIO proximity is unit-less. Remove IIO_CHAN_INFO_SCALE from info_mask because so that the _scale sysfs entry won't appear. This fixes userspace tools like generic_buffer which abort when reads returns an error. Signed-off-by: Crestez Dan Leonard <leonard.crestez@intel.com> Signed-off-by: Jonathan Cameron <jic23@kernel.org>
* iio: humidity: am2315: Remove a stray unlockDan Carpenter2016-05-211-3/+1
| | | | | | | | | We haven't taken the lock yet so we don't need to unlock here. Fixes: 0d96d5ead3f7 ('iio: humidity: Add triggered buffer support for AM2315') Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com> Acked-by: Tiberiu Breana <tiberiu.a.breana@intel.com> Signed-off-by: Jonathan Cameron <jic23@kernel.org>
* iio: humidity: hdc100x: correct humidity integration time maskAlison Schofield2016-05-211-1/+1
| | | | | | | | | | | | | Apply the correct mask to enable all available humidity integration times. Currently, the driver defaults to 6500 and all is okay with that. However, if 3850 is selected we get a stuck bit and can't change back to 6500 or select 2500. (Verified with HDC1008) Signed-off-by: Alison Schofield <amsfield22@gmail.com> Cc: Daniel Baluta <daniel.baluta@gmail.com> Reviewed-by: Matt Ranostay <mranostay@gmail.com> Cc: <Stable@vger.kernel.org> Signed-off-by: Jonathan Cameron <jic23@kernel.org>
* iio: pressure: bmp280: fix error message for wrong chip idAkinobu Mita2016-05-141-2/+2
| | | | | | | | | | | | | | | | | | The bmp280 driver also supports BMP180 which has a different chip id with BMP280. The probe routine verifies that the device reports the correct chip id but the error message is confusing as if BMP280's chip id is always expected. Reported-by: Matt Ranostay <mranostay@gmail.com> Signed-off-by: Akinobu Mita <akinobu.mita@gmail.com> Cc: Matt Ranostay <mranostay@gmail.com> Cc: Vlad Dogaru <vlad.dogaru@intel.com> Cc: Christoph Mair <christoph.mair@gmail.com> Cc: Jonathan Cameron <jic23@kernel.org> Cc: Hartmut Knaack <knaack.h@gmx.de> Cc: Lars-Peter Clausen <lars@metafoo.de> Cc: Peter Meerwald <pmeerw@pmeerw.net> Signed-off-by: Jonathan Cameron <jic23@kernel.org>
* iio: light: bh1780: return after writeLinus Walleij2016-05-041-1/+1
| | | | | | | | | | | When writing a value using direct reg access from debugfs we need to return and not fall through to reading the value, lest we'll dereference a NULL pointer. Cc: Dan Carpenter <dan.carpenter@oracle.com> Reported-by: Dan Carpenter <dan.carpenter@oracle.com> Signed-off-by: Linus Walleij <linus.walleij@linaro.org> Signed-off-by: Jonathan Cameron <jic23@kernel.org>
* iio: dac: ad5592r: Off by one bug in ad5592r_alloc_channels()Dan Carpenter2016-05-041-1/+1
| | | | | | | The > here should be >= or we go beyond the end for the array. Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com> Signed-off-by: Jonathan Cameron <jic23@kernel.org>
* iio: bmi160: Fix ODR settingDaniel Baluta2016-05-041-2/+2
| | | | | | | | mask and val parameters of regmap_update_bits were reveresed. Fixes: 77c4ad2d6a9 ("iio: imu: Add initial support for Bosch BMI160") Signed-off-by: Daniel Baluta <daniel.baluta@intel.com> Signed-off-by: Jonathan Cameron <jic23@kernel.org>
* iio: bmi160: Fix output data rate for accelDaniel Baluta2016-05-041-6/+6
| | | | | | | | | | | Format is INT_PLUS_MICRO and micro odr part of ODR should be parts of a micro. Also s/8000/800 this is obviously a typo. Fixes: 77c4ad2d6a9 ("iio: imu: Add initial support for Bosch BMI160") Signed-off-by: Daniel Baluta <daniel.baluta@intel.com> Signed-off-by: Jonathan Cameron <jic23@kernel.org>
* staging: comedi: mite: tidy up module init/exitH Hartley Sweeten2016-05-031-2/+1
| | | | | | | | | Move the module_init()/module_exit() so they are in the prefered spot on the line after the function. Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com> Reviewed-by: Ian Abbott <abbotti@mev.co.uk> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* staging: comedi: mite: document the remaining exported functionsH Hartley Sweeten2016-05-032-4/+28
| | | | | | | | For aesthetics, add docbook comments for the exported functions. Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com> Reviewed-by: Ian Abbott <abbotti@mev.co.uk> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* staging: comedi: mite: move the mite dma arm/disarm/reset functionsH Hartley Sweeten2016-05-032-36/+45
| | | | | | | | | For aesthetics, move these functions to a more logical spot in the code and add docbook comments for the exported functions. Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com> Reviewed-by: Ian Abbott <abbotti@mev.co.uk> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* staging: comedi: mite: move mite_prep_dma()H Hartley Sweeten2016-05-032-86/+92
| | | | | | | | | For aesthetics, move this functions to a more logical spot in the code and add a docbook comment for the exported function. Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com> Reviewed-by: Ian Abbott <abbotti@mev.co.uk> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* staging: comedi: mite: tidy up mite dma channel request/releaseH Hartley Sweeten2016-05-032-67/+91
| | | | | | | | | | | | | | For aesthetics, make the actual "request" function static and change mite_request_channel_in_range() into a wrapper that calls the internal function. Change the inline function that requests any free channel into an export that also calls the internal function. Move the functions to a more logical spot in the code and add docbook comments for the exported functions. Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com> Reviewed-by: Ian Abbott <abbotti@mev.co.uk> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* staging: comedi: mite: move the mite ring functionsH Hartley Sweeten2016-05-032-132/+150
| | | | | | | | | | | | For aesthetics, move the functions that allocate/free and initialize the mite dma ring. They are currently kind of scattered around the code. Add docbook comments for the exported functions. Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com> Reviewed-by: Ian Abbott <abbotti@mev.co.uk> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* staging: comedi: mite: tidy up kernel messages in mite_steup()H Hartley Sweeten2016-05-031-29/+21
| | | | | | | | | | | | | | | The dev_err() messages with pci_ioremap_bar() fails are just noise. Remove them. The 'use_win1' and 'fifo_size' dev_info() messages are also noise but they may be useful when debugging. Change them to dev_dbg(). Absorb dump_chip_signnature() and change the pr_info() messages to dev_dbg(). These also might be useful when debugging. Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com> Reviewed-by: Ian Abbott <abbotti@mev.co.uk> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* staging: comedi: mite: do mite_steup() as part of mite_attach()H Hartley Sweeten2016-05-035-110/+101
| | | | | | | | | | | | | | | | | Currently all the drivers that use the mite driver have to call mite_setup() after allocating and initializing the mite device with mite_attach(). Move the mite_setup() call into mite_attach() to simplify the drivers a bit and remove the need for the additional inline and exported functions. For aesthetics, move mite_setup2(), and rename it to mite_setup(), so it's near mite_attach(). Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com> Reviewed-by: Ian Abbott <abbotti@mev.co.uk> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* staging: comedi: mite: document mite_alloc()/mite_detach()H Hartley Sweeten2016-05-035-37/+53
| | | | | | | | | | | | | | | | | These functions are basically the comedi_driver (*attach)/(*detach) for this driver. For aesthetics, rename mite_alloc() to mite_attach() and pass the comedi_device pointer to it instead of the pci_dev pointer. Move the functions to the end of the file. This is typically where a comedi_drivers (*attach)/(*detach) are located. Add some docbook comments for these exported functions. Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com> Reviewed-by: Ian Abbott <abbotti@mev.co.uk> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* staging: comedi: mite: use prefered form for passing a struct sizeH Hartley Sweeten2016-05-031-5/+6
| | | | | | | | | Add a local variable to mite_buf_change() so that the prefered form of passing a struct size, sizeof(*p), can be used. Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com> Reviewed-by: Ian Abbott <abbotti@mev.co.uk> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* staging: comedi: mite: introduce mite_free_dma_descs()H Hartley Sweeten2016-05-031-17/+16
| | | | | | | | | Introduce a helper function to handle the dma_free_coherent() of the mite dma descriptors. Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com> Reviewed-by: Ian Abbott <abbotti@mev.co.uk> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* staging: comedi: mite: remove mite member 'channel_allocated'H Hartley Sweeten2016-05-032-10/+8
| | | | | | | | | | | | | | An allocated mite_channel will have its 'ring' member initialized to point to the mite_ring that will be used for DMA. A non-allocated mite_channel will have a 'ring' member set to NULL, either by a channel release or due to the initial kzalloc of the 'mite' struct. Refactor the code to use the mite_chan->ring to detect in a channel is allocated and remove the unnecessary member. Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com> Reviewed-by: Ian Abbott <abbotti@mev.co.uk> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* staging: comedi: mite: rename mite member 'mite_io_addr'H Hartley Sweeten2016-05-033-53/+44
| | | | | | | | | | | Rename this member of struct mite to 'mmio' to help shorten the long lines. Add a local variable for the mite pointer in the ni_pcimio driver to clarify and shorten the long lines. Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com> Reviewed-by: Ian Abbott <abbotti@mev.co.uk> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* staging: comedi: mite: tidy up mite_init_ring_descriptors()H Hartley Sweeten2016-05-031-12/+10
| | | | | | | | | Use a local variable for the mite_dma_desc pointer to help clarify this function. Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com> Reviewed-by: Ian Abbott <abbotti@mev.co.uk> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* staging: comedi: mite: rename mite_ring member 'descriptors'H Hartley Sweeten2016-05-032-15/+15
| | | | | | | | | Rename this member of struct mite_ring to 'descs' to help shorten the long lines. Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com> Reviewed-by: Ian Abbott <abbotti@mev.co.uk> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* staging: comedi: mite: rename mite_ring member 'descriptors_dma_addr'H Hartley Sweeten2016-05-032-9/+9
| | | | | | | | | Rename this member of struct mite_ring to 'dma_addr' to help shorten the long lines. Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com> Reviewed-by: Ian Abbott <abbotti@mev.co.uk> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* staging: comedi: mite: rename 'struct mite_dma_descriptor_ring'H Hartley Sweeten2016-05-036-43/+37
| | | | | | | | | | | Rename this name to 'mite_ring' to help shorten the long lines. In the ni_660x driver, also shorten the private data member 'mite_rings' to simply 'ring'. Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com> Reviewed-by: Ian Abbott <abbotti@mev.co.uk> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* staging: comedi: mite: rename 'struct mite_dma_descriptor'H Hartley Sweeten2016-05-032-6/+6
| | | | | | | | Rename this struct to 'mite_dma_desc' to help shorten the long lines. Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com> Reviewed-by: Ian Abbott <abbotti@mev.co.uk> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* staging: comedi: mite: rename 'struct mite_struct'H Hartley Sweeten2016-05-035-29/+28
| | | | | | | | Rename this struct to simply 'mite'. The current name is a bit redundant. Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com> Reviewed-by: Ian Abbott <abbotti@mev.co.uk> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* staging: skein: cleanup: align code to parenthesesManu Kumar2016-05-031-6/+6
| | | | | | | Align wrapped lines to parentheses (if applicable). Signed-off-by: Manu Kumar <maraku@gmx.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* staging: skein: cleanup: removed unnecessary cast spacesManu Kumar2016-05-034-19/+19
| | | | | | | Spaces after casts are removed Signed-off-by: Manu Kumar <maraku@gmx.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* staging: skein: cleanup: Fixed operator whitespaceManu Kumar2016-05-032-16/+16
| | | | | | | added operator white space and parentheses for readability Signed-off-by: Manu Kumar <maraku@gmx.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* staging: skein: cleanup: fixed new linesManu Kumar2016-05-032-2/+3
| | | | | | | | Added lines between functions in skein_block.c and removed unneeded lines in skein_block.c Signed-off-by: Manu Kumar <maraku@gmx.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* staging: wilc1000: rename result in handle_get_mac_addressChaehyun Lim2016-05-031-4/+4
| | | | | | | | | | This patch renames result to ret that is used to get return value from wilc_send_config_pkt. Some handle_*() functions are used as result, others are used as ret. It will be changed as ret in all handle_*() functions to match variable name. Signed-off-by: Chaehyun Lim <chaehyun.lim@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* staging: wilc1000: change data type of result in handle_get_mac_addressChaehyun Lim2016-05-031-1/+1
| | | | | | | | | This patch changes data type of result variable from s32 to int. result is used to get return value from wilc_send_config_pkt that has return type of int. Signed-off-by: Chaehyun Lim <chaehyun.lim@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* staging: wilc1000: change handle_get_mac_address's return type to voidChaehyun Lim2016-05-031-7/+3
| | | | | | | | | | When handle_get_mac_address is called in hostIFthread that is a kernel thread, it is not checked return type of this function. This patch changes return type to void and removes braces if statement due to have a single statement. Signed-off-by: Chaehyun Lim <chaehyun.lim@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* staging: wilc1000: fix comparison style of if statement in handle_get_ip_addressChaehyun Lim2016-05-031-1/+1
| | | | | | | | This patch changes conditional comparison of if statement as if (ret) instead of using if (ret != 0) Signed-off-by: Chaehyun Lim <chaehyun.lim@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* staging: wilc1000: rename result in handle_get_ip_addressChaehyun Lim2016-05-031-4/+4
| | | | | | | | | | This patch renames result to ret that is used to get return value from wilc_send_config_pkt. Some handle_*() functions are used as result, others are used as ret. It will be changed as ret in all handle_*() functions to match variable name. Signed-off-by: Chaehyun Lim <chaehyun.lim@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* staging: wilc1000: change data type of result in handle_get_ip_addressChaehyun Lim2016-05-031-1/+1
| | | | | | | | | This patch changes data type of result variable from s32 to int. result is used to get return value from wilc_send_config_pkt that has return type of int. Signed-off-by: Chaehyun Lim <chaehyun.lim@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* staging: wilc1000: change handle_get_ip_address's return type to voidChaehyun Lim2016-05-031-6/+2
| | | | | | | | | | When handle_get_ip_address is called in hostIFthread that is a kernel thread, it is not checked return type of this function. This patch changes return type to void and removes braces if statement due to have a single statement. Signed-off-by: Chaehyun Lim <chaehyun.lim@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* Staging: drivers: rtl8188eu: use sizeof(*ptr) instead of sizeof(struct)Jacky Boen2016-05-011-2/+1
| | | | | | | Fix coding style issue Signed-off-by: Jacky Boen <aqiank@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* Staging: drivers: rtl8188eu: fixed extraneous spacesJacky Boen2016-05-011-2/+2
| | | | | | | Fix coding style issue Signed-off-by: Jacky Boen <aqiank@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* Staging: drivers: rtl8188eu: fixed extraneous parenthesesJacky Boen2016-05-011-15/+15
| | | | | | | Fix coding style issue Signed-off-by: Jacky Boen <aqiank@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* Staging: drivers: rtl8188eu: fixed extraneous indentationJacky Boen2016-05-011-1/+1
| | | | | | | Fixed coding style issue Signed-off-by: Jacky Boen <aqiank@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* Staging: drivers: rtl8188eu: fixed unnecessary else branchJacky Boen2016-05-011-3/+2
| | | | | | | Fixed coding style issue Signed-off-by: Jacky Boen <aqiank@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* Staging: drivers: rtl8188eu: fixed brace styleJacky Boen2016-05-011-2/+1
| | | | | | | Fixed coding style issue Signed-off-by: Jacky Boen <aqiank@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* Staging: drivers: rtl8188eu: fixed newlines styleJacky Boen2016-05-011-6/+1
| | | | | | | Fixed coding style issue Signed-off-by: Jacky Boen <aqiank@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* Staging: drivers: rtl8188eu: fixed block comments styleJacky Boen2016-05-011-3/+6
| | | | | | | Fixed coding style issue Signed-off-by: Jacky Boen <aqiank@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* Staging: drivers: rtl8188eu: fixed typoJacky Boen2016-05-011-1/+1
| | | | | | | Fixed typo Signed-off-by: Jacky Boen <aqiank@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* Staging: drivers: rtl8188eu: move constants to the right in comparisonsJacky Boen2016-05-011-2/+2
| | | | | | | Fixed coding style issue Signed-off-by: Jacky Boen <aqiank@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>