linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: "Uwe Kleine-König" <u.kleine-koenig@pengutronix.de>
To: Billy Tsai <billy_tsai@aspeedtech.com>
Cc: "lee.jones@linaro.org" <lee.jones@linaro.org>,
	"robh+dt@kernel.org" <robh+dt@kernel.org>,
	"joel@jms.id.au" <joel@jms.id.au>,
	"andrew@aj.id.au" <andrew@aj.id.au>,
	"thierry.reding@gmail.com" <thierry.reding@gmail.com>,
	"p.zabel@pengutronix.de" <p.zabel@pengutronix.de>,
	"devicetree@vger.kernel.org" <devicetree@vger.kernel.org>,
	"linux-arm-kernel@lists.infradead.org" 
	<linux-arm-kernel@lists.infradead.org>,
	"linux-aspeed@lists.ozlabs.org" <linux-aspeed@lists.ozlabs.org>,
	"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
	"linux-pwm@vger.kernel.org" <linux-pwm@vger.kernel.org>,
	BMC-SW <BMC-SW@aspeedtech.com>
Subject: Re: [v9 2/2] pwm: Add Aspeed ast2600 PWM support
Date: Fri, 16 Jul 2021 12:13:01 +0200	[thread overview]
Message-ID: <20210716101301.l563tdwt5xuq5iq6@pengutronix.de> (raw)
In-Reply-To: <DD5590B4-11BC-411B-95BF-03AC26C078E4@aspeedtech.com>

[-- Attachment #1: Type: text/plain, Size: 1954 bytes --]

Hello Billy,

On Fri, Jul 16, 2021 at 09:22:22AM +0000, Billy Tsai wrote:
> On 2021/7/16, 3:10 PM, "Uwe Kleine-König" <u.kleine-koenig@pengutronix.de> wrote:
> 
>     On Fri, Jul 16, 2021 at 01:48:20AM +0000, Billy Tsai wrote:
>     >> On 2021/7/15, 11:06 PM, "Uwe Kleine-König" <u.kleine-koenig@pengutronix.de>> wrote:
>     >>     > Another is: The PWM doesn't support duty_cycle 0, on such a request the
>     >>     > PWM is disabled which results in a constant inactive level.
>     >> 
>     >>     > (This is correct, is it? Or does it yield a constant 0 level?)
>     >> 
>     >> Our pwm can support duty_cycle 0 by unset CLK_ENABLE.
> 
>     > This has a slightly different semantic though. Some consumer might
>     > expect that the following sequence:
> 
>     >	pwm_apply(mypwm, { .period = 10000, .duty_cycle = 10000, .enabled = true })
>     >	pwm_apply(mypwm, { .period = 10000, .duty_cycle = 0, .enabled = true })
>     >	pwm_apply(mypwm, { .period = 10000, .duty_cycle = 10000, .enabled = true })
> 
>     > results in the output being low for an integer multiple of 10 µs. This
>     > isn't given with setting CLK_ENABLE to zero, is it? (I didn't recheck,
>     > if the PWM doesn't complete periods on reconfiguration this doesn't
>     > matter much though.)
> Thanks for the explanation.
> Our hardware actually can only support duty from 1/256 to 256/256.
> For this situation I can do possible solution:
> We can though change polarity to meet this requirement. Inverse the pin and use
> duty_cycle 100. 
> But I think this is not a good solution for this problem right?

If this doesn't result in more glitches that would be fine for me.
(Assuming it is documented good enough in the code to be
understandable.)

Best regards
Uwe

-- 
Pengutronix e.K.                           | Uwe Kleine-König            |
Industrial Linux Solutions                 | https://www.pengutronix.de/ |

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 488 bytes --]

  reply	other threads:[~2021-07-16 10:13 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-07-09  6:52 [v9 0/2] Support pwm driver for aspeed ast26xx Billy Tsai
2021-07-09  6:52 ` [v9 1/2] dt-bindings: Add bindings for aspeed pwm-tach Billy Tsai
2021-07-13 22:14   ` Rob Herring
2021-07-14  4:02     ` Billy Tsai
2021-10-04  1:46       ` Billy Tsai
2021-07-09  6:52 ` [v9 2/2] pwm: Add Aspeed ast2600 PWM support Billy Tsai
2021-07-15 15:05   ` Uwe Kleine-König
2021-07-16  1:48     ` Billy Tsai
2021-07-16  7:09       ` Uwe Kleine-König
2021-07-16  9:22         ` Billy Tsai
2021-07-16 10:13           ` Uwe Kleine-König [this message]
2021-07-16 10:56             ` Billy Tsai
2021-07-21 10:52               ` Billy Tsai
2021-07-21 12:48                 ` Uwe Kleine-König
2021-07-23  4:23                   ` Billy Tsai
2021-07-23 20:12                     ` Uwe Kleine-König
2021-07-26  5:14                       ` Billy Tsai

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=20210716101301.l563tdwt5xuq5iq6@pengutronix.de \
    --to=u.kleine-koenig@pengutronix.de \
    --cc=BMC-SW@aspeedtech.com \
    --cc=andrew@aj.id.au \
    --cc=billy_tsai@aspeedtech.com \
    --cc=devicetree@vger.kernel.org \
    --cc=joel@jms.id.au \
    --cc=lee.jones@linaro.org \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-aspeed@lists.ozlabs.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-pwm@vger.kernel.org \
    --cc=p.zabel@pengutronix.de \
    --cc=robh+dt@kernel.org \
    --cc=thierry.reding@gmail.com \
    /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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).