summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* Merge tag 'char-misc-4.1-rc1' of ↵Linus Torvalds2015-04-21119-1482/+4033
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/char-misc Pull char/misc driver updates from Greg KH: "Here's the big char/misc driver patchset for 4.1-rc1. Lots of different driver subsystem updates here, nothing major, full details are in the shortlog. All of this has been in linux-next for a while" * tag 'char-misc-4.1-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/char-misc: (133 commits) mei: trace: remove unused TRACE_SYSTEM_STRING DTS: ARM: OMAP3-N900: Add lis3lv02d support Documentation: DT: lis302: update wakeup binding lis3lv02d: DT: add wakeup unit 2 and wakeup threshold lis3lv02d: DT: use s32 to support negative values Drivers: hv: hv_balloon: correctly handle num_pages>INT_MAX case Drivers: hv: hv_balloon: correctly handle val.freeram<num_pages case mei: replace check for connection instead of transitioning mei: use mei_cl_is_connected consistently mei: fix mei_poll operation hv_vmbus: Add gradually increased delay for retries in vmbus_post_msg() Drivers: hv: hv_balloon: survive ballooning request with num_pages=0 Drivers: hv: hv_balloon: eliminate jumps in piecewiese linear floor function Drivers: hv: hv_balloon: do not online pages in offline blocks hv: remove the per-channel workqueue hv: don't schedule new works in vmbus_onoffer()/vmbus_onoffer_rescind() hv: run non-blocking message handlers in the dispatch tasklet coresight: moving to new "hwtracing" directory coresight-tmc: Adding a status interface to sysfs coresight: remove the unnecessary configuration coresight-default-sink ...
| * mei: trace: remove unused TRACE_SYSTEM_STRINGTomas Winkler2015-04-131-2/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | fix warning: include/trace/ftrace.h:28:0: note: this is the location of the previous definition ^ In file included from include/trace/define_trace.h:90:0, from drivers/misc/mei/mei-trace.h:76, from drivers/misc/mei/mei-trace.c:21: include/trace/ftrace.h:28:0: warning: "TRACE_SYSTEM_STRING" redefined Cc: Stephen Rothwell <sfr@canb.auug.org.au> Reported-by: Stephen Rothwell <sfr@canb.auug.org.au> Signed-off-by: Tomas Winkler <tomas.winkler@intel.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
| * DTS: ARM: OMAP3-N900: Add lis3lv02d supportSebastian Reichel2015-04-031-0/+52
| | | | | | | | | | | | | | | | | | | | This adds support for the N900's accelerometer to the Nokia N900 DTS file. Signed-off-by: Sebastian Reichel <sre@kernel.org> Acked-by: Tony Lindgren <tony@atomide.com> Reviewed-by: Éric Piel <eric.piel@tremplin-utc.net> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
| * Documentation: DT: lis302: update wakeup bindingSebastian Reichel2015-04-031-1/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | This updated the documentation of the DT binding to describe the added wakeup threshold and second wakeup engine. It also adds a note, that the axis values may be negative. Signed-off-by: Sebastian Reichel <sre@kernel.org> Reviewed-by: Éric Piel <eric.piel@tremplin-utc.net> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
| * lis3lv02d: DT: add wakeup unit 2 and wakeup thresholdSebastian Reichel2015-04-031-0/+17
| | | | | | | | | | | | | | | | | | | | This adds support for the the wakeup threshold and support for the second wakeup unit to the DT based setup. Signed-off-by: Sebastian Reichel <sre@kernel.org> Reviewed-by: Éric Piel <eric.piel@tremplin-utc.net> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
| * lis3lv02d: DT: use s32 to support negative valuesSebastian Reichel2015-04-031-19/+20
| | | | | | | | | | | | | | | | | | | | | | | | st,axis-{x,y,z} can be negative to imply inverted axis. Apart from that the minimal and maximal threshold may be negative. Signed-off-by: Sebastian Reichel <sre@kernel.org> Reviewed-by: Éric Piel <eric.piel@tremplin-utc.net> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
| * Drivers: hv: hv_balloon: correctly handle num_pages>INT_MAX caseVitaly Kuznetsov2015-04-031-6/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | balloon_wrk.num_pages is __u32 and it comes from host in struct dm_balloon where it is also __u32. We, however, use 'int' in balloon_up() and in case we happen to receive num_pages>INT_MAX request we'll end up allocating zero pages as 'num_pages < alloc_unit' check in alloc_balloon_pages() will pass. Change num_pages type to unsigned int. In real life ballooning request come with num_pages in [512, 32768] range so this is more a future-proof/cleanup. Reported-by: Laszlo Ersek <lersek@redhat.com> Signed-off-by: Vitaly Kuznetsov <vkuznets@redhat.com> Reviewed-by: Laszlo Ersek <lersek@redhat.com> Signed-off-by: K. Y. Srinivasan <kys@microsoft.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
| * Drivers: hv: hv_balloon: correctly handle val.freeram<num_pages caseVitaly Kuznetsov2015-04-031-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 'Drivers: hv: hv_balloon: refuse to balloon below the floor' fix does not correctly handle the case when val.freeram < num_pages as val.freeram is __kernel_ulong_t and the 'val.freeram - num_pages' value will be a huge positive value instead of being negative. Usually host doesn't ask us to balloon more than val.freeram but in case he have a memory hog started after we post the last pressure report we can get into troubles. Suggested-by: Laszlo Ersek <lersek@redhat.com> Signed-off-by: Vitaly Kuznetsov <vkuznets@redhat.com> Reviewed-by: Laszlo Ersek <lersek@redhat.com> Signed-off-by: K. Y. Srinivasan <kys@microsoft.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
| * mei: replace check for connection instead of transitioningTomas Winkler2015-04-033-10/+12
| | | | | | | | | | | | | | | | | | | | The function mei_cl_is_transitioning is just opposite of mei_cl_is_connected. What we actually wanted to check is if we lost connection so we can discard the check for transition and check for 'not connected' Signed-off-by: Tomas Winkler <tomas.winkler@intel.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
| * mei: use mei_cl_is_connected consistentlyTomas Winkler2015-04-035-17/+22
| | | | | | | | | | | | | | | | | | | | | | Replace open coded check for cl->state !=/== MEI_FILE_CONNECTED with mei_cl_is_connected function. Note that cl->state != MEI_FILE_CONNECTED is not the same as cl->state == MEI_FILE_DISCONNECTED Signed-off-by: Tomas Winkler <tomas.winkler@intel.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
| * mei: fix mei_poll operationTomas Winkler2015-04-033-24/+27
| | | | | | | | | | | | | | | | | | mei_poll returned with POLLIN w/o checking whether the operation has really completed. remove redundant check and locking in amthif specific handler Signed-off-by: Tomas Winkler <tomas.winkler@intel.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
| * hv_vmbus: Add gradually increased delay for retries in vmbus_post_msg()Haiyang Zhang2015-04-031-2/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | Most of the retries can be done within a millisecond successfully, so we sleep 1ms before the first retry, then gradually increase the retry interval to 2^n with max value of 2048ms. Doing so, we will have shorter overall delay time, because most of the cases succeed within 1-2 attempts. Signed-off-by: Haiyang Zhang <haiyangz@microsoft.com> Reviewed-by: K. Y. Srinivasan <kys@microsoft.com> Reviewed-by: Dexuan Cui <decui@microsoft.com> Signed-off-by: K. Y. Srinivasan <kys@microsoft.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
| * Drivers: hv: hv_balloon: survive ballooning request with num_pages=0Vitaly Kuznetsov2015-04-031-13/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | ... and simplify alloc_balloon_pages() interface by removing redundant alloc_error from it. If we happen to enter balloon_up() with balloon_wrk.num_pages = 0 we will enter infinite 'while (!done)' loop as alloc_balloon_pages() will be always returning 0 and not setting alloc_error. We will also be sending a meaningless message to the host on every iteration. The 'alloc_unit == 1 && alloc_error -> num_ballooned == 0' change and alloc_error elimination requires a special comment. We do alloc_balloon_pages() with 2 different alloc_unit values and there are 4 different alloc_balloon_pages() results, let's check them all. alloc_unit = 512: 1) num_ballooned = 0, alloc_error = 0: we do 'alloc_unit=1' and retry pre- and post-patch. 2) num_ballooned > 0, alloc_error = 0: we check 'num_ballooned == num_pages' and act accordingly, pre- and post-patch. 3) num_ballooned > 0, alloc_error > 0: we report this chunk and remain within the loop, no changes here. 4) num_ballooned = 0, alloc_error > 0: we do 'alloc_unit=1' and retry pre- and post-patch. alloc_unit = 1: 1) num_ballooned = 0, alloc_error = 0: this can happen in two cases: when we passed 'num_pages=0' to alloc_balloon_pages() or when there was no space in bl_resp to place a single response. The second option is not possible as bl_resp is of PAGE_SIZE size and single response 'union dm_mem_page_range' is 8 bytes, but the first one is (in theory, I think that Hyper-V host never places such requests). Pre-patch code loops forever, post-patch code sends a reply with more_pages = 0 and finishes. 2) num_ballooned > 0, alloc_error = 0: we ran out of space in bl_resp, we report partial success and remain within the loop, no changes pre- and post-patch. 3) num_ballooned > 0, alloc_error > 0: pre-patch code finishes, post-patch code does one more try and if there is no progress (we finish with 'num_ballooned = 0') we finish. So we try a bit harder with this patch. 4) num_ballooned = 0, alloc_error > 0: both pre- and post-patch code enter 'more_pages = 0' branch and finish. So this patch has two real effects: 1) We reply with an empty response to 'num_pages=0' request. 2) We try a bit harder on alloc_unit=1 allocations (and reply with an empty tail reply in case we fail). An empty reply should be supported by host as we were able to send it even with pre-patch code when we were not able to allocate a single page. Suggested-by: Laszlo Ersek <lersek@redhat.com> Signed-off-by: Vitaly Kuznetsov <vkuznets@redhat.com> Signed-off-by: K. Y. Srinivasan <kys@microsoft.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
| * Drivers: hv: hv_balloon: eliminate jumps in piecewiese linear floor functionVitaly Kuznetsov2015-04-031-4/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Commit 79208c57da53 ("Drivers: hv: hv_balloon: Make adjustments in computing the floor") was inacurate as it introduced a jump in our piecewiese linear 'floor' function: At 2048MB we have: Left limit: 104 + 2048/8 = 360 Right limit: 256 + 2048/16 = 384 (so the right value is 232) We now have to make an adjustment at 8192 boundary: 232 + 8192/16 = 744 512 + 8192/32 = 768 (so the right value is 488) Suggested-by: Laszlo Ersek <lersek@redhat.com> Signed-off-by: Vitaly Kuznetsov <vkuznets@redhat.com> Signed-off-by: K. Y. Srinivasan <kys@microsoft.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
| * Drivers: hv: hv_balloon: do not online pages in offline blocksVitaly Kuznetsov2015-04-031-1/+11
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Currently we add memory in 128Mb blocks but the request from host can be aligned differently. In such case we add a partially backed block and when this block goes online we skip onlining pages which are not backed (hv_online_page() callback serves this purpose). When we receive next request for the same host add region we online pages which were not backed before with hv_bring_pgs_online(). However, we don't check if the the block in question was onlined and online this tail unconditionally. This is bad as we avoid all online_pages() logic: these pages are not accounted, we don't send notifications (and hv_balloon is not the only receiver of them),... And, first of all, nobody asked as to online these pages. Solve the issue by checking if the last previously backed page was onlined and onlining the tail only in case it was. Signed-off-by: Vitaly Kuznetsov <vkuznets@redhat.com> Signed-off-by: K. Y. Srinivasan <kys@microsoft.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
| * hv: remove the per-channel workqueueDexuan Cui2015-04-032-32/+1
| | | | | | | | | | | | | | | | | | | | It's not necessary any longer, since we can safely run the blocking message handlers in vmbus_connection.work_queue now. Signed-off-by: Dexuan Cui <decui@microsoft.com> Cc: K. Y. Srinivasan <kys@microsoft.com> Signed-off-by: K. Y. Srinivasan <kys@microsoft.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
| * hv: don't schedule new works in vmbus_onoffer()/vmbus_onoffer_rescind()Dexuan Cui2015-04-033-135/+30
| | | | | | | | | | | | | | | | | | | | | | | | | | Since the 2 fucntions can safely run in vmbus_connection.work_queue without hang, we don't need to schedule new work items into the per-channel workqueue. Actally we can even remove the per-channel workqueue now -- we'll do it in the next patch. Signed-off-by: Dexuan Cui <decui@microsoft.com> Cc: K. Y. Srinivasan <kys@microsoft.com> Signed-off-by: K. Y. Srinivasan <kys@microsoft.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
| * hv: run non-blocking message handlers in the dispatch taskletDexuan Cui2015-04-033-26/+53
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | A work item in vmbus_connection.work_queue can sleep, waiting for a new host message (usually it is some kind of "completion" message). Currently the new message will be handled in the same workqueue, but since work items in the workqueue is serialized, we actually have no chance to handle the new message if the current work item is sleeping -- as as result, the current work item will hang forever. K. Y. has posted the below fix to resolve the issue: Drivers: hv: vmbus: Perform device register in the per-channel work element Actually we can simplify the fix by directly running non-blocking message handlers in the dispatch tasklet (inspired by K. Y.). This patch is the fundamental change. The following 2 patches will simplify the message offering and rescind-offering handling a lot. Signed-off-by: Dexuan Cui <decui@microsoft.com> Cc: K. Y. Srinivasan <kys@microsoft.com> Signed-off-by: K. Y. Srinivasan <kys@microsoft.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
| * coresight: moving to new "hwtracing" directoryMathieu Poirier2015-04-0317-4/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Keeping drivers related to HW tracing on ARM, i.e coresight, under "drivers/coresight" doesn't make sense when other architectures start rolling out technologies of the same nature. As such creating a new "drivers/hwtracing" directory where all drivers of the same kind can reside, reducing namespace pollution under "drivers/". Signed-off-by: Mathieu Poirier <mathieu.poirier@linaro.org> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
| * coresight-tmc: Adding a status interface to sysfsMathieu Poirier2015-04-031-0/+56
| | | | | | | | | | | | | | | | | | Knowing the state of various control register is always useful for degging and tuning. As such add an entry in sysfs that expose to userspace the most important registers. Signed-off-by: Mathieu Poirier <mathieu.poirier@linaro.org> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
| * coresight: remove the unnecessary configuration coresight-default-sinkKaixu Xia2015-04-035-5/+0
| | | | | | | | | | | | | | | | | | The coresight-default-sink configuration option has been removed from the framework. As such remove it from DT and bindings. Signed-off-by: Kaixu Xia <xiakaixu@huawei.com> Signed-off-by: Mathieu Poirier <mathieu.poirier@linaro.org> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
| * coresight: adding the LINKSINK block as a sink typeXia Kaixu2015-04-031-1/+3
| | | | | | | | | | | | | | | | | | >From the TMC TRM, the ETF can be configured as buffer mode, so ETF can be a sink type. Signed-off-by: Xia Kaixu <kaixu.xia@linaro.org> Signed-off-by: Mathieu Poirier <mathieu.poirier@linaro.org> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
| * coresight: Correcting documentation typographical errorMathieu Poirier2015-04-031-1/+1
| | | | | | | | | | Signed-off-by: Mathieu Poirier <mathieu.poirier@linaro.org> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
| * coresight: Adding coresight support for arm64 architectureMathieu Poirier2015-04-033-54/+64
| | | | | | | | | | | | | | | | | | | | | | Most CoreSight blocks are 64-bit ready. As such move configuration entries from "arch/arm/Kconfig.config" to the driver's subdirectory and source the newly created Kconfig from architecture specific Kconfig.debug files. Signed-off-by: Mathieu Poirier <mathieu.poirier@linaro.org> Acked-by: Catalin Marinas <catalin.marinas@arm.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
| * coresight: fixing compilation warnings picked up by 64bit compilerMathieu Poirier2015-04-032-4/+4
| | | | | | | | | | | | | | | | Compiling coresight drivers with a 64-bit compiler highlights a couple of formatting issues, which are fixed by this patch. Signed-off-by: Mathieu Poirier <mathieu.poirier@linaro.org> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
| * coresight: making cpu index lookup arm64 compliantMathieu Poirier2015-04-031-12/+6
| | | | | | | | | | | | | | | | | | | | Function "get_logical_index()" is not available on arm64. Instead of adding the function simply using "of_get_cpu_node()" and comparing the return value with cpu handles yields the same result. Signed-off-by: Mathieu Poirier <mathieu.poirier@linaro.org> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
| * mcb: request_mem_region() returns NULL on errorDan Carpenter2015-04-031-2/+2
| | | | | | | | | | | | | | | | The code here is checking for IS_ERR() when request_mem_region() only returns NULL on error and never an ERR_PTR. Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
| * char: xillybus: Don't return -EFAULT on user-triggered flushEli Billauer2015-04-031-0/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | The API allows the application to flush a host-to-FPGA stream by calling write() with the data count set to zero. Before this patch, copy_from_user() was called with a non-zero byte count, which possibly made it attempt to read from unmapped user memory. Such attempts caused the driver to return -EFAULT instead of 0, even though the desired operation went through fine. This patch ensures the driver returns 0 on a successful flush. Signed-off-by: Eli Billauer <eli.billauer@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
| * mic: drop pci_msi_off call on probeMichael S. Tsirkin2015-04-031-2/+0
| | | | | | | | | | | | | | | | | | | | pci core now disables msi on probe automatically, drop this from device-specific code. Cc: Bjorn Helgaas <bhelgaas@google.com> Cc: linux-pci@vger.kernel.org Signed-off-by: Michael S. Tsirkin <mst@redhat.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
| * spmi: pmic_arb: remove ARM build time dependencyIvan T. Ivanov2015-04-031-1/+0
| | | | | | | | | | | | | | | | | | | | | | Qualcomm PMIC arbiter driver already depends on ARCH_QCOM, which could be either ARM or ARM64. New version of the PMIC arbiter controller is available on 64 bit platforms. Remove ARM dependency to allow driver to be build for 64 bit platforms. Signed-off-by: Ivan T. Ivanov <ivan.ivanov@linaro.org> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
| * virtio_console: Use bool function return values of true/false not 1/0Joe Perches2015-04-031-1/+1
| | | | | | | | | | | | | | | | Use the normal return values for bool functions Signed-off-by: Joe Perches <joe@perches.com> Reviewed-by: Amit Shah <amit.shah@redhat.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
| * misc: pass miscdevice through file's private_dataTom Van Braeckel2015-04-031-3/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Make the miscdevice accessible through the file's private_data. Previously, this was done only when an open() file operation had been registered. If no custom open() file operation was defined, private_data was set to NULL. This subtle quirk was confusing, to the point where kernel code registered *empty* file open operations to have private_data point to the misc device structure and avoid duplicating that logic. And it could easily lead to bugs, where the addition or removal of a custom open() file operation surprisingly changes the initial value of a file's private_data structure. To resolve this, we now place the miscdevice in the file's private_data member unconditionally when open() is called. Signed-off-by: Tom Van Braeckel <tomvanbraeckel@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
| * Revert "uio: constify of_device_id array"Greg Kroah-Hartman2015-04-031-1/+1
| | | | | | | | | | | | | | | | | | | | | | This reverts commit 4d8beff2ae07fad85d723b4cdf704b05f0ed4794. It causes build warnings, and it's incorrect as we do write to this structure. Reported-by: Stephen Rothwell <sfr@canb.auug.org.au> Cc: Fabian Frederick <fabf@skynet.be> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
| * Merge tag 'extcon-next-for-4.1' of ↵Greg Kroah-Hartman2015-04-0114-59/+1248
| |\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | git://git.kernel.org/pub/scm/linux/kernel/git/chanwoo/extcon into char-misc-next Chanwoo writes: Update extcon for v4.1 This patchset include two new extcon driver and fix minor issue of extcon driver. Detailed description for patchset: 1. new extcon-max77843.c and extcon-usb-gpio.c extcon driver - extcon-max77843.c driver support the MAXIM MAX77843 MUIC (Micor-USB Interface Controller) device which handles the various external connectors such as TA/USB /USB-HOST/JIG and so on. - extcon-usb-gpio.c driver support the USB and USB-HOST cable detection by using the GPIO pin which is connected to USB ID pin. This GPIO pin updates the USB cable states. 2. Rename the filename of extcon core driver and add missing locking mechanism - Rename the previous extcon-class driver.c as extcon.c because '-class' postfix is not necessary word. - extcon core driver (extcon.c) used the raw_notifier_chain. It must be protected by locking mechanism to avoid the list changing while extcon_update_state() is executed. 3. Fix minor issue of extcon drviers - Fix cable name by using the capital letter instead of small letter on extcon-max77693.c driver. - Clean-up code of extcon-arizona.c to detect headphone cable. - Fix the wrong return type and variable type on extcon-max77843.c. - Fix the checkpatch warning of all extcon drivers.
| | * extcon: Fix missing locking when [un]registering notifiersHans de Goede2015-03-231-4/+31
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Since extcon.c is using raw_notifiers it must protect the notifier list itself when [un]registering notifiers to avoid the list changing while extcon_update_state is walking the list (through raw_notifier_call_chain). Signed-off-by: Hans de Goede <hdegoede@redhat.com> [cw00.choi: Apply this patch to extcon.c driver instead of old extcon-class.c] Signed-off-by: Chanwoo Choi <cw00.choi@samsung.com>
| | * extcon: max77843: Fix an error code in max77843_init_muic_regmap()Dan Carpenter2015-03-231-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The i2c_new_dummy() return the NULL if error happen. So, If i2c_new_dummy() return NULL, max77843_init_muic_regmap() return the proper error value (-ENOMEM); Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com> [cw00.choi: Use -ENOMEM instead of -ENODEV and modify patch description] Signed-off-by: Chanwoo Choi <cw00.choi@samsung.com>
| | * extcon: max77843: Fix signedness bug in max77843_muic_set_debounce_time()Dan Carpenter2015-03-161-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This patch fixes the variable type of 'ret' from 'unsigned int' to 'int' type because the return type of regmap_update_bits() is 'int' type. Fixes: 27a28d32b4f2 ('extcon: max77843: Add max77843 MUIC driver') Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com> [cw00.choi: Fix the patch description] Signed-off-by: Chanwoo Choi <cw00.choi@samsung.com>
| | * extcon: Fix the checkpatch warningChanwoo Choi2015-03-077-20/+10
| | | | | | | | | | | | | | | | | | This patch fixes the checkpatch warning about coding style. Signed-off-by: Chanwoo Choi <cw00.choi@samsung.com>
| | * extcon: Rename extcon core driverChanwoo Choi2015-03-072-1/+1
| | | | | | | | | | | | | | | | | | | | | This patch renames the extcon core driver from extcon-class.c to extcon.c because '-class' postfix is not necessary. Signed-off-by: Chanwoo Choi <cw00.choi@samsung.com>
| | * extcon: arizona: Fix headphone clamping on wm5110Charles Keepax2015-03-041-5/+18
| | | | | | | | | | | | | | | | | | | | | | | | | | | wm5110 requires slightly different configuration of the headphone clamps to other Arizona devices. Otherwise headphone detection accuracy will be way off. This patch adds the needed clamping. Signed-off-by: Charles Keepax <ckeepax@opensource.wolfsonmicro.com> Signed-off-by: Chanwoo Choi <cw00.choi@samsung.com>
| | * extcon: arizona: Deobfuscate arizona_extcon_do_magicCharles Keepax2015-03-043-19/+23
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | arizona_extcon_do_magic does not lend a lot of clarity to the purpose of the function, and as all the registers used are described in the datasheet there is no need to obfuscate the code. This patch renames the function to arizona_extcon_hp_clamp, as it controls clamping on the headphone output. Signed-off-by: Charles Keepax <ckeepax@opensource.wolfsonmicro.com> Acked-by: Lee Jones <lee.jones@linaro.org> Signed-off-by: Chanwoo Choi <cw00.choi@samsung.com>
| | * extcon: max77843: Add max77843 MUIC driverJaewon Kim2015-02-243-0/+892
| | | | | | | | | | | | | | | | | | | | | | | | | | | This patch adds MAX77843 extcon driver to support for MUIC(Micro USB Interface Controller) device by using EXTCON subsystem to handle various external connectors. Signed-off-by: Jaewon Kim <jaewon02.kim@samsung.com> Signed-off-by: Chanwoo Choi <cw00.choi@samsung.com>
| | * extcon: usb-gpio: Introduce gpio usb extcon driverRoger Quadros2015-02-244-0/+263
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This driver observes the USB ID pin connected over a GPIO and updates the USB cable extcon states accordingly. The existing GPIO extcon driver is not suitable for this purpose as it needs to be taught to understand USB cable states and it can't handle more than one cable per instance. For the USB case we need to handle 2 cable states. 1) USB (attach/detach) 2) USB-HOST (attach/detach) This driver can be easily updated in the future to handle VBUS events in case it happens to be available on GPIO for any platform. Signed-off-by: Roger Quadros <rogerq@ti.com> Reviewed-by: Felipe Balbi <balbi@ti.com> Acked-by: Felipe Balbi <balbi@ti.com> Signed-off-by: Chanwoo Choi <cw00.choi@samsung.com>
| | * extcon: max77693: Use HOST term to express USB-HOST cable instead of OTG termJaewon Kim2015-02-241-10/+10
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This patch unifies the term called 'USB_OTG' and 'USB_HOST' into USB_HOST. OTG(On-The-Go) function supports USB host and this driver sents 'USB-Host event. So, unifies term to USB_HOST. Signed-off-by: Jaewon Kim <jaewon02.kim@samsung.com> [cw00.choi: Fix patch title to indicate the correct meaning of patch] Signed-off-by: Chanwoo Choi <cw00.choi@samsung.com>
| | * extcon: max77693: Fix cable name of MHL-TAJaewon Kim2015-02-241-6/+6
| | | | | | | | | | | | | | | | | | | | | | | | This patch fixes extcon cable name of MHL-TA instead of MHL_TA to unify cable name style. Signed-off-by: Jaewon Kim <jaewon02.kim@samsung.com> Signed-off-by: Chanwoo Choi <cw00.choi@samsung.com>
| * | memory: jz4780-nemc: driver for the NEMC on JZ4780 SoCsAlex Smith2015-03-264-0/+444
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Add a driver for the NAND/External Memory Controller (NEMC) on JZ4780 and later SoCs. The primary function of this driver is to configure parameters, such as timings, for external memory devices using data supplied in the device tree. Devices connected to the NEMC are represented in the DT as children of the NEMC node, the driver uses optional properties specified in these child nodes to configure the parameters of each bank. Signed-off-by: Alex Smith <alex@alex-smith.me.uk> Signed-off-by: Zubair Lutfullah Kakakhel <Zubair.Kakakhel@imgtec.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
| * | dt-bindings: memory-controllers: Add binding for jz4780-nemcAlex Smith2015-03-261-0/+75
| | | | | | | | | | | | | | | | | | | | | | | | | | | Add device tree bindings for the NAND/External Memory Controller (NEMC) on Ingenic JZ4780 Signed-off-by: Alex Smith <alex@alex-smith.me.uk> Signed-off-by: Zubair Lutfullah Kakakhel <Zubair.Kakakhel@imgtec.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
| * | spmi: pmic_arb: add support for hw version 2Gilad Avidov2015-03-262-60/+265
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Qualcomm PMIC Arbiter version-2 changes from version-1 are: - Some different register offsets. - New channel register space, one per PMIC peripheral (ppid). All tx traffic uses these channels. - New observer register space. All rx trafic uses this space. - Different command format for spmi command registers. Reviewed-by: Sagar Dharia <sdharia@codeaurora.org> Signed-off-by: Gilad Avidov <gavidov@codeaurora.org> Tested-by: Ivan T. Ivanov <iivanov@mm-sol.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
| * | spmi: remove wakeup command before slave probeGilad Avidov2015-03-261-7/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | According to spmi spec a slave powers up into startup state and then transitions into active state. Thus, the wakeup command is not required before calling the slave's probe. The wakeup command is only needed for slaves that are in sleep state after receiving the sleep command. Cc: galak@codeaurora.org Reviewed-by: Stephen Boyd <sboyd@codeaurora.org> Reviewed-by: Sagar Dharia <sdharia@codeaurora.org> Acked-by: Josh Cartwright <joshc@eso.teric.us> Signed-off-by: Gilad Avidov <gavidov@codeaurora.org> Tested-by: Ivan T. Ivanov <iivanov@mm-sol.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
| * | MAINTAINERS: change Atmel ssc driver entryNicolas Ferre2015-03-261-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | I take over the maintainship from Voice. Signed-off-by: Nicolas Ferre <nicolas.ferre@atmel.com> Cc: Mark Brown <broonie@linaro.org> Cc: Arnd Bergmann <arnd@arndb.de> Acked-by: Bo Shen <voice.shen@atmel.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
OpenPOWER on IntegriCloud