[PATCH v3 5/6] Moving existing HP drivers to a central location

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



The purpose of this patch is to provide a central location where all
HP related drivers are found. HP drivers will recide under hp
directory with exception of hp-bioscfg.  hp-bioscfg is found under
hp/hp-bioscfg/ directory.

Introduced changes to Kconfig file to list all HP driver under "HP X86
Platform Specific Device Drivers" menu option.

Changes needed to relocate hp-bioscfg driver

Relocation of the driver requires minor changes such updating the path
for a local include file.  Additional changes include update MAINTAINERS
file to indicated support status, reviewer, and maintainer of hp-bioscfg
driver.  Lastly, removal of 'stddef' include file from the source.

Signed-off-by: Jorge Lopez <jorge.lopez2@xxxxxx>

---
Based on the latest platform-drivers-x86.git/for-next
---
 MAINTAINERS                                   | 15 ++++--
 drivers/platform/x86/Makefile                 |  5 +-
 drivers/platform/x86/hp/Kconfig               | 51 ++++++++++++++++++-
 drivers/platform/x86/hp/Makefile              | 30 ++++-------
 drivers/platform/x86/hp/hp-bioscfg/Makefile   | 19 +++++++
 .../hp/{ => hp-bioscfg}/biosattr-interface.c  |  1 -
 .../x86/hp/{ => hp-bioscfg}/bioscfg.c         |  2 +-
 .../x86/hp/{ => hp-bioscfg}/bioscfg.h         |  0
 .../x86/hp/{ => hp-bioscfg}/enum-attributes.c |  0
 .../x86/hp/{ => hp-bioscfg}/int-attributes.c  |  0
 .../hp/{ => hp-bioscfg}/ordered-attributes.c  |  0
 .../{ => hp-bioscfg}/passwdattr-interface.c   |  0
 .../{ => hp-bioscfg}/passwdobj-attributes.c   |  0
 .../hp/{ => hp-bioscfg}/spmobj-attributes.c   |  0
 .../hp/{ => hp-bioscfg}/string-attributes.c   |  0
 .../{ => hp-bioscfg}/sureadmin-attributes.c   |  0
 .../{ => hp-bioscfg}/surestart-attributes.c   |  0
 drivers/platform/x86/{ => hp}/hp-wmi.c        |  0
 drivers/platform/x86/{ => hp}/hp_accel.c      |  0
 drivers/platform/x86/{ => hp}/tc1100-wmi.c    |  0
 20 files changed, 92 insertions(+), 31 deletions(-)
 create mode 100644 drivers/platform/x86/hp/hp-bioscfg/Makefile
 rename drivers/platform/x86/hp/{ => hp-bioscfg}/biosattr-interface.c (99%)
 rename drivers/platform/x86/hp/{ => hp-bioscfg}/bioscfg.c (99%)
 rename drivers/platform/x86/hp/{ => hp-bioscfg}/bioscfg.h (100%)
 rename drivers/platform/x86/hp/{ => hp-bioscfg}/enum-attributes.c (100%)
 rename drivers/platform/x86/hp/{ => hp-bioscfg}/int-attributes.c (100%)
 rename drivers/platform/x86/hp/{ => hp-bioscfg}/ordered-attributes.c (100%)
 rename drivers/platform/x86/hp/{ => hp-bioscfg}/passwdattr-interface.c (100%)
 rename drivers/platform/x86/hp/{ => hp-bioscfg}/passwdobj-attributes.c (100%)
 rename drivers/platform/x86/hp/{ => hp-bioscfg}/spmobj-attributes.c (100%)
 rename drivers/platform/x86/hp/{ => hp-bioscfg}/string-attributes.c (100%)
 rename drivers/platform/x86/hp/{ => hp-bioscfg}/sureadmin-attributes.c (100%)
 rename drivers/platform/x86/hp/{ => hp-bioscfg}/surestart-attributes.c (100%)
 rename drivers/platform/x86/{ => hp}/hp-wmi.c (100%)
 rename drivers/platform/x86/{ => hp}/hp_accel.c (100%)
 rename drivers/platform/x86/{ => hp}/tc1100-wmi.c (100%)

diff --git a/MAINTAINERS b/MAINTAINERS
index 5a918c703b63..9ad23364ae69 100644
--- a/MAINTAINERS
+++ b/MAINTAINERS
@@ -120,7 +120,7 @@ Descriptions of section entries and preferred order
 	   matches all files in and below net excluding net/ipv6/
 	N: Files and directories *Regex* patterns.
 	   N:	[^a-z]tegra	all files whose path contains tegra
-	                        (not including files like integrator)
+				(not including files like integrator)
 	   One pattern per line.  Multiple N: lines acceptable.
 	   scripts/get_maintainer.pl has different behavior for files that
 	   match F: pattern and matches of N: patterns.  By default,
