summaryrefslogtreecommitdiff
path: root/drivers/platform/x86/intel/Makefile
diff options
context:
space:
mode:
authorHans de Goede <hdegoede@redhat.com>2023-03-04 01:19:28 +0300
committerHans de Goede <hdegoede@redhat.com>2023-03-16 16:42:30 +0300
commit94227b9c88f3df8ac3025611719cebd125b5981a (patch)
tree360d67c0b08928b290badf25cb12a03273dd5cac /drivers/platform/x86/intel/Makefile
parentde4fb5f5165582caf21b9074b918acccf99582a1 (diff)
downloadlinux-94227b9c88f3df8ac3025611719cebd125b5981a.tar.xz
platform/x86: Add intel_bytcrc_pwrsrc driver
Add a new driver for the power-, wake- and reset-source functionality of the Bay Trail (BYT) version of the Crystal Cove PMIC. The main functionality here is detecting which power-sources (USB / DC in / battery) are active. This is normally exposed to userspace as a power_supply class charger device with an online sysfs attribute. But if a charger is online or not is already exposed on BYT-CRC devices through either an ACPI AC power_supply device, or through a native driver for the battery charger chip (e.g. a BQ24292i). So instead of adding duplicate info under the power_supply class this driver exports the info through debugfs and likewise adds debugfs files for the reset- and wake-source info / registers. Despite this driver only exporting debugfs bits it is still useful to have this driver because it clears the wake- and reset-source registers after reading them. Not clearing these can have undesirable side-effects. Specifically if the WAKESRC register contains 0x01 (wake by powerbutton) on reboot then the firmware on some tablets turns the reboot into a poweroff. I guess this may be necessary to make long power-presses turn into a poweroff somehow? Signed-off-by: Hans de Goede <hdegoede@redhat.com> Link: https://lore.kernel.org/r/20230303221928.285477-1-hdegoede@redhat.com
Diffstat (limited to 'drivers/platform/x86/intel/Makefile')
-rw-r--r--drivers/platform/x86/intel/Makefile2
1 files changed, 2 insertions, 0 deletions
diff --git a/drivers/platform/x86/intel/Makefile b/drivers/platform/x86/intel/Makefile
index 411df4040427..c1d5fe05e3f3 100644
--- a/drivers/platform/x86/intel/Makefile
+++ b/drivers/platform/x86/intel/Makefile
@@ -38,6 +38,8 @@ intel_bxtwc_tmu-y := bxtwc_tmu.o
obj-$(CONFIG_INTEL_BXTWC_PMIC_TMU) += intel_bxtwc_tmu.o
intel_crystal_cove_charger-y := crystal_cove_charger.o
obj-$(CONFIG_X86_ANDROID_TABLETS) += intel_crystal_cove_charger.o
+intel_bytcrc_pwrsrc-y := bytcrc_pwrsrc.o
+obj-$(CONFIG_INTEL_BYTCRC_PWRSRC) += intel_bytcrc_pwrsrc.o
intel_chtdc_ti_pwrbtn-y := chtdc_ti_pwrbtn.o
obj-$(CONFIG_INTEL_CHTDC_TI_PWRBTN) += intel_chtdc_ti_pwrbtn.o
intel_chtwc_int33fe-y := chtwc_int33fe.o