Module Name: src Committed By: jmcneill Date: Wed Jan 2 18:39:01 UTC 2019
Modified Files: src/sys/arch/arm/sunxi: sunxi_mmc.c Log Message: Only set signal voltage if the regulator can handle it To generate a diff of this commit: cvs rdiff -u -r1.29 -r1.30 src/sys/arch/arm/sunxi/sunxi_mmc.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_mmc.c diff -u src/sys/arch/arm/sunxi/sunxi_mmc.c:1.29 src/sys/arch/arm/sunxi/sunxi_mmc.c:1.30 --- src/sys/arch/arm/sunxi/sunxi_mmc.c:1.29 Wed Jan 2 17:28:18 2019 +++ src/sys/arch/arm/sunxi/sunxi_mmc.c Wed Jan 2 18:39:01 2019 @@ -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 <jmcne...@invisible.ca> @@ -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 @@ sunxi_mmc_signal_voltage(sdmmc_chipset_h 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;