summaryrefslogtreecommitdiff
path: root/drivers
AgeCommit message (Collapse)AuthorFilesLines
2013-04-11misc: tsl2550: Use dev_pm_opsLars-Peter Clausen1-10/+11
Use dev_pm_ops instead of the deprecated legacy suspend/resume callbacks. Signed-off-by: Lars-Peter Clausen <lars@metafoo.de> Cc: Rodolfo Giometti <giometti@enneenne.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-04-11misc: isl29003: Use dev_pm_opsLars-Peter Clausen1-8/+11
Use dev_pm_ops instead of the deprecated legacy suspend/resume callbacks. Signed-off-by: Lars-Peter Clausen <lars@metafoo.de> Cc: Daniel Mack <daniel@caiaq.de> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-04-11misc: fsa8480: Use dev_pm_opsLars-Peter Clausen1-8/+11
Use dev_pm_ops instead of the deprecated legacy suspend/resume callbacks. Signed-off-by: Lars-Peter Clausen <lars@metafoo.de> Cc: Donggeun Kim <dg77.kim@samsung.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-04-11misc: apds9802als: Fix suspend/resumeLars-Peter Clausen1-21/+4
The apds9802als driver implements runtime pm and at the same time uses the legacy pm callbacks for suspend and resume. This does not work since the i2c core wont look at the legacy pm callbacks if a driver has the 'pm' field set. This patch fixes it by moving over to dev_pm_ops for suspend/resume as well. Since both runtime pm and suspend/resume behave the same way this can easily be done using the UNIVERSAL_DEV_PM_OPS macro. Signed-off-by: Lars-Peter Clausen <lars@metafoo.de> Cc: Hong Liu <hong.liu@intel.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-04-11mei: convert to use simple_open()Wei Yongjun1-8/+2
This removes an open coded simple_open() function and replaces file operations references to the function with simple_open() instead. Signed-off-by: Wei Yongjun <yongjun_wei@trendmicro.com.cn> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-04-10mei: nfc: Implement MEI bus opsSamuel Ortiz1-1/+169
The send ops for NFC builds the command header, updates the request id and then waits for an ACK. The recv ops check if it receives data or an ACK and in the latter case wakes the send ops up. The enable ops sends the NFC HECI connect command. Signed-off-by: Samuel Ortiz <sameo@linux.intel.com> Signed-off-by: Tomas Winkler <tomas.winkler@intel.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-04-10mei: nfc: Add NFC device to the MEI busSamuel Ortiz1-0/+75
After building its bus name as a string based on its vendor id and radio type, we can add it to the bus. Signed-off-by: Samuel Ortiz <sameo@linux.intel.com> Signed-off-by: Tomas Winkler <tomas.winkler@intel.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-04-10mei: nfc: Initial nfc implementationSamuel Ortiz5-0/+327
NFC ME device is exported through the MEI bus to be consumed by the NFC subsystem. NFC is represented by two mei clients: An info one and the actual NFC one. In order to properly build the ME id we first need to retrieve the firmware information from the info client and then disconnect from it. Signed-off-by: Samuel Ortiz <sameo@linux.intel.com> Signed-off-by: Tomas Winkler <tomas.winkler@intel.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-04-08mei: bus: Add device enabling and disabling APISamuel Ortiz2-12/+115
It should be left to the drivers to enable and disable the device on the MEI bus when e.g getting probed. For drivers to be able to safely call the enable and disable hooks, the mei_cl_ops must be set before it's probed and thus this should happen before registering the device on the MEI bus. Hence the mei_cl_add_device() prototype change. Signed-off-by: Samuel Ortiz <sameo@linux.intel.com> Signed-off-by: Tomas Winkler <tomas.winkler@intel.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-04-08mei: notify about the reset in error levelTomas Winkler2-15/+12
Display errors causing device reset using dev_err and not dev_dbg also change messages text to something more concise Signed-off-by: Tomas Winkler <tomas.winkler@intel.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-04-08mei: add mei_cl_write functionTomas Winkler5-158/+146
consolidate write code to a specific me client in mei_cl_write function the function is called from mei device write handler and from mei_cl bus send function Signed-off-by: Tomas Winkler <tomas.winkler@intel.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-04-08Merge tag 'extcon-for-3.10' of ↵Greg Kroah-Hartman2-11/+11
git://git.kernel.org/pub/scm/linux/kernel/git/chanwoo/extcon into char-misc-next Chanwoo writes: This is small fixes for extcon driver. MAX77693 extcon driver - Add 'static' keryword to internal data structure - Fix return value using 'ret' instead of hardcoding MAX8997 extcon driver - Use dev_err() instead of pr_err() - Fix return value using 'ret' instead of hardcoding
2013-04-09extcon: max8997: Fix return valueSachin Kamat1-5/+5
Return the value obtained from the function instead of hardcoding. Fixes the following warnings: drivers/extcon/extcon-max8997.c:235 max8997_muic_set_path() info: why not propagate 'ret' from max8997_update_reg() instead of (-11)? drivers/extcon/extcon-max8997.c:248 max8997_muic_set_path() info: why not propagate 'ret' from max8997_update_reg() instead of (-11)? Signed-off-by: Sachin Kamat <sachin.kamat@linaro.org> Signed-off-by: Chanwoo Choi <cw00.choi@samsung.com> Signed-off-by: Myungjoo Ham <myungjoo.ham@samsung.com>
2013-04-09extcon: max77693: Fix return valueSachin Kamat1-4/+4
Return the value obtained from the function instead of hardcoding. Silences the following warnings: drivers/extcon/extcon-max77693.c:297 max77693_muic_set_path() info: why not propagate 'ret' from max77693_update_reg() instead of (-11)? drivers/extcon/extcon-max77693.c:310 max77693_muic_set_path() info: why not propagate 'ret' from max77693_update_reg() instead of (-11)? Signed-off-by: Sachin Kamat <sachin.kamat@linaro.org> Signed-off-by: Chanwoo Choi <cw00.choi@samsung.com> Signed-off-by: Myungjoo Ham <myungjoo.ham@samsung.com>
2013-04-09extcon: max8997: use dev_err() instead of pr_err()Jingoo Han1-1/+1
dev_err() is more preferred than pr_err(). Signed-off-by: Jingoo Han <jg1.han@samsung.com> Signed-off-by: Chanwoo Choi <cw00.choi@samsung.com> Signed-off-by: Myungjoo Ham <myungjoo.ham@samsung.com>
2013-04-09extcon: max77693: Staticize default_init_dataSachin Kamat1-1/+1
Commit 0ec83bd246 ("extcon: max77693: Initialize register of MUIC device to bring up it without platform data") added this structure but forgot to make it static. Without this patch we get the following warning: drivers/extcon/extcon-max77693.c:41:26: warning: symbol 'default_init_data' was not declared. Should it be static? Signed-off-by: Sachin Kamat <sachin.kamat@linaro.org> Signed-off-by: Chanwoo Choi <cw00.choi@samsung.com> Signed-off-by: Myungjoo Ham <myungjoo.ham@samsung.com>
2013-04-05mei: add debugfs hooksTomas Winkler5-8/+185
debugfs exposes device state and list of me clients and their properties Signed-off-by: Tomas Winkler <tomas.winkler@intel.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-04-05misc: lattice-ecp3-config: use spi_get_drvdata()Jingoo Han1-1/+1
Use the wrapper functions for getting and setting the driver data using spi_device instead of using dev_{get|set}_drvdata with &spi->dev, so we can directly pass a struct spi_device. Signed-off-by: Jingoo Han <jg1.han@samsung.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-04-05misc: eeprom_93xx46: use spi_get_drvdata() and spi_set_drvdata()Jingoo Han1-3/+3
Use the wrapper functions for getting and setting the driver data using spi_device instead of using dev_{get|set}_drvdata with &spi->dev, so we can directly pass a struct spi_device. Signed-off-by: Jingoo Han <jg1.han@samsung.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-04-05misc: at25: use spi_get_drvdata() and spi_set_drvdata()Jingoo Han1-2/+2
Use the wrapper functions for getting and setting the driver data using spi_device instead of using dev_{get|set}_drvdata with &spi->dev, so we can directly pass a struct spi_device. Signed-off-by: Jingoo Han <jg1.han@samsung.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-04-03Merge tag 'extcon-arizona-v3.10' of ↵Greg Kroah-Hartman2-104/+295
git://git.kernel.org/pub/scm/linux/kernel/git/broonie/misc into char-misc-next Mark writes: extcon: arizona: Updates for v3.10 There's a bunch of different things in this series, I can split them out if need be: - Support for configuring the button detection circuit to reflect the accessories supplied with the system. - Improvements in the HPDET based detection scheme. - Additional robustness against more pathological use cases. - A few small standalone fixes.
2013-04-03cs5535-mfgpt: Fix quotation marksRichard Weinberger1-2/+2
Commit "cs5535-mfgpt: Add another reset method" introduced an unterminated string and broke the build. Reported-by: Stephen Rothwell <sfr@canb.auug.org.au> Reported-by: kbuild test robot <fengguang.wu@intel.com> Signed-off-by: Richard Weinberger <richard@nod.at> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-04-02extcon: arizona: Make mic detection timeout configurableMark Brown1-3/+10
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2013-04-02extcon: arizona: Allow additional debounce during microphone detectionMark Brown1-5/+30
Help mitigate against mechanical bounce during the initial detection by allowing the configuration of an additional debounce on top of that the hardware does during the initial phase of microphone detection operation. Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2013-04-02extcon: arizona: Clear existing button reports before reporting new oneMark Brown1-0/+4
If the user moves directly from one button to another then we won't get a no buttons pressed event and will therefore end up reporting that two buttons are simultaneously pressed which isn't supported by the hardware. Make sure we clear any existing button reports before reporting any new ones. Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2013-04-02extcon: arizona: Time out if MICDET fails to reportMark Brown1-3/+35
In pathological cases the microphone detection may fail to report, for example due to a failure to get a stable measurement. Provide a timeout to cover such cases. Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2013-04-02extcon: arizona: Simplify HPDET based identificationMark Brown1-21/+25
Rather than measuring both HP channels we can simply directly measure the microphone impedance and then rely on MICDET for final confirmation of the presence of a suitable microphone. This improves the overall performance of the identification process. Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2013-04-02extcon: arizona: Don't ground flip when using HPDET identificationMark Brown1-23/+1
This extra check makes the procedure take longer and is of marginal use in identification so do not execute it. Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2013-04-02extcon: arizona: Retry HPDET identification for high impedanceMark Brown1-1/+17
Sometimes we can trigger measurements early if contacts are shorted during a slow insertion. As well as debouncing add further robustness by retrying if we get a high impedance measurement for headphones as this can indicate that the headphones were not yet connected. Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2013-04-02extcon: arizona: Tune up HPDET debounceMark Brown1-1/+1
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2013-04-02extcon: arizona: Check we report a valid impedanceCharles Keepax1-10/+18
Occasionally we can trigger an interrupt before we have completed impedance measurement, although the valid bit will still be set. This patch spins reading the impedance value until a valid value is seen. Signed-off-by: Charles Keepax <ckeepax@opensource.wolfsonmicro.com> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2013-04-02extcon: arizona: Suppress duplicate JACKDET reportsMark Brown1-4/+22
In cases where we see a brief (dis)connection of the jack detection signals we may see a noop jack insertion or removal where the jack has returned to the original state by the time the interrupt is serviced. Suppress these events in order to save work and avoid confusing the rest of the code. Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2013-04-02extcon: arizona: Raise minimum microphone impedance for HPDET methodMark Brown1-1/+1
Ensure greater reliability by increasing the minimum threashold for identifying a microphone. Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2013-04-02extcon: arizona: Allow pull to be disabled on GPIO5 when used for JACKETMark Brown1-2/+7
In some designs an external pull won't be needed. Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2013-04-02extcon: arizona: Don't pulse MICBIAS for HPDET identificationMark Brown1-2/+0
There is no need to do this as HPDET identification will cause MICBIAS to be powered down again. Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2013-04-02extcon: arizona: Allow configuration of button detectionMark Brown1-39/+125
The Arizona button detection circuit is configurable, allowing the system integrator to program a range of thresholds for the buttons supported on the accessory but currently the driver uses the default button ranges and does not provide any flexibility in how this is exposed to the application layer. Provide platform data allowing the user to control this and to map the buttons to keys in the input subsystem. Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2013-04-01extcon: arizona: Attempt more microphone measurementsMark Brown1-1/+3
In some pathological use cases users may insert an accessory very slowly causing multiple indeterminate measurements. Handle this by retrying many measurements before we give up and declare a headphone. Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2013-04-01mfd: wm5102: Add registers for microphone detection level configurationMark Brown1-0/+8
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2013-04-01Drivers: hv: vmbus: Fix a bug in hv_need_to_signal()K. Y. Srinivasan1-0/+1
As part of updating the vmbus protocol, the function hv_need_to_signal() was introduced. This functions helps optimize signalling from guest to host. The newly added memory barrier is needed to ensure that we correctly decide when to signal the host. Signed-off-by: K. Y. Srinivasan <kys@microsoft.com> Reviewed-by: Haiyang Zhang <haiyangz@microsoft.com> Reported-by: Olaf Hering <olh@suse.de> Cc: Stable <stable@vger.kernel.org> (V3.8+) Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-04-01cs5535-mfgpt: Add another reset methodRichard Weinberger1-4/+37
The CS5535/CS5536 MFGPT has no support to reset the device. The current method uses an undocumented bit but does not work on all devices. At least on my ALIX board it completely freezes the board. This new method tries to soft reset all timers by unconfiguring them. But this does not clear the RO setup register and therefore it has to be ignored while probing. Resetting the timers is not only needed on broken BIOSes also when kexec is used. Otherwise the new kernel will find preconfigured timers and odd things will happen. Signed-off-by: Richard Weinberger <richard@nod.at> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-04-01Merge v3.9-rc5 into char-misc-nextGreg Kroah-Hartman137-748/+1871
This picks up the fixes in 3.9-rc5 that we need here. Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-03-31Merge branch 'fixes' of git://git.infradead.org/users/vkoul/slave-dmaLinus Torvalds2-4/+20
Pull slave-dmaengine fixes from Vinod Koul: "Two fixes for slave-dmaengine. The first one is for making slave_id value correct for dw_dmac and the other one fixes the endieness in DT parsing" * 'fixes' of git://git.infradead.org/users/vkoul/slave-dma: dw_dmac: adjust slave_id accordingly to request line base dmaengine: dw_dma: fix endianess for DT xlate function
2013-03-31Merge branch 'v4l_for_linus' of ↵Linus Torvalds11-38/+53
git://git.kernel.org/pub/scm/linux/kernel/git/mchehab/linux-media Pull media fixes from Mauro Carvalho Chehab: "For a some fixes for Kernel 3.9: - subsystem build fix when VIDEO_DEV=y, VIDEO_V4L2=m and I2C=m - compilation fix for arm multiarch preventing IR_RX51 to be selected - regression fix at bttv crop logic - s5p-mfc/m5mols/exynos: a few fixes for cameras on exynos hardware" * 'v4l_for_linus' of git://git.kernel.org/pub/scm/linux/kernel/git/mchehab/linux-media: [media] [REGRESSION] bt8xx: Fix too large height in cropcap [media] fix compilation with both V4L2 and I2C as 'm' [media] m5mols: Fix bug in stream on handler [media] s5p-fimc: Do not attempt to disable not enabled media pipeline [media] s5p-mfc: Fix encoder control 15 issue [media] s5p-mfc: Fix frame skip bug [media] s5p-fimc: send valid m2m ctx to fimc_m2m_job_finish [media] exynos-gsc: send valid m2m ctx to gsc_m2m_job_finish [media] fimc-lite: Fix the variable type to avoid possible crash [media] fimc-lite: Initialize 'step' field in fimc_lite_ctrl structure [media] ir: IR_RX51 only works on OMAP2
2013-03-31Merge tag 'for-linus-20130331' of git://git.kernel.dk/linux-blockLinus Torvalds17-254/+698
Pull block fixes from Jens Axboe: "Alright, this time from 10K up in the air. Collection of fixes that have been queued up since the merge window opened, hence postponed until later in the cycle. The pull request contains: - A bunch of fixes for the xen blk front/back driver. - A round of fixes for the new IBM RamSan driver, fixing various nasty issues. - Fixes for multiple drives from Wei Yongjun, bad handling of return values and wrong pointer math. - A fix for loop properly killing partitions when being detached." * tag 'for-linus-20130331' of git://git.kernel.dk/linux-block: (25 commits) mg_disk: fix error return code in mg_probe() rsxx: remove unused variable rsxx: enable error return of rsxx_eeh_save_issued_dmas() block: removes dynamic allocation on stack Block: blk-flush: Fixed indent code style cciss: fix invalid use of sizeof in cciss_find_cfgtables() loop: cleanup partitions when detaching loop device loop: fix error return code in loop_add() mtip32xx: fix error return code in mtip_pci_probe() xen-blkfront: remove frame list from blk_shadow xen-blkfront: pre-allocate pages for requests xen-blkback: don't store dev_bus_addr xen-blkfront: switch from llist to list xen-blkback: fix foreach_grant_safe to handle empty lists xen-blkfront: replace kmalloc and then memcpy with kmemdup xen-blkback: fix dispatch_rw_block_io() error path rsxx: fix missing unlock on error return in rsxx_eeh_remap_dmas() Adding in EEH support to the IBM FlashSystem 70/80 device driver block: IBM RamSan 70/80 error message bug fix. block: IBM RamSan 70/80 branding changes. ...
2013-03-30Merge git://git.kernel.org/pub/scm/linux/kernel/git/nab/target-pendingLinus Torvalds2-3/+14
Pull SCSI target fixes from Nicholas Bellinger: "This includes the bug-fix for a >= v3.8-rc1 regression specific to iscsi-target persistent reservation conflict handling (CC'ed to stable), and a tcm_vhost patch to drop VIRTIO_RING_F_EVENT_IDX usage so that in-flight qemu vhost-scsi-pci device code can detect the proper vhost feature bits. Also, there are two more tcm_vhost patches still being discussed by MST and Asias for v3.9 that will be required for the in-flight qemu vhost-scsi-pci device patch to function properly, and that should (hopefully) be the last target fixes for this round." * git://git.kernel.org/pub/scm/linux/kernel/git/nab/target-pending: target: Fix RESERVATION_CONFLICT status regression for iscsi-target special case tcm_vhost: Avoid VIRTIO_RING_F_EVENT_IDX feature bit
2013-03-30dw_dmac: adjust slave_id accordingly to request line baseAndy Shevchenko2-1/+17
On some hardware configurations we have got the request line with the offset. The patch introduces convert_slave_id() helper for that cases. The request line base is came from the driver data provided by the platform_device_id table. Signed-off-by: Mika Westerberg <mika.westerberg@linux.intel.com> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Viresh Kumar <viresh.kumar@linaro.org> Acked-by: Viresh Kumar <viresh.kumar@linaro.org> Signed-off-by: Vinod Koul <vinod.koul@intel.com>
2013-03-30dmaengine: dw_dma: fix endianess for DT xlate functionArnd Bergmann1-3/+3
As reported by Wu Fengguang's build robot tracking sparse warnings, the dma_spec arguments in the dw_dma_xlate are already byte swapped on little-endian platforms and must not get swapped again. This code is currently not used anywhere, but will be used in Linux 3.10 when the ARM SPEAr platform starts using the generic DMA DT binding. Signed-off-by: Arnd Bergmann <arnd@arndb.de> Reported-by: Fengguang Wu <fengguang.wu@intel.com> Acked-by: Viresh Kumar <viresh.kumar@linaro.org> Signed-off-by: Vinod Koul <vinod.koul@intel.com>
2013-03-29Merge branch 'for-linus' of ↵Linus Torvalds1-17/+30
git://git.kernel.org/pub/scm/linux/kernel/git/sage/ceph-client Pull ceph fix from Sage Weil: "This fixes a regression introduced during the last merge window when mapping non-existent images." * 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/sage/ceph-client: rbd: don't zero-fill non-image object requests
2013-03-29rbd: don't zero-fill non-image object requestsAlex Elder1-17/+30
A result of ENOENT from a read request for an object that's part of an rbd image indicates that there is a hole in that portion of the image. Similarly, a short read for such an object indicates that the remainder of the read should be interpreted a full read with zeros filling out the end of the request. This behavior is not correct for objects that are not backing rbd image data. Currently rbd_img_obj_request_callback() assumes it should be done for all objects. Change rbd_img_obj_request_callback() so it only does this zeroing for image objects. Encapsulate that special handling in its own function. Add an assertion that the image object request is a bio request, since we assume that (and we currently don't support any other types). This resolves a problem identified here: http://tracker.ceph.com/issues/4559 The regression was introduced by bf0d5f503dc11d6314c0503591d258d60ee9c944. Reported-by: Dan van der Ster <dan@vanderster.com> Signed-off-by: Alex Elder <elder@inktank.com> Reviewed-off-by: Sage Weil <sage@inktank.com>
2013-03-29drivers: uio: Fix UIO device registration failureDamian Hobson-Garcia1-0/+1
Until recently uio_get_minor() returned 0 for success and a negative value on failure. This became non-negative for suceess and negative for failure. Restore the original return value spec so that we can successfully initialize UIO devices with a non-zero minor device number. Cc: "Hans J. Koch" <hjk@hansjkoch.de> Signed-off-by: Damian Hobson-Garcia <dhobsong@igel.co.jp> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>