Module Name: src Committed By: jmcneill Date: Sun Nov 3 22:55:34 UTC 2019
Modified Files: src/sys/dev/i2c: tps65217pmic.c Log Message: Defer power monitor polling to the sysmon taskq thread to avoid i2c transactions in intr context To generate a diff of this commit: cvs rdiff -u -r1.13 -r1.14 src/sys/dev/i2c/tps65217pmic.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/dev/i2c/tps65217pmic.c diff -u src/sys/dev/i2c/tps65217pmic.c:1.13 src/sys/dev/i2c/tps65217pmic.c:1.14 --- src/sys/dev/i2c/tps65217pmic.c:1.13 Sun Oct 27 20:11:13 2019 +++ src/sys/dev/i2c/tps65217pmic.c Sun Nov 3 22:55:34 2019 @@ -1,4 +1,4 @@ -/* $NetBSD: tps65217pmic.c,v 1.13 2019/10/27 20:11:13 jmcneill Exp $ */ +/* $NetBSD: tps65217pmic.c,v 1.14 2019/11/03 22:55:34 jmcneill Exp $ */ /*- * Copyright (c) 2013 The NetBSD Foundation, Inc. @@ -37,7 +37,7 @@ #include "opt_fdt.h" #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: tps65217pmic.c,v 1.13 2019/10/27 20:11:13 jmcneill Exp $"); +__KERNEL_RCSID(0, "$NetBSD: tps65217pmic.c,v 1.14 2019/11/03 22:55:34 jmcneill Exp $"); #include <sys/param.h> #include <sys/systm.h> @@ -49,6 +49,7 @@ __KERNEL_RCSID(0, "$NetBSD: tps65217pmic #include <dev/i2c/i2cvar.h> #include <dev/sysmon/sysmonvar.h> +#include <dev/sysmon/sysmon_taskq.h> #include <dev/i2c/tps65217pmicreg.h> #include <dev/i2c/tps65217pmicvar.h> @@ -419,7 +420,7 @@ tps65217pmic_power_monitor_init(struct t } static void -tps65217pmic_power_monitor(void *aux) +tps65217pmic_power_monitor_task(void *aux) { struct tps65217pmic_softc *sc; uint8_t status; @@ -462,6 +463,12 @@ tps65217pmic_power_monitor(void *aux) } static void +tps65217pmic_power_monitor(void *aux) +{ + sysmon_task_queue_sched(0, tps65217pmic_power_monitor_task, aux); +} + +static void tps65217pmic_wled_init(struct tps65217pmic_softc *sc, int isel, int fdim, int brightness) {