Skip to contentSkip to conversation

acpi/pmic: Add opregion driver for Intel BXT WhiskeyCove PMIC

PATCH Superseded Bin Gao 2 participants 3 messages Jun 11, 2016 – Jun 13, 2016

Subsystems (2)

v1 of 4 Superseded Latest is v4 →

lore
Share & tools
lore

Bin Gao

author
#0 lore raw

PATCH 2/2 acpi/pmic: Add opregion driver for Intel BXT WhiskeyCove PMIC

This patch adds operation region driver for Intel BXT WhiskeyCove PMIC. The register mapping is done as per the BXT WC data sheet.

---
 drivers/acpi/Kconfig                 |   6 +
 drivers/acpi/Makefile                |   1 +
 drivers/acpi/pmic/intel_pmic_bxtwc.c | 424 +++++++++++++++++++++++++++++++++++
 3 files changed, 431 insertions(+)
 create mode 100644 drivers/acpi/pmic/intel_pmic_bxtwc.c
drivers/acpi/Kconfig +6 -0
index b7e2e77..47cb6f6 100644
@@ -519,6 +519,12 @@ config XPOWER_PMIC_OPREGION
 	help
 	  This config adds ACPI operation region support for XPower AXP288 PMIC.
 
+config BXT_WC_PMIC_OPREGION
+	bool "ACPI operation region support for BXT WhiskeyCove PMIC"
+	depends on INTEL_SOC_PMIC
+	help
+	  This config adds ACPI operation region support for BXT WhiskeyCove PMIC.
+
 endif
 
 endif	# ACPI
drivers/acpi/Makefile +1 -0
index 251ce85..5da9d4b 100644
@@ -99,5 +99,6 @@ obj-$(CONFIG_ACPI_EXTLOG)	+= acpi_extlog.o
 obj-$(CONFIG_PMIC_OPREGION)	+= pmic/intel_pmic.o
 obj-$(CONFIG_CRC_PMIC_OPREGION) += pmic/intel_pmic_crc.o
 obj-$(CONFIG_XPOWER_PMIC_OPREGION) += pmic/intel_pmic_xpower.o
+obj-$(CONFIG_BXT_WC_PMIC_OPREGION) += pmic/intel_pmic_bxtwc.o
 
 video-objs			+= acpi_video.o video_detect.o
drivers/acpi/pmic/intel_pmic_bxtwc.c new file +424 -0

424 lines not on this page · raw message

Signature · 1 line
1.9.1
#1 lore raw

drivers/acpi/pmic/intel_pmic_bxtwc.c line 421

Quoted 12 lines · Bin Gao

This patch adds operation region driver for Intel BXT WhiskeyCove PMIC. The register mapping is done as per the BXT WC data sheet.

---

drivers/acpi/pmic/intel_pmic_bxtwc.c new file +6 -0
+static int __init intel_bxtwc_pmic_opregion_driver_init(void)
+{
+	return platform_driver_register(&intel_bxtwc_pmic_opregion_driver);
+}
+
+module_init(intel_bxtwc_pmic_opregion_driver_init);

Last time Paul suggests device_initcall instead of module_init here:

commit 75829dcf10862966f52716f2d67ac1c1b1eb486b

Author: Paul Gortmaker <[email protected]>
Date:   Mon Feb 15 00:27:51 2016 -0500

drivers/acpi: make pmic/intel_pmic_crc.c explicitly non-modular

Perhaps you should do the same.

Thanks,
Aaron

Quoted 4 lines
drivers/acpi/pmic/intel_pmic_bxtwc.c new file +3 -0
+
+MODULE_DESCRIPTION("BXT WhiskeyCove ACPI opregion driver");
+MODULE_LICENSE("GPL");
author
#2 lore raw
Quoted 9 lines · Aaron Lu

Last time Paul suggests device_initcall instead of module_init here:

commit 75829dcf10862966f52716f2d67ac1c1b1eb486b

Author: Paul Gortmaker <[email protected]>
Date:   Mon Feb 15 00:27:51 2016 -0500

drivers/acpi: make pmic/intel_pmic_crc.c explicitly non-modular

Perhaps you should do the same.

Thanks Aaron's review.
I just sent out v2 of the patches which addressed your comments.