All of lore.kernel.org
 help / color / mirror / Atom feed
From: Simon Glass <sjg@chromium.org>
To: u-boot@lists.denx.de
Subject: [U-Boot] [PATCH] rockchip: Set up default PWM flags
Date: Tue, 23 May 2017 18:15:14 -0600	[thread overview]
Message-ID: <20170524001514.3480-1-sjg@chromium.org> (raw)

At present if the PWM set_invert() method is not called then the flags are
not set up and the driver does not work properly. Fix this by setting up
the default flags when probing.

Signed-off-by: Simon Glass <sjg@chromium.org>
Fixes: 874ee59 (rockchip: pwm: implement pwm_set_invert())
---

 drivers/pwm/rk_pwm.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/drivers/pwm/rk_pwm.c b/drivers/pwm/rk_pwm.c
index f3b2f7615d..5d78d4a67d 100644
--- a/drivers/pwm/rk_pwm.c
+++ b/drivers/pwm/rk_pwm.c
@@ -92,6 +92,7 @@ static int rk_pwm_probe(struct udevice *dev)
 		return -EINVAL;
 	}
 	priv->freq = clk_get_rate(&clk);
+	priv->enable_conf = PWM_DUTY_POSTIVE | PWM_INACTIVE_POSTIVE;
 
 	return 0;
 }
-- 
2.13.0.219.gdb65acc882-goog

             reply	other threads:[~2017-05-24  0:15 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-05-24  0:15 Simon Glass [this message]
2017-10-06 16:26 ` [U-Boot] rockchip: Set up default PWM flags Philipp Tomsich
2017-10-06 16:26 ` Philipp Tomsich

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20170524001514.3480-1-sjg@chromium.org \
    --to=sjg@chromium.org \
    --cc=u-boot@lists.denx.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.