Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys/arch/arm/sunxi Enable regulator if present
details: https://anonhg.NetBSD.org/src/rev/188c3c433f88
branches: trunk
changeset: 996464:188c3c433f88
user: jmcneill <jmcneill%NetBSD.org@localhost>
date: Sat Feb 02 17:35:16 2019 +0000
description:
Enable regulator if present
diffstat:
sys/arch/arm/sunxi/sunxi_dwhdmi.c | 14 ++++++++++++--
1 files changed, 12 insertions(+), 2 deletions(-)
diffs (42 lines):
diff -r 9e7a5c7b9931 -r 188c3c433f88 sys/arch/arm/sunxi/sunxi_dwhdmi.c
--- a/sys/arch/arm/sunxi/sunxi_dwhdmi.c Sat Feb 02 17:26:38 2019 +0000
+++ b/sys/arch/arm/sunxi/sunxi_dwhdmi.c Sat Feb 02 17:35:16 2019 +0000
@@ -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 <jmcneill%invisible.ca@localhost>
@@ -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 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 @@
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;
Home |
Main Index |
Thread Index |
Old Index