Module Name:    src
Committed By:   jakllsch
Date:           Thu Dec 19 00:42:12 UTC 2019

Modified Files:
        src/sys/arch/arm/rockchip: rk_pwm.c

Log Message:
paper over the rkpwm get_conf function that otherwise doesn't seem to
let things work


To generate a diff of this commit:
cvs rdiff -u -r1.2 -r1.3 src/sys/arch/arm/rockchip/rk_pwm.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/rockchip/rk_pwm.c
diff -u src/sys/arch/arm/rockchip/rk_pwm.c:1.2 src/sys/arch/arm/rockchip/rk_pwm.c:1.3
--- src/sys/arch/arm/rockchip/rk_pwm.c:1.2	Fri Oct 18 06:51:02 2019
+++ src/sys/arch/arm/rockchip/rk_pwm.c	Thu Dec 19 00:42:12 2019
@@ -1,4 +1,4 @@
-/* $NetBSD: rk_pwm.c,v 1.2 2019/10/18 06:51:02 skrll Exp $ */
+/* $NetBSD: rk_pwm.c,v 1.3 2019/12/19 00:42:12 jakllsch Exp $ */
 
 /*-
  * Copyright (c) 2019 Jared McNeill <[email protected]>
@@ -28,7 +28,7 @@
 
 #include <sys/cdefs.h>
 
-__KERNEL_RCSID(1, "$NetBSD: rk_pwm.c,v 1.2 2019/10/18 06:51:02 skrll Exp $");
+__KERNEL_RCSID(1, "$NetBSD: rk_pwm.c,v 1.3 2019/12/19 00:42:12 jakllsch Exp $");
 
 #include <sys/param.h>
 #include <sys/bus.h>
@@ -132,6 +132,10 @@ static int
 rk_pwm_get_config(pwm_tag_t pwm, struct pwm_config *conf)
 {
 	struct rk_pwm_softc * const sc = device_private(pwm->pwm_dev);
+
+#if 0
+	/* XXX may be useful someday */
+
 	uint32_t ctrl, period, duty;
 	u_int div;
 
@@ -153,6 +157,9 @@ rk_pwm_get_config(pwm_tag_t pwm, struct 
 	conf->polarity = (ctrl & CTRL_DUTY_POL) ? PWM_ACTIVE_HIGH : PWM_ACTIVE_LOW;
         conf->period = (u_int)(((uint64_t)period * 1000000000) / rate);
         conf->duty_cycle = (u_int)(((uint64_t)duty * 1000000000) / rate);
+#else
+	*conf = sc->sc_conf;
+#endif
 
 	return 0;
 }

Reply via email to