Module Name: src
Committed By: jmcneill
Date: Sat Feb 2 17:35:16 UTC 2019
Modified Files:
src/sys/arch/arm/sunxi: sunxi_dwhdmi.c
Log Message:
Enable regulator if present
To generate a diff of this commit:
cvs rdiff -u -r1.2 -r1.3 src/sys/arch/arm/sunxi/sunxi_dwhdmi.c
Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.
Modified files:
Index: src/sys/arch/arm/sunxi/sunxi_dwhdmi.c
diff -u src/sys/arch/arm/sunxi/sunxi_dwhdmi.c:1.2 src/sys/arch/arm/sunxi/sunxi_dwhdmi.c:1.3
--- src/sys/arch/arm/sunxi/sunxi_dwhdmi.c:1.2 Thu Jan 31 01:49:28 2019
+++ src/sys/arch/arm/sunxi/sunxi_dwhdmi.c Sat Feb 2 17:35:16 2019
@@ -1,4 +1,4 @@
-/* $NetBSD: sunxi_dwhdmi.c,v 1.2 2019/01/31 01:49:28 jmcneill Exp $ */
+/* $NetBSD: sunxi_dwhdmi.c,v 1.3 2019/02/02 17:35:16 jmcneill Exp $ */
/*-
* Copyright (c) 2019 Jared D. McNeill <[email protected]>
@@ -27,7 +27,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: sunxi_dwhdmi.c,v 1.2 2019/01/31 01:49:28 jmcneill Exp $");
+__KERNEL_RCSID(0, "$NetBSD: sunxi_dwhdmi.c,v 1.3 2019/02/02 17:35:16 jmcneill Exp $");
#include <sys/param.h>
#include <sys/bus.h>
@@ -61,6 +61,7 @@ struct sunxi_dwhdmi_softc {
struct dwhdmi_softc sc_base;
int sc_phandle;
struct fdtbus_phy *sc_phy;
+ struct fdtbus_regulator *sc_regulator;
struct fdt_device_ports sc_ports;
struct drm_display_mode sc_curmode;
@@ -106,6 +107,15 @@ sunxi_dwhdmi_ep_activate(device_t dev, s
return ENXIO;
}
+ sc->sc_regulator = fdtbus_regulator_acquire(sc->sc_phandle, "hvcc-supply");
+ if (sc->sc_regulator != NULL) {
+ error = fdtbus_regulator_enable(sc->sc_regulator);
+ if (error != 0) {
+ device_printf(dev, "couldn't enable supply\n");
+ return error;
+ }
+ }
+
error = dwhdmi_bind(&sc->sc_base, encoder);
if (error != 0)
return error;