summaryrefslogtreecommitdiffstats
path: root/drivers/extcon/extcon-max77843.c
Commit message (Collapse)AuthorAgeFilesLines
* Merge tag 'regulator-v4.3' of ↵Linus Torvalds2015-08-311-25/+41
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | git://git.kernel.org/pub/scm/linux/kernel/git/broonie/regulator Pull regulator updates from Mark Brown: "The biggest changes in the core this time around have been some refactorings that move us towards being able to drop the list of regulators maintained by the core and instead just use the driver model list maintained for the class devices for regulators which will make the code smaller and avoid some potential bugs. Otherwise another fairly quiet release for the regulator API, highlights include: - a new API for setting voltages based on a minimum, target, maximum triplet - support for continuous voltage ranges rather than tables of explicit steps in the PWM regulator, requiring less explicit configuration - new driver support for Dialog DA9215, Maxim 77843, Mediatek MT6311 and Qualcomm RPM" * tag 'regulator-v4.3' of git://git.kernel.org/pub/scm/linux/kernel/git/broonie/regulator: (70 commits) regulator: mt6311: fix platform_no_drv_owner.cocci warnings regulator: ltc3589: Remove unnecessary MODULE_ALIAS() regulator: ad5398: Remove unnecessary MODULE_ALIAS() regulator: pfuze100: Remove unnecessary MODULE_ALIAS() regulator: core: use debug level print in regulator_check_drms regulator: lp872x: handle error case regulator: lp872x: use the private data instead of updating I2C device platform data regulator: isl9305: Export OF module alias information regulators: max77693: register driver earlier to avoid deferred probe regulator: qcom_smd: Set n_voltages for pm8941_lnldo regulator: core: Use IS_ERR_OR_NULL() regulator: core: Define regulator_set_voltage_triplet() regulator: Regulator driver for the Qualcomm RPM regulator: pbias: Fix broken pbias disable functionality regulator: core: Spelling fix regulator: core: Use class device list for regulator_list in late init regulator: core: Move more deallocation into class unregister regulator: core: Reduce rdev locking region when releasing regulator Input: Remove the max77843 haptic driver Input: max77693: Add support for Maxim 77843 ...
| * mfd/extcon: max77843: Rename defines to allow inclusion with max77693Krzysztof Kozlowski2015-07-161-17/+32
| | | | | | | | | | | | | | | | | | | | | | Add MAX77843_MUIC prefix to some of the defines used in max77843 extcon driver so the max77693-private.h can be included simultaneously with max77843-private.h. Signed-off-by: Krzysztof Kozlowski <k.kozlowski.k@gmail.com> Acked-by: Lee Jones <lee.jones@linaro.org> Acked-by: Chanwoo Choi <cw00.choi@samsung.com> Signed-off-by: Mark Brown <broonie@kernel.org>
| * drivers: max77843: Switch to common max77693 state containerKrzysztof Kozlowski2015-07-161-8/+9
| | | | | | | | | | | | | | | | | | | | | | | | Switch to the same definition of state container as in MAX77693 drivers. This will allow usage of one regulator driver in both devices: MAX77693 and MAX77843. Signed-off-by: Krzysztof Kozlowski <k.kozlowski.k@gmail.com> Acked-by: Dmitry Torokhov <dmitry.torokhov@gmail.com> Acked-by: Lee Jones <lee.jones@linaro.org> Acked-by: Chanwoo Choi <cw00.choi@samsung.com> Signed-off-by: Mark Brown <broonie@kernel.org>
* | extcon: max77843: Clear IRQ bits state before request IRQJaewon Kim2015-08-101-0/+9
|/ | | | | | | | | | IRQ signal before driver probe is needless because driver sends current state after platform booting done. So, this patch clears MUIC IRQ bits before request IRQ. Signed-off-by: Jaewon Kim <jaewon02.kim@samsung.com> Acked-by: MyungJoo Ham <myungjoo.ham@samsung.com> Signed-off-by: Chanwoo Choi <cw00.choi@samsung.com>
* extcon: Redefine the unique id of supported external connectors without ↵Chanwoo Choi2015-06-121-1/+1
| | | | | | | | | | | | | | | '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>
* extcon: Use the unique id for external connector instead of stringChanwoo Choi2015-05-221-33/+23
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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: Alter MHL-TA cable name to TA cable nameChanwoo Choi2015-05-191-4/+2
| | | | | | | | | | 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 jig cable names on rt8973 and max14577/77693/77843Chanwoo Choi2015-05-191-25/+12
| | | | | | | | | | | | | 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>
* 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: max77843: Add max77843 MUIC driverJaewon Kim2015-02-241-0/+881
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>
OpenPOWER on IntegriCloud