]> git.baikalelectronics.ru Git - kernel.git/commit
power: supply: axp288_charger: Use acpi_quirk_skip_acpi_ac_and_battery()
authorHans de Goede <hdegoede@redhat.com>
Thu, 24 Feb 2022 22:28:04 +0000 (23:28 +0100)
committerSebastian Reichel <sebastian.reichel@collabora.com>
Fri, 25 Feb 2022 17:04:02 +0000 (18:04 +0100)
commit348be7aacda2ef0397d2d48e99dff660627685a7
tree08c806d176d7aa0a355645c9757fd11cd7053c6b
parentbbc201bc16c4a3fa459fdd3240b6fc7f4f917322
power: supply: axp288_charger: Use acpi_quirk_skip_acpi_ac_and_battery()

Normally the native AXP288 fg/charger drivers are preferred but one some
devices the ACPI drivers should be used instead.

The ACPI battery/ac drivers use the acpi_quirk_skip_acpi_ac_and_battery()
helper to determine if they should skip loading because native fuel-gauge/
charger drivers like the AXP288 drivers will be used.

The new acpi_quirk_skip_acpi_ac_and_battery() helper includes a list of
exceptions for boards where the ACPI drivers should be used instead.

Use this new helper to avoid loading on such boards. Note this requires
adding a Kconfig dependency on ACPI, this is not a problem because ACPI
should be enabled on all boards with an AXP288 PMIC anyways.

Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Signed-off-by: Sebastian Reichel <sebastian.reichel@collabora.com>
drivers/power/supply/Kconfig
drivers/power/supply/axp288_charger.c