]> git.karo-electronics.de Git - karo-tx-linux.git/blobdiff - drivers/extcon/extcon-arizona.c
Merge tag 'soc' of git://git.kernel.org/pub/scm/linux/kernel/git/arm/arm-soc
[karo-tx-linux.git] / drivers / extcon / extcon-arizona.c
index fa2114f1f9ec118465d644076e6f083926a01efb..cdab9e598297b8102fcb18df0984e26b49140685 100644 (file)
@@ -348,7 +348,7 @@ static int __devinit arizona_extcon_probe(struct platform_device *pdev)
 
        info = devm_kzalloc(&pdev->dev, sizeof(*info), GFP_KERNEL);
        if (!info) {
-               dev_err(&pdev->dev, "failed to allocate memory\n");
+               dev_err(&pdev->dev, "Failed to allocate memory\n");
                ret = -ENOMEM;
                goto err;
        }
@@ -385,7 +385,7 @@ static int __devinit arizona_extcon_probe(struct platform_device *pdev)
 
        ret = extcon_dev_register(&info->edev, arizona->dev);
        if (ret < 0) {
-               dev_err(arizona->dev, "extcon_dev_regster() failed: %d\n",
+               dev_err(arizona->dev, "extcon_dev_register() failed: %d\n",
                        ret);
                goto err;
        }
@@ -483,16 +483,23 @@ static int __devinit arizona_extcon_probe(struct platform_device *pdev)
        regmap_update_bits(arizona->regmap, ARIZONA_JACK_DETECT_ANALOGUE,
                           ARIZONA_JD1_ENA, ARIZONA_JD1_ENA);
 
+       ret = regulator_allow_bypass(info->micvdd, true);
+       if (ret != 0)
+               dev_warn(arizona->dev, "Failed to set MICVDD to bypass: %d\n",
+                        ret);
+
        pm_runtime_put(&pdev->dev);
 
        ret = input_register_device(info->input);
        if (ret) {
                dev_err(&pdev->dev, "Can't register input device: %d\n", ret);
-               goto err_fall_wake;
+               goto err_micdet;
        }
 
        return 0;
 
+err_micdet:
+       arizona_free_irq(arizona, ARIZONA_IRQ_MICDET, info);
 err_fall_wake:
        arizona_set_irq_wake(arizona, ARIZONA_IRQ_JD_FALL, 0);
 err_fall: