linux-embedded.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Grant Likely <grant.likely@secretlab.ca>
To: David Brownell <david-b@pacbell.net>
Cc: Mike Frysinger <vapier.adi@gmail.com>,
	Bill Gatliff <bgat@billgatliff.com>,
	linux-embedded@vger.kernel.org
Subject: Re: [PATCH 0/6] Generic PWM API implementation
Date: Fri, 20 Nov 2009 15:14:36 -0700	[thread overview]
Message-ID: <fa686aa40911201414u6a9023e6y9addc97635d1c88@mail.gmail.com> (raw)
In-Reply-To: <200911162347.02364.david-b@pacbell.net>

On Tue, Nov 17, 2009 at 12:47 AM, David Brownell <david-b@pacbell.net> wrote:
> On Friday 13 November 2009, Grant Likely wrote:
>>                 Right now, I don't
>> see a fundamental difference is between GPIO and PWM pin management.
>> It is essentially the same problem, and in many cases PWM pins can
>> also be used as GPIOs.
>
> Pin management for a given SoC is going to be relevant to setting
> every signal, no matter what peripheral it's associated with.  The
> same argument applies to an MDIO bus, I2C, 1-wire, and more.
>
> And I don't buy it in those cases either.
>
>
>> I think the question should be flipped around;
>> rather than asking for a compelling reason for them to be merged; I
>> want to know the compelling reason to keep them separate.  What is the
>> fundamental difference that keeps them apart?
>
> PWM is about periodic signal generation without CPU intervention.
>
> GPIO is about explicit CPU management/interrogation of single
> signals.

Can also be viewed from the perspective: It is about putting a pin
into a particular state until I explicitly tell you to change it.
Whether that state be a GPIO input, a GPIO high, a GPIO low, or a PWM
periodic.

>> What I would like to see is the PWM functions added to the GPIO API.
>
> No.  If you want a pin mux interface, come up with one of them.
>
> It shouldn't be a PWM interface, a GPIO interface, an I2C interface,
> a SPI interface, an MDIO interface, a 1-wire interface ... or any of
> dozens of other things.  It'd be purely for pinmux.

I'm not talking about a pin mux interface.  I'm talking about discrete
controllable entities.  I agree that pin muxing is an entirely
different scope.  I'm also not talking about layers on top of the
GPIO.  I'm talking about the management code to obtain a reference to
the pin your interested in.  There is a non-trivial amount of code
associated with getting a reference to a pin and the behaviour
required is largely identical between GPIO and PWM.  I don't want to
see a new subsystem that largely does the exact same job, but is
different in subtle ways.  I think it should either be a unified
PWM/GPIO pin management subsystem, or a common library used by each.

g.

-- 
Grant Likely, B.Sc., P.Eng.
Secret Lab Technologies Ltd.

  parent reply	other threads:[~2009-11-20 22:14 UTC|newest]

Thread overview: 41+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-10-15 18:14 [PATCH 0/6] Generic PWM API implementation Bill Gatliff
2008-10-15 18:14 ` [PATCH 1/6] [PWM] " Bill Gatliff
2008-10-17 15:59   ` Mike Frysinger
2008-11-04 20:16     ` Bill Gatliff
2008-11-04 20:51       ` Mike Frysinger
2008-11-04 23:55       ` David Brownell
2008-11-05  0:17         ` Mike Frysinger
2008-11-05  2:59           ` Bill Gatliff
2008-11-05  5:08           ` David Brownell
2008-11-05  2:56         ` Bill Gatliff
2008-10-15 18:14 ` [PATCH 2/6] [PWM] Changes to existing include/linux/pwm.h to adapt to generic PWM API Bill Gatliff
2008-10-15 18:14 ` [PATCH 3/6] [PWM] Documentation Bill Gatliff
2008-10-15 18:14 ` [PATCH 4/6] [PWM] Driver for Atmel PWMC peripheral Bill Gatliff
2008-10-15 18:14 ` [PATCH 5/6] [PWM] Install new Atmel PWMC driver in Kconfig, expunge old one Bill Gatliff
2008-10-15 18:14 ` [PATCH 6/6] [PWM] New LED driver and trigger that use PWM API Bill Gatliff
2009-11-13 19:08 ` [PATCH 0/6] Generic PWM API implementation Grant Likely
2009-11-14  4:22   ` Mike Frysinger
2009-11-14  7:55     ` Grant Likely
2009-11-17  7:47       ` David Brownell
2009-11-17 15:48         ` Bill Gatliff
2009-11-17 16:53           ` David Brownell
2009-11-20 22:51             ` Grant Likely
2009-11-20 22:14         ` Grant Likely [this message]
2009-11-23 14:12           ` Bill Gatliff
2009-11-23 17:39             ` Grant Likely
2009-11-23 20:51               ` Albrecht Dreß
2009-11-28 21:38               ` David Brownell
2009-11-28 21:59               ` David Brownell
2009-11-17 15:45       ` Bill Gatliff
2009-11-17  8:27   ` David Brownell
2009-11-17 15:54     ` Bill Gatliff
2009-11-20 22:21     ` Grant Likely
2009-11-23 14:13       ` Bill Gatliff
2009-11-23 17:40         ` Grant Likely
2009-11-23 15:29       ` Mark Brown
2009-11-23 17:44         ` Grant Likely
2009-11-23 18:09           ` Mark Brown
2009-11-28 21:54             ` David Brownell
2009-11-17 15:39   ` Bill Gatliff
2009-11-20 22:49     ` Grant Likely
2009-11-28 21:28       ` David Brownell

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=fa686aa40911201414u6a9023e6y9addc97635d1c88@mail.gmail.com \
    --to=grant.likely@secretlab.ca \
    --cc=bgat@billgatliff.com \
    --cc=david-b@pacbell.net \
    --cc=linux-embedded@vger.kernel.org \
    --cc=vapier.adi@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).