summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* misc: mic: Fix reported static checker warningSudeep Dutt2015-06-121-4/+0
| | | | | | | | | | Delete unnecessary prints resulting in an "spdev could be null" warning from a static checker in scif_peer_remove(..). Reported-by: Dan Carpenter <dan.carpenter@oracle.com> Reviewed-by: Ashutosh Dixit <ashutosh.dixit@intel.com> Signed-off-by: Sudeep Dutt <sudeep.dutt@intel.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* misc: mic: Fix randconfig build error by including errno.hSudeep Dutt2015-06-121-0/+1
| | | | | | | | | This issue was reported @ https://lkml.org/lkml/2015/6/9/731 Reported-by: Jim Davis <jim.epost@gmail.com> Reviewed-by: Ashutosh Dixit <ashutosh.dixit@intel.com> Signed-off-by: Sudeep Dutt <sudeep.dutt@intel.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* uio: pruss: Drop depends on ARCH_DAVINCI_DA850 from configMatwey V. Kornilov2015-06-121-1/+0
| | | | | | | | | | | mach-dependant stuff has been removed by 2eb2478d471e ("uio: uio_pruss: replace private SRAM API with genalloc") There is no need to keep depends on ARCH_DAVINCI_DA850 Signed-off-by: Matwey V. Kornilov <matwey@sai.msu.ru> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* uio: pruss: Add CONFIG_HAS_IOMEM dependenceMatwey V. Kornilov2015-06-121-0/+1
| | | | | | | uio_pruss uses io memory, that should be explicitly depend on it Signed-off-by: Matwey V. Kornilov <matwey@sai.msu.ru> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* uio: pruss: Include <linux/sizes.h>Matwey V. Kornilov2015-06-121-0/+1
| | | | | | | uio_pruss references SZ_16K and SZ_256K defines, but linux/sizes.h is not included. Signed-off-by: Matwey V. Kornilov <matwey@sai.msu.ru> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* extcon: Redefine the unique id of supported external connectors without ↵Chanwoo Choi2015-06-1214-77/+71
| | | | | | | | | | | | | | | 'enum extcon' type This patch just redefine the unique id of supported external connectors without 'enum extcon' type. Because unique id would be used on devictree file(*.dts) to indicate the specific external connectors like key number of input framework. So, I have the plan to move this definitions to following header file which includes the unique id of supported external connectors. - include/dt-bindings/extcon/extcon.h Fixes: 2a9de9c0f08d ("extcon: Use the unique id for external connector instead of string") Signed-off-by: Chanwoo Choi <cw00.choi@samsung.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* char:xilinx_hwicap:buffer_icap - change 1/0 to true/false for bool type ↵Shailendra Verma2015-06-121-3/+3
| | | | | | | | | | | | variable in function buffer_icap_set_configuration(). The variable dirty is bool type. Hence assign the variable with bool value true/false instead of 1/0. Signed-off-by: Shailendra Verma <shailendra.capricorn@gmail.com> Tested-by: Michal Simek <michal.simek@xilinx.com> Acked-by: Moritz Fischer <moritz.fischer@ettus.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* Drivers: hv: vmbus: Allocate ring buffer memory in NUMA aware fashionK. Y. Srinivasan2015-06-121-2/+12
| | | | | | | | | Allocate ring buffer memory from the NUMA node assigned to the channel. Since this is a performance and not a correctness issue, if the node specific allocation were to fail, fall back and allocate without specifying the node. Signed-off-by: K. Y. Srinivasan <kys@microsoft.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* parport: check exclusive access before registerSudip Mukherjee2015-06-121-0/+28
| | | | | | | | | | | | | As of now we were starting the registration process and after the device is registered we were checking if the device can be used by the parport. Now lets check it first so that we do not need to go through the registration process only to fail at the end. The original exclusive access check at the end is still there so that we do not get any surprises if two different process registers its device with same parport and with exclusive access at the same time. Signed-off-by: Sudip Mukherjee <sudip@vectorindia.org> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* w1: use correct lock on error in w1_seq_show()Dan Carpenter2015-06-121-2/+2
| | | | | | | | | | | | | | | | | I noticed there was a problem here because Smatch complained: drivers/w1/slaves/w1_therm.c:416 w1_seq_show() warn: inconsistent returns 'mutex:&sl->master->mutex'. Locked on: line 416 Unlocked on: line 413 The problem is that we lock ->mutex but we unlock ->bus_mutex on error. David Fries says that ->bus_mutex is correct and ->mutex is incorrect. Fixes: d9411e57dc7f ('w1: Add support for DS28EA00 sequence to w1-therm') Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com> Acked-by: Evgeniy Polyakov <zbr@ioremap.net> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* w1: fix for loop exit condition in w1_seq_show()Dan Carpenter2015-06-121-1/+1
| | | | | | | | | The W1_42_FINISHED_BYTE is 0xFF so the cast means the condition is never true. Fixes: d9411e57dc7f ('w1: Add support for DS28EA00 sequence to w1-therm') Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* drivers/hwtracing: fix coresight-etm4x implicit <module.h> usagePaul Gortmaker2015-06-081-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | In commit 2e1cdfe184b5202d51e0611d7a051e2bea303946 ("coresight-etm4x: Adding CoreSight ETM4x driver") this driver was added. It uses module_amba_driver() to register itself with the system, which is just an alias for module_driver. This currently works by relying on getting that via init.h but we are planning to move that code[1] to module.h -- at which time this will fail to compile since it does not include module.h currently, resulting in: drivers/hwtracing/coresight/coresight-etm4x.c:2701:1: note: in expansion of macro ‘module_amba_driver’ module_amba_driver(etm4x_driver); ^ include/linux/device.h:1296:1: error: type defaults to ‘int’ in declaration of ‘module_init’ [-Werror=implicit-int] module_init(__driver##_init); \ ^ In the future, the amba support may want to create another alias that uses builtin_driver[2] for cases like this which are using bool Kconfig triggers, but for now we just fix the implicit include. [1] https://lkml.kernel.org/r/1433276168-21550-1-git-send-email-paul.gortmaker@windriver.com [2] https://lkml.kernel.org/r/1431287385-1526-1-git-send-email-paul.gortmaker@windriver.com Cc: Pratik Patel <pratikp@codeaurora.org> Cc: Kaixu Xia <xiakaixu@huawei.com> Signed-off-by: Paul Gortmaker <paul.gortmaker@windriver.com> Acked-by: Mathieu Poirier <mathieu.poirier@linaro.org> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* drivers/hwtracing: fix coresight-replicator-qcom implicit <module.h> usagePaul Gortmaker2015-06-081-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | In commit 620cf787c121f39b5223e43bad3d1b7c66ecead5 ("coresight: replicator: Add Qualcomm CoreSight Replicator driver") this driver was added. It uses module_amba_driver(replicator_driver) to register itself with the system -- which is just an alias for module_driver. This currently works by relying on getting that via init.h but we are planning to move that code[1] to module.h -- at which time this will fail to compile since it does not include module.h currently, resulting in: drivers/hwtracing/coresight/coresight-replicator-qcom.c:214:1: error: type defaults to 'int' in declaration of 'module_init' [-Werror=implicit-int] drivers/hwtracing/coresight/coresight-replicator-qcom.c:214:1: error: type defaults to 'int' in declaration of 'module_exit' [-Werror=implicit-int] In the future, the amba support may want to create another alias that uses builtin_driver[2] for cases like this which are using bool Kconfig triggers, but for now we just fix the implicit include. [1] https://lkml.kernel.org/r/1433276168-21550-1-git-send-email-paul.gortmaker@windriver.com [2] https://lkml.kernel.org/r/1431287385-1526-1-git-send-email-paul.gortmaker@windriver.com Cc: Pratik Patel <pratikp@codeaurora.org> Cc: Ivan T. Ivanov <ivan.ivanov@linaro.org> Signed-off-by: Paul Gortmaker <paul.gortmaker@windriver.com> Acked-by: Mathieu Poirier <mathieu.poirier@linaro.org> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* Merge tag 'extcon-next-for-4.2' of ↵Greg Kroah-Hartman2015-06-0322-613/+885
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | git://git.kernel.org/pub/scm/linux/kernel/git/chanwoo/extcon into char-misc-next Chanwoo writes: Update extcon for v4.2 This patchset include the huge update of extcon core and add the new one extcon driver and fix minor isseu of extcon drivers. Detailed description for patchset: 1. Update the extcon core. - Modify the extcon device name on sysfs from device name name to 'extcon[X]' as following because if same extcon device are included in H/W development board, the one of the two device driver might be failed on the probe(). : /sys/class/extcon/[device name] -> /sys/class/extcon/extcon[X] - Use the unique id for external connectors instead of legacy string name. Previously, extcon used the string name to identify the type of external connectors. This way have the many potential issues. So, extcon core define the unique id for each external connectors as following: enum extcon { EXTCON_NONE = 0x0, /* USB external connector */ EXTCON_USB = 0x1, EXTCON_USB_HOST = 0x2, /* Charger external connector */ EXTCON_TA = 0x10, EXTCON_FAST_CHARGER = 0x11, EXTCON_SLOW_CHARGER = 0x12, EXTCON_CHARGE_DOWNSTREAM = 0x13, /* Audio and video external connector */ EXTCON_LINE_IN = 0x20, EXTCON_LINE_OUT = 0x21, EXTCON_MICROPHONE = 0x22, EXTCON_HEADPHONE = 0x23, ... }; - Update tye prototype of extcon_register_notifier() by using the unique id (enum extcon) of external connectors. - Add extcon_get_edev_name() API to get the name of extcon device on extcon client driver because the name is included in 'struct extcon_dev' and 'struct extcon_dev' should be handled in only drivers/extcon directory. So. if extcon client need the name of extcon device, they could use this function. - Unify the jig/dock and MHL-TA cable name on extcon driver. : JIG-{USB-ON|USB-OFF|UART-ON|UART-OFF} -> JIG : Dock-{Smart|Desk|Audio|Card} -> DOCK : MHL-TA -> TA - Use the capital letter for the name of all external connectors. - Remove the optional print_name() function pointer from struct extcon_dev to maintain the consistent name of extcon device. 2. Add the new extcon-axp288.c extcon driver. - The extcon-axp288.c driver support for AXP288 PMIC which has the BC1.2 charger detection capability. So this extcon driver can detect the EXTCON_SLOW_CHARGER, EXTCON_CHARGE_DOWNSTREAM and EXTCON_FAST_CHARGER. 3. Update the extcon-arizona.c driver. - Add support for selective detection mode when headphone detection. - Apply HP clamps for WM8280 4. Clean-up the extcon core and drivers. - Add manufactor information of each extcon device. - Fix checkpatch warning and minor coding style on extcon.c.c - Fix build break if GPIOLIB is not enabled on extcon-usb-gpiio.c. - Set the direction of gpio when calling devm_gpiod_get() on extcon-usb-gpio.c
| * extcon: Remove optional print_name() function pointer of extcon_devChanwoo Choi2015-05-292-11/+0
| | | | | | | | | | | | | | | | | | | | | | This patch removes the optional print_name() function pointer included in 'struct extcon_dev' because the extcon must maintain the consistent name of extcon device on sysfs instead of inconsistent name. After merged patch[1], extcon can maintain the consistent name of extcon device without any hard-coded device name. [1] https://lkml.org/lkml/2015/4/27/258 Signed-off-by: Chanwoo Choi <cw00.choi@samsung.com>
| * extcon: Update the prototype of extcon_register_notifier() with enum extconChanwoo Choi2015-05-222-52/+56
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Previously, extcon consumer driver used the extcon_register_interest() to register the notifier chain and then to receive the notifier event when external connector's state is changed. When registering the notifier chain for specific external connector with extcon_register_interest(), it used the the string name of external connector directly. There are potential problem because of unclear, non-standard and inconsequent cable name. Namely, it is not appropriate method to identify each external connector. So, this patch modify the prototype of extcon_register_notifier() by using the 'enum extcon' which are the unique id for each external connector instead of unclear string method. - Previously, the extcon consumer driver used the extcon_register_interest() with 'cable_name' to point out the specific external connector. Also. it used the un-needed structure (struct extcon_specific_cable_nb). : int extcon_register_interest(struct extcon_specific_cable_nb *obj, const char *extcon_name, const char *cable_name, struct notifier_block *nb) - Newly, the updated extcon_register_notifier() would definitely support the same feature to detech the changed state of external connector without any specific structure (struct extcon_specific_cable_nb). : int extcon_register_notifier(struct extcon_dev *edev, enum extcon id, struct notifier_block *nb) This patch support the both extcon_register_interest() and new extcon_register_ notifier(). But the extcon_{register|unregister}_interest() will be deprecated because extcon core would support the notifier event for extcon consumer driver with only updated extcon_register_notifier() and 'extcon_specific_cable_nb' will be removed if there are no extcon consumer driver with legacy extcon_{register|unregister}_interest(). Signed-off-by: Chanwoo Choi <cw00.choi@samsung.com> Reviewed-by: Krzysztof Kozlowski <k.kozlowski@samsung.com>
| * extcon: Use capital letter for the name of external connectorsChanwoo Choi2015-05-221-14/+23
| | | | | | | | | | | | | | | | This patch uses the capital letter for the name of external connectors to improve the readability instead of small letter. Cc: MyungJoo Ham <myungjoo.ham@samsung.com> Signed-off-by: Chanwoo Choi <cw00.choi@samsung.com>
| * extcon: Use the unique id for external connector instead of stringChanwoo Choi2015-05-2214-411/+320
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This patch uses the unique id to identify the type of external connector instead of string name. The string name have the many potential issues. So, this patch defines the 'extcon' enumeration which includes all supported external connector on EXTCON subsystem. If new external connector is necessary, the unique id of new connector have to be added in 'extcon' enumeration. There are current supported external connector in 'enum extcon' as following: enum extcon { EXTCON_NONE = 0x0, /* USB external connector */ EXTCON_USB = 0x1, EXTCON_USB_HOST = 0x2, /* Charger external connector */ EXTCON_TA = 0x10, EXTCON_FAST_CHARGER = 0x11, EXTCON_SLOW_CHARGER = 0x12, EXTCON_CHARGE_DOWNSTREAM = 0x13, /* Audio and video external connector */ EXTCON_LINE_IN = 0x20, EXTCON_LINE_OUT = 0x21, EXTCON_MICROPHONE = 0x22, EXTCON_HEADPHONE = 0x23, EXTCON_HDMI = 0x30, EXTCON_MHL = 0x31, EXTCON_DVI = 0x32, EXTCON_VGA = 0x33, EXTCON_SPDIF_IN = 0x34, EXTCON_SPDIF_OUT = 0x35, EXTCON_VIDEO_IN = 0x36, EXTCON_VIDEO_OUT = 0x37, /* Miscellaneous external connector */ EXTCON_DOCK = 0x50, EXTCON_JIG = 0x51, EXTCON_MECHANICAL = 0x52, EXTCON_END, }; For example in extcon-arizona.c: To use unique id removes the potential issue about handling the inconsistent name of external connector with string. - Previously, use the string to register the type of arizona jack connector static const char *arizona_cable[] = { "Mechanical", "Microphone", "Headphone", "Line-out", }; - Newly, use the unique id to register the type of arizona jack connector static const enum extcon arizona_cable[] = { EXTCON_MECHANICAL, EXTCON_MICROPHONE, EXTCON_HEADPHONE, EXTCON_LINE_OUT, EXTCON_NONE, }; And this patch modify the prototype of extcon_{get|set}_cable_state_() which uses the 'enum extcon id' instead of 'cable_index'. Because although one more extcon drivers support USB cable, each extcon driver might has the differnt 'cable_index' for USB cable. All extcon drivers can use the unique id number for same external connector with modified extcon_{get|set}_cable_state_(). - Previously, use 'cable_index' on these functions: extcon_get_cable_state_(struct extcon_dev*, int cable_index) extcon_set_cable_state_(struct extcon_dev*, int cable_index, bool state) -Newly, use 'enum extcon id' on these functions: extcon_get_cable_state_(struct extcon_dev*, enum extcon id) extcon_set_cable_state_(struct extcon_dev*, enum extcon id, bool state) Cc: Arnd Bergmann <arnd@arndb.de> Cc: Felipe Balbi <balbi@ti.com> Signed-off-by: Chanwoo Choi <cw00.choi@samsung.com> Acked-by: Roger Quadros <rogerq@ti.com> Acked-by: Charles Keepax <ckeepax@opensource.wolfsonmicro.com> Acked-by: Ramakrishna Pallala <ramakrishna.pallala@intel.com> Reviewed-by: Krzysztof Kozlowski <k.kozlowski@samsung.com> [arnd: Report the build break about drivers/usb/phy/phy-tahvo.c after using the unique id for external connector insteadf of string] Reported-by: Arnd Bergmann <arnd@arndb.de> [dan.carpenter: Report the build warning of extcon_{set|get}_cable_state_()] Reported-by: Dan Carpenter <dan.carpenter@oracle.com>
| * extcon: usb-gpio: use flags argument of devm_gpiod_get to set directionUwe Kleine-König2015-05-201-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | Since 39b2bbe3d715 (gpio: add flags argument to gpiod_get*() functions) which appeared in v3.17-rc1, the gpiod_get* functions take an additional parameter that allows to specify direction and initial value for output. Without this patch there is no call to gpiod_direction_input but the gpio is used for irq reporting and for that the line should be in input mode. Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de> Signed-off-by: Chanwoo Choi <cw00.choi@samsung.com>
| * extcon: Remove the optional name of extcon deviceChanwoo Choi2015-05-198-9/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This patch removes the optional name of extcon device. Instead, extcon_dev_register() set the device name as 'extcon[number]' naming pattern. - /sys/class/extcon/[hardcoded device name] -> /sys/class/extcon/extcon[number] Signed-off-by: Chanwoo Choi <cw00.choi@samsung.com> Acked-by: Krzysztof Kozlowski <k.kozlowski@samsung.com> Cc: MyungJoo Ham <myungjoo.ham@samsung.com> Cc: Charles Keepax <ckeepax@opensource.wolfsonmicro.com> Cc: Graeme Gregory <gg@slimlogic.co.uk> Cc: Kishon Vijay Abraham I <kishon@ti.com> Cc: Krzysztof Kozlowski <k.kozlowski@samsung.com> Cc: Jaewon Kim <jaewon02.kim@samsung.com>
| * extcon: Allow compile test of GPIO consumers if !GPIOLIBGeert Uytterhoeven2015-05-192-2/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The GPIO subsystem provides dummy GPIO consumer functions if GPIOLIB is not enabled. Hence drivers that depend on GPIOLIB, but use GPIO consumer functionality only, can still be compiled if GPIOLIB is not enabled. Relax the dependency on GPIOLIB if COMPILE_TEST is enabled, where appropriate. If GPIOLIB=n and asm-generic/gpio.h is not used: drivers/extcon/extcon-usb-gpio.c: In function ‘usb_extcon_detect_cable’: drivers/extcon/extcon-usb-gpio.c:63: error: implicit declaration of function ‘gpiod_get_value_cansleep’ drivers/extcon/extcon-usb-gpio.c: In function ‘usb_extcon_probe’: drivers/extcon/extcon-usb-gpio.c:116: error: implicit declaration of function ‘devm_gpiod_get’ drivers/extcon/extcon-usb-gpio.c:116: warning: assignment makes pointer from integer without a cast drivers/extcon/extcon-usb-gpio.c:122: error: implicit declaration of function ‘gpiod_set_debounce’ drivers/extcon/extcon-usb-gpio.c:129: error: implicit declaration of function ‘gpiod_to_irq’ Add the missing #include <linux/gpio/consumer.h> to fix this. Signed-off-by: Geert Uytterhoeven <geert@linux-m68k.org> Signed-off-by: Chanwoo Choi <cw00.choi@samsung.com>
| * extcon: adc-jack: Remove the unneeded num_cables fieldChanwoo Choi2015-05-191-12/+0
| | | | | | | | | | | | | | | | This patch removes the 'num_cables' filed from 'struct adc_jack_pdata' because 'struct extcon_dev' contains the 'max_supported' field which means the number of supported cable of extcon device. Signed-off-by: Chanwoo Choi <cw00.choi@samsung.com>
| * extcon: Alter MHL-TA cable name to TA cable nameChanwoo Choi2015-05-192-11/+7
| | | | | | | | | | | | | | | | | | | | This patch alters the MHL-TA cable name to TA cable name because MHL-TA is not standard name. The MHL-TA is MHL cable with charger cable (TA or USB). So, this patch use the TA cable instead of MHL-TA to inform the charger cable state. - MHL-TA -> TA Signed-off-by: Chanwoo Choi <cw00.choi@samsung.com> Reviewed-by: Krzysztof Kozlowski <k.kozlowski@samsung.com>
| * extcon: Unify the dock device names on max8997/77693Chanwoo Choi2015-05-192-25/+16
| | | | | | | | | | | | | | | | | | | | | | | | | | | | This patch change the name of various dock devices as 'DOCK' because the name of various dock devices have not the standard naming rules. The name of dock devices include the differenct word but it is ambiguous and never important information on user-space aspect. This patch unifies the name of dock devices as following: - Dock-Smart -->|--> DOCK - Dock-Desk -->| - Dock-Audio -->| - Dock-Card -->| Signed-off-by: Chanwoo Choi <cw00.choi@samsung.com> Reviewed-by: Krzysztof Kozlowski <k.kozlowski@samsung.com>
| * extcon: Unify the jig cable names on rt8973 and max14577/77693/77843Chanwoo Choi2015-05-194-78/+23
| | | | | | | | | | | | | | | | | | | | | | | | | | This patch change the name of various jig cables as 'JIG' because the name of various jig cables are strange and ambiguous on user-space aspect. They include the different information of either USB and UART state. It is never important for user-space process. This patch unifies the name of jig cables as following: - JIG-USB-ON -->|--> JIG - JIG-USB-OFF -->| - JIG-UART-ON -->| - JIG-UART-OFF -->| Signed-off-by: Chanwoo Choi <cw00.choi@samsung.com>
| * mfd: arizona: Update DT binding to support hpdet channelInha Song2015-05-191-0/+6
| | | | | | | | | | | | | | | | | | | | This patch add device tree bindings for the pdata needed to configure the Accessory Detect Mode select when Headphone detection. Signed-off-by: Inha Song <ideal.song@samsung.com> Acked-by: Lee Jones <lee@kernel.org> Acked-by: Charles Keepax <ckeepax@opensource.wolfsonmicro.com> Signed-off-by: Chanwoo Choi <cw00.choi@samsung.com>
| * extcon: arizona: Add support for select accessory detect mode when headphone ↵Inha Song2015-05-193-8/+37
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | detection This patch add support for select accessory detect mode to HPDETL or HPDETR. Arizona provides a headphone detection circuit on the HPDETL and HPDETR pins to measure the impedance of an external load connected to the headphone. Depending on board design, headphone detect pins can change to HPDETR or HPDETL. Signed-off-by: Inha Song <ideal.song@samsung.com> Acked-by: Lee Jones <lee@kernel.org> Acked-by: Charles Keepax <ckeepax@opensource.wolfsonmicro.com> Signed-off-by: Chanwoo Choi <cw00.choi@samsung.com>
| * extcon: arizona: Apply HP clamps correctly for WM8280Charles Keepax2015-05-191-0/+1
| | | | | | | | | | | | | | | | | | | | The headphone clamping is not set correctly currently, this was missed because the wm8280 patches and the patch fixing the clamping for wm5110 went upstream at very similar times. This patch sets the headphone clamping correctly for wm8280. Signed-off-by: Charles Keepax <ckeepax@opensource.wolfsonmicro.com> Signed-off-by: Chanwoo Choi <cw00.choi@samsung.com>
| * extcon: arizona: Remove the setting of device nameChanwoo Choi2015-05-191-1/+0
| | | | | | | | | | | | | | | | | | | | This patch removes the setting of device name. Instead, extcon_dev_register() set the device name such as 'extcon[number]' naming method. - /sys/class/extcon/Headset Jack -> /sys/class/extcon/extcon[number] Cc: Charles Keepax <ckeepax@opensource.wolfsonmicro.com> Signed-off-by: Chanwoo Choi <cw00.choi@samsung.com> Acked-by: Charles Keepax <ckeepax@opensource.wolfsonmicro.com>
| * extcon: Fix the checkpatch warning and minor coding style issueChanwoo Choi2015-05-192-8/+9
| | | | | | | | | | | | | | This patch clean up the extcon core driver by fixing the checkpatch warning and minor coding style issue. Signed-off-by: Chanwoo Choi <cw00.choi@samsung.com>
| * extcon: Add extcon_get_edev_name() API to get the extcon device nameChanwoo Choi2015-05-192-0/+13
| | | | | | | | | | | | | | | | This patch adds the extcon_get_edev_name() API to get the name of extcon device because all information inclued in the structure extcon_dev should be accessed by extcon core API instead of directly accessing the data. Signed-off-by: Chanwoo Choi <cw00.choi@samsung.com>
| * extcon: Modify the device name as extcon[X] for sysfsChanwoo Choi2015-05-191-3/+5
| | | | | | | | | | | | | | | | | | | | This patch modify the device name as extcon[X] for sysfs by using the 'extcon' prefix word instead of separate device name. On user-space aspect, user would find the some extcon drvier with extcon[X] pattern. So, this patch modify the device name as following: - /sys/class/extcon/[device name] -> /sys/class/extcon/extcon[X] Signed-off-by: Chanwoo Choi <cw00.choi@samsung.com>
| * extcon: axp288: Add axp288 extcon driver supportRamakrishna Pallala2015-05-194-0/+398
| | | | | | | | | | | | | | | | | | | | | | | | This patch adds the extcon support for AXP288 PMIC which has the BC1.2 charger detection capability. Additionally it also adds the USB mux switching support b/w SOC and PMIC based on GPIO control. Signed-off-by: Ramakrishna Pallala <ramakrishna.pallala@intel.com> Acked-by: Lee Jones <lee.jones@linaro.org> [cw00.choi: Modify the log message to keep the consistent log message pattern] Signed-off-by: Chanwoo Choi <cw00.choi@samsung.com>
| * extcon: arizona: Rename hpdet_ip to make its purpose clearerRichard Fitzgerald2015-05-191-5/+5
| | | | | | | | | | | | | | | | Renamed to hpdet_ip_version to make it clearer what it does and that the value in it is simply a version number. Signed-off-by: Richard Fitzgerald <rf@opensource.wolfsonmicro.com> Signed-off-by: Chanwoo Choi <cw00.choi@samsung.com>
| * extcon: Add manufactor name of each extcon deviceChanwoo Choi2015-05-191-7/+7
| | | | | | | | | | | | | | This patch adds the manufactor name of each extcon device and removes un-necessary comment in Kconfig. Signed-off-by: Chanwoo Choi <cw00.choi@samsung.com>
* | Drivers: hv: vmbus: Implement NUMA aware CPU affinity for channelsK. Y. Srinivasan2015-06-012-29/+48
| | | | | | | | | | | | | | | | | | | | | | | | Channels/sub-channels can be affinitized to VCPUs in the guest. Implement this affinity in a way that is NUMA aware. The current protocol distributed the primary channels uniformly across all available CPUs. The new protocol is NUMA aware: primary channels are distributed across the available NUMA nodes while the sub-channels within a primary channel are distributed amongst CPUs within the NUMA node assigned to the primary channel. Signed-off-by: K. Y. Srinivasan <kys@microsoft.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* | Drivers: hv: vmbus: Use the vp_index map even for channels bound to CPU 0K. Y. Srinivasan2015-06-011-1/+1
| | | | | | | | | | | | | | | | | | | | | | Map target_cpu to target_vcpu using the mapping table. We should use the mapping table to transform guest CPU ID to VP Index as is done for the non-performance critical channels. While the value CPU 0 is special and will map to VP index 0, it is good to be consistent. Signed-off-by: K. Y. Srinivasan <kys@microsoft.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* | w1: ds2482: Add i2c module alias nameLudek Hlavacek2015-06-011-0/+1
| | | | | | | | | | | | | | | | | | Add i2c alias to enable autoloading of the module for device specified in device-tree. Signed-off-by: Ludek Hlavacek <ludek_h@seznam.cz> Acked-by: Evgeniy Polyakov <zbr@ioremap.net> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* | snsc: pass timeout as HZ independent valueNicholas Mc Guire2015-06-011-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | schedule_timeout takes a timeout in jiffies but the code currently is passing in a constant SCDRV_TIMEOUT which makes this timeout HZ dependent, so pass it through msecs_to_jiffies() to fix this up. patch was compile tested with generic_defconfig (implies CONFIG_SGI_SNSC=y) Patch is against 4.0-rc5 (localversion-next is -next-20150527) Signed-off-by: Nicholas Mc Guire <hofrat@osadl.org> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* | MAINTAINERS: Fix typo in Android drivers git pathLee Campbell2015-06-011-1/+1
| | | | | | | | | | | | | | | | Fix typo in staging git location for the ANDROID DRIVERS secion. Signed-off-by: Lee Campbell <leecam@google.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* | MAINTAINERS: maintain parportSudip Mukherjee2015-06-011-2/+5
| | | | | | | | | | | | | | | | Lets give the parport subsystem a proper name and start maintaining the files. Signed-off-by: Sudip Mukherjee <sudip@vectorindia.org> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* | paride: use new parport device modelSudip Mukherjee2015-06-017-7/+96
| | | | | | | | | | | | | | | | Modify paride driver to use the new parallel port device model. Tested-by: Alan Cox <gnomes@lxorguk.ukuu.org.uk> Signed-off-by: Sudip Mukherjee <sudip@vectorindia.org> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* | i2c-parport: use new parport device modelSudip Mukherjee2015-06-011-5/+10
| | | | | | | | | | | | | | | | | | Modify i2c-parport driver to use the new parallel port device model. Tested-by: Jean Delvare <jdelvare@suse.de> Acked-by: Wolfram Sang <wsa@the-dreams.de> Signed-off-by: Sudip Mukherjee <sudip@vectorindia.org> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* | i2c-parport: define ports to connectSudip Mukherjee2015-06-011-0/+23
| | | | | | | | | | | | | | | | | | | | | | As of now i2c-parport was connecting to all the available parallel ports. Lets limit that to maximum of 4 instances and at the same time define which instance connects to which parallel port. Tested-by: Jean Delvare <jdelvare@suse.de> Signed-off-by: Sudip Mukherjee <sudip@vectorindia.org> Acked-by: Wolfram Sang <wsa@the-dreams.de> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* | staging: panel: use new parport device modelSudip Mukherjee2015-06-011-5/+9
| | | | | | | | | | | | | | Converted to use the new device-model parallel port. Signed-off-by: Sudip Mukherjee <sudip@vectorindia.org> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* | parport: add device-model to parport subsystemSudip Mukherjee2015-06-014-28/+379
| | | | | | | | | | | | | | | | | | | | | | parport subsystem starts using the device-model. Drivers using the device-model has to define devmodel as true and should register the device with parport using parport_register_dev_model(). Tested-by: Jean Delvare <jdelvare@suse.de> Tested-by: Alan Cox <gnomes@lxorguk.ukuu.org.uk> Signed-off-by: Sudip Mukherjee <sudip@vectorindia.org> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* | char:pcmcia:synclink_cs - Do not initialise statics to 0.Shailendra Verma2015-06-011-1/+1
| | | | | | | | | | | | | | | | | | | | | | Static variables are initialised to 0 by GCC. Fixes the following checkpatch error: ERROR: do not initialise statics to 0 or NULL FILE: drivers/char/pcmcia/synclink_cs.c:440: static bool break_on_load = 0; Signed-off-by: Shailendra Verma <shailendra.capricorn@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* | Drivers: hv: balloon: check if ha_region_mutex was acquired in ↵Vitaly Kuznetsov2015-06-011-1/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | MEM_CANCEL_ONLINE case Memory notifiers are being executed in a sequential order and when one of them fails returning something different from NOTIFY_OK the remainder of the notification chain is not being executed. When a memory block is being onlined in online_pages() we do memory_notify(MEM_GOING_ONLINE, ) and if one of the notifiers in the chain fails we end up doing memory_notify(MEM_CANCEL_ONLINE, ) so it is possible for a notifier to see MEM_CANCEL_ONLINE without seeing the corresponding MEM_GOING_ONLINE event. E.g. when CONFIG_KASAN is enabled the kasan_mem_notifier() is being used to prevent memory hotplug, it returns NOTIFY_BAD for all MEM_GOING_ONLINE events. As kasan_mem_notifier() comes before the hv_memory_notifier() in the notification chain we don't see the MEM_GOING_ONLINE event and we do not take the ha_region_mutex. We, however, see the MEM_CANCEL_ONLINE event and unconditionally try to release the lock, the following is observed: [ 110.850927] ===================================== [ 110.850927] [ BUG: bad unlock balance detected! ] [ 110.850927] 4.1.0-rc3_bugxxxxxxx_test_xxxx #595 Not tainted [ 110.850927] ------------------------------------- [ 110.850927] systemd-udevd/920 is trying to release lock (&dm_device.ha_region_mutex) at: [ 110.850927] [<ffffffff81acda0e>] mutex_unlock+0xe/0x10 [ 110.850927] but there are no more locks to release! At the same time we can have the ha_region_mutex taken when we get the MEM_CANCEL_ONLINE event in case one of the memory notifiers after the hv_memory_notifier() in the notification chain failed so we need to add the mutex_is_locked() check. In case of MEM_ONLINE we are always supposed to have the mutex locked. 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: vmbus:Update preferred vmbus protocol version to windows 10.Keith Mange2015-06-012-4/+8
| | | | | | | | | | | | | | | | Add support for Windows 10. Signed-off-by: Keith Mange <keith.mange@microsoft.com> Signed-off-by: K. Y. Srinivasan <kys@microsoft.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* | char: misc: restore MISC_DYNAMIC_MINOR on device_create() failureVladimir Zapolskiy2015-06-011-4/+9
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | On attempt to register a dynamic minor misc device its minor number is updated to a virtual minor number prior to device_create() call, however on error path misc->minor == MISC_DYNAMIC_MINOR is not restored. Following the rule of thumb that a function returning an error must not change the state of the caller, assign MISC_DYNAMIC_MINOR back. The problem is met in a sutuation, when subsys_initcall(misc_init) is not yet called and misc_class is not created, but misc_register() modifies statically defined ".minor = MISC_DYNAMIC_MINOR", therefore implicitly changing the client's logic on next attempt (e.g. retrying from deferred list) to register a misc device, whose minor number is converted from dynamic to some unknown static one. Signed-off-by: Vladimir Zapolskiy <vladimir_zapolskiy@mentor.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
OpenPOWER on IntegriCloud