td88801:add psensor config

This commit is contained in:
lw@rock-chips.com
2011-12-21 16:17:05 +08:00
committed by lw
parent e0d3270a59
commit 0b5d93f655
2 changed files with 9 additions and 1900 deletions

File diff suppressed because it is too large Load Diff

5
drivers/input/misc/al3006.c Normal file → Executable file
View File

@@ -69,6 +69,7 @@ struct al3006_data {
struct delayed_work dwork; //for l/psensor
//struct delayed_work l_work; //for light sensor
struct mutex lock;
spinlock_t work_lock;
int enabled;
int irq;
};
@@ -204,7 +205,7 @@ static void al3006_reschedule_work(struct al3006_data *data,
{
unsigned long flags;
spin_lock_irqsave(&data->lock, flags);
spin_lock_irqsave(&data->work_lock, flags);
/*
* If work is already scheduled then subsequent schedules will not
@@ -213,7 +214,7 @@ static void al3006_reschedule_work(struct al3006_data *data,
__cancel_delayed_work(&data->dwork);
schedule_delayed_work(&data->dwork, delay);
spin_unlock_irqrestore(&data->lock, flags);
spin_unlock_irqrestore(&data->work_lock, flags);
}
static irqreturn_t al3006_irq_handler(int irq, void *data)