linux-media.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Antti Palosaari <crope@iki.fi>
To: Mauro Carvalho Chehab <mchehab@redhat.com>
Cc: "Frank Schäfer" <fschaefer.oss@googlemail.com>,
	linux-media@vger.kernel.org
Subject: Re: [PATCH 1/3] em28xx: give up GPIO register tracking/caching
Date: Mon, 15 Apr 2013 17:11:33 +0300	[thread overview]
Message-ID: <516C0A95.1040101@iki.fi> (raw)
In-Reply-To: <20130415095130.78a5ecd9@redhat.com>

On 04/15/2013 03:51 PM, Mauro Carvalho Chehab wrote:
> Em Sun, 14 Apr 2013 22:35:05 +0200
> Frank Schäfer <fschaefer.oss@googlemail.com> escreveu:

>> I checked the em25xx datasheet (excerpt) and it talks about separate
>> registers for GPIO configuration (unfortunately without explaining their
>> function in detail).
>
> Interesting. There are several old designs (bttv, saa7134,...) that uses
> a separate register for defining the input and the output pins.

That's pretty usual way, likely most common, having separate GPIO 
configuration and GPIO value registers. If you has a port of GPIO values 
in one register, and you has configured those as 0-3 INPUT and 4-7 
OUTPUT, then writing to that register does not make any changes to bits 
that are mapped as IN (are just discarded as don't care).

In case a bit I/O (which is not not supported by Kernel) writing to 
input register could enable internal pull-up or pull-down resistor :) 
IIRC Atmel micro-controllers has such option.

regards
Antti

-- 
http://palosaari.fi/

  reply	other threads:[~2013-04-15 14:12 UTC|newest]

Thread overview: 27+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-04-13  9:48 [PATCH 0/3] em28xx: clean up end extend the GPIO port handling Frank Schäfer
2013-04-13  9:48 ` [PATCH 1/3] em28xx: give up GPIO register tracking/caching Frank Schäfer
2013-04-13 14:41   ` Mauro Carvalho Chehab
2013-04-13 15:33     ` Frank Schäfer
2013-04-13 17:04       ` Mauro Carvalho Chehab
2013-04-13 17:46         ` Frank Schäfer
2013-04-13 18:08           ` Mauro Carvalho Chehab
2013-04-14 20:35             ` Frank Schäfer
2013-04-15 12:51               ` Mauro Carvalho Chehab
2013-04-15 14:11                 ` Antti Palosaari [this message]
2013-04-15 16:26                 ` Frank Schäfer
2013-04-15 23:01                   ` Mauro Carvalho Chehab
2013-04-23 16:58                     ` Frank Schäfer
2013-04-13 18:19           ` Frank Schäfer
2013-04-13 18:41             ` Frank Schäfer
2013-04-13  9:48 ` [PATCH 2/3] em28xx: add register defines for em25xx/em276x/7x/8x GPIO registers Frank Schäfer
2013-04-13  9:48 ` [PATCH 3/3] em28xx: add helper function for handling the GPIO registers of newer devices Frank Schäfer
2013-04-13 13:15 ` [PATCH 0/3] em28xx: clean up end extend the GPIO port handling Antti Palosaari
2013-04-13 14:25   ` Mauro Carvalho Chehab
2013-04-13 14:37     ` Antti Palosaari
2013-04-14  1:32       ` Mauro Carvalho Chehab
2013-04-14 19:32         ` Antti Palosaari
2013-04-15 14:40           ` Mauro Carvalho Chehab
2013-04-13 15:30     ` Frank Schäfer
2013-04-13 15:34       ` Devin Heitmueller
2013-04-13 16:21         ` Antti Palosaari
2013-04-13 16:54           ` Devin Heitmueller

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=516C0A95.1040101@iki.fi \
    --to=crope@iki.fi \
    --cc=fschaefer.oss@googlemail.com \
    --cc=linux-media@vger.kernel.org \
    --cc=mchehab@redhat.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).