From: cyril@ti.com (Cyril Chemparathy)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH v4 08/12] gpio: add ti-ssp gpio driver
Date: Wed, 10 Nov 2010 09:34:42 -0500 [thread overview]
Message-ID: <4CDAAD82.9090007@ti.com> (raw)
In-Reply-To: <20101110062310.GB7431@angua.secretlab.ca>
On 11/10/2010 01:23 AM, Grant Likely wrote:
> On Tue, Nov 09, 2010 at 10:16:22PM -0800, David Brownell wrote:
>>
>>> I thought the point of this device was that a single [SSP] device
>>> hosted a
>>> pair of multi-function serial interfaces, with each
>>> implementing a
>>> separate function.
>>
>> function chosen based on what the board needs.
>> Codec interface, SPI, GPIO, etc.
>>
>> If so, then it makes sense for the
>>> base driver to
>>> register child devices of the appropriate kinds.
>>
>> I'd normally say board setup registers them; a
>> "core"driver can't know what children would be needed.
>>
>> But the point I was making was about code factoring
>> not driver setup. When the functions don't have
>> much commonality, they might as well just write to
>> the relevant registers instead of expecting to have
>> a non-register programming interface (of dubious
>> generality of a "core" driver, but much complexity).
>>
>> Easier just to have children use registers directly,
>> in several similar cases. Less overhead, too.
>
> I guess it depends on how much overlap/interlock there is between the
> multiple channels. If there is shared context, then that is a
> stronger argument for a shared api. Cyril, what say you?
>
The channels (or ports) in this case are not very well separated out.
The registers for these ports are interleaved, and in some cases
different bits of the same register are meant for different ports.
Second, with the exception of GPIO (which essentially bit bangs), all
other functions would follow the same flow, i.e. set stuff up (mode,
iosel), load up a sequence, kick off execution, and wait for completion.
I thought it made sense to provide these pieces in a shared driver.
Regards
Cyril.
next prev parent reply other threads:[~2010-11-10 14:34 UTC|newest]
Thread overview: 24+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-10-26 20:18 [PATCH v4 00/12] tnetv107x ssp driver stack Cyril Chemparathy
2010-10-26 20:18 ` [PATCH v4 01/12] misc: add driver for sequencer serial port Cyril Chemparathy
2010-10-28 15:49 ` Linus Walleij
2010-10-28 16:09 ` Cyril Chemparathy
2010-10-28 18:14 ` Linus Walleij
2010-10-26 20:18 ` [PATCH v4 02/12] davinci: add tnetv107x ssp platform device Cyril Chemparathy
2010-10-26 20:18 ` [PATCH v4 03/12] davinci: add ssp config for tnetv107x evm board Cyril Chemparathy
2010-10-26 20:18 ` [PATCH v4 04/12] spi: add ti-ssp spi master driver Cyril Chemparathy
2010-10-26 20:18 ` [PATCH v4 05/12] davinci: add spi devices on tnetv107x evm Cyril Chemparathy
2010-10-26 20:18 ` [PATCH v4 06/12] regulator: add driver for tps6524x regulator Cyril Chemparathy
2010-10-26 20:18 ` [PATCH v4 07/12] davinci: add tnetv107x evm regulators Cyril Chemparathy
2010-10-26 20:18 ` [PATCH v4 08/12] gpio: add ti-ssp gpio driver Cyril Chemparathy
2010-11-03 2:15 ` David Brownell
2010-11-03 10:18 ` Linus Walleij
2010-11-03 12:35 ` David Brownell
2010-11-03 16:24 ` Linus Walleij
2010-11-10 4:45 ` Grant Likely
2010-11-10 6:16 ` David Brownell
2010-11-10 6:23 ` Grant Likely
2010-11-10 14:34 ` Cyril Chemparathy [this message]
2010-10-26 20:18 ` [PATCH v4 09/12] davinci: add tnetv107x evm ti-ssp gpio device Cyril Chemparathy
2010-10-26 20:18 ` [PATCH v4 10/12] backlight: add support for tps6116x controller Cyril Chemparathy
2010-10-26 20:18 ` [PATCH v4 11/12] davinci: add tnetv107x evm backlight device Cyril Chemparathy
2010-10-26 20:18 ` [PATCH v4 12/12] davinci: add tnetv107x evm i2c eeprom device Cyril Chemparathy
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=4CDAAD82.9090007@ti.com \
--to=cyril@ti.com \
--cc=linux-arm-kernel@lists.infradead.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).