linux-pwm.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Clemens Gruber <clemens.gruber@pqgruber.com>
To: Thierry Reding <thierry.reding@gmail.com>
Cc: Mika Westerberg <mika.westerberg@linux.intel.com>,
	Linus Walleij <linus.walleij@linaro.org>,
	Andy Shevchenko <andriy.shevchenko@linux.intel.com>,
	linux-pwm@vger.kernel.org
Subject: Re: [PATCH] pwm-pca9685: Allow any of the 16 PWMs to be used as a GPIO
Date: Thu, 20 Oct 2016 15:08:53 +0200	[thread overview]
Message-ID: <20161020130853.GA1785@archie.localdomain> (raw)
In-Reply-To: <20161020125144.GA24653@ulmo.ba.sec>

On Thu, Oct 20, 2016 at 02:51:44PM +0200, Thierry Reding wrote:
> I'm reluctant to add this to the PWM core because it's effectively
> duplicating something for which a proper subsystem already exists.
> 
> If adding pinmux is considered overkill, maybe doing so needs to be
> simplified. Surely if this is applicable to more than one PWM controller
> some helpers could be extracted to make it easier to add.
> 
> But if it isn't generally useful I don't think it makes sense to add it
> to the PWM core either. So I think our choices here are to register via
> pinmux and in the process add helpers to make that easier (remove the
> overkill) or to keep this to the driver until we start seeing a pattern
> emerge.

But the fact that this one pwm chip bypasses PWM control and acts as a
GPO is an implementation detail of the chip, this feature is helpful for
other PWM chips too, as long as they don't toggle.
Would this really be a good fit in the pinmux subsystem?

I really like the idea of Mika to add a gpio_set callback in pwm_ops and
let the pwm core export a GPIO chip. For now we could add this callback
only to the pwm-pca9685 driver but others could opt-in if needed.

But the initial patch from Mika is fine too, in my opinion.

Regards,
Clemens

  parent reply	other threads:[~2016-10-20 13:08 UTC|newest]

Thread overview: 20+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-09-20 14:40 [PATCH] pwm-pca9685: Allow any of the 16 PWMs to be used as a GPIO Mika Westerberg
2016-09-20 21:46 ` Linus Walleij
2016-10-19 18:56 ` Mika Westerberg
2016-10-19 20:05   ` Clemens Gruber
2016-10-19 20:28     ` Mika Westerberg
2016-10-19 22:59       ` Clemens Gruber
2016-10-20  8:07         ` Mika Westerberg
2016-10-20 10:45   ` Thierry Reding
2016-10-20 11:18     ` Mika Westerberg
2016-10-20 12:51       ` Thierry Reding
2016-10-20 12:56         ` Andy Shevchenko
2016-10-20 13:01         ` Mika Westerberg
2016-10-20 21:50           ` Thierry Reding
2016-10-21 12:23             ` Mika Westerberg
2016-10-31 11:42               ` Mika Westerberg
2016-12-01  7:28                 ` Mika Westerberg
2016-10-20 13:08         ` Clemens Gruber [this message]
2016-10-20 21:52           ` Thierry Reding
2016-10-23 10:23     ` Linus Walleij
2017-01-18 10:41 ` Thierry Reding

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=20161020130853.GA1785@archie.localdomain \
    --to=clemens.gruber@pqgruber.com \
    --cc=andriy.shevchenko@linux.intel.com \
    --cc=linus.walleij@linaro.org \
    --cc=linux-pwm@vger.kernel.org \
    --cc=mika.westerberg@linux.intel.com \
    --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).