[PATCH 21/30] staging: nvec: Register nvec-event and move init to nvec-event

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

 



Register nvec-event as a mdf_cell and move the initialization
of power button and lid switch from nvec to nvec_event.

Signed-off-by: Julian Andres Klode <jak@xxxxxxxxxxxxx>
---
 drivers/staging/nvec/nvec.c       |   10 ++++------
 drivers/staging/nvec/nvec_event.c |    6 ++++++
 2 files changed, 10 insertions(+), 6 deletions(-)

diff --git a/drivers/staging/nvec/nvec.c b/drivers/staging/nvec/nvec.c
index 46cd1ad..34b9c11 100644
--- a/drivers/staging/nvec/nvec.c
+++ b/drivers/staging/nvec/nvec.c
@@ -89,6 +89,10 @@ static struct mfd_cell nvec_devices[] = {
 		.name = "nvec-leds",
 		.id = 1,
 	},
+	{
+		.name	= "nvec-event",
+		.id	= 1,
+	},
 };
 
 /**
@@ -782,12 +786,6 @@ static int __devinit tegra_nvec_probe(struct platform_device *pdev)
 	/* unmute speakers? */
 	nvec_write_async(nvec, "\x0d\x10\x59\x95", 4);
 
-	/* enable lid switch event */
-	nvec_write_async(nvec, "\x01\x01\x01\x00\x00\x02\x00", 7);
-
-	/* enable power button event */
-	nvec_write_async(nvec, "\x01\x01\x01\x00\x00\x80\x00", 7);
-
 	return 0;
 
 err_iounmap:
diff --git a/drivers/staging/nvec/nvec_event.c b/drivers/staging/nvec/nvec_event.c
index cb36287..20cc179 100644
--- a/drivers/staging/nvec/nvec_event.c
+++ b/drivers/staging/nvec/nvec_event.c
@@ -110,6 +110,12 @@ static int __devinit nvec_event_probe(struct platform_device *pdev)
 	event_handler.notifier.notifier_call = nvec_event_notifier;
 	nvec_register_notifier(nvec, &event_handler.notifier, 0);
 
+	/* enable lid switch event */
+	nvec_write_async(nvec, "\x01\x01\x01\x00\x00\x02\x00", 7);
+
+	/* enable power button event */
+	nvec_write_async(nvec, "\x01\x01\x01\x00\x00\x80\x00", 7);
+
 	return 0;
 
 fail:
-- 
1.7.5.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