Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/sys/arch/arm/rockchip paper over the rkpwm get_conf function...



details:   https://anonhg.NetBSD.org/src/rev/baa4c72bfd3c
branches:  trunk
changeset: 967709:baa4c72bfd3c
user:      jakllsch <jakllsch%NetBSD.org@localhost>
date:      Thu Dec 19 00:42:12 2019 +0000

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

diffstat:

 sys/arch/arm/rockchip/rk_pwm.c |  11 +++++++++--
 1 files changed, 9 insertions(+), 2 deletions(-)

diffs (39 lines):

diff -r 57910d6e33c4 -r baa4c72bfd3c sys/arch/arm/rockchip/rk_pwm.c
--- a/sys/arch/arm/rockchip/rk_pwm.c    Thu Dec 19 00:36:26 2019 +0000
+++ b/sys/arch/arm/rockchip/rk_pwm.c    Thu Dec 19 00:42:12 2019 +0000
@@ -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 <jmcneill%invisible.ca@localhost>
@@ -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 @@
 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 @@
        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;
 }



Home | Main Index | Thread Index | Old Index