treewide: remove redundant IS_ERR() before error code check
[linux/fpc-iii.git] / drivers / gpu / drm / msm / hdmi / hdmi_phy_8x74.c
bloba2a6940e195a0788a3d84de0171565510ef60623
1 // SPDX-License-Identifier: GPL-2.0-only
2 /*
3 * Copyright (C) 2013 Red Hat
4 * Author: Rob Clark <robdclark@gmail.com>
5 */
7 #include "hdmi.h"
9 static void hdmi_phy_8x74_powerup(struct hdmi_phy *phy,
10 unsigned long int pixclock)
12 hdmi_phy_write(phy, REG_HDMI_8x74_ANA_CFG0, 0x1b);
13 hdmi_phy_write(phy, REG_HDMI_8x74_ANA_CFG1, 0xf2);
14 hdmi_phy_write(phy, REG_HDMI_8x74_BIST_CFG0, 0x0);
15 hdmi_phy_write(phy, REG_HDMI_8x74_BIST_PATN0, 0x0);
16 hdmi_phy_write(phy, REG_HDMI_8x74_BIST_PATN1, 0x0);
17 hdmi_phy_write(phy, REG_HDMI_8x74_BIST_PATN2, 0x0);
18 hdmi_phy_write(phy, REG_HDMI_8x74_BIST_PATN3, 0x0);
19 hdmi_phy_write(phy, REG_HDMI_8x74_PD_CTRL1, 0x20);
22 static void hdmi_phy_8x74_powerdown(struct hdmi_phy *phy)
24 hdmi_phy_write(phy, REG_HDMI_8x74_PD_CTRL0, 0x7f);
27 static const char * const hdmi_phy_8x74_reg_names[] = {
28 "core-vdda",
29 "vddio",
32 static const char * const hdmi_phy_8x74_clk_names[] = {
33 "iface", "alt_iface"
36 const struct hdmi_phy_cfg msm_hdmi_phy_8x74_cfg = {
37 .type = MSM_HDMI_PHY_8x74,
38 .powerup = hdmi_phy_8x74_powerup,
39 .powerdown = hdmi_phy_8x74_powerdown,
40 .reg_names = hdmi_phy_8x74_reg_names,
41 .num_regs = ARRAY_SIZE(hdmi_phy_8x74_reg_names),
42 .clk_names = hdmi_phy_8x74_clk_names,
43 .num_clks = ARRAY_SIZE(hdmi_phy_8x74_clk_names),