msm: pil: Reorg registration API

Instead of having pil device driver authors register struct
pil_device pointers, have them register a set of ops along with
the important parts of struct pil_device. This allows us to
separate the platform_device from the pil_device so that future
device driver authors can move away from the platform bus. Plus,
this allows us to hide the details of struct pil_device outside
of peripheral-loader.c.

Change-Id: I0945c0bc2447207270efcd3fb935437c449edc63
Signed-off-by: Stephen Boyd <sboyd@codeaurora.org>
diff --git a/arch/arm/mach-msm/peripheral-loader.h b/arch/arm/mach-msm/peripheral-loader.h
index 097d9d7..3d4b4b2 100644
--- a/arch/arm/mach-msm/peripheral-loader.h
+++ b/arch/arm/mach-msm/peripheral-loader.h
@@ -12,28 +12,23 @@
 #ifndef __MSM_PERIPHERAL_LOADER_H
 #define __MSM_PERIPHERAL_LOADER_H
 
-#include <linux/list.h>
-#include <linux/mutex.h>
-#include <linux/platform_device.h>
+struct device;
 
-struct pil_device {
+struct pil_desc {
 	const char *name;
 	const char *depends_on;
-	int count;
-	struct mutex lock;
-	struct platform_device pdev;
-	struct list_head list;
-	struct pil_reset_ops *ops;
+	struct device *dev;
+	const struct pil_reset_ops *ops;
 };
 
 struct pil_reset_ops {
-	int (*init_image)(struct pil_device *pil, const u8 *metadata,
+	int (*init_image)(struct pil_desc *pil, const u8 *metadata,
 			  size_t size);
-	int (*verify_blob)(struct pil_device *pil, u32 phy_addr, size_t size);
-	int (*auth_and_reset)(struct pil_device *pil);
-	int (*shutdown)(struct pil_device *pil);
+	int (*verify_blob)(struct pil_desc *pil, u32 phy_addr, size_t size);
+	int (*auth_and_reset)(struct pil_desc *pil);
+	int (*shutdown)(struct pil_desc *pil);
 };
 
-extern int msm_pil_add_device(struct pil_device *pil);
+extern int msm_pil_register(struct pil_desc *desc);
 
 #endif