Re: [PATCH 2/3] ASoC: imx-rpmsg: Support headphone jack detection
From: Mark Brown
Date: Tue May 26 2026 - 11:47:23 EST
On Tue, May 26, 2026 at 02:38:14PM +0900, Chancel Liu wrote:
> Add headphone jack detection support for i.MX RPMSG audio cards.
> When the "hp-det-gpios" property is present in the device tree node,
> use simple_util_init_jack() from the ASoC simple card utilities to
> register a headphone jack with GPIO-based insertion detection.
> +#include <sound/simple_card_utils.h>
We need to ensure that SND_SIMPLE_CARD_UTILS is selected.
> + if (of_property_present(np, "hp-det-gpios")) {
> + ret = simple_util_init_jack(&data->card, &data->hp_jack,
> + 1, NULL, "Headphone Jack");
> + if (ret)
> + goto fail;
> + }
> fail:
The interaction with deferred probe is a bit fun here, we're doing this
after registering the card which might defer via unbind_card_list now.
late_probe() might be safer, everything should be mostly up by then.
Attachment:
signature.asc
Description: PGP signature