aboutsummaryrefslogtreecommitdiff
path: root/drivers/staging/olpc_dcon/olpc_dcon.h
diff options
context:
space:
mode:
authorAndres Salomon <dilinger@queued.net>2011-02-10 17:54:24 -0800
committerGreg Kroah-Hartman <gregkh@suse.de>2011-02-18 12:33:21 -0800
commitbbe963f1b98c90980e33086d726f0963e286d1b4 (patch)
tree19b7a735621df7cdf9714beca67b3f7c97333088 /drivers/staging/olpc_dcon/olpc_dcon.h
parent097cd83a4c312e1ae0d9c14526f846666cab4f3a (diff)
staging: olpc_dcon: move more variables into dcon_priv
This moves dcon_source and dcon_pending into the dcon_priv struct. Because these variables are used by the IRQ handler (which is registered in the model-specific callbacks), we end up needing to move dcon_priv into olpc_dcon.h. This also changes the IRQ registration to use the dcon_priv pointer as dev_id, instead of dcon_driver. Signed-off-by: Andres Salomon <dilinger@queued.net> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Diffstat (limited to 'drivers/staging/olpc_dcon/olpc_dcon.h')
-rw-r--r--drivers/staging/olpc_dcon/olpc_dcon.h32
1 files changed, 28 insertions, 4 deletions
diff --git a/drivers/staging/olpc_dcon/olpc_dcon.h b/drivers/staging/olpc_dcon/olpc_dcon.h
index 03ac42c5e3c..2c06e1915c3 100644
--- a/drivers/staging/olpc_dcon/olpc_dcon.h
+++ b/drivers/staging/olpc_dcon/olpc_dcon.h
@@ -1,6 +1,9 @@
#ifndef OLPC_DCON_H_
#define OLPC_DCON_H_
+#include <linux/notifier.h>
+#include <linux/workqueue.h>
+
/* DCON registers */
#define DCON_REG_ID 0
@@ -44,8 +47,32 @@
/* Interrupt */
#define DCON_IRQ 6
+struct dcon_priv {
+ struct i2c_client *client;
+ struct fb_info *fbinfo;
+
+ struct work_struct switch_source;
+ struct notifier_block reboot_nb;
+ struct notifier_block fbevent_nb;
+
+ /* Shadow register for the DCON_REG_MODE register */
+ u8 disp_mode;
+
+ /* Current source, initialized at probe time */
+ int curr_src;
+
+ /* Desired source */
+ int pending_src;
+
+ /* Current output type; true == mono, false == color */
+ bool mono;
+ bool asleep;
+ /* This get set while controlling fb blank state from the driver */
+ bool ignore_fb_events;
+};
+
struct dcon_platform_data {
- int (*init)(void);
+ int (*init)(struct dcon_priv *);
void (*bus_stabilize_wiggle)(void);
void (*set_dconload)(int);
u8 (*read_status)(void);
@@ -53,10 +80,7 @@ struct dcon_platform_data {
#include <linux/interrupt.h>
-extern int dcon_source;
-extern int dcon_pending;
extern irqreturn_t dcon_interrupt(int irq, void *id);
-extern struct i2c_driver dcon_driver;
#ifdef CONFIG_FB_OLPC_DCON_1
extern struct dcon_platform_data dcon_pdata_xo_1;