From 80fc2e686bf4b5b2f726241c77842bce23bd75e3 Mon Sep 17 00:00:00 2001 From: Marc Dietrich Date: Tue, 11 Mar 2014 21:04:07 +0100 Subject: [PATCH 4/6] NOT_FOR_UPSTREAM: staging: nvec: remove lid and power events enable from core driver This is done now in the board specific driver. Signed-off-by: Marc Dietrich --- drivers/staging/nvec/nvec.c | 35 +---------------------------------- 1 file changed, 1 insertion(+), 34 deletions(-) diff --git a/drivers/staging/nvec/nvec.c b/drivers/staging/nvec/nvec.c index 3ee0b18..ae2ee77 100644 --- a/drivers/staging/nvec/nvec.c +++ b/drivers/staging/nvec/nvec.c @@ -75,10 +75,7 @@ enum nvec_sleep_subcmds { AP_SUSPEND, }; -#define CNF_EVENT_REPORTING 0x01 #define GET_FIRMWARE_VERSION 0x15 -#define LID_SWITCH BIT(1) -#define PWR_BUTTON BIT(15) static struct nvec_chip *nvec_power_handle; @@ -350,27 +347,6 @@ static void nvec_toggle_global_events(struct nvec_chip *nvec, bool state) } /** - * nvec_event_mask - fill the command string with event bitfield - * ev: points to event command string - * mask: bit to insert into the event mask - * - * Configure event command expects a 32 bit bitfield which describes - * which events to enable. The bitfield has the following structure - * (from highest byte to lowest): - * system state bits 7-0 - * system state bits 15-8 - * oem system state bits 7-0 - * oem system state bits 15-8 - */ -static void nvec_event_mask(char *ev, u32 mask) -{ - ev[3] = mask >> 16 & 0xff; - ev[4] = mask >> 24 & 0xff; - ev[5] = mask >> 0 & 0xff; - ev[6] = mask >> 8 & 0xff; -} - -/** * nvec_request_master - Process outgoing messages * @work: A &struct work_struct (the tx_worker member of &struct nvec_chip) * @@ -799,8 +775,7 @@ static int tegra_nvec_probe(struct platform_device *pdev) struct resource *res; void __iomem *base; char get_firmware_version[] = { NVEC_CNTL, GET_FIRMWARE_VERSION }, - unmute_speakers[] = { NVEC_OEM0, 0x10, 0x59, 0x95 }, - enable_event[7] = { NVEC_SYS, CNF_EVENT_REPORTING, true }; + unmute_speakers[] = { NVEC_OEM0, 0x10, 0x59, 0x95 }; if (!pdev->dev.of_node) { dev_err(&pdev->dev, "must be instantiated using device tree\n"); @@ -903,14 +878,6 @@ static int tegra_nvec_probe(struct platform_device *pdev) /* unmute speakers? */ nvec_write_async(nvec, unmute_speakers, 4); - /* enable lid switch event */ - nvec_event_mask(enable_event, LID_SWITCH); - nvec_write_async(nvec, enable_event, 7); - - /* enable power button event */ - nvec_event_mask(enable_event, PWR_BUTTON); - nvec_write_async(nvec, enable_event, 7); - return 0; } -- 1.8.3.1