linux-arm-kernel.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
From: broonie@opensource.wolfsonmicro.com (Mark Brown)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH 4/7] S3C64XX: Declare IISv4 PCLK for S3C6410
Date: Wed, 2 Dec 2009 12:10:53 +0000	[thread overview]
Message-ID: <20091202121053.GC12661@rakim.wolfsonmicro.main> (raw)
In-Reply-To: <1b68c6790912011650p58cc6b27n90b032167ebb9bc8@mail.gmail.com>

On Wed, Dec 02, 2009 at 09:50:15AM +0900, jassi brar wrote:
> On Wed, Dec 2, 2009 at 6:42 AM, Ben Dooks <ben-linux@fluff.org> wrote:

> > 1) If changing the .id field of the iisv4 device really a good idea,
> > ? especially if there might be more than one of them in the future?

> Also, changing indices of devices with disregard to their respective clock
> might force further adhoc changes in system resources.

Well, from that point of view we'd be much better off with clkdev which
completely avoids the need to fiddle with id numbers to match clocks and
devices; the fact that this is a concern is really a limitation of the
clock API and open to fragility.  There would also be issues if someone
decided to do something like hang the PCM controllers off CLKAUDIO1 and
2 instead of 0 and 1, for example.  It's only a concern because there is
insufficient abstracton between the devices and clocks.

> I think, best wud be to modify s3c64xx_i2s.c to support 2 channel, 6
> channel, h/w mixing(maybe LP-Audio feature too) and pass flag for each
> feature via platform data
> by something like:-  .has_6_channels, .has_hw_mixer, .has_lp_audio etc

> The point to note here is to write drivers around functionality, rather than
> version, of the controller.

This can also be addressed via use of library code (which is what's
happening at the minute for the stuff that's shared between the 24xx and
64xx series).  You can also look at this from the point of view of
saying that IP blocks that are documented as having separate programming
interfaces should be presented in a similar way to the user so that it's
easier for them to find the functionality they need.

None of the approach I'm suggesting means that we can't have a single
driver file which handles more than one revision of the controller, we
can always move the registration of multiple variants into a single
source file.  The benefit is that we're not forced to do that so if the
conditional code gets to be too much which does seem likely - there's
already differences going from 24xx to 64xx, and I seem to recall that
there are some incompatibilities between IISv2 and IISv4 on the 6410 too.

Since Samsung have not been willing to share documentation (I do have
access to some but not all) it's hard to comment in detail on the most
tasteful way of handling all these things but I have particular concerns
about trying to fit more substantial functionality like hardware mixing
support into the existing driver.

  reply	other threads:[~2009-12-02 12:10 UTC|newest]

Thread overview: 23+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-11-27 16:43 [PATCH 0/7] S3C64XX IISv4 support Mark Brown
2009-11-27 16:43 ` [PATCH 1/7] S3C64XX: Staticise platform data for PCM devices Mark Brown
2009-11-28  1:40   ` jassi brar
2009-12-01 18:08     ` Ben Dooks
2009-12-02  0:22   ` jassi brar
2009-12-03 22:01   ` Ben Dooks
2009-12-03 22:57     ` Mark Brown
2009-11-27 16:43 ` [PATCH 2/7] S3C6410: Correct names of IISv4 data output pin definitions Mark Brown
2009-12-01 18:16   ` Ben Dooks
2009-11-27 16:43 ` [PATCH 3/7] S3C64XX: Add support for CLK_SRC2 configured clocks Mark Brown
2009-11-28  1:46   ` jassi brar
2009-12-01 18:17   ` Ben Dooks
2009-11-27 16:43 ` [PATCH 4/7] S3C64XX: Declare IISv4 PCLK for S3C6410 Mark Brown
2009-12-01 21:42   ` Ben Dooks
2009-12-02  0:50     ` jassi brar
2009-12-02 12:10       ` Mark Brown [this message]
2009-12-04 13:17         ` jassi brar
2009-12-02 11:20     ` Mark Brown
2009-11-27 16:43 ` [PATCH 5/7] S3C6410: Define CLK_AUDIO2 for IISv4 block Mark Brown
2009-11-27 16:43 ` [PATCH 6/7] S3C6410: Use platform data to supply pin configuration for IISv4 Mark Brown
2009-11-28  1:31   ` jassi brar
2009-12-01 18:24   ` Ben Dooks
2009-11-27 16:43 ` [PATCH 7/7] SMDK6410: Register IISv4 device Mark Brown

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=20091202121053.GC12661@rakim.wolfsonmicro.main \
    --to=broonie@opensource.wolfsonmicro.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).