DPAUX_HYBRID_PADCTL_AUX_INPUT_RCV_ENABLE);
tegra_dpaux_pad_power(dp->dc,
- tegra_dc_which_sor(dp->dc) ? TEGRA_DPAUX_INSTANCE_1 :
- TEGRA_DPAUX_INSTANCE_0, true);
+ dp->dc->ndev->id == 0 ? TEGRA_DPAUX_INSTANCE_0 :
+ TEGRA_DPAUX_INSTANCE_1, true);
}
static int tegra_dp_panel_power_state(struct tegra_dc_dp_data *dp, u8 state)
{
BUG_ON(!dp->dc || !dp);
- tegra_set_dpaux_addr(dp->aux_base, tegra_dc_which_sor(dp->dc));
+ tegra_set_dpaux_addr(dp->aux_base, dp->dc->ndev->id);
_tegra_dpaux_init(dp);
int err;
u32 irq;
struct device_node *np = dc->ndev->dev.of_node;
- int dp_num = tegra_dc_which_sor(dc);
+
struct device_node *np_dp =
- dp_num ? of_find_node_by_path(DPAUX1_NODE)
+ (dc->ndev->id) ? of_find_node_by_path(DPAUX1_NODE)
: of_find_node_by_path(DPAUX_NODE);
struct device_node *np_panel = NULL;
#ifdef CONFIG_TEGRA_NVDISPLAY
- clk = clk_get(NULL, dp_num ? "dpaux1" : "dpaux");
+ clk = clk_get(NULL, dc->ndev->id ? "dpaux1" : "dpaux");
#else
- clk = clk_get_sys(dp_num ? "dpaux1" : "dpaux", NULL);
+ clk = clk_get_sys(dc->ndev->id ? "dpaux1" : "dpaux", NULL);
#endif
if (IS_ERR_OR_NULL(clk)) {
dev_err(&dc->ndev->dev, "dp: dc clock %s.edp unavailable\n",
static void tegra_dc_dp_destroy(struct tegra_dc *dc)
{
struct device_node *np_dp =
- tegra_dc_which_sor(dc) ? of_find_node_by_path(DPAUX1_NODE) :
+ (dc->ndev->id) ? of_find_node_by_path(DPAUX1_NODE) :
of_find_node_by_path(DPAUX_NODE);
struct tegra_dc_dp_data *dp = tegra_dc_get_outdata(dc);