@@ -140,8 +140,8 @@ Maintainers List
 ----------------
 
 .. note:: When reading this list, please look for the most precise areas
-          first. When adding to this list, please keep the entries in
-          alphabetical order.
+	  first. When adding to this list, please keep the entries in
+	  alphabetical order.
 
 3C59X NETWORK DRIVER
 M:	Steffen Klassert <klassert@xxxxxxxxxx>
@@ -9286,10 +9286,15 @@ S:	Obsolete
 W:	http://w1.fi/hostap-driver.html
 F:	drivers/net/wireless/intersil/hostap/
 
+HP BIOSCFG DRIVER
+M:	Jorge Lopez <jorge.lopez2@xxxxxx>
+S:	Maintained
+F:	drivers/platform/x86/hp/hp-bioscfg/
+
 HP COMPAQ TC1100 TABLET WMI EXTRAS DRIVER
 L:	platform-driver-x86@xxxxxxxxxxxxxxx
 S:	Orphan
-F:	drivers/platform/x86/tc1100-wmi.c
+F:	drivers/platform/x86/hp/tc1100-wmi.c
 
 HPET:	High Precision Event Timers driver
 M:	Clemens Ladisch <clemens@xxxxxxxxxx>
@@ -11747,7 +11752,7 @@ M:	Eric Piel <eric.piel@xxxxxxxxxxxxxxxx>
 S:	Maintained
 F:	Documentation/misc-devices/lis3lv02d.rst
 F:	drivers/misc/lis3lv02d/
-F:	drivers/platform/x86/hp_accel.c
+F:	drivers/platform/x86/hp/hp_accel.c
 
 LIST KUNIT TEST
 M:	David Gow <davidgow@xxxxxxxxxx>
diff --git a/drivers/platform/x86/Makefile b/drivers/platform/x86/Makefile
index 7f4fdec482a5..ade6d24b441d 100644
--- a/drivers/platform/x86/Makefile
+++ b/drivers/platform/x86/Makefile
@@ -55,10 +55,7 @@ obj-$(CONFIG_FUJITSU_TABLET)	+= fujitsu-tablet.o
 obj-$(CONFIG_GPD_POCKET_FAN)	+= gpd-pocket-fan.o
 
 # Hewlett Packard
-obj-$(CONFIG_HP_ACCEL)		+= hp_accel.o
-obj-$(CONFIG_HP_WMI)		+= hp-wmi.o
-obj-$(CONFIG_TC1100_WMI)	+= tc1100-wmi.o
-obj-$(CONFIG_HP_BIOSCFG)        += hp/
++obj-y				+= hp/
 
 # Hewlett Packard Enterprise
 obj-$(CONFIG_UV_SYSFS)       += uv_sysfs.o
diff --git a/drivers/platform/x86/hp/Kconfig b/drivers/platform/x86/hp/Kconfig
index b17b99449ee5..b0dae087cb2a 100644
--- a/drivers/platform/x86/hp/Kconfig
+++ b/drivers/platform/x86/hp/Kconfig
@@ -5,6 +5,7 @@
 
 menuconfig X86_PLATFORM_DRIVERS_HP
 	bool "HP X86 Platform Specific Device Drivers"
+	default y
 	depends on X86_PLATFORM_DEVICES
 	help
 	  Say Y here to get to see options for device drivers for various
@@ -26,10 +27,58 @@ config HP_BIOSCFG
 	  This driver enables administrators to securely manage BIOS settings
 	  using digital certificates and public-key cryptography that eliminate
 	  the need for passwords for both remote and local management. It supports
-          changing BIOS settings on many HP machines from 2018 and newer without
+	  changing BIOS settings on many HP machines from 2018 and newer without
 	  the use of any additional software.
 
 	  To compile this driver as a module, choose M here: the module will
 	  be called hp-bioscfg.
 
