Commit aa6f8688 authored by Charles Keepax's avatar Charles Keepax Committed by Matt Davis
Browse files

FROMGIT: mfd: cs42l43: Use gpiod_set_raw for GPIO operations

The GPIO framework supports specifying if a GPIO is active low or
high and will invert accordingly. Whilst specifying this is part of
the normal GPIO definition flow on device tree systems, it is a DSD
extension under ACPI, that Windows doesn't really use. This means most
ACPI systems do not set the polarity of the pin.

The current cs42l43 driver assumes it is setting the level of the line
directly, which is actually the case on all current systems and likely
most future ones. However if the part was used in a device tree system
or an ACPI system that actually used the DSD extensions this would get
inverted, causing the driver to fail probe. As the driver always knows
the polarity of its own reset line, use the raw set API making the
intention to set the level directly clear and to avoid any such future
issues.

(cherry picked from commit 10f66d7b4faf8dbba39c37a6b5a1abceac8bc71d https://github.com/CirrusLogic/linux-drivers

 v6.12-cs42l43-cs35l56)
Signed-off-by: default avatarCharles Keepax <ckeepax@opensource.cirrus.com>
Link: https://lore.kernel.org/r/20241205115822.2371719-2-ckeepax@opensource.cirrus.com


Signed-off-by: default avatarLee Jones <lee@kernel.org>

Change-Id: Id676afbbf46ef483eac5947aa0c952480e57116b
Signed-off-by: default avatarCharles Keepax <ckeepax@opensource.cirrus.com>
Signed-off-by: default avatarTongtong Pan <pantongtong@huaqin.corp-partner.google.com>
parent f261cf8c
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment