[RFC 2/3] mei: unstaging mei driver

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

 



1. move mei driver under driver misc directory
2. move mei.h under include/linux/mei.h and export it to user space
3. update Documentation/ioctl/ioctl-number.txt
4. move mei.h Documentation/misc-devices/mei
5. move example code under Documentation/misc-devices/mei and create Makefile for it
6. remove TODO file
7. update relevant Kconfigs and Makefiles

Signed-off-by: Tomas Winkler <tomas.winkler@xxxxxxxxx>
---
 Documentation/Makefile                             |    2 +-
 Documentation/ioctl/ioctl-number.txt               |    1 +
 .../misc-devices}/mei/mei-amt-version.c            |    2 +-
 .../misc-devices}/mei/mei.txt                      |    0
 drivers/misc/Kconfig                               |    2 ++
 drivers/misc/Makefile                              |    1 +
 drivers/{staging => misc}/mei/Kconfig              |    0
 drivers/{staging => misc}/mei/Makefile             |    0
 drivers/{staging => misc}/mei/hw.h                 |    0
 drivers/{staging => misc}/mei/init.c               |    2 +-
 drivers/{staging => misc}/mei/interface.c          |    2 +-
 drivers/{staging => misc}/mei/interface.h          |    2 +-
 drivers/{staging => misc}/mei/interrupt.c          |    2 +-
 drivers/{staging => misc}/mei/iorw.c               |    2 +-
 drivers/{staging => misc}/mei/main.c               |    2 +-
 drivers/{staging => misc}/mei/mei_dev.h            |    2 +-
 drivers/{staging => misc}/mei/mei_version.h        |    0
 drivers/{staging => misc}/mei/wd.c                 |    2 +-
 drivers/staging/Kconfig                            |    2 --
 drivers/staging/Makefile                           |    1 -
 drivers/staging/mei/TODO                           |   10 ----------
 include/linux/Kbuild                               |    1 +
 {drivers/staging/mei => include/linux}/mei.h       |    0
 23 files changed, 15 insertions(+), 23 deletions(-)
 rename {drivers/staging => Documentation/misc-devices}/mei/mei-amt-version.c (99%)
 rename {drivers/staging => Documentation/misc-devices}/mei/mei.txt (100%)
 rename drivers/{staging => misc}/mei/Kconfig (100%)
 rename drivers/{staging => misc}/mei/Makefile (100%)
 rename drivers/{staging => misc}/mei/hw.h (100%)
 rename drivers/{staging => misc}/mei/init.c (99%)
 rename drivers/{staging => misc}/mei/interface.c (99%)
 rename drivers/{staging => misc}/mei/interface.h (99%)
 rename drivers/{staging => misc}/mei/interrupt.c (99%)
 rename drivers/{staging => misc}/mei/iorw.c (99%)
 rename drivers/{staging => misc}/mei/main.c (99%)
 rename drivers/{staging => misc}/mei/mei_dev.h (99%)
 rename drivers/{staging => misc}/mei/mei_version.h (100%)
 rename drivers/{staging => misc}/mei/wd.c (99%)
 delete mode 100644 drivers/staging/mei/TODO
 rename {drivers/staging/mei => include/linux}/mei.h (100%)

diff --git a/Documentation/Makefile b/Documentation/Makefile
index 9b4bc5c..9113dca 100644
--- a/Documentation/Makefile
+++ b/Documentation/Makefile
@@ -1,3 +1,3 @@
 obj-m := DocBook/ accounting/ auxdisplay/ connector/ \
 	filesystems/ filesystems/configfs/ ia64/ laptops/ networking/ \
-	pcmcia/ spi/ timers/ vm/ watchdog/src/
+	pcmcia/ spi/ timers/ vm/ watchdog/src/ misc-devices/mei/
diff --git a/Documentation/ioctl/ioctl-number.txt b/Documentation/ioctl/ioctl-number.txt
index 4840334..d7f4ba9 100644
--- a/Documentation/ioctl/ioctl-number.txt
+++ b/Documentation/ioctl/ioctl-number.txt
@@ -118,6 +118,7 @@ Code  Seq#(hex)	Include File		Comments
 'F'	DD	video/sstfb.h		conflict!
 'G'	00-3F	drivers/misc/sgi-gru/grulib.h	conflict!
 'G'	00-0F	linux/gigaset_dev.h	conflict!
+'H'	01	linux/mei.h		conflict!
 'H'	00-7F	linux/hiddev.h		conflict!
 'H'	00-0F	linux/hidraw.h		conflict!
 'H'	00-0F	sound/asound.h		conflict!
diff --git a/drivers/staging/mei/mei-amt-version.c b/Documentation/misc-devices/mei/mei-amt-version.c
similarity index 99%
rename from drivers/staging/mei/mei-amt-version.c
rename to Documentation/misc-devices/mei/mei-amt-version.c
index 970f2d3..3b181e7 100644
--- a/drivers/staging/mei/mei-amt-version.c
+++ b/Documentation/misc-devices/mei/mei-amt-version.c
@@ -74,7 +74,7 @@
 #include <stdint.h>
 #include <stdbool.h>
 #include <bits/wordsize.h>
