Lines Matching refs:res

96 	struct hdmi_resources res;  member
499 struct hdmi_resources *res = &hdev->res; in hdmi_streamon() local
536 clk_disable(res->sclk_hdmi); in hdmi_streamon()
537 clk_set_parent(res->sclk_hdmi, res->sclk_hdmiphy); in hdmi_streamon()
538 clk_enable(res->sclk_hdmi); in hdmi_streamon()
550 struct hdmi_resources *res = &hdev->res; in hdmi_streamoff() local
558 clk_disable(res->sclk_hdmi); in hdmi_streamoff()
559 clk_set_parent(res->sclk_hdmi, res->sclk_pixel); in hdmi_streamoff()
560 clk_enable(res->sclk_hdmi); in hdmi_streamoff()
580 static int hdmi_resource_poweron(struct hdmi_resources *res) in hdmi_resource_poweron() argument
585 ret = regulator_bulk_enable(res->regul_count, res->regul_bulk); in hdmi_resource_poweron()
589 clk_enable(res->hdmiphy); in hdmi_resource_poweron()
591 clk_set_parent(res->sclk_hdmi, res->sclk_pixel); in hdmi_resource_poweron()
593 clk_enable(res->sclk_hdmi); in hdmi_resource_poweron()
598 static void hdmi_resource_poweroff(struct hdmi_resources *res) in hdmi_resource_poweroff() argument
601 clk_disable(res->sclk_hdmi); in hdmi_resource_poweroff()
603 clk_disable(res->hdmiphy); in hdmi_resource_poweroff()
605 regulator_bulk_disable(res->regul_count, res->regul_bulk); in hdmi_resource_poweroff()
742 hdmi_resource_poweroff(&hdev->res); in hdmi_runtime_suspend()
756 ret = hdmi_resource_poweron(&hdev->res); in hdmi_runtime_resume()
770 hdmi_resource_poweroff(&hdev->res); in hdmi_runtime_resume()
781 static void hdmi_resource_clear_clocks(struct hdmi_resources *res) in hdmi_resource_clear_clocks() argument
783 res->hdmi = ERR_PTR(-EINVAL); in hdmi_resource_clear_clocks()
784 res->sclk_hdmi = ERR_PTR(-EINVAL); in hdmi_resource_clear_clocks()
785 res->sclk_pixel = ERR_PTR(-EINVAL); in hdmi_resource_clear_clocks()
786 res->sclk_hdmiphy = ERR_PTR(-EINVAL); in hdmi_resource_clear_clocks()
787 res->hdmiphy = ERR_PTR(-EINVAL); in hdmi_resource_clear_clocks()
792 struct hdmi_resources *res = &hdev->res; in hdmi_resources_cleanup() local
796 if (res->regul_count) in hdmi_resources_cleanup()
797 regulator_bulk_free(res->regul_count, res->regul_bulk); in hdmi_resources_cleanup()
799 kfree(res->regul_bulk); in hdmi_resources_cleanup()
800 if (!IS_ERR(res->hdmiphy)) in hdmi_resources_cleanup()
801 clk_put(res->hdmiphy); in hdmi_resources_cleanup()
802 if (!IS_ERR(res->sclk_hdmiphy)) in hdmi_resources_cleanup()
803 clk_put(res->sclk_hdmiphy); in hdmi_resources_cleanup()
804 if (!IS_ERR(res->sclk_pixel)) in hdmi_resources_cleanup()
805 clk_put(res->sclk_pixel); in hdmi_resources_cleanup()
806 if (!IS_ERR(res->sclk_hdmi)) in hdmi_resources_cleanup()
807 clk_put(res->sclk_hdmi); in hdmi_resources_cleanup()
808 if (!IS_ERR(res->hdmi)) in hdmi_resources_cleanup()
809 clk_put(res->hdmi); in hdmi_resources_cleanup()
810 memset(res, 0, sizeof(*res)); in hdmi_resources_cleanup()
811 hdmi_resource_clear_clocks(res); in hdmi_resources_cleanup()
817 struct hdmi_resources *res = &hdev->res; in hdmi_resources_init() local
828 memset(res, 0, sizeof(*res)); in hdmi_resources_init()
829 hdmi_resource_clear_clocks(res); in hdmi_resources_init()
832 res->hdmi = clk_get(dev, "hdmi"); in hdmi_resources_init()
833 if (IS_ERR(res->hdmi)) { in hdmi_resources_init()
837 res->sclk_hdmi = clk_get(dev, "sclk_hdmi"); in hdmi_resources_init()
838 if (IS_ERR(res->sclk_hdmi)) { in hdmi_resources_init()
842 res->sclk_pixel = clk_get(dev, "sclk_pixel"); in hdmi_resources_init()
843 if (IS_ERR(res->sclk_pixel)) { in hdmi_resources_init()
847 res->sclk_hdmiphy = clk_get(dev, "sclk_hdmiphy"); in hdmi_resources_init()
848 if (IS_ERR(res->sclk_hdmiphy)) { in hdmi_resources_init()
852 res->hdmiphy = clk_get(dev, "hdmiphy"); in hdmi_resources_init()
853 if (IS_ERR(res->hdmiphy)) { in hdmi_resources_init()
857 res->regul_bulk = kcalloc(ARRAY_SIZE(supply), in hdmi_resources_init()
858 sizeof(res->regul_bulk[0]), GFP_KERNEL); in hdmi_resources_init()
859 if (!res->regul_bulk) { in hdmi_resources_init()
864 res->regul_bulk[i].supply = supply[i]; in hdmi_resources_init()
865 res->regul_bulk[i].consumer = NULL; in hdmi_resources_init()
868 ret = regulator_bulk_get(dev, ARRAY_SIZE(supply), res->regul_bulk); in hdmi_resources_init()
873 res->regul_count = ARRAY_SIZE(supply); in hdmi_resources_init()
885 struct resource *res; in hdmi_probe() local
914 res = platform_get_resource(pdev, IORESOURCE_MEM, 0); in hdmi_probe()
915 if (res == NULL) { in hdmi_probe()
921 hdmi_dev->regs = devm_ioremap(&pdev->dev, res->start, in hdmi_probe()
922 resource_size(res)); in hdmi_probe()
929 res = platform_get_resource(pdev, IORESOURCE_IRQ, 0); in hdmi_probe()
930 if (res == NULL) { in hdmi_probe()
936 ret = devm_request_irq(&pdev->dev, res->start, hdmi_irq_handler, 0, in hdmi_probe()
942 hdmi_dev->irq = res->start; in hdmi_probe()
999 clk_enable(hdmi_dev->res.hdmi); in hdmi_probe()
1040 clk_disable(hdmi_dev->res.hdmi); in hdmi_remove()