nfsd4.1: common slot allocation size calculation
[safe/jmp/linux-2.6] / include / linux / wm97xx.h
index ed01c7d..38e8c4d 100644 (file)
 #include <linux/platform_device.h>
 
 /*
+ * WM97xx variants
+ */
+#define        WM97xx_GENERIC                  0x0000
+#define        WM97xx_WM1613                   0x1613
+
+/*
  * WM97xx AC97 Touchscreen registers
  */
 #define AC97_WM97XX_DIGITISER1         0x76
 #define WM9713_ADCSEL_Y                0x0004  /* Y measurement */
 #define WM9713_ADCSEL_PRES     0x0008  /* Pressure measurement */
 #define WM9713_COO             0x0001  /* enable coordinate mode */
+#define WM9713_45W             0x1000  /* set for 5 wire panel */
 #define WM9713_PDEN            0x0800  /* measure only when pen down */
 #define WM9713_ADCSEL_MASK     0x00fe  /* ADC selection mask */
 #define WM9713_WAIT            0x0200  /* coordinate wait */
@@ -282,6 +289,26 @@ struct wm97xx {
        unsigned pen_is_down:1;         /* Pen is down */
        unsigned aux_waiting:1;         /* aux measurement waiting */
        unsigned pen_probably_down:1;   /* used in polling mode */
+       u16 variant;                    /* WM97xx chip variant */
+       u16 suspend_mode;               /* PRP in suspend mode */
+};
+
+struct wm97xx_batt_pdata {
+       int     batt_aux;
+       int     temp_aux;
+       int     charge_gpio;
+       int     min_voltage;
+       int     max_voltage;
+       int     batt_div;
+       int     batt_mult;
+       int     temp_div;
+       int     temp_mult;
+       int     batt_tech;
+       char    *batt_name;
+};
+
+struct wm97xx_pdata {
+       struct wm97xx_batt_pdata        *batt_pdata;    /* battery data */
 };
 
 /*
@@ -297,6 +324,8 @@ void wm97xx_config_gpio(struct wm97xx *wm, u32 gpio,
                                     enum wm97xx_gpio_sticky sticky,
                                     enum wm97xx_gpio_wake wake);
 
+void wm97xx_set_suspend_mode(struct wm97xx *wm, u16 mode);
+
 /* codec AC97 IO access */
 int wm97xx_reg_read(struct wm97xx *wm, u16 reg);
 void wm97xx_reg_write(struct wm97xx *wm, u16 reg, u16 val);