public inbox for linux-mtd@lists.infradead.org
 help / color / mirror / Atom feed
From: Russell King - ARM Linux <linux@arm.linux.org.uk>
To: Mike Frysinger <vapier.adi@gmail.com>
Cc: Michael Hennerich <michael.hennerich@analog.com>,
	Russ Dill <russ.dill@gmail.com>,
	Jamie Lokier <jamie@shareable.org>,
	Ben Dooks <ben-linux-arm@fluff.org>,
	linux-mtd <linux-mtd@lists.infradead.org>,
	Mike Rapoport <mike@compulab.co.il>,
	David Woodhouse <dwmw2@infradead.org>
Subject: Re: [PATCH] [MTD] [NAND] GPIO NAND flash driver
Date: Sun, 12 Oct 2008 20:40:07 +0100	[thread overview]
Message-ID: <20081012194007.GB28525@flint.arm.linux.org.uk> (raw)
In-Reply-To: <8bd0f97a0810121222o655bfa3s1acaaaab5efe31cc@mail.gmail.com>

On Sun, Oct 12, 2008 at 03:22:45PM -0400, Mike Frysinger wrote:
> On Sun, Oct 12, 2008 at 15:09, Russell King - ARM Linux wrote:
> > On Sun, Oct 12, 2008 at 03:04:06PM -0400, Mike Frysinger wrote:
> >> On Sun, Oct 12, 2008 at 06:13, Russell King - ARM Linux wrote:
> >> > It doesn't.  The fact that the GPIO state is preserved when free'd on
> >> > PXA is just that it takes _more_ code to do anything else.
> >>
> >> so which is it ?  GPIO state *should* be preserved, or PXA does it
> >> simply due to code frugality ?
> >
> > May I remind you that _you_ are the one with the system which doesn't
> > preserve GPIO state.
> >
> >> if the API behavior is strictly documented, your complaint here is
> >> pretty moot.
> >
> > My complaint?  I don't have a complaint.  You are the one with the
> > complaint with the driver that's being discussed.  You're the one
> > who's moaning about it setting state before calling gpio_free.
> >
> > I see no point in continuing this discussion; your arguments are
> > just plain silly.  I've explained _why_ we're doing it.
> >
> > Our GPIO hardware behaves differently from yours.  Our gpio_free()
> > is side-effect free.  Get over it.
> 
> i'm attempting to get things fixed for everyone.  stop being so
> abrasive over nothing.

Me being abrasive?  ROTFL.  You're the one being difficult and constantly
twisting what I'm saying.

> my question is simply:
> > if certain behavior is expected, then it should be codified.  i see no
> > mention (unless i just missed it) of expected behavior upon freeing in
> > Documentation/gpio.txt.
> 
> and i havent gotten a straight answer out of you about this.  should
> state be retained when a pin gets freed or not ?

How the hell do I know?  Ask the GPIO library authors what *their*
intention of their interface is!

Look, so you can be clear for my point:

1. GPIO hardware state may be unaffected by gpio_free() - since it's
   undefined whether gpio_free() has any side effects.
2. Real implementations today exist where gpio_free() does not affect
   hardware state.
3. NAND may be connected to GPIOs for the control signals.
4. For hardware where gpio_free() does not affect hardware state, it
   makes total sense to ensure that GPIOs are set to inactive states
   prior to free.

That is the basis of my point.  Not "don't need pull ups".  And not
anything else that you're busy trying to twist my damned words into.

I don't care whether pull ups exist - because that's completely
irrelevent in the case where hardware state is unaffected by gpio_free.
You're the one bringing the issue of pull ups into this discussion,
not me.  You're the one clouding the issue.

Let me repeat.

1. gpio_free() is undefined wrt hardware side effects.
2. Some implementations may preserve the existing state, others may not.
3. To cater for all, setting the hardware state to inactive is _clearly_
   the right thing to do.

So, stop twisting my bloody words into your own stupid arguments.

I'm done with this thread.

  reply	other threads:[~2008-10-12 19:45 UTC|newest]

Thread overview: 30+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-10-08  6:01 [PATCH] [MTD] [NAND] GPIO NAND flash driver Mike Rapoport
2008-10-08  6:20 ` Mike Frysinger
2008-10-08  7:28   ` Russell King - ARM Linux
2008-10-08  7:29     ` Mike Frysinger
2008-10-08  8:28       ` Mike Rapoport
2008-10-08 17:41         ` Mike Frysinger
2008-10-10 10:46           ` Mike Rapoport
2008-10-10 14:19             ` Jamie Lokier
2008-10-10 21:48               ` Russell King - ARM Linux
2008-10-10 22:07                 ` Mike Frysinger
2008-10-12  8:02                   ` Mike Rapoport
2008-10-12  8:14                     ` Mike Frysinger
2008-10-12  8:28                       ` Russell King - ARM Linux
2008-10-12  8:56                         ` Mike Frysinger
2008-10-12 10:13                           ` Russell King - ARM Linux
2008-10-12 10:35                             ` David Woodhouse
2008-10-12 10:43                               ` Russell King - ARM Linux
2008-10-12 15:04                             ` Jamie Lokier
2008-10-12 19:04                             ` Mike Frysinger
2008-10-12 19:09                               ` Russell King - ARM Linux
2008-10-12 19:22                                 ` Mike Frysinger
2008-10-12 19:40                                   ` Russell King - ARM Linux [this message]
2008-10-12 10:04                       ` Mike Rapoport
2008-10-13 13:59                     ` David Woodhouse
2008-10-15  6:38                       ` Mike Rapoport
2008-10-15  7:52                         ` Russell King - ARM Linux
2008-10-15  8:25                           ` Mike Rapoport
2008-10-08  8:30     ` David Woodhouse
2008-10-08 14:25 ` Paulius Zaleckas
  -- strict thread matches above, loose matches on Subject: below --
2008-10-19 23:51 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=20081012194007.GB28525@flint.arm.linux.org.uk \
    --to=linux@arm.linux.org.uk \
    --cc=ben-linux-arm@fluff.org \
    --cc=dwmw2@infradead.org \
    --cc=jamie@shareable.org \
    --cc=linux-mtd@lists.infradead.org \
    --cc=michael.hennerich@analog.com \
    --cc=mike@compulab.co.il \
    --cc=russ.dill@gmail.com \
    --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