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 Only set signal voltage if the regulator ...
details: https://anonhg.NetBSD.org/src/rev/8618790126cf
branches: trunk
changeset: 995709:8618790126cf
user: jmcneill <jmcneill%NetBSD.org@localhost>
date: Wed Jan 02 18:39:01 2019 +0000
description:
Only set signal voltage if the regulator can handle it
diffstat:
sys/arch/arm/sunxi/sunxi_mmc.c | 8 ++++++--
1 files changed, 6 insertions(+), 2 deletions(-)
diffs (29 lines):
diff -r 8812fc685d3f -r 8618790126cf sys/arch/arm/sunxi/sunxi_mmc.c
--- a/sys/arch/arm/sunxi/sunxi_mmc.c Wed Jan 02 18:38:43 2019 +0000
+++ b/sys/arch/arm/sunxi/sunxi_mmc.c Wed Jan 02 18:39:01 2019 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: sunxi_mmc.c,v 1.29 2019/01/02 17:28:18 jmcneill Exp $ */
+/* $NetBSD: sunxi_mmc.c,v 1.30 2019/01/02 18:39:01 jmcneill Exp $ */
/*-
* Copyright (c) 2014-2017 Jared McNeill <jmcneill%invisible.ca@localhost>
@@ -29,7 +29,7 @@
#include "opt_sunximmc.h"
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: sunxi_mmc.c,v 1.29 2019/01/02 17:28:18 jmcneill Exp $");
+__KERNEL_RCSID(0, "$NetBSD: sunxi_mmc.c,v 1.30 2019/01/02 18:39:01 jmcneill Exp $");
#include <sys/param.h>
#include <sys/bus.h>
@@ -911,6 +911,10 @@
return EINVAL;
}
+ error = fdtbus_regulator_supports_voltage(sc->sc_reg_vqmmc, uvol, uvol);
+ if (error != 0)
+ return 0;
+
error = fdtbus_regulator_set_voltage(sc->sc_reg_vqmmc, uvol, uvol);
if (error != 0)
return error;
Home |
Main Index |
Thread Index |
Old Index