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