From 8a431e5b5469ee4236a8add7b28074d0eed5063a Mon Sep 17 00:00:00 2001 From: kiyohara Date: Sun, 3 Jul 2016 11:40:58 +0000 Subject: [PATCH] Add 'needs-flag' to tps65217pmic. --- sys/arch/evbarm/beagle/beagle_machdep.c | 10 ++++++++-- sys/dev/i2c/files.i2c | 4 ++-- 2 files changed, 10 insertions(+), 4 deletions(-) diff --git a/sys/arch/evbarm/beagle/beagle_machdep.c b/sys/arch/evbarm/beagle/beagle_machdep.c index 3ff6c3c0dbe4..b7cf25cef27e 100644 --- a/sys/arch/evbarm/beagle/beagle_machdep.c +++ b/sys/arch/evbarm/beagle/beagle_machdep.c @@ -1,4 +1,4 @@ -/* $NetBSD: beagle_machdep.c,v 1.63 2016/07/03 11:25:27 kiyohara Exp $ */ +/* $NetBSD: beagle_machdep.c,v 1.64 2016/07/03 11:40:58 kiyohara Exp $ */ /* * Machine dependent functions for kernel setup for TI OSK5912 board. @@ -125,7 +125,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: beagle_machdep.c,v 1.63 2016/07/03 11:25:27 kiyohara Exp $"); +__KERNEL_RCSID(0, "$NetBSD: beagle_machdep.c,v 1.64 2016/07/03 11:40:58 kiyohara Exp $"); #include "opt_machdep.h" #include "opt_ddb.h" @@ -141,6 +141,7 @@ __KERNEL_RCSID(0, "$NetBSD: beagle_machdep.c,v 1.63 2016/07/03 11:25:27 kiyohara #include "sdhc.h" #include "ukbd.h" #include "arml2cc.h" +#include "tps65217pmic.h" #include #include @@ -1125,10 +1126,15 @@ beagle_device_register(device_t self, void *aux) int set_mpu_volt(int mvolt) { + +#if NTPS65217PMIC > 0 if (pmic_dev == NULL) return ENODEV; /* MPU voltage is on vdcd2 */ return tps65217pmic_set_volt(pmic_dev, "DCDC2", mvolt); +#else + return -1; +#endif } #endif diff --git a/sys/dev/i2c/files.i2c b/sys/dev/i2c/files.i2c index 99399252f527..1f1c53b65ae8 100644 --- a/sys/dev/i2c/files.i2c +++ b/sys/dev/i2c/files.i2c @@ -1,4 +1,4 @@ -# $NetBSD: files.i2c,v 1.71 2016/06/20 04:18:12 pgoyette Exp $ +# $NetBSD: files.i2c,v 1.72 2016/07/03 11:40:58 kiyohara Exp $ obsolete defflag opt_i2cbus.h I2C_SCAN define i2cbus { } @@ -204,7 +204,7 @@ file dev/i2c/tps65950.c tps65950pm # TI TPS65217 device tps65217pmic: sysmon_envsys attach tps65217pmic at iic -file dev/i2c/tps65217pmic.c tps65217pmic +file dev/i2c/tps65217pmic.c tps65217pmic needs-flag # Microchip MCP980x device mcp980x: sysmon_envsys