diff options
Diffstat (limited to 'include/linux/sm501.h')
| -rw-r--r-- | include/linux/sm501.h | 39 |
1 files changed, 20 insertions, 19 deletions
diff --git a/include/linux/sm501.h b/include/linux/sm501.h index 95c1c39ba445..214f93209b8c 100644 --- a/include/linux/sm501.h +++ b/include/linux/sm501.h | |||
| @@ -46,24 +46,6 @@ extern unsigned long sm501_modify_reg(struct device *dev, | |||
| 46 | unsigned long set, | 46 | unsigned long set, |
| 47 | unsigned long clear); | 47 | unsigned long clear); |
| 48 | 48 | ||
| 49 | /* sm501_gpio_set | ||
| 50 | * | ||
| 51 | * set the state of the given GPIO line | ||
| 52 | */ | ||
| 53 | |||
| 54 | extern void sm501_gpio_set(struct device *dev, | ||
| 55 | unsigned long gpio, | ||
| 56 | unsigned int to, | ||
| 57 | unsigned int dir); | ||
| 58 | |||
| 59 | /* sm501_gpio_get | ||
| 60 | * | ||
| 61 | * get the state of the given GPIO line | ||
| 62 | */ | ||
| 63 | |||
| 64 | extern unsigned long sm501_gpio_get(struct device *dev, | ||
| 65 | unsigned long gpio); | ||
| 66 | |||
| 67 | 49 | ||
| 68 | /* Platform data definitions */ | 50 | /* Platform data definitions */ |
| 69 | 51 | ||
| @@ -73,6 +55,8 @@ extern unsigned long sm501_gpio_get(struct device *dev, | |||
| 73 | #define SM501FB_FLAG_USE_HWACCEL (1<<3) | 55 | #define SM501FB_FLAG_USE_HWACCEL (1<<3) |
| 74 | #define SM501FB_FLAG_PANEL_NO_FPEN (1<<4) | 56 | #define SM501FB_FLAG_PANEL_NO_FPEN (1<<4) |
| 75 | #define SM501FB_FLAG_PANEL_NO_VBIASEN (1<<5) | 57 | #define SM501FB_FLAG_PANEL_NO_VBIASEN (1<<5) |
| 58 | #define SM501FB_FLAG_PANEL_INV_FPEN (1<<6) | ||
| 59 | #define SM501FB_FLAG_PANEL_INV_VBIASEN (1<<7) | ||
| 76 | 60 | ||
| 77 | struct sm501_platdata_fbsub { | 61 | struct sm501_platdata_fbsub { |
| 78 | struct fb_videomode *def_mode; | 62 | struct fb_videomode *def_mode; |
| @@ -102,11 +86,19 @@ struct sm501_platdata_fb { | |||
| 102 | struct sm501_platdata_fbsub *fb_pnl; | 86 | struct sm501_platdata_fbsub *fb_pnl; |
| 103 | }; | 87 | }; |
| 104 | 88 | ||
| 105 | /* gpio i2c */ | 89 | /* gpio i2c |
| 90 | * | ||
| 91 | * Note, we have to pass in the bus number, as the number used will be | ||
| 92 | * passed to the i2c-gpio driver's platform_device.id, subsequently used | ||
| 93 | * to register the i2c bus. | ||
| 94 | */ | ||
| 106 | 95 | ||
| 107 | struct sm501_platdata_gpio_i2c { | 96 | struct sm501_platdata_gpio_i2c { |
| 97 | unsigned int bus_num; | ||
| 108 | unsigned int pin_sda; | 98 | unsigned int pin_sda; |
| 109 | unsigned int pin_scl; | 99 | unsigned int pin_scl; |
| 100 | int udelay; | ||
| 101 | int timeout; | ||
| 110 | }; | 102 | }; |
| 111 | 103 | ||
| 112 | /* sm501_initdata | 104 | /* sm501_initdata |
| @@ -129,6 +121,7 @@ struct sm501_reg_init { | |||
| 129 | #define SM501_USE_FBACCEL (1<<6) | 121 | #define SM501_USE_FBACCEL (1<<6) |
| 130 | #define SM501_USE_AC97 (1<<7) | 122 | #define SM501_USE_AC97 (1<<7) |
| 131 | #define SM501_USE_I2S (1<<8) | 123 | #define SM501_USE_I2S (1<<8) |
| 124 | #define SM501_USE_GPIO (1<<9) | ||
| 132 | 125 | ||
| 133 | #define SM501_USE_ALL (0xffffffff) | 126 | #define SM501_USE_ALL (0xffffffff) |
| 134 | 127 | ||
| @@ -155,6 +148,8 @@ struct sm501_init_gpio { | |||
| 155 | struct sm501_reg_init gpio_ddr_high; | 148 | struct sm501_reg_init gpio_ddr_high; |
| 156 | }; | 149 | }; |
| 157 | 150 | ||
| 151 | #define SM501_FLAG_SUSPEND_OFF (1<<4) | ||
| 152 | |||
| 158 | /* sm501_platdata | 153 | /* sm501_platdata |
| 159 | * | 154 | * |
| 160 | * This is passed with the platform device to allow the board | 155 | * This is passed with the platform device to allow the board |
| @@ -168,6 +163,12 @@ struct sm501_platdata { | |||
| 168 | struct sm501_init_gpio *init_gpiop; | 163 | struct sm501_init_gpio *init_gpiop; |
| 169 | struct sm501_platdata_fb *fb; | 164 | struct sm501_platdata_fb *fb; |
| 170 | 165 | ||
| 166 | int flags; | ||
| 167 | int gpio_base; | ||
| 168 | |||
| 169 | int (*get_power)(struct device *dev); | ||
| 170 | int (*set_power)(struct device *dev, unsigned int on); | ||
| 171 | |||
| 171 | struct sm501_platdata_gpio_i2c *gpio_i2c; | 172 | struct sm501_platdata_gpio_i2c *gpio_i2c; |
| 172 | unsigned int gpio_i2c_nr; | 173 | unsigned int gpio_i2c_nr; |
| 173 | }; | 174 | }; |
