linux-gpio.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: "Uwe Kleine-König" <u.kleine-koenig@pengutronix.de>
To: "Ken.Lin" <Ken.Lin@advantech.com.tw>
Cc: Akshay Bhat <akshay.bhat@timesys.com>,
	"shawnguo@kernel.org" <shawnguo@kernel.org>,
	kernel@pengutronix.de, linux-arm-kernel@lists.infradead.org,
	linux-gpio@vger.kernel.org
Subject: Re: [PATCH] ARM: dts: imx6q-bx50v3: configure unused pca953x pins
Date: Mon, 15 Aug 2016 09:28:25 +0200	[thread overview]
Message-ID: <20160815072825.hffvzlxpzlph6bk7@pengutronix.de> (raw)
In-Reply-To: <a23f6081bea242bfba70b805f2a93494@taipei08.ADVANTECH.CORP>

Hello,

Cc += linux-gpio

On Mon, Aug 15, 2016 at 06:18:07AM +0000, Ken.Lin wrote:
> 1. As you can see in the datasheet(that I attached to this email), at
> power on, P00 - P17 are configured as inputs (by chip default setting,
> datasheet P.3) and an interrupt is generated by any rising or falling
> edge of the port inputs in the input mode (datasheet P.10)

ah, I see. All input pins generate an irq. The driver should handle this
just fine however. So I hope you don't see an oops or messages about
unhandled irqs, right?

> 2. The unhandled interrupts ( return IRQ_NONE in pca953x_irq_handler)
> in GPIO expander driver (drivers/gpio/gpio-pca953x.c) could happen
> when unused GPIO pins in GPIO expander are not well configured.

Hmm, maybe the driver should return IRQ_HANDLED in this case, too. After
all the irq reason is known and it was expected that an irq happend,
right?

> 3. As a result, we tried to configure the unused (default floating
> inputs) pca953x GPIO pins as GPO low to avoid the unexpected
> interrupts (could be observed during the interference situation e.g.
> putting fingers on the unused pin to make the signal level change)

So changing these to outputs might still make sense to prevent these
from floating or triggering unused irqs, but this should not make a
semantical difference for your machine. (It might have more load and a
bigger irq count, but apart from that everything should be the same.)

Best regards
Uwe

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

       reply	other threads:[~2016-08-15  7:28 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <1471023911-2763-1-git-send-email-akshay.bhat@timesys.com>
     [not found] ` <20160815053033.ds27jg3c7vnx7ujw@pengutronix.de>
     [not found]   ` <a23f6081bea242bfba70b805f2a93494@taipei08.ADVANTECH.CORP>
2016-08-15  7:28     ` Uwe Kleine-König [this message]
2016-08-16  2:42       ` [PATCH] ARM: dts: imx6q-bx50v3: configure unused pca953x pins Ken.Lin
2016-08-22 14:18       ` Akshay Bhat

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=20160815072825.hffvzlxpzlph6bk7@pengutronix.de \
    --to=u.kleine-koenig@pengutronix.de \
    --cc=Ken.Lin@advantech.com.tw \
    --cc=akshay.bhat@timesys.com \
    --cc=kernel@pengutronix.de \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-gpio@vger.kernel.org \
    --cc=shawnguo@kernel.org \
    /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).