Skip to contentSkip to conversation

x86/platform/intel-mid: Use common power off sequence

PATCH New Andy Shevchenko 2 participants 4 messages Mar 8, 2017 – Mar 13, 2017

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/2 x86/platform/intel-mid: Use common power off sequence

Intel Medfield may use common for Intel MID devices power sequence. Remove unneded custom power off stub.

While here, remove function forward declaration.

---
 arch/x86/platform/intel-mid/mfld.c | 15 ++++-----------
 1 file changed, 4 insertions(+), 11 deletions(-)
arch/x86/platform/intel-mid/mfld.c +4 -11
index e793fe509971..e42978d4deaf 100644
@@ -17,16 +17,6 @@
 
 #include "intel_mid_weak_decls.h"
 
-static void penwell_arch_setup(void);
-/* penwell arch ops */
-static struct intel_mid_ops penwell_ops = {
-	.arch_setup = penwell_arch_setup,
-};
-
-static void mfld_power_off(void)
-{
-}
-
 static unsigned long __init mfld_calibrate_tsc(void)
 {
 	unsigned long fast_calibrate;
@@ -63,9 +53,12 @@ static unsigned long __init mfld_calibrate_tsc(void)
 static void __init penwell_arch_setup(void)
 {
 	x86_platform.calibrate_tsc = mfld_calibrate_tsc;
-	pm_power_off = mfld_power_off;
 }
 
+static struct intel_mid_ops penwell_ops = {
+	.arch_setup = penwell_arch_setup,
+};
+
 void *get_penwell_ops(void)
 {
 	return &penwell_ops;
Signature · 1 line
2.11.0
#1 lore raw

PATCH 2/2 x86/platform/intel-mid: Add support power button for Merrifield

Intel Merrifield platform has Basin Cove PMIC to handle in particular power button events. Add necessary bits here to enable it.

---
- it would be nice to have it in v4.11-rc2, v4.11-rc1 has all preparatory work done

 arch/x86/platform/intel-mid/device_libs/Makefile   |  1 +
 .../device_libs/platform_mrfld_power_btn.c         | 82 ++++++++++++++++++++++
 2 files changed, 83 insertions(+)
 create mode 100644 arch/x86/platform/intel-mid/device_libs/platform_mrfld_power_btn.c
arch/x86/platform/intel-mid/device_libs/Makefile +1 -0
index a7dbec4dce27..3dbde04febdc 100644
@@ -26,5 +26,6 @@ obj-$(subst m,y,$(CONFIG_GPIO_PCA953X)) += platform_pcal9555a.o
 obj-$(subst m,y,$(CONFIG_GPIO_PCA953X)) += platform_tca6416.o
 # MISC Devices
 obj-$(subst m,y,$(CONFIG_KEYBOARD_GPIO)) += platform_gpio_keys.o
+obj-$(subst m,y,$(CONFIG_INTEL_MID_POWER_BUTTON)) += platform_mrfld_power_btn.o
 obj-$(subst m,y,$(CONFIG_RTC_DRV_CMOS)) += platform_mrfld_rtc.o
 obj-$(subst m,y,$(CONFIG_INTEL_MID_WATCHDOG)) += platform_mrfld_wdt.o
arch/x86/platform/intel-mid/device_libs/platform_mrfld_power_btn.c new file +82 -0

82 lines not on this page · raw message

Signature · 1 line
2.11.0
#2 lore raw

[tip:x86/urgent] x86/platform/intel-mid: Add power button support for Merrifield

x86/platform/intel-mid: Add power button support for Merrifield
Commit-ID:  859bb6d59066b96341020e0991f191631cabe59d
Gitweb:     http://git.kernel.org/tip/859bb6d59066b96341020e0991f191631cabe59d
Author:     Andy Shevchenko <[email protected]>
AuthorDate: Wed, 8 Mar 2017 13:24:22 +0200
Committer:  Thomas Gleixner <[email protected]>
CommitDate: Mon, 13 Mar 2017 22:08:28 +0100

x86/platform/intel-mid: Add power button support for Merrifield

Intel Merrifield platform has a Basin Cove PMIC to handle in particular power button events. Add necessary bits to enable it.

---
 arch/x86/platform/intel-mid/device_libs/Makefile   |  1 +
 .../device_libs/platform_mrfld_power_btn.c         | 82 ++++++++++++++++++++++
 2 files changed, 83 insertions(+)
arch/x86/platform/intel-mid/device_libs/Makefile +1 -0
index a7dbec4..3dbde04 100644
@@ -26,5 +26,6 @@ obj-$(subst m,y,$(CONFIG_GPIO_PCA953X)) += platform_pcal9555a.o
 obj-$(subst m,y,$(CONFIG_GPIO_PCA953X)) += platform_tca6416.o
 # MISC Devices
 obj-$(subst m,y,$(CONFIG_KEYBOARD_GPIO)) += platform_gpio_keys.o
+obj-$(subst m,y,$(CONFIG_INTEL_MID_POWER_BUTTON)) += platform_mrfld_power_btn.o
 obj-$(subst m,y,$(CONFIG_RTC_DRV_CMOS)) += platform_mrfld_rtc.o
 obj-$(subst m,y,$(CONFIG_INTEL_MID_WATCHDOG)) += platform_mrfld_wdt.o
arch/x86/platform/intel-mid/device_libs/platform_mrfld_power_btn.c new file +82 -0

82 lines not on this page · raw message

#3 lore raw
In reply to Andy Shevchenko
x86/platform/intel-mid: Use common power off sequence
Commit-ID:  c836e5cf0d0880d6668966476c4ffe727f29f69a
Gitweb:     http://git.kernel.org/tip/c836e5cf0d0880d6668966476c4ffe727f29f69a
Author:     Andy Shevchenko <[email protected]>
AuthorDate: Wed, 8 Mar 2017 13:24:21 +0200
Committer:  Thomas Gleixner <[email protected]>
CommitDate: Mon, 13 Mar 2017 22:08:28 +0100

x86/platform/intel-mid: Use common power off sequence

Intel Medfield may use common for Intel MID devices power sequence. Remove unneded custom power off stub.

While here, remove function forward declaration.

---
 arch/x86/platform/intel-mid/mfld.c | 15 ++++-----------
 1 file changed, 4 insertions(+), 11 deletions(-)
arch/x86/platform/intel-mid/mfld.c +4 -11
index e793fe5..e42978d 100644
@@ -17,16 +17,6 @@
 
 #include "intel_mid_weak_decls.h"
 
-static void penwell_arch_setup(void);
-/* penwell arch ops */
-static struct intel_mid_ops penwell_ops = {
-	.arch_setup = penwell_arch_setup,
-};
-
-static void mfld_power_off(void)
-{
-}
-
 static unsigned long __init mfld_calibrate_tsc(void)
 {
 	unsigned long fast_calibrate;
@@ -63,9 +53,12 @@ static unsigned long __init mfld_calibrate_tsc(void)
 static void __init penwell_arch_setup(void)
 {
 	x86_platform.calibrate_tsc = mfld_calibrate_tsc;
-	pm_power_off = mfld_power_off;
 }
 
+static struct intel_mid_ops penwell_ops = {
+	.arch_setup = penwell_arch_setup,
+};
+
 void *get_penwell_ops(void)
 {
 	return &penwell_ops;