Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit aea086dd authored by Bard Liao's avatar Bard Liao Committed by Mark Brown
Browse files

ASoC: rt5645: add inv_jd1_1 flag



The flag will invert jd1_1 status. Which will be used if the jack
connector is normal closed.

Signed-off-by: default avatarBard Liao <bardliao@realtek.com>
Tested-by: default avatarHans de Goede <hdegoede@redhat.com>
Signed-off-by: default avatarTakashi Iwai <tiwai@suse.de>
Signed-off-by: default avatarMark Brown <broonie@kernel.org>
parent 89575022
Loading
Loading
Loading
Loading
+2 −0
Original line number Diff line number Diff line
@@ -23,6 +23,8 @@ struct rt5645_platform_data {
	unsigned int jd_mode;
	/* Use level triggered irq */
	bool level_trigger_irq;
	/* Invert JD1_1 status polarity */
	bool inv_jd1_1;
};

#endif
+4 −0
Original line number Diff line number Diff line
@@ -3833,6 +3833,10 @@ static int rt5645_i2c_probe(struct i2c_client *i2c,
		default:
			break;
		}
		if (rt5645->pdata.inv_jd1_1) {
			regmap_update_bits(rt5645->regmap, RT5645_IRQ_CTRL2,
				RT5645_JD_1_1_MASK, RT5645_JD_1_1_INV);
		}
	}

	regmap_update_bits(rt5645->regmap, RT5645_ADDA_CLK1,