mirror of
https://github.com/hardkernel/linux.git
synced 2026-06-09 04:10:18 +09:00
MIPI: Provide a function,get screen type,for frequency conversion.
Signed-off-by: xubilv <xbl@rock-chips.com>
This commit is contained in:
@@ -85,6 +85,26 @@ static int rk32_mipi_power_down_DDR(void);
|
||||
static int rk32_mipi_power_up_DDR(void);
|
||||
int rk_mipi_screen_standby(u8 enable);
|
||||
|
||||
int rockchip_get_screen_type(void)
|
||||
{
|
||||
struct device_node *type_node;
|
||||
struct device_node *childnode;
|
||||
u32 val = 0;
|
||||
|
||||
type_node = of_find_node_by_name(NULL, "display-timings");
|
||||
if (!type_node) {
|
||||
pr_err("could not find display-timings node\n");
|
||||
return -1;
|
||||
}
|
||||
|
||||
for_each_child_of_node(type_node, childnode) {
|
||||
if (!of_property_read_u32(childnode, "screen-type", &val))
|
||||
return val;
|
||||
}
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
static int rk32_dsi_read_reg(struct dsi *dsi, u16 reg, u32 *pval)
|
||||
{
|
||||
if (dsi->ops.id == DWC_DSI_VERSION)
|
||||
|
||||
@@ -727,4 +727,5 @@ int rk_fb_get_display_policy(void);
|
||||
int rk_fb_pixel_width(int data_format);
|
||||
void trace_buffer_dump(struct device *dev,
|
||||
struct rk_lcdc_driver *dev_drv);
|
||||
extern int rockchip_get_screen_type(void);
|
||||
#endif
|
||||
|
||||
Reference in New Issue
Block a user