- 23 5月, 2017 1 次提交
-
-
由 Markus Elfring 提交于
* A multiplication for the size determination of a memory allocation indicated that an array data structure should be processed. Thus use the corresponding function "devm_kcalloc". * Replace the specification of a data structure by a pointer dereference to make the corresponding size determination a bit safer according to the Linux coding style convention. Signed-off-by: NMarkus Elfring <elfring@users.sourceforge.net> Reviewed-by: NCharles Keepax <ckeepax@opensource.wolfsonmicro.com> Signed-off-by: NChanwoo Choi <cw00.choi@samsung.com>
-
- 06 4月, 2017 1 次提交
-
-
由 Charles Keepax 提交于
As the HPDET can't be aborted mid way through we should not allow any new insertion to be processed until the previous HPDET has finished. It is very unlikely but with low enough debounce settings you could start a new HPDET before the old one has completed, which results in an erroneous reading. Signed-off-by: NCharles Keepax <ckeepax@opensource.wolfsonmicro.com> Signed-off-by: NChanwoo Choi <cw00.choi@samsung.com>
-
- 09 1月, 2017 1 次提交
-
-
由 Charles Keepax 提交于
Currently we handle both old style GPIO and new style GPIOD differently simplify this slightly by converting the old style GPIO to a GPIOD and just using that from then on. Signed-off-by: NCharles Keepax <ckeepax@opensource.wolfsonmicro.com> Signed-off-by: NChanwoo Choi <cw00.choi@samsung.com>
-
- 02 12月, 2016 1 次提交
-
-
由 Richard Fitzgerald 提交于
The name of a codec pin can have an optional prefix string, which is defined by the SoC machine driver. The snd_soc_dapm_x_pin functions take the fully-specified name including the prefix and so the existing code would fail to find the pin if the audio machine driver had added a prefix. Switch to using the snd_soc_component_x_pin equivalent functions that take a specified SoC component and automatically add the name prefix to the provided pin name. Signed-off-by: NRichard Fitzgerald <rf@opensource.wolfsonmicro.com> Acked-by: NChanwoo Choi <cw00.choi@samsung.com> Signed-off-by: NMark Brown <broonie@kernel.org>
-
- 13 9月, 2016 1 次提交
-
-
由 Chanwoo Choi 提交于
This patch alters the renamed extcon API to set the state of the external connectors instead of deprecated extcon_set_cable_state_(). Because the patch[1] modifies the function name to maintain the function naming pattern. - extcon_set_cable_state_() -> extcon_set_state_sync() - extcon_get_cable_state_() -> extcon_get_state() [1] https://lkml.org/lkml/2016/8/4/729 - extcon: Rename the extcon_set/get_state() to maintain the function naming pattern Signed-off-by: NChanwoo Choi <cw00.choi@samsung.com> Acked-by: NCharles Keepax <ckeepax@opensource.wolfsonmicro.com> Acked-by: NRoger Quadros <rogerq@ti.com>
-
- 10 9月, 2016 2 次提交
-
-
由 Chanwoo Choi 提交于
This patch remvoes the usage of extcon_update_state() because the extcon_update_state() use directly the bit masking calculation to change the state of external connector without the unique id of external connector. It makes the code diffcult to read it. So, this patch uses the extcon_set_cable_state_() instead. Signed-off-by: NChanwoo Choi <cw00.choi@samsung.com> Acked-by: NCharles Keepax <ckeepax@opensource.wolfsonmicro.com>
-
由 Charles Keepax 提交于
There is no need for a semi-colon at the end of a switch statement so remove it. Signed-off-by: NCharles Keepax <ckeepax@opensource.wolfsonmicro.com> Signed-off-by: NChanwoo Choi <cw00.choi@samsung.com>
-
- 08 8月, 2016 2 次提交
-
-
由 Chanwoo Choi 提交于
This patch remvoes the usage of extcon_update_state() because the extcon_update_state() use directly the bit masking calculation to change the state of external connector without the unique id of external connector. It makes the code diffcult to read it. So, this patch uses the extcon_set_cable_state_() instead. Signed-off-by: NChanwoo Choi <cw00.choi@samsung.com> Acked-by: NCharles Keepax <ckeepax@opensource.wolfsonmicro.com>
-
由 Charles Keepax 提交于
There is no need for a semi-colon at the end of a switch statement so remove it. Signed-off-by: NCharles Keepax <ckeepax@opensource.wolfsonmicro.com> Signed-off-by: NChanwoo Choi <cw00.choi@samsung.com>
-
- 25 1月, 2016 1 次提交
-
-
由 Charles Keepax 提交于
We should be using the helper functions to lock the DAPM mutex not accessing it directly. There are no ill effects of this as the moment but it is best practice, and the implementation could be changed in the future. Signed-off-by: NCharles Keepax <ckeepax@opensource.wolfsonmicro.com> Signed-off-by: NChanwoo Choi <cw00.choi@samsung.com>
-
- 15 12月, 2015 1 次提交
-
-
由 Charles Keepax 提交于
Add device bindings to support configuring the jack detection configurations. Each configuration needs to specify the connection of the mic det pins, which micbias should be used and the value of the micd polarity GPIO required to activate that configuration. Signed-off-by: NCharles Keepax <ckeepax@opensource.wolfsonmicro.com> Acked-by: NChanwoo Choi <cw00.choi@samsung.com> Signed-off-by: NChanwoo Choi <cw00.choi@samsung.com>
-
- 24 11月, 2015 2 次提交
-
-
由 Charles Keepax 提交于
Add time units of -ms (milliseconds) to wlf,micd-timeout. Signed-off-by: NCharles Keepax <ckeepax@opensource.wolfsonmicro.com> Signed-off-by: NChanwoo Choi <cw00.choi@samsung.com>
-
由 Charles Keepax 提交于
Update the name for the second jack detection pin binding to be a little less confusing. Signed-off-by: NCharles Keepax <ckeepax@opensource.wolfsonmicro.com> Acked-by: NRob Herring <robh@kernel.org> Signed-off-by: NChanwoo Choi <cw00.choi@samsung.com>
-
- 20 11月, 2015 4 次提交
-
-
由 Charles Keepax 提交于
Some Arizona devices have the option to use the GPIO5 pin as a second jack detection pin. This patch adds device bindings to specify to the driver that it should use this pin. Note that the second jack detection pin is hard wired in the chip so can only be enabled through the binding, rather than a pin being specified. Signed-off-by: NCharles Keepax <ckeepax@opensource.wolfsonmicro.com> Acked-by: NChanwoo Choi <cw00.choi@samsung.com> Signed-off-by: NChanwoo Choi <cw00.choi@samsung.com>
-
由 Charles Keepax 提交于
By default the driver expects the jackdet pin to be pulled low when a jack is inserted. This patch adds a device binding that allows the user to specify that the jackdet pin will be pulled high when a jack is inserted. Signed-off-by: NCharles Keepax <ckeepax@opensource.wolfsonmicro.com> Acked-by: NChanwoo Choi <cw00.choi@samsung.com> Signed-off-by: NChanwoo Choi <cw00.choi@samsung.com>
-
由 Charles Keepax 提交于
The switch is generally used in conjunction with the MICDET clamp to suppress pops and clicks associated with jack insertion. This patch adds a binding that allows the user to select the mode of operation for this switch. Signed-off-by: NCharles Keepax <ckeepax@opensource.wolfsonmicro.com> Acked-by: NChanwoo Choi <cw00.choi@samsung.com> Signed-off-by: NChanwoo Choi <cw00.choi@samsung.com>
-
由 Charles Keepax 提交于
Add a simple boolean binding to turn on and off the use of ADC microphone detection mode to determine 3/4 pole jack. Signed-off-by: NCharles Keepax <ckeepax@opensource.wolfsonmicro.com> Acked-by: NChanwoo Choi <cw00.choi@samsung.com> Signed-off-by: NChanwoo Choi <cw00.choi@samsung.com>
-
- 16 10月, 2015 1 次提交
-
-
由 Chanwoo Choi 提交于
This patch modifies the id and name of external connector with the additional prefix to clarify both attribute and meaning of external connector as following: - EXTCON_CHG_* mean the charger connector. - EXTCON_JACK_* mean the jack connector. - EXTCON_DISP_* mean the display port connector. Following table show the new name of external connector with old name: -------------------------------------------------- Old extcon name | New extcon name | -------------------------------------------------- EXTCON_TA | EXTCON_CHG_USB_DCP | EXTCON_CHARGE_DOWNSTREAM| EXTCON_CHG_USB_CDP | EXTCON_FAST_CHARGER | EXTCON_CHG_USB_FAST | EXTCON_SLOW_CHARGER | EXTCON_CHG_USB_SLOW | -------------------------------------------------- EXTCON_MICROPHONE | EXTCON_JACK_MICROPHONE | EXTCON_HEADPHONE | EXTCON_JACK_HEADPHONE | EXTCON_LINE_IN | EXTCON_JACK_LINE_IN | EXTCON_LINE_OUT | EXTCON_JACK_LINE_OUT | EXTCON_VIDEO_IN | EXTCON_JACK_VIDEO_IN | EXTCON_VIDEO_OUT | EXTCON_JACK_VIDEO_OUT | EXTCON_SPDIF_IN | EXTCON_JACK_SPDIF_IN | EXTCON_SPDIF_OUT | EXTCON_JACK_SPDIF_OUT | -------------------------------------------------- EXTCON_HMDI | EXTCON_DISP_HDMI | EXTCON_MHL | EXTCON_DISP_MHL | EXTCON_DVI | EXTCON_DISP_DVI | EXTCON_VGA | EXTCON_DISP_VGA | -------------------------------------------------- And, when altering the name of USB charger connector, EXTCON refers to the "Battery Charging v1.2 Spec and Adopters Agreement"[1] to use the standard name of USB charging port as following. Following name of USB charging port are already used in power_supply subsystem. We chan check it on patch[2]. - EXTCON_CHG_USB_SDP /* Standard Downstream Port */ - EXTCON_CHG_USB_DCP /* Dedicated Charging Port */ - EXTCON_CHG_USB_CDP /* Charging Downstream Port */ - EXTCON_CHG_USB_ACA /* Accessory Charger Adapter */ [1] www.usb.org/developers/docs/devclass_docs/BCv1.2_070312.zip [2] commit 85efc8a1 ("power_supply: Add types for USB chargers") Signed-off-by: NChanwoo Choi <cw00.choi@samsung.com> [ckeepax: For the Arizona changes] Acked-by: NCharles Keepax <ckeepax@opensource.wolfsonmicro.com> Reviewed-by: NRoger Quadros <rogerq@ti.com>
-
- 30 9月, 2015 1 次提交
-
-
由 Chanwoo Choi 提交于
This patch reorders the default statement to remove unnecessary warning message when info->hpdet_ip_version is higher than 2. Signed-off-by: NChanwoo Choi <cw00.choi@samsung.com> Acked-by: NCharles Keepax <ckeepax@opensource.wolfsonmicro.com>
-
- 29 9月, 2015 1 次提交
-
-
由 Richard Fitzgerald 提交于
This patch adds support for the WM8998 and WM1814 codecs. These use the same IP version as WM5110 but have different clamp control. Signed-off-by: NRichard Fitzgerald <rf@opensource.wolfsonmicro.com> Acked-by: NChanwoo Choi <cw00.choi@samsung.com> Signed-off-by: NChanwoo Choi <cw00.choi@samsung.com>
-
- 22 9月, 2015 6 次提交
-
-
由 Charles Keepax 提交于
Whilst the jack is connected we disable the jack detection debounce to ensure as quick as possible a detection of jack removal. However, it is only safe to disable the jack debounce whilst the jack is connected if using the micd clamp or the jack is not inverted. Otherwise spurious interrupts might be generated when we re-enable the debounce. Signed-off-by: NCharles Keepax <ckeepax@opensource.wolfsonmicro.com> Signed-off-by: NChanwoo Choi <cw00.choi@samsung.com>
-
由 Charles Keepax 提交于
Currently we only use the microphone clamp IRQ if GPIO5 is being used as a second jack detection pin. But we should be using it on any system where the clamp is available. This patch updates the driver to do so. Signed-off-by: NCharles Keepax <ckeepax@opensource.wolfsonmicro.com> Signed-off-by: NChanwoo Choi <cw00.choi@samsung.com>
-
由 Nariman Poushin 提交于
The polarity of MICD_CLAMP_STS does not change when different clamp modes are used, this patch corrects this issue. Signed-off-by: NNariman Poushin <nariman@opensource.wolfsonmicro.com> Signed-off-by: NCharles Keepax <ckeepax@opensource.wolfsonmicro.com> Acked-by: NChanwoo Choi <cw00.choi@samsung.com> Signed-off-by: NChanwoo Choi <cw00.choi@samsung.com>
-
由 Charles Keepax 提交于
If the TST_CAP_SEL bits aren't set correctly on wm5110/8280 there will be a 100k load along side the headphones, which will affect the accurary towards the very top of the detection range. This patch sets those bits. Signed-off-by: NCharles Keepax <ckeepax@opensource.wolfsonmicro.com> Acked-by: NChanwoo Choi <cw00.choi@samsung.com> Signed-off-by: NChanwoo Choi <cw00.choi@samsung.com>
-
由 Charles Keepax 提交于
The switch is typically used in conjunction with the MICDET clamp in order to suppress pops and clicks associated with jack insertion. Signed-off-by: NCharles Keepax <ckeepax@opensource.wolfsonmicro.com> Acked-by: NChanwoo Choi <cw00.choi@samsung.com> Signed-off-by: NChanwoo Choi <cw00.choi@samsung.com>
-
由 Charles Keepax 提交于
Newer devices give users the option to make the 3/4 pole jack determination using a software comparison rather than a hardware one. This patch adds support for this functionality. Signed-off-by: NCharles Keepax <ckeepax@opensource.wolfsonmicro.com> Acked-by: NChanwoo Choi <cw00.choi@samsung.com> Signed-off-by: NChanwoo Choi <cw00.choi@samsung.com>
-
- 10 8月, 2015 6 次提交
-
-
由 Charles Keepax 提交于
Currently micd_dbtime can be set to 0 for default, 1 for 4 measurements, or a greater than 16-bit value for 2 measurements. This patch simplifies the symantics to 2 for 2 measurements, 4 for 4 measurements and any other value for the default. I am not super keen on changing the symantics of the pdata at this stage in the drivers life, but acceptance of the DT binding for this field has been made conditional on this happening. Signed-off-by: NCharles Keepax <ckeepax@opensource.wolfsonmicro.com> Signed-off-by: NChanwoo Choi <cw00.choi@samsung.com>
-
由 Charles Keepax 提交于
Detecting an open-circuit on the microphone pin, usually means the headset has a microphone but the cable is faulty. Currently the code will simply stop detecting and declare nothing in this situation. It is better to declare this as headphones such that the user can still use their headset as plain headphones even if the microphone is faulty. Signed-off-by: NCharles Keepax <ckeepax@opensource.wolfsonmicro.com> Signed-off-by: NChanwoo Choi <cw00.choi@samsung.com>
-
由 Charles Keepax 提交于
The detecting flag really refers to the microphone detection stage and as such should be cleared before arizona_identify_headphones is called. Also the mic flag should be set before identify headphones is called as well. Signed-off-by: NCharles Keepax <ckeepax@opensource.wolfsonmicro.com> Signed-off-by: NChanwoo Choi <cw00.choi@samsung.com>
-
由 Charles Keepax 提交于
Convert to using the newer gpiod interface for the micd_pol_gpio. Although we still carry support for the old gpio interface from pdata. Signed-off-by: NCharles Keepax <ckeepax@opensource.wolfsonmicro.com> [cw00.choi: Modify the patch titlei to include the detailed content] Signed-off-by: NChanwoo Choi <cw00.choi@samsung.com>
-
由 Charles Keepax 提交于
This patch adds bindings for the basic microphone detection platform data. Signed-off-by: NCharles Keepax <ckeepax@opensource.wolfsonmicro.com> Signed-off-by: NChanwoo Choi <cw00.choi@samsung.com>
-
由 Charles Keepax 提交于
The device properties API will load data from both device tree and ACPI, update the binding to use this API instead of the OF API. Signed-off-by: NCharles Keepax <ckeepax@opensource.wolfsonmicro.com> Signed-off-by: NChanwoo Choi <cw00.choi@samsung.com>
-
- 13 6月, 2015 1 次提交
-
-
由 Chanwoo Choi 提交于
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: 2a9de9c0 ("extcon: Use the unique id for external connector instead of string") Signed-off-by: NChanwoo Choi <cw00.choi@samsung.com> Signed-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
-
- 22 5月, 2015 1 次提交
-
-
由 Chanwoo Choi 提交于
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: NChanwoo Choi <cw00.choi@samsung.com> Acked-by: NRoger Quadros <rogerq@ti.com> Acked-by: NCharles Keepax <ckeepax@opensource.wolfsonmicro.com> Acked-by: NRamakrishna Pallala <ramakrishna.pallala@intel.com> Reviewed-by: NKrzysztof 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: NArnd Bergmann <arnd@arndb.de> [dan.carpenter: Report the build warning of extcon_{set|get}_cable_state_()] Reported-by: NDan Carpenter <dan.carpenter@oracle.com>
-
- 19 5月, 2015 4 次提交
-
-
由 Inha Song 提交于
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: NInha Song <ideal.song@samsung.com> Acked-by: NLee Jones <lee@kernel.org> Acked-by: NCharles Keepax <ckeepax@opensource.wolfsonmicro.com> Signed-off-by: NChanwoo Choi <cw00.choi@samsung.com>
-
由 Charles Keepax 提交于
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: NCharles Keepax <ckeepax@opensource.wolfsonmicro.com> Signed-off-by: NChanwoo Choi <cw00.choi@samsung.com>
-
由 Chanwoo Choi 提交于
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: NChanwoo Choi <cw00.choi@samsung.com> Acked-by: NCharles Keepax <ckeepax@opensource.wolfsonmicro.com>
-
由 Richard Fitzgerald 提交于
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: NRichard Fitzgerald <rf@opensource.wolfsonmicro.com> Signed-off-by: NChanwoo Choi <cw00.choi@samsung.com>
-
- 04 3月, 2015 2 次提交
-
-
由 Charles Keepax 提交于
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: NCharles Keepax <ckeepax@opensource.wolfsonmicro.com> Signed-off-by: NChanwoo Choi <cw00.choi@samsung.com>
-
由 Charles Keepax 提交于
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: NCharles Keepax <ckeepax@opensource.wolfsonmicro.com> Acked-by: NLee Jones <lee.jones@linaro.org> Signed-off-by: NChanwoo Choi <cw00.choi@samsung.com>
-