[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CAGngYiW6_T8GjLvHrzNk+nUN5L81BwivBTRQ4GofF8LOf1qexA@mail.gmail.com>
Date: Mon, 7 Dec 2020 17:34:58 -0500
From: Sven Van Asbroeck <thesven73@...il.com>
To: Uwe Kleine-König
<u.kleine-koenig@...gutronix.de>
Cc: Clemens Gruber <clemens.gruber@...ruber.com>,
linux-pwm@...r.kernel.org,
Thierry Reding <thierry.reding@...il.com>,
Lee Jones <lee.jones@...aro.org>,
Linux Kernel Mailing List <linux-kernel@...r.kernel.org>,
Mika Westerberg <mika.westerberg@...ux.intel.com>,
David Jander <david@...tonic.nl>
Subject: Re: [PATCH v4 1/4] pwm: pca9685: Switch to atomic API
Hi Uwe,
On Mon, Dec 7, 2020 at 5:00 PM Uwe Kleine-König
<u.kleine-koenig@...gutronix.de> wrote:
>
> This is not acceptable, if you have two PWM outputs and a consumer
> modifies one of them the other must change. So if this chip only
> supports a single period length of all channels, the first consumer
> enabling a channel defines the period to be used. All later consumers
> must live with that. (Also the first must be denied modifying the period
> if a second consumer has enabled its PWM.)
That makes sense. However, a possible wrinkle: when more than one pwm channel
is requested, which one is able to change the period?
Example:
1. start with all pwms free
2. pwm_request(0), pwm_apply(period=200Hz)
3. pwm_request(1)
4. pwm_apply(1, period=400Hz) fails?
5. pwm_apply(0, period=400Hz) succeeds?
And if (5) succeeds, then pwm_get_state(1) will still return period=200Hz,
because the pwm core doesn't realize anything has changed. Are you ok
with this behaviour?
Powered by blists - more mailing lists