summaryrefslogtreecommitdiffstats
path: root/drivers/extcon/extcon-max14577.c
Commit message (Collapse)AuthorAgeFilesLines
* extcon: max14577: Use devm_extcon_dev_allocate for extcon_devChanwoo Choi2014-04-291-3/+4
| | | | | | | | | | This patch use devm_extcon_dev_allocate() to simplify the memory control of extcon device. Cc: Krzysztof Kozlowski <k.kozlowski@samsung.com> Signed-off-by: Chanwoo Choi <cw00.choi@samsung.com> Reviewed-by: Krzysztof Kozlowski <k.kozlowski@samsung.com> Reviewed-by: Felipe Balbi <balbi@ti.com>
* extcon: max14577: Use devm_extcon_dev_register()Sangjung Woo2014-04-241-7/+2
| | | | | | | | | | | Use the resource-managed extcon device register function (i.e. devm_extcon_dev_register()) instead of extcon_dev_register(). If extcon device is attached with this function, that extcon device is automatically unregistered on driver detach. That reduces tiresome managing code. Signed-off-by: Sangjung Woo <sangjung.woo@samsung.com> Reviewed-by: Krzysztof Kozlowski <k.kozlowski@samsung.com> Signed-off-by: Chanwoo Choi <cw00.choi@samsung.com>
* extcon: max14577: Properly handle regmap_irq_get_virq errorKrzysztof Kozlowski2014-04-241-1/+1
| | | | | | | | | The regmap_irq_get_virq may return 0 or -EINVAL on error. Fail the probe in both situations. Signed-off-by: Krzysztof Kozlowski <k.kozlowski@samsung.com> Cc: <stable@vger.kernel.org> Signed-off-by: Chanwoo Choi <cw00.choi@samsung.com>
* extcon: max14577: Fix probe failure on successful work queueKrzysztof Kozlowski2014-04-241-6/+1
| | | | | | | | | | | | | | In probe the driver queued delayed work for cable detection and returned the result of queue_delayed_work() call. However the return value of queue_delayed_work() does not indicate an error and in normal condition it returns true which means successful work queue. This effectively resulted in probe failure: [ 2.088204] max14577-muic: probe of max77836-muic failed with error 1 Signed-off-by: Krzysztof Kozlowski <k.kozlowski@samsung.com> Cc: <stable@vger.kernel.org> Fixes: 962e56bfcf0b ("extcon: max14577: Add extcon-max14577 driver...") Signed-off-by: Chanwoo Choi <cw00.choi@samsung.com>
* extcon: max14577: Add support for MAX77836Krzysztof Kozlowski2014-04-231-19/+90
| | | | | | | | | | | | Add support for MAX77836 chipset to the max14577 extcon driver. The MAX77836 MUIC has additional interrupts (VIDRM, ADC1K) so IRQ handling is split up into two functions: max14577_parse_irq() and max77836_parse_irq(). Signed-off-by: Krzysztof Kozlowski <k.kozlowski@samsung.com> Acked-by: Chanwoo Choi <cw00.choi@samsung.com> Tested-by: Chanwoo Choi <cw00.choi@samsung.com> Signed-off-by: Lee Jones <lee.jones@linaro.org>
* extcon: max14577: Choose muic_irqs according to device typeKrzysztof Kozlowski2014-04-231-28/+37
| | | | | | | | | | | | | | This patch continues the preparation for adding support for max77836 device to existing max14577 driver. During probe choose muic_irqs according to device type. Currently there are only "max14577_muic_irqs" but later patch will add max77836 interrupts. Signed-off-by: Krzysztof Kozlowski <k.kozlowski@samsung.com> Acked-by: Chanwoo Choi <cw00.choi@samsung.com> Tested-by: Chanwoo Choi <cw00.choi@samsung.com> Signed-off-by: Lee Jones <lee.jones@linaro.org>
* extcon: max14577: Add max14577 prefix to muic_irqsKrzysztof Kozlowski2014-04-231-6/+6
| | | | | | | | | | Add max14577 prefix to muic_irqs array. This prepares for max77836 support in this extcon driver. Signed-off-by: Krzysztof Kozlowski <k.kozlowski@samsung.com> Acked-by: Chanwoo Choi <cw00.choi@samsung.com> Tested-by: Chanwoo Choi <cw00.choi@samsung.com> Signed-off-by: Lee Jones <lee.jones@linaro.org>
* extcon: max14577: Change extcon name instead of static name according to ↵Chanwoo Choi2014-04-231-3/+3
| | | | | | | | | | | | | | | | device type This patch use device name to make sysfs path according to device type: max14577-muic - /sys/class/extcon/max14577-muic/ max77836-muic - /sys/class/extcon/max77836-muic/ Signed-off-by: Krzysztof Kozlowski <k.kozlowski@samsung.com> Acked-by: Chanwoo Choi <cw00.choi@samsung.com> Tested-by: Chanwoo Choi <cw00.choi@samsung.com> Signed-off-by: Lee Jones <lee.jones@linaro.org>
* extcon: max14577: Add extcon-max14577 driver to support MUIC deviceChanwoo Choi2014-01-071-0/+752
This patch supports Maxim MAX14577 MUIC(Micro USB Interface Controller) device by using EXTCON subsystem to handle various external connectors. The max14577 device uses regmap method for i2c communication and supports irq domain. Signed-off-by: Chanwoo Choi <cw00.choi@samsung.com> Signed-off-by: Krzysztof Kozlowski <k.kozlowski@samsung.com> Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com>
OpenPOWER on IntegriCloud