Merge remote-tracking branches 'asoc/topic/rt5514', 'asoc/topic/rt5640', 'asoc/topic...
[muen/linux.git] / sound / soc / codecs / rt5645.c
index 43dee1b5779ddd101450ede09ce6afe65ccc684e..e149f3ce540154252fa882000b020da691d4d3db 100644 (file)
@@ -3109,7 +3109,7 @@ static int rt5645_jack_detect(struct snd_soc_codec *codec, int jack_insert)
        unsigned int val;
 
        if (jack_insert) {
-               regmap_write(rt5645->regmap, RT5645_CHARGE_PUMP, 0x0006);
+               regmap_write(rt5645->regmap, RT5645_CHARGE_PUMP, 0x0e06);
 
                /* for jack type detect */
                snd_soc_dapm_force_enable_pin(dapm, "LDO2");
@@ -3660,8 +3660,14 @@ static int rt5645_i2c_probe(struct i2c_client *i2c,
                                                       GPIOD_IN);
 
        if (IS_ERR(rt5645->gpiod_hp_det)) {
-               dev_err(&i2c->dev, "failed to initialize gpiod\n");
-               return PTR_ERR(rt5645->gpiod_hp_det);
+               dev_info(&i2c->dev, "failed to initialize gpiod\n");
+               ret = PTR_ERR(rt5645->gpiod_hp_det);
+               /*
+                * Continue if optional gpiod is missing, bail for all other
+                * errors, including -EPROBE_DEFER
+                */
+               if (ret != -ENOENT)
+                       return ret;
        }
 
        for (i = 0; i < ARRAY_SIZE(rt5645->supplies); i++)