2 * Copyright (c) 2017 Theobroma Systems Design und Consulting GmbH
4 * SPDX-License-Identifier: GPL-2.0+
10 struct rkhdmi_driverdata {
14 const char * const *regulator_names;
15 u32 regulator_names_cnt;
17 int (*set_input_vop)(struct udevice *dev);
18 int (*clk_config)(struct udevice *dev);
27 * rk_hdmi_read_edid() - read the attached HDMI/DVI monitor's EDID
29 * N.B.: The buffer should be large enough to hold 2 EDID blocks, as
30 * this function calls dw_hdmi_read_edid, which ignores buf_size
31 * argument and assumes that there's always enough space for 2
35 * @buf: output buffer for the EDID
36 * @buf_size: number of bytes in the buffer
37 * @return number of bytes read if OK, -ve if something went wrong
39 int rk_hdmi_read_edid(struct udevice *dev, u8 *buf, int buf_size);
42 * rk_hdmi_probe_regulators() - probe (autoset + enable) regulators
44 * Probes a list of regulators by performing autoset and enable
45 * operations on them. The list of regulators is an array of string
46 * pointers and any individual regulator-probe may fail without
47 * counting as an error.
50 * @names: array of string-pointers to regulator names to probe
51 * @cnt: number of elements in the 'names' array
53 void rk_hdmi_probe_regulators(struct udevice *dev,
54 const char * const *names, int cnt);
56 * rk_hdmi_ofdata_to_platdata() - common ofdata_to_platdata implementation
59 * @return 0 if OK, -ve if something went wrong
61 int rk_hdmi_ofdata_to_platdata(struct udevice *dev);
64 * rk_hdmi_probe() - common probe implementation
66 * Performs the following, common initialisation steps:
67 * 1. checks for HPD (i.e. a HDMI monitor being attached)
68 * 2. initialises the Designware HDMI core
69 * 3. initialises the Designware HDMI PHY
72 * @return 0 if OK, -ve if something went wrong
74 int rk_hdmi_probe(struct udevice *dev);