+
+config HP_ACCEL
+	tristate "HP laptop accelerometer"
+	default m
+	depends on INPUT && ACPI
+	depends on SERIO_I8042
+	select SENSORS_LIS3LV02D
+	select NEW_LEDS
+	select LEDS_CLASS
+	help
+	  This driver provides support for the "Mobile Data Protection System 3D"
+	  or "3D DriveGuard" feature of HP laptops. On such systems the driver
+	  should load automatically (via ACPI alias).
+
+	  Support for a led indicating disk protection will be provided as
+	  hp::hddprotect. For more information on the feature, refer to
+	  Documentation/misc-devices/lis3lv02d.rst.
+
+	  To compile this driver as a module, choose M here: the module will
+	  be called hp_accel.
+
+config HP_WMI
+	tristate "HP WMI extras"
+	default m
+	depends on ACPI_WMI
+	depends on INPUT
+	depends on RFKILL || RFKILL = n
+	select INPUT_SPARSEKMAP
+	select ACPI_PLATFORM_PROFILE
+	select HWMON
+	help
+	 Say Y here if you want to support WMI-based hotkeys on HP laptops and
+	 to read data from WMI such as docking or ambient light sensor state.
+
+	 To compile this driver as a module, choose M here: the module will
+	 be called hp-wmi.
+
+config TC1100_WMI
+	tristate "HP Compaq TC1100 Tablet WMI Extras"
+	default m
+	depends on !X86_64
+	depends on ACPI
+	depends on ACPI_WMI
+	help
+	  This is a driver for the WMI extensions (wireless and bluetooth power
+	  control) of the HP Compaq TC1100 tablet.
+
+
 endif # X86_PLATFORM_DRIVERS_HP
diff --git a/drivers/platform/x86/hp/Makefile b/drivers/platform/x86/hp/Makefile
index e3790e223084..acffd5b32af0 100644
--- a/drivers/platform/x86/hp/Makefile
+++ b/drivers/platform/x86/hp/Makefile
@@ -1,19 +1,11 @@
-obj-m           := hp-bioscfg.o
-
-hp-bioscfg-objs := bioscfg.o 	\
-	enum-attributes.o 	\
-	int-attributes.o 	\
-	string-attributes.o 	\
-	passwdobj-attributes.o 	\
-	biosattr-interface.o  	\
-	passwdattr-interface.o 	\
-	ordered-attributes.o 	\
-	surestart-attributes.o 	\
-	spmobj-attributes.o 	\
-	sureadmin-attributes.o
-
-default:
-	make -C /lib/modules/`uname -r`/build M=$(PWD) hp-bioscfg.ko
-
-clean:
-	make -C /lib/modules/`uname -r`/build M=$(PWD) clean
+# SPDX-License-Identifier: GPL-2.0
+#
+# Makefile for linux/drivers/platform/x86/hp
+# HP x86 Platform-Specific Drivers
+#
+# Hewlett Packard
+#
+obj-$(CONFIG_HP_ACCEL)		+= hp_accel.o
+obj-$(CONFIG_HP_WMI)		+= hp-wmi.o
+obj-$(CONFIG_TC1100_WMI)	+= tc1100-wmi.o
+obj-$(CONFIG_HP_BIOSCFG)        += hp-bioscfg/
diff --git a/drivers/platform/x86/hp/hp-bioscfg/Makefile b/drivers/platform/x86/hp/hp-bioscfg/Makefile
new file mode 100644
index 000000000000..e3790e223084
--- /dev/null
+++ b/drivers/platform/x86/hp/hp-bioscfg/Makefile
@@ -0,0 +1,19 @@
+obj-m           := hp-bioscfg.o
+
+hp-bioscfg-objs := bioscfg.o 	\
+	enum-attributes.o 	\
+	int-attributes.o 	\
+	string-attributes.o 	\
+	passwdobj-attributes.o 	\
+	biosattr-interface.o  	\
+	passwdattr-interface.o 	\
+	ordered-attributes.o 	\
+	surestart-attributes.o 	\
+	spmobj-attributes.o 	\
+	sureadmin-attributes.o
+
+default:
+	make -C /lib/modules/`uname -r`/build M=$(PWD) hp-bioscfg.ko
+
+clean:
+	make -C /lib/modules/`uname -r`/build M=$(PWD) clean
diff --git a/drivers/platform/x86/hp/biosattr-interface.c b/drivers/platform/x86/hp/hp-bioscfg/biosattr-interface.c
similarity index 99%
rename from drivers/platform/x86/hp/biosattr-interface.c
rename to drivers/platform/x86/hp/hp-bioscfg/biosattr-interface.c
index c983ef21a9ed..f0c919bf3ab0 100644
--- a/drivers/platform/x86/hp/biosattr-interface.c
+++ b/drivers/platform/x86/hp/hp-bioscfg/biosattr-interface.c
@@ -8,7 +8,6 @@
 
 #include <linux/wmi.h>
 #include "bioscfg.h"
-#include <stddef.h>
 
 #define SET_DEFAULT_VALUES_METHOD_ID	0x02
 #define SET_BIOS_DEFAULTS_METHOD_ID	0x03
diff --git a/drivers/platform/x86/hp/bioscfg.c b/drivers/platform/x86/hp/hp-bioscfg/bioscfg.c
similarity index 99%
rename from drivers/platform/x86/hp/bioscfg.c
rename to drivers/platform/x86/hp/hp-bioscfg/bioscfg.c
index ce3226d79696..ef32223bd182 100644
--- a/drivers/platform/x86/hp/bioscfg.c
+++ b/drivers/platform/x86/hp/hp-bioscfg/bioscfg.c
@@ -14,7 +14,7 @@
 #include <linux/kernel.h>
 #include <linux/wmi.h>
 #include "bioscfg.h"
