Hans de Goede ce58f479b5 mfd: arizona-spi: Set pdata.hpdet_channel for ACPI enumerated devs
[ Upstream commit 831d1af85133e1763d41e20414912d9a1058ea72 ]

Commit 9e86b2ad4c11 changed the channel used for HPDET detection
(headphones vs lineout detection) from being hardcoded to
ARIZONA_ACCDET_MODE_HPL (HP left channel) to it being configurable
through arizona_pdata.hpdet_channel the DT/OF parsing added for
filling arizona_pdata on devicetree platforms ensures that
arizona_pdata.hpdet_channel gets set to ARIZONA_ACCDET_MODE_HPL
when not specified in the devicetree-node.

But on ACPI platforms where arizona_pdata is filled by
arizona_spi_acpi_probe() arizona_pdata.hpdet_channel was not
getting set, causing it to default to 0 aka ARIZONA_ACCDET_MODE_MIC.

This causes headphones to get misdetected as line-out on some models.
Fix this by setting hpdet_channel = ARIZONA_ACCDET_MODE_HPL.

Fixes: e933836744a2 ("mfd: arizona: Add support for ACPI enumeration of WM5102 connected over SPI")
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Link: https://lore.kernel.org/r/20231014205414.59415-1-hdegoede@redhat.com
Signed-off-by: Lee Jones <lee@kernel.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
2023-11-20 11:52:08 +01:00
..
2022-08-06 10:25:16 -07:00
2022-08-16 12:46:26 +02:00
2022-10-07 11:24:20 -07:00
2023-11-20 11:52:08 +01:00
2022-03-21 18:33:57 -07:00
2022-10-07 11:24:20 -07:00
2022-08-16 12:46:26 +02:00
2023-03-10 09:33:28 +01:00
2022-10-07 11:24:20 -07:00
2019-07-15 20:18:40 -07:00
2022-09-28 16:09:50 +01:00
2022-08-16 12:46:26 +02:00
2022-08-16 12:46:26 +02:00
2022-10-07 11:24:20 -07:00
2022-08-16 12:46:26 +02:00
2022-09-28 16:09:50 +01:00
2019-07-09 08:59:39 -07:00
2022-10-07 11:24:20 -07:00