+static struct gpio_led backlight_leds[] = {
+ {
+ .name = "lcd_h4",
+ .default_trigger = "backlight",
+ .gpio = H4_GPIO_LCD_ENBKL,
+ },
+ { },
+};
+
+static struct gpio_led_platform_data backlight_led_data = {
+ .num_leds = 1,
+ .leds = backlight_leds,
+};
+
+static struct platform_device h4_backlight_device = {
+ .name = "leds-gpio",
+ .id = 0,
+ .dev.platform_data = &backlight_led_data,
+};
+
+static int
+u191_setup(struct i2c_client *client, int gpio, unsigned ngpio, void *context)
+{
+ /* P0 = IRDA control, FIR/MIR vs SIR */
+ gpio_request(H4_GPIO_IRDA_FIRSEL, "irda_firsel");
+ gpio_direction_output(H4_GPIO_IRDA_FIRSEL, false);
+
+ /* P3 = camera sensor module PWDN */
+ gpio_request(H4_GPIO_CAM_MODULE_EN, "camera_en");
+ gpio_direction_output(H4_GPIO_CAM_MODULE_EN, false);
+
+ /* P7 = LCD_ENVDD ... controls power to LCD (including backlight)
+ * P5 = LCD_ENBKL ... switches backlight
+ */
+ gpio_request(H4_GPIO_LCD_ENVDD, "lcd_power");
+ gpio_direction_output(H4_GPIO_LCD_ENVDD, LCD_ENABLED);
+ if (LCD_ENABLED) {
+ h4_backlight_device.dev.parent = &client->dev;
+ platform_device_register(&h4_backlight_device);
+ }
+
+ /* P6 = AUDIO_ENVDD ... switch power to microphone */
+ gpio_request(H4_GPIO_AUDIO_ENVDD, "audio_power");
+ gpio_direction_output(H4_GPIO_AUDIO_ENVDD, true);
+
+ return 0;
+}
+
+
+static struct pcf857x_platform_data u191_platform_data = {
+ .gpio_base = H4_U191_GPIO_BASE,
+ .setup = u191_setup,
+};
+
+static int
+u192_setup(struct i2c_client *client, int gpio, unsigned ngpio, void *context)
+{
+ gpio_request(H4_GPIO_IRDA_AGPSn, "irda/agps");
+ gpio_direction_output(H4_GPIO_IRDA_AGPSn, false);
+
+ return 0;
+}
+
+static struct pcf857x_platform_data u192_platform_data = {
+ .gpio_base = H4_U192_GPIO_BASE,
+ .setup = u192_setup,
+};
+
+static int
+u193_setup(struct i2c_client *client, int gpio, unsigned ngpio, void *context)
+{
+ /* reset sensor */
+ gpio_request(H4_GPIO_CAM_RST, "camera_rst");
+ gpio_direction_output(H4_GPIO_CAM_RST, true);
+
+ return 0;
+}
+
+static struct pcf857x_platform_data u193_platform_data = {
+ .gpio_base = H4_U193_GPIO_BASE,
+ .setup = u193_setup,
+};
+