-#include "mei.h"
+#include <linux/mei.h>
 
 /*****************************************************************************
  * Intel Management Enginin Interface
diff --git a/drivers/staging/mei/mei.txt b/Documentation/misc-devices/mei/mei.txt
similarity index 100%
rename from drivers/staging/mei/mei.txt
rename to Documentation/misc-devices/mei/mei.txt
diff --git a/drivers/misc/Kconfig b/drivers/misc/Kconfig
index c779509..fe8d8c7 100644
--- a/drivers/misc/Kconfig
+++ b/drivers/misc/Kconfig
@@ -506,4 +506,6 @@ source "drivers/misc/ti-st/Kconfig"
 source "drivers/misc/lis3lv02d/Kconfig"
 source "drivers/misc/carma/Kconfig"
 source "drivers/misc/altera-stapl/Kconfig"
+source "drivers/misc/mei/Kconfig"
+
 endmenu
diff --git a/drivers/misc/Makefile b/drivers/misc/Makefile
index 3e1d801..0f6af6a 100644
--- a/drivers/misc/Makefile
+++ b/drivers/misc/Makefile
@@ -49,3 +49,4 @@ obj-y				+= carma/
 obj-$(CONFIG_USB_SWITCH_FSA9480) += fsa9480.o
 obj-$(CONFIG_ALTERA_STAPL)	+=altera-stapl/
 obj-$(CONFIG_MAX8997_MUIC)	+= max8997-muic.o
+obj-$(CONFIG_INTEL_MEI)		+= mei/
diff --git a/drivers/staging/mei/Kconfig b/drivers/misc/mei/Kconfig
similarity index 100%
rename from drivers/staging/mei/Kconfig
rename to drivers/misc/mei/Kconfig
diff --git a/drivers/staging/mei/Makefile b/drivers/misc/mei/Makefile
similarity index 100%
rename from drivers/staging/mei/Makefile
rename to drivers/misc/mei/Makefile
diff --git a/drivers/staging/mei/hw.h b/drivers/misc/mei/hw.h
similarity index 100%
rename from drivers/staging/mei/hw.h
rename to drivers/misc/mei/hw.h
diff --git a/drivers/staging/mei/init.c b/drivers/misc/mei/init.c
similarity index 99%
rename from drivers/staging/mei/init.c
rename to drivers/misc/mei/init.c
index e24b6ad..24df9d5 100644
--- a/drivers/staging/mei/init.c
+++ b/drivers/misc/mei/init.c
@@ -22,7 +22,7 @@
 #include "mei_dev.h"
 #include "hw.h"
 #include "interface.h"
-#include "mei.h"
+#include <linux/mei.h>
 
 const uuid_le mei_amthi_guid  = UUID_LE(0x12f80028, 0xb4b7, 0x4b2d, 0xac,
 						0xa8, 0x46, 0xe0, 0xff, 0x65,
diff --git a/drivers/staging/mei/interface.c b/drivers/misc/mei/interface.c
similarity index 99%
rename from drivers/staging/mei/interface.c
rename to drivers/misc/mei/interface.c
index a873be7..7cce04e 100644
--- a/drivers/staging/mei/interface.c
+++ b/drivers/misc/mei/interface.c
@@ -16,7 +16,7 @@
 
 #include <linux/pci.h>
 #include "mei_dev.h"
-#include "mei.h"
+#include <linux/mei.h>
 #include "interface.h"
 
 
diff --git a/drivers/staging/mei/interface.h b/drivers/misc/mei/interface.h
similarity index 99%
rename from drivers/staging/mei/interface.h
rename to drivers/misc/mei/interface.h
index e5bfb18..d87d96f 100644
--- a/drivers/staging/mei/interface.h
+++ b/drivers/misc/mei/interface.h
@@ -19,7 +19,7 @@
 #ifndef _MEI_INTERFACE_H_
 #define _MEI_INTERFACE_H_
 
-#include "mei.h"
+#include <linux/mei.h>
 #include "mei_dev.h"
 
 
diff --git a/drivers/staging/mei/interrupt.c b/drivers/misc/mei/interrupt.c
similarity index 99%
rename from drivers/staging/mei/interrupt.c
rename to drivers/misc/mei/interrupt.c
index ce14e39..2d41a38 100644
--- a/drivers/staging/mei/interrupt.c
+++ b/drivers/misc/mei/interrupt.c
@@ -22,7 +22,7 @@
 #include <linux/jiffies.h>
 
 #include "mei_dev.h"
-#include "mei.h"
+#include <linux/mei.h>
 #include "hw.h"
 #include "interface.h"
 
diff --git a/drivers/staging/mei/iorw.c b/drivers/misc/mei/iorw.c
similarity index 99%
rename from drivers/staging/mei/iorw.c
rename to drivers/misc/mei/iorw.c
index a3fbac9..0393966 100644
--- a/drivers/staging/mei/iorw.c
+++ b/drivers/misc/mei/iorw.c
@@ -35,7 +35,7 @@
 
 #include "mei_dev.h"
 #include "hw.h"
-#include "mei.h"
+#include <linux/mei.h>
 #include "interface.h"
 #include "mei_version.h"
 
diff --git a/drivers/staging/mei/main.c b/drivers/misc/mei/main.c
similarity index 99%
rename from drivers/staging/mei/main.c
rename to drivers/misc/mei/main.c
index 22afc92..db155f3 100644
--- a/drivers/staging/mei/main.c
+++ b/drivers/misc/mei/main.c
@@ -36,7 +36,7 @@
 #include <linux/miscdevice.h>
 
 #include "mei_dev.h"
-#include "mei.h"
+#include <linux/mei.h>
 #include "interface.h"
 #include "mei_version.h"
 
diff --git a/drivers/staging/mei/mei_dev.h b/drivers/misc/mei/mei_dev.h
similarity index 99%
rename from drivers/staging/mei/mei_dev.h
rename to drivers/misc/mei/mei_dev.h
index 0d937b0..d7c9de4 100644
--- a/drivers/staging/mei/mei_dev.h
+++ b/drivers/misc/mei/mei_dev.h
@@ -19,7 +19,7 @@
 
 #include <linux/types.h>
 #include <linux/watchdog.h>
-#include "mei.h"
+#include <linux/mei.h>
 #include "hw.h"
 
 /*
diff --git a/drivers/staging/mei/mei_version.h b/drivers/misc/mei/mei_version.h
similarity index 100%
rename from drivers/staging/mei/mei_version.h
rename to drivers/misc/mei/mei_version.h
diff --git a/drivers/staging/mei/wd.c b/drivers/misc/mei/wd.c
similarity index 99%
rename from drivers/staging/mei/wd.c
rename to drivers/misc/mei/wd.c
index f397835..5153215 100644
--- a/drivers/staging/mei/wd.c
+++ b/drivers/misc/mei/wd.c
@@ -24,7 +24,7 @@
 #include "mei_dev.h"
 #include "hw.h"
 #include "interface.h"
-#include "mei.h"
+#include <linux/mei.h>
 
 static const u8 mei_start_wd_params[] = { 0x02, 0x12, 0x13, 0x10 };
 static const u8 mei_stop_wd_params[] = { 0x02, 0x02, 0x14, 0x10 };
diff --git a/drivers/staging/Kconfig b/drivers/staging/Kconfig
index f1abfb1..29d70cc 100644
--- a/drivers/staging/Kconfig
+++ b/drivers/staging/Kconfig
@@ -118,8 +118,6 @@ source "drivers/staging/cptm1217/Kconfig"
 
 source "drivers/staging/ste_rmi4/Kconfig"
 
-source "drivers/staging/mei/Kconfig"
-
 source "drivers/staging/nvec/Kconfig"
 
 source "drivers/staging/media/Kconfig"
diff --git a/drivers/staging/Makefile b/drivers/staging/Makefile
index ffe7d44..a8f4d9d 100644
--- a/drivers/staging/Makefile
+++ b/drivers/staging/Makefile
@@ -50,7 +50,6 @@ obj-$(CONFIG_FT1000)		+= ft1000/
 obj-$(CONFIG_SPEAKUP)		+= speakup/
 obj-$(CONFIG_TOUCHSCREEN_CLEARPAD_TM1217)	+= cptm1217/
 obj-$(CONFIG_TOUCHSCREEN_SYNAPTICS_I2C_RMI4)	+= ste_rmi4/
-obj-$(CONFIG_INTEL_MEI)		+= mei/
 obj-$(CONFIG_MFD_NVEC)		+= nvec/
 obj-$(CONFIG_DRM_OMAP)		+= omapdrm/
 obj-$(CONFIG_ANDROID)		+= android/
diff --git a/drivers/staging/mei/TODO b/drivers/staging/mei/TODO
deleted file mode 100644
index fc26601..0000000
--- a/drivers/staging/mei/TODO
+++ /dev/null
@@ -1,10 +0,0 @@
-TODO:
-	- Cleanup and split the timer function
-Upon Unstaging:
-	- move mei.h to include/linux/mei.h
-	- Documentation/ioctl/ioctl-number.txt
-	- move mei.txt under Documentation/mei/
-	- move mei-amt-version.c under Documentation/mei
-	- add hostprogs-y for mei-amt-version.c
-	- drop mei_version.h
-	- Updated MAINTAINERS
diff --git a/include/linux/Kbuild b/include/linux/Kbuild
index 0aa6b7a..8277866 100644
--- a/include/linux/Kbuild
+++ b/include/linux/Kbuild
@@ -239,6 +239,7 @@ header-y += major.h
 header-y += map_to_7segment.h
 header-y += matroxfb.h
 header-y += media.h
+header-y += mei.h
 header-y += mempolicy.h
 header-y += meye.h
 header-y += mii.h
diff --git a/drivers/staging/mei/mei.h b/include/linux/mei.h
similarity index 100%
rename from drivers/staging/mei/mei.h
rename to include/linux/mei.h
-- 
1.7.4.4

_______________________________________________
devel mailing list
devel@xxxxxxxxxxxxxxxxxxxxxx
http://driverdev.linuxdriverproject.org/mailman/listinfo/devel


[Index of Archives]     [Linux Driver Backports]     [DMA Engine]     [Linux GPIO]     [Linux SPI]     [Video for Linux]     [Linux USB Devel]     [Linux Coverity]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [Yosemite Backpacking]
  Powered by Linux