From: Felipe Balbi <me@felipebalbi.com>
To: "Olaya, Margarita" <magi.olaya@ti.com>
Cc: alsa-devel@alsa-project.org, linux-omap@vger.kernel.org,
broonie@opensource.wolfsonmicro.com, lrg@slimlogic.co.uk
Subject: Re: [PATCHv5 2/2] ASoC: TWL6040: Add twl6040 codec driver
Date: Sat, 13 Mar 2010 05:23:27 -0600 [thread overview]
Message-ID: <05b5d6bc0abd41e31334184e66718cec@secure211.sgcpanel.com> (raw)
In-Reply-To: <1889FA7136B567478A67D4B0F85B0CCE66173AF7@dlee06.ent.ti.com>
Hi,
On Fri, 12 Mar 2010 19:52:20 -0600, "Olaya, Margarita" <magi.olaya@ti.com>
wrote:
> +/*
> + * twl6040 register cache & default register settings
> + */
> +static const u8 twl6040_reg[TWL6040_CACHEREGNUM] = {
> + 0x00, /* not used 0x00 */
> + 0x4B, /* TWL6040_ASICID (ro) 0x01 */
> + 0x00, /* TWL6040_ASICREV (ro) 0x02 */
> + 0x00, /* TWL6040_INTID 0x03 */
> + 0x00, /* TWL6040_INTMR 0x04 */
> + 0x00, /* TWL6040_NCPCTRL 0x05 */
> + 0x00, /* TWL6040_LDOCTL 0x06 */
> + 0x00, /* TWL6040_HPPLLCTL 0x07 */
> + 0x00, /* TWL6040_LPPLLCTL 0x08 */
> + 0x00, /* TWL6040_LPPLLDIV 0x09 */
> + 0x00, /* TWL6040_AMICBCTL 0x0A */
> + 0x00, /* TWL6040_DMICBCTL 0x0B */
> + 0x18, /* TWL6040_MICLCTL 0x0C */
> + 0x18, /* TWL6040_MICRCTL 0x0D */
> + 0x00, /* TWL6040_MICGAIN 0x0E */
> + 0x1B, /* TWL6040_LINEGAIN 0x0F */
> + 0x00, /* TWL6040_HSLCTL 0x10 */
> + 0x00, /* TWL6040_HSRCTL 0x11 */
> + 0x00, /* TWL6040_HSGAIN 0x12 */
> + 0x06, /* TWL6040_EARCTL 0x13 */
> + 0x00, /* TWL6040_HFLCTL 0x14 */
> + 0x03, /* TWL6040_HFLGAIN 0x15 */
> + 0x00, /* TWL6040_HFRCTL 0x16 */
> + 0x03, /* TWL6040_HFRGAIN 0x17 */
> + 0x00, /* TWL6040_VIBCTLL 0x18 */
> + 0x00, /* TWL6040_VIBDATL 0x19 */
> + 0x00, /* TWL6040_VIBCTLR 0x1A */
> + 0x00, /* TWL6040_VIBDATR 0x1B */
> + 0x00, /* TWL6040_HKCTL1 0x1C */
> + 0x00, /* TWL6040_HKCTL2 0x1D */
> + 0x00, /* TWL6040_GPOCTL 0x1E */
> + 0x00, /* TWL6040_ALB 0x1F */
> + 0x00, /* TWL6040_DLB 0x20 */
> + 0x00, /* not used 0x21 */
> + 0x00, /* not used 0x22 */
> + 0x00, /* not used 0x23 */
> + 0x00, /* not used 0x24 */
> + 0x00, /* not used 0x25 */
> + 0x00, /* not used 0x26 */
> + 0x00, /* not used 0x27 */
> + 0x00, /* TWL6040_TRIM1 0x28 */
> + 0x00, /* TWL6040_TRIM2 0x29 */
> + 0x00, /* TWL6040_TRIM3 0x2A */
> + 0x00, /* TWL6040_HSOTRIM 0x2B */
> + 0x00, /* TWL6040_HFOTRIM 0x2C */
> + 0x09, /* TWL6040_ACCCTL 0x2D */
> + 0x00, /* TWL6040_STATUS (ro) 0x2E */
> +};
a little comment about what the default values are would
be nice.
#ifdef CONFIG_PM
> +static int twl6040_suspend(struct platform_device *pdev, pm_message_t
> state)
> +{
> + struct snd_soc_device *socdev = platform_get_drvdata(pdev);
> + struct snd_soc_codec *codec = socdev->card->codec;
> +
> + twl6040_set_bias_level(codec, SND_SOC_BIAS_OFF);
> +
> + return 0;
> +}
> +
> +static int twl6040_resume(struct platform_device *pdev)
> +{
> + struct snd_soc_device *socdev = platform_get_drvdata(pdev);
> + struct snd_soc_codec *codec = socdev->card->codec;
> +
> + twl6040_set_bias_level(codec, SND_SOC_BIAS_STANDBY);
> + twl6040_set_bias_level(codec, codec->suspend_bias_level);
> +
> + return 0;
> +}
#else
#define twl6040_suspend NULL
#define twl6040_resume NULL
#endif
--
balbi
next prev parent reply other threads:[~2010-03-13 11:23 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-03-13 1:52 [PATCHv5 2/2] ASoC: TWL6040: Add twl6040 codec driver Olaya, Margarita
2010-03-13 11:23 ` Felipe Balbi [this message]
2010-03-16 17:51 ` Olaya, Margarita
2010-03-16 18:19 ` 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=05b5d6bc0abd41e31334184e66718cec@secure211.sgcpanel.com \
--to=me@felipebalbi.com \
--cc=alsa-devel@alsa-project.org \
--cc=broonie@opensource.wolfsonmicro.com \
--cc=linux-omap@vger.kernel.org \
--cc=lrg@slimlogic.co.uk \
--cc=magi.olaya@ti.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