···1010 Supports LCD Panel used in TI SDP3430 and EVM boards,1111 OMAP3517 EVM boards and CM-T35.12121313-config PANEL_DVI1414- tristate "DVI output"1313+config PANEL_TFP4101414+ tristate "TFP410 DPI-to-DVI chip"1515 depends on OMAP2_DSS_DPI && I2C1616 help1717- Driver for external monitors, connected via DVI. The driver uses i2c1818- to read EDID information from the monitor.1717+ Driver for TFP410 DPI-to-DVI chip. The driver uses i2c to read EDID1818+ information from the monitor.19192020config PANEL_LGPHILIPS_LB035Q022121 tristate "LG.Philips LB035Q02 LCD Panel"
···912912913913 dev_set_drvdata(&dssdev->dev, td);914914915915+ if (gpio_is_valid(panel_data->reset_gpio)) {916916+ r = gpio_request_one(panel_data->reset_gpio, GPIOF_OUT_INIT_LOW,917917+ "taal rst");918918+ if (r) {919919+ dev_err(&dssdev->dev, "failed to request reset gpio\n");920920+ goto err_rst_gpio;921921+ }922922+ }923923+915924 taal_hw_reset(dssdev);916925917926 if (panel_data->use_dsi_backlight) {···1001992 if (bldev != NULL)1002993 backlight_device_unregister(bldev);1003994err_bl:995995+ if (gpio_is_valid(panel_data->reset_gpio))996996+ gpio_free(panel_data->reset_gpio);997997+err_rst_gpio:1004998 destroy_workqueue(td->workqueue);1005999err_wq:10061000 kfree(td);···10421030 /* reset, to be sure that the panel is in a valid state */10431031 taal_hw_reset(dssdev);1044103210331033+ if (gpio_is_valid(panel_data->reset_gpio))10341034+ gpio_free(panel_data->reset_gpio);10351035+10451036 kfree(td);10461037}1047103810481039static int taal_power_on(struct omap_dss_device *dssdev)10491040{10501041 struct taal_data *td = dev_get_drvdata(&dssdev->dev);10421042+ struct nokia_dsi_panel_data *panel_data = get_panel_data(dssdev);10511043 u8 id1, id2, id3;10521044 int r;10451045+10461046+ r = omapdss_dsi_configure_pins(dssdev, &panel_data->pin_config);10471047+ if (r) {10481048+ dev_err(&dssdev->dev, "failed to configure DSI pins\n");10491049+ goto err0;10501050+ };1053105110541052 r = omapdss_dsi_display_enable(dssdev);10551053 if (r) {
+68-65
drivers/video/omap2/dss/dsi.c
···20452045 }20462046}2047204720482048-static int dsi_parse_lane_config(struct omap_dss_device *dssdev)20492049-{20502050- struct platform_device *dsidev = dsi_get_dsidev_from_dssdev(dssdev);20512051- struct dsi_data *dsi = dsi_get_dsidrv_data(dsidev);20522052- u8 lanes[DSI_MAX_NR_LANES];20532053- u8 polarities[DSI_MAX_NR_LANES];20542054- int num_lanes, i;20552055-20562056- static const enum dsi_lane_function functions[] = {20572057- DSI_LANE_CLK,20582058- DSI_LANE_DATA1,20592059- DSI_LANE_DATA2,20602060- DSI_LANE_DATA3,20612061- DSI_LANE_DATA4,20622062- };20632063-20642064- lanes[0] = dssdev->phy.dsi.clk_lane;20652065- lanes[1] = dssdev->phy.dsi.data1_lane;20662066- lanes[2] = dssdev->phy.dsi.data2_lane;20672067- lanes[3] = dssdev->phy.dsi.data3_lane;20682068- lanes[4] = dssdev->phy.dsi.data4_lane;20692069- polarities[0] = dssdev->phy.dsi.clk_pol;20702070- polarities[1] = dssdev->phy.dsi.data1_pol;20712071- polarities[2] = dssdev->phy.dsi.data2_pol;20722072- polarities[3] = dssdev->phy.dsi.data3_pol;20732073- polarities[4] = dssdev->phy.dsi.data4_pol;20742074-20752075- num_lanes = 0;20762076-20772077- for (i = 0; i < dsi->num_lanes_supported; ++i)20782078- dsi->lanes[i].function = DSI_LANE_UNUSED;20792079-20802080- for (i = 0; i < dsi->num_lanes_supported; ++i) {20812081- int num;20822082-20832083- if (lanes[i] == DSI_LANE_UNUSED)20842084- break;20852085-20862086- num = lanes[i] - 1;20872087-20882088- if (num >= dsi->num_lanes_supported)20892089- return -EINVAL;20902090-20912091- if (dsi->lanes[num].function != DSI_LANE_UNUSED)20922092- return -EINVAL;20932093-20942094- dsi->lanes[num].function = functions[i];20952095- dsi->lanes[num].polarity = polarities[i];20962096- num_lanes++;20972097- }20982098-20992099- if (num_lanes < 2 || num_lanes > dsi->num_lanes_supported)21002100- return -EINVAL;21012101-21022102- dsi->num_lanes_used = num_lanes;21032103-21042104- return 0;21052105-}21062106-21072048static int dsi_set_lane_config(struct omap_dss_device *dssdev)21082049{21092050 struct platform_device *dsidev = dsi_get_dsidev_from_dssdev(dssdev);···38853944 }38863945}3887394639473947+int omapdss_dsi_configure_pins(struct omap_dss_device *dssdev,39483948+ const struct omap_dsi_pin_config *pin_cfg)39493949+{39503950+ struct platform_device *dsidev = dsi_get_dsidev_from_dssdev(dssdev);39513951+ struct dsi_data *dsi = dsi_get_dsidrv_data(dsidev);39523952+ int num_pins;39533953+ const int *pins;39543954+ struct dsi_lane_config lanes[DSI_MAX_NR_LANES];39553955+ int num_lanes;39563956+ int i;39573957+39583958+ static const enum dsi_lane_function functions[] = {39593959+ DSI_LANE_CLK,39603960+ DSI_LANE_DATA1,39613961+ DSI_LANE_DATA2,39623962+ DSI_LANE_DATA3,39633963+ DSI_LANE_DATA4,39643964+ };39653965+39663966+ num_pins = pin_cfg->num_pins;39673967+ pins = pin_cfg->pins;39683968+39693969+ if (num_pins < 4 || num_pins > dsi->num_lanes_supported * 239703970+ || num_pins % 2 != 0)39713971+ return -EINVAL;39723972+39733973+ for (i = 0; i < DSI_MAX_NR_LANES; ++i)39743974+ lanes[i].function = DSI_LANE_UNUSED;39753975+39763976+ num_lanes = 0;39773977+39783978+ for (i = 0; i < num_pins; i += 2) {39793979+ u8 lane, pol;39803980+ int dx, dy;39813981+39823982+ dx = pins[i];39833983+ dy = pins[i + 1];39843984+39853985+ if (dx < 0 || dx >= dsi->num_lanes_supported * 2)39863986+ return -EINVAL;39873987+39883988+ if (dy < 0 || dy >= dsi->num_lanes_supported * 2)39893989+ return -EINVAL;39903990+39913991+ if (dx & 1) {39923992+ if (dy != dx - 1)39933993+ return -EINVAL;39943994+ pol = 1;39953995+ } else {39963996+ if (dy != dx + 1)39973997+ return -EINVAL;39983998+ pol = 0;39993999+ }40004000+40014001+ lane = dx / 2;40024002+40034003+ lanes[lane].function = functions[i / 2];40044004+ lanes[lane].polarity = pol;40054005+ num_lanes++;40064006+ }40074007+40084008+ memcpy(dsi->lanes, lanes, sizeof(dsi->lanes));40094009+ dsi->num_lanes_used = num_lanes;40104010+40114011+ return 0;40124012+}40134013+EXPORT_SYMBOL(omapdss_dsi_configure_pins);40144014+38884015int dsi_enable_video_output(struct omap_dss_device *dssdev, int channel)38894016{38904017 struct platform_device *dsidev = dsi_get_dsidev_from_dssdev(dssdev);···43094300 struct platform_device *dsidev = dsi_get_dsidev_from_dssdev(dssdev);43104301 int dsi_module = dsi_get_dsidev_id(dsidev);43114302 int r;43124312-43134313- r = dsi_parse_lane_config(dssdev);43144314- if (r) {43154315- DSSERR("illegal lane config");43164316- goto err0;43174317- }4318430343194304 r = dsi_pll_init(dsidev, true, true);43204305 if (r)