platform/x86: Add driver for GPD pocket custom fan controller
Subsystems (2)
PATCH 1/1 platform/x86: Add driver for GPD pocket custom fan controller
Add a driver for the GPD pocket device's custom fan controller, which gets controlled through 2 GPIOs listed in a FAN02501 ACPI device.
--- MAINTAINERS | 6 ++ drivers/platform/x86/Kconfig | 12 +++ drivers/platform/x86/Makefile | 1 + drivers/platform/x86/gpd-pocket-fan.c | 193 ++++++++++++++++++++++++++++++++++ 4 files changed, 212 insertions(+) create mode 100644 drivers/platform/x86/gpd-pocket-fan.c
MAINTAINERS +6 -0
@@ -5949,6 +5949,12 @@ L: [email protected] S: Maintained F: drivers/input/touchscreen/goodix.c +GPD POCKET FAN DRIVER +M: Hans de Goede <[email protected]> +L: [email protected] +S: Maintained +F: drivers/platform/x86/gpd-pocket-fan.c + GPIO ACPI SUPPORT M: Mika Westerberg <[email protected]> M: Andy Shevchenko <[email protected]>
drivers/platform/x86/Kconfig +12 -0
@@ -244,6 +244,18 @@ config AMILO_RFKILL This is a driver for enabling wifi on some Fujitsu-Siemens Amilo laptops. +config GPD_POCKET_FAN + tristate "GPD Pocket Fan Controller support" + depends on ACPI + depends on THERMAL + ---help--- + Driver for the GPD Pocket vendor specific FAN02501 ACPI device + which controls the fan speed on the GPD Pocket. + + Without this driver the fan on the Pocket will stay off independent + of the CPU temperature. Say Y or M if the kernel may be used on a + GPD pocket. + config TC1100_WMI tristate "HP Compaq TC1100 Tablet WMI Extras" depends on !X86_64
drivers/platform/x86/Makefile +1 -0
@@ -28,6 +28,7 @@ obj-$(CONFIG_HP_ACCEL) += hp_accel.o obj-$(CONFIG_HP_WIRELESS) += hp-wireless.o obj-$(CONFIG_HP_WMI) += hp-wmi.o obj-$(CONFIG_AMILO_RFKILL) += amilo-rfkill.o +obj-$(CONFIG_GPD_POCKET_FAN) += gpd-pocket-fan.o obj-$(CONFIG_TC1100_WMI) += tc1100-wmi.o obj-$(CONFIG_SONY_LAPTOP) += sony-laptop.o obj-$(CONFIG_IDEAPAD_LAPTOP) += ideapad-laptop.o
drivers/platform/x86/gpd-pocket-fan.c new file +193 -0
193 lines not on this page · raw message
Signature · 1 line
2.14.3
Dear Hans,
Quoted 2 lines · Hans de Goede
Add a driver for the GPD pocket device's custom fan controller, which gets controlled through 2 GPIOs listed in a FAN02501 ACPI device.
[...]
drivers/platform/x86/gpd-pocket-fan.c line 1
Quoted 4 lines
drivers/platform/x86/gpd-pocket-fan.c new file +1
-0@@ -0,0 +1,193 @@ +/* SPDX-License-Identifier: GPL-2.0 */
This should be IMHO this style as requested by Linus on list and documented by Thomas in the doc patches:
// SPDX-License-Identifier: GPL-2.0
drivers/platform/x86/gpd-pocket-fan.c line 193
Quoted 1 line
drivers/platform/x86/gpd-pocket-fan.c new file +1
-0+MODULE_LICENSE ("GPL" );
This module license means "GPL 2 or later" and does not match your top level GPL 2.0 license tag and should be instead as per module.h doc:MODULE_LICENSE("GPL v2");
.... unless you want this to be GPL 2.0 or later all the way in which case it should be:
// SPDX-License-Identifier: GPL-2.0+
andMODULE_LICENSE("GPL");
... though I am not sure what is the point of "or later" for a module.
Signature · 2 lines
Cordially Philippe Ombredanne
Hi,
Quoted 7 lines · Philippe Ombredanne
Dear Hans,
Quoted 2 lines · Hans de Goede
Add a driver for the GPD pocket device's custom fan controller, which gets controlled through 2 GPIOs listed in a FAN02501 ACPI device.
[...]
Quoted 8 lines
drivers/platform/x86/gpd-pocket-fan.c line 1
Quoted 4 lines
drivers/platform/x86/gpd-pocket-fan.c new file +1
-0@@ -0,0 +1,193 @@ +/* SPDX-License-Identifier: GPL-2.0 */ This should be IMHO this style as requested by Linus on list and documented by Thomas in the doc patches:
// SPDX-License-Identifier: GPL-2.0
Ok, fixed for v2.
Quoted 6 lines
drivers/platform/x86/gpd-pocket-fan.c line 193
Quoted 1 line
drivers/platform/x86/gpd-pocket-fan.c new file +1
-0+MODULE_LICENSE ("GPL" );This module license means "GPL 2 or later" and does not match your top level GPL 2.0 license tag and should be instead as per
module.hdoc:MODULE_LICENSE("GPL v2");
Quoted 7 lines
.... unless you want this to be GPL 2.0 or later all the way in which case it should be:
// SPDX-License-Identifier: GPL-2.0+
andMODULE_LICENSE("GPL");... though I am not sure what is the point of "or later" for a module.
I prefer for "v2 or later" just in case there ever is a GPL v4 which is more sensible then v3...
So I've changed the SPDX identifier to:
// SPDX-License-Identifier: GPL-2.0+
Regards,
Hans