-#include "../firmware_attributes_class.h"
+#include "../../firmware_attributes_class.h"
 #include <linux/nls.h>
 
 MODULE_AUTHOR("Jorge Lopez <jorge.lopez2@xxxxxx>");
diff --git a/drivers/platform/x86/hp/bioscfg.h b/drivers/platform/x86/hp/hp-bioscfg/bioscfg.h
similarity index 100%
rename from drivers/platform/x86/hp/bioscfg.h
rename to drivers/platform/x86/hp/hp-bioscfg/bioscfg.h
diff --git a/drivers/platform/x86/hp/enum-attributes.c b/drivers/platform/x86/hp/hp-bioscfg/enum-attributes.c
similarity index 100%
rename from drivers/platform/x86/hp/enum-attributes.c
rename to drivers/platform/x86/hp/hp-bioscfg/enum-attributes.c
diff --git a/drivers/platform/x86/hp/int-attributes.c b/drivers/platform/x86/hp/hp-bioscfg/int-attributes.c
similarity index 100%
rename from drivers/platform/x86/hp/int-attributes.c
rename to drivers/platform/x86/hp/hp-bioscfg/int-attributes.c
diff --git a/drivers/platform/x86/hp/ordered-attributes.c b/drivers/platform/x86/hp/hp-bioscfg/ordered-attributes.c
similarity index 100%
rename from drivers/platform/x86/hp/ordered-attributes.c
rename to drivers/platform/x86/hp/hp-bioscfg/ordered-attributes.c
diff --git a/drivers/platform/x86/hp/passwdattr-interface.c b/drivers/platform/x86/hp/hp-bioscfg/passwdattr-interface.c
similarity index 100%
rename from drivers/platform/x86/hp/passwdattr-interface.c
rename to drivers/platform/x86/hp/hp-bioscfg/passwdattr-interface.c
diff --git a/drivers/platform/x86/hp/passwdobj-attributes.c b/drivers/platform/x86/hp/hp-bioscfg/passwdobj-attributes.c
similarity index 100%
rename from drivers/platform/x86/hp/passwdobj-attributes.c
rename to drivers/platform/x86/hp/hp-bioscfg/passwdobj-attributes.c
diff --git a/drivers/platform/x86/hp/spmobj-attributes.c b/drivers/platform/x86/hp/hp-bioscfg/spmobj-attributes.c
similarity index 100%
rename from drivers/platform/x86/hp/spmobj-attributes.c
rename to drivers/platform/x86/hp/hp-bioscfg/spmobj-attributes.c
diff --git a/drivers/platform/x86/hp/string-attributes.c b/drivers/platform/x86/hp/hp-bioscfg/string-attributes.c
similarity index 100%
rename from drivers/platform/x86/hp/string-attributes.c
rename to drivers/platform/x86/hp/hp-bioscfg/string-attributes.c
diff --git a/drivers/platform/x86/hp/sureadmin-attributes.c b/drivers/platform/x86/hp/hp-bioscfg/sureadmin-attributes.c
similarity index 100%
rename from drivers/platform/x86/hp/sureadmin-attributes.c
rename to drivers/platform/x86/hp/hp-bioscfg/sureadmin-attributes.c
diff --git a/drivers/platform/x86/hp/surestart-attributes.c b/drivers/platform/x86/hp/hp-bioscfg/surestart-attributes.c
similarity index 100%
rename from drivers/platform/x86/hp/surestart-attributes.c
rename to drivers/platform/x86/hp/hp-bioscfg/surestart-attributes.c
diff --git a/drivers/platform/x86/hp-wmi.c b/drivers/platform/x86/hp/hp-wmi.c
similarity index 100%
rename from drivers/platform/x86/hp-wmi.c
rename to drivers/platform/x86/hp/hp-wmi.c
diff --git a/drivers/platform/x86/hp_accel.c b/drivers/platform/x86/hp/hp_accel.c
similarity index 100%
rename from drivers/platform/x86/hp_accel.c
rename to drivers/platform/x86/hp/hp_accel.c
diff --git a/drivers/platform/x86/tc1100-wmi.c b/drivers/platform/x86/hp/tc1100-wmi.c
similarity index 100%
rename from drivers/platform/x86/tc1100-wmi.c
rename to drivers/platform/x86/hp/tc1100-wmi.c
-- 
2.34.1




[Index of Archives]     [Linux Kernel Development]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux