Skip to content

Commit

Permalink
Revert "hlte: shutdown capative key when fbblanks"
Browse files Browse the repository at this point in the history
This reverts commit 0ee1db5.

Change-Id: I29c89a52ed3d7a5711cd7eec1de74adc86a0baca
  • Loading branch information
slayher committed Jan 16, 2014
1 parent 125e766 commit 0ba80f7
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 50 deletions.
45 changes: 2 additions & 43 deletions drivers/input/keyboard/cypress_touchkey_h/cypress-touchkey.c
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@

#define CYPRESS_FW_ID_REG 0X05

//#define USE_OPEN_CLOSE
#define USE_OPEN_CLOSE
#undef DO_NOT_USE_FUNC_PARAM

#define KEYCODE_REG 0x00
Expand All @@ -93,9 +93,7 @@ static void cypress_input_close(struct input_dev *dev);
static void cypress_touchkey_early_suspend(struct early_suspend *h);
static void cypress_touchkey_late_resume(struct early_suspend *h);
#endif
static int fb_notifier_callback(struct notifier_block *self,
unsigned long event, void *data);
static void configure_sleep(struct cypress_touchkey_info *info);

#ifdef TK_INFORM_CHARGER
extern void touchkey_register_callback(void *cb);
#endif
Expand Down Expand Up @@ -125,7 +123,6 @@ static struct pm_gpio tkey_sleep_int = {
};
#endif


#ifdef TSP_BOOSTER
static void cypress_change_dvfs_lock(struct work_struct *work)
{
Expand All @@ -144,7 +141,6 @@ static void cypress_change_dvfs_lock(struct work_struct *work)
mutex_unlock(&info->dvfs_lock);
}


static void cypress_set_dvfs_off(struct work_struct *work)
{
struct cypress_touchkey_info *info =
Expand Down Expand Up @@ -1866,10 +1862,6 @@ static int __devinit cypress_touchkey_probe(struct i2c_client *client,
register_early_suspend(&info->early_suspend);
#endif /* CONFIG_HAS_EARLYSUSPEND */

#ifdef CONFIG_FB
configure_sleep(info);
#endif

#if defined(CONFIG_GLOVE_TOUCH)
info->glove_wq = create_singlethread_workqueue("cypress_touchkey");
if (!info->glove_wq)
Expand Down Expand Up @@ -2027,39 +2019,6 @@ static int cypress_touchkey_resume(struct device *dev)
}
#endif

#if defined(CONFIG_FB)
static int fb_notifier_callback(struct notifier_block *self,
unsigned long event, void *data)
{
struct fb_event *evdata = data;
int *blank;
struct cypress_touchkey_info *info =
container_of(self, struct cypress_touchkey_info, fb_notif);

if (evdata && evdata->data && event == FB_EVENT_BLANK &&
info && info->client) {
blank = evdata->data;
if (*blank == FB_BLANK_UNBLANK)
cypress_touchkey_resume(&info->client->dev);
else if (*blank == FB_BLANK_POWERDOWN)
cypress_touchkey_suspend(&info->client->dev);
}

return 0;
}

static void configure_sleep(struct cypress_touchkey_info *info)
{
int retval = 0;
info->fb_notif.notifier_call = fb_notifier_callback;
retval = fb_register_client(&info->fb_notif);
if (retval)
dev_err(&info->client->dev,
"Unable to register fb_notifier: %d\n", retval);
return;
}
#endif

#ifdef CONFIG_HAS_EARLYSUSPEND
static void cypress_touchkey_early_suspend(struct early_suspend *h)
{
Expand Down
7 changes: 0 additions & 7 deletions include/linux/i2c/touchkey_i2c.h
Original file line number Diff line number Diff line change
Expand Up @@ -32,10 +32,6 @@ extern int poweroff_charging;
#include <linux/input.h>
#include <linux/earlysuspend.h>
#include <linux/mutex.h>
#ifdef CONFIG_FB
#include <linux/notifier.h>
#include <linux/fb.h>
#endif

#if defined(CONFIG_GLOVE_TOUCH)
#define TK_BIT_GLOVE 0x40
Expand Down Expand Up @@ -131,9 +127,6 @@ struct cypress_touchkey_info {
struct i2c_client *client;
struct cypress_touchkey_platform_data *pdata;
struct input_dev *input_dev;
#ifdef CONFIG_FB
struct notifier_block fb_notif;
#endif
struct early_suspend early_suspend;
char phys[32];
unsigned char keycode[NUM_OF_KEY];
Expand Down

0 comments on commit 0ba80f7

Please sign in to comment.