Logo Search packages:      
Sourcecode: linux-fsl-imx51 version File versions  Download package

static int __devinit lcd_probe ( struct platform_device *  pdev  )  [static]

This function is called whenever the SPI slave device is detected.

Parameters:
spi the SPI slave device
Returns:
Returns 0 on SUCCESS and error on FAILURE.

Definition at line 115 of file mxcfb_claa_wvga.c.

References lcd_poweron().

{
      int i;
      struct mxc_lcd_platform_data *plat = pdev->dev.platform_data;

      if (plat) {
            if (plat->reset)
                  plat->reset();

            io_reg = regulator_get(&pdev->dev, plat->io_reg);
            if (IS_ERR(io_reg))
                  io_reg = NULL;
            core_reg = regulator_get(&pdev->dev, plat->core_reg);
            if (!IS_ERR(core_reg)) {
                  regulator_set_voltage(io_reg, 1800000, 1800000);
            } else {
                  core_reg = NULL;
            }
      }

      for (i = 0; i < num_registered_fb; i++) {
            if (strcmp(registered_fb[i]->fix.id, "DISP3 BG") == 0) {
                  lcd_init_fb(registered_fb[i]);
                  fb_show_logo(registered_fb[i], 0);
                  lcd_poweron();
            } else if (strcmp(registered_fb[i]->fix.id, "DISP3 FG") == 0) {
                  lcd_init_fb(registered_fb[i]);
            }
      }

      fb_register_client(&nb);

      plcd_dev = pdev;

      return 0;
}


Generated by  Doxygen 1.6.0   Back to index