linux-arm-kernel.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
From: s.hauer@pengutronix.de (Sascha Hauer)
To: linux-arm-kernel@lists.infradead.org
Subject: [RESEND RFC PATCH 2/3] ASoC: mediatek: Add AFE connection control
Date: Tue, 21 Apr 2015 07:50:41 +0200	[thread overview]
Message-ID: <20150421055041.GQ6325@pengutronix.de> (raw)
In-Reply-To: <20150420205230.GK14892@sirena.org.uk>

On Mon, Apr 20, 2015 at 09:52:30PM +0100, Mark Brown wrote:
> On Mon, Apr 20, 2015 at 06:50:17AM +0200, Sascha Hauer wrote:
> > On Sat, Apr 18, 2015 at 06:37:40PM +0100, Mark Brown wrote:
> > > On Fri, Apr 10, 2015 at 04:14:08PM +0800, Koro Chen wrote:
> 
> > > > +	[0][0] =   { .creg = 0x020, .cshift =  0, .sreg = 0x020, .sshift = 10},
> > > > +	[0][1] =   { .creg = 0x020, .cshift = 16, .sreg = 0x020, .sshift = 26},
> 
> > > It'd also be nice to have less magic numbers in the table, at least for
> > > the indexes (which I guess correspond to some of the defines in the
> > > headers)?
> 
> > With defines the above two lines would become something like:
> 
> > [0][0] = { .creg = AFE_CONN0, .cshift = CONN0_I00_O00_S, .sreg = AFE_CONN0, .sshift = CONN0_I00_O00_R },
> > [0][1] = { .creg = AFE_CONN0, .cshift = CONN0_I00_O01_S, .sreg = AFE_CONN0, .sshift = CONN0_I00_O01_S },
> 
> > For the registers we could use defines, but I think using defines for
> > the shifts doesn't add much value given they are only used once.
> 
> By indexes I actually meant the [0][0] and so on - they seem the more
> magic bit.

Oh, that's not magic at all, the crossbar switch has inputs and outputs
numbered from 0 to MTK_AFE_INTERCONN_NUM_INPUT /
MTK_AFE_INTERCONN_NUM_OUTPUT (they have the same numbers in the
datasheet. To connect input x with output y look at index [x][y] in the
table and write the register values found at that place. If .creg is 0x0
then it's not possible to connect the given input with the given output.

Sascha



-- 
Pengutronix e.K.                           |                             |
Industrial Linux Solutions                 | http://www.pengutronix.de/  |
Peiner Str. 6-8, 31137 Hildesheim, Germany | Phone: +49-5121-206917-0    |
Amtsgericht Hildesheim, HRA 2686           | Fax:   +49-5121-206917-5555 |

  reply	other threads:[~2015-04-21  5:50 UTC|newest]

Thread overview: 20+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <1428653649-38200-1-git-send-email-koro.chen@mediatek.com>
     [not found] ` <1428653649-38200-2-git-send-email-koro.chen@mediatek.com>
2015-04-18 17:34   ` [RESEND RFC PATCH 1/3] ASoC: mediatek: Add binding support for AFE driver Mark Brown
2015-04-20  4:37     ` Sascha Hauer
2015-04-20 20:48       ` Mark Brown
2015-04-21  9:49         ` Sascha Hauer
2015-04-21 10:14           ` Mark Brown
2015-04-21 10:15           ` Koro Chen
2015-04-21 10:56             ` Mark Brown
2015-04-22  3:17         ` Koro Chen
2015-04-30 20:12           ` Mark Brown
2015-05-04  1:57             ` Koro Chen
     [not found] ` <1428653649-38200-3-git-send-email-koro.chen@mediatek.com>
2015-04-18 17:37   ` [RESEND RFC PATCH 2/3] ASoC: mediatek: Add AFE connection control Mark Brown
2015-04-20  4:50     ` Sascha Hauer
2015-04-20 20:52       ` Mark Brown
2015-04-21  5:50         ` Sascha Hauer [this message]
2015-04-21 10:15           ` Mark Brown
     [not found] ` <1428653649-38200-4-git-send-email-koro.chen@mediatek.com>
2015-04-18 17:51   ` [RESEND RFC PATCH 3/3] ASoC: mediatek: Add AFE platform driver Mark Brown
2015-04-20  6:22     ` Koro Chen
2015-04-20 20:55       ` Mark Brown
2015-04-21  2:27         ` Koro Chen
2015-04-21 10:05           ` 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=20150421055041.GQ6325@pengutronix.de \
    --to=s.hauer@pengutronix.de \
    --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).