devicetree.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Jianqun <xjq-TNX95d0MmH7DzftRWevZcw@public.gmane.org>
To: Mark Brown <broonie-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org>,
	Jianqun <jay.xu-TNX95d0MmH7DzftRWevZcw@public.gmane.org>
Cc: robh+dt-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org,
	pawel.moll-5wv7dgnIgG8@public.gmane.org,
	mark.rutland-5wv7dgnIgG8@public.gmane.org,
	ijc+devicetree-KcIKpvwj1kUDXYZnReoRVg@public.gmane.org,
	galak-sgV2jX0FEOL9JmXXK+q4OQ@public.gmane.org,
	heiko-4mtYJXux2i+zQB+pC5nmwQ@public.gmane.org,
	lgirdwood-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org,
	perex-/Fr2/VpizcU@public.gmane.org,
	tiwai-l3A5Bk7waGM@public.gmane.org,
	grant.likely-QSEj5FYQhm4dnm+yROfE0A@public.gmane.org,
	devicetree-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
	linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
	linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r@public.gmane.org,
	huangtao-TNX95d0MmH7DzftRWevZcw@public.gmane.org,
	cf-TNX95d0MmH7DzftRWevZcw@public.gmane.org
Subject: Re: [PATCH] ASoC: rockchip-max98090: add driver for rockchip board using a max98090
Date: Thu, 02 Oct 2014 16:06:37 +0800	[thread overview]
Message-ID: <542D078D.2000103@rock-chips.com> (raw)
In-Reply-To: <20140912135247.GU7960-GFdadSzt00ze9xe1eoZjHA@public.gmane.org>

Hi Mark:

I'm still try to use simple-card driver but it hasn't do work from now on,
could I to update rockchip-max98090.c at the same time ?

在 09/12/2014 09:52 PM, Mark Brown 写道:
> On Fri, Sep 12, 2014 at 03:39:48PM +0800, Jianqun wrote:
>
>> +#define RK_PLAT_CLK_12M      12000000
> I'm not sure a define is adding anything here...  it's just a define
> saying 12MHz that has the value 12MHz.
>
Okay
>> +	struct snd_soc_dai *codec_dai = rtd->codec_dai;
>> +
>> +/* Set max98090 as master, i2s clock output 12MHz for max98090 */
>> +	ret = snd_soc_dai_set_sysclk(cpu_dai, 0,
> Coding style, comments aren't aligned with the code.
Okay
>
>> +	ret = snd_soc_add_card_controls(card, rk_mc_controls,
>> +					ARRAY_SIZE(rk_mc_controls));
>> +	if (ret) {
>> +		pr_err("unable to add card controls\n");
>> +		return ret;
>> +	}
> Use card->controls.
Okay
>
>> +	snd_soc_dapm_enable_pin(dapm, "Headset Mic");
>> +	snd_soc_dapm_enable_pin(dapm, "Headphone");
>> +	snd_soc_dapm_enable_pin(dapm, "Ext Spk");
>> +	snd_soc_dapm_enable_pin(dapm, "Int Mic");
>> +
>> +	snd_soc_dapm_sync(dapm);
> All pins are enabled by default and sync doesn't do anything during
> init.
okay, will to remove sync in next version
>> +#ifdef CONFIG_PM_SLEEP
>> +static int snd_rk_prepare(struct device *dev)
>> +{
>> +	struct snd_soc_card *card = dev_get_drvdata(dev);
>> +	struct rk_mc_private *drv = snd_soc_card_get_drvdata(card);
>> +
>> +	snd_soc_jack_free_gpios(&drv->hp_jack, 1, &hp_jack_gpio);
>> +	snd_soc_jack_free_gpios(&drv->mic_jack, 1, &mic_jack_gpio);
>> +
>> +	return snd_soc_suspend(dev);
>> +}
> Why are you freeing the GPIOs over suspend, that doesn't seem good?
Okay , will to remove them in next version
>
>> +	hp_jack_gpio.gpio = of_get_named_gpio(np, "rockchip,hp-det-gpios", 0);
>> +	if (hp_jack_gpio.gpio == -EPROBE_DEFER)
>> +		return -EPROBE_DEFER;
>> +
>> +	mic_jack_gpio.gpio = of_get_named_gpio(np, "rockchip,mic-det-gpios", 0);
>> +	if (mic_jack_gpio.gpio == -EPROBE_DEFER)
>> +		return -EPROBE_DEFER;
> This ignores errors other than probe deferral but the init code assumed
> that these would've succeeded.  Either the init code should handle
> failure or all errors should be treated as fatal.
dev_warn will be ok ?
>> +	platform_set_drvdata(pdev, &card);
>> +
>> +	ret = snd_soc_of_parse_card_name(card, "rockchip,model");
>> +	if (ret)
>> +		return ret;
> These need to happen before we register the card since they could be
> used as soon as we probe.
okay
>> +	snd_soc_card_set_drvdata(soc_card, NULL);
> No need to clear driver data, the core will do it anyway and anything
> relying on pre-set driver data is broken.

okay

-- 
Jianqun Xu

****************************************************************************
*IMPORTANT NOTICE:*This email is from Fuzhou Rockchip Electronics Co.,
Ltd .The contents of this email and any attachments may contain
information that is privileged, confidential and/or exempt from
disclosure under applicable law and relevant NDA. If you are not the
intended recipient, you are hereby notified that any disclosure,
copying, distribution, or use of the information is STRICTLY PROHIBITED.
Please immediately contact the sender as soon as possible and destroy
the material in its entirety in any format. Thank you.
****************************************************************************


--
To unsubscribe from this list: send the line "unsubscribe devicetree" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

  parent reply	other threads:[~2014-10-02  8:06 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-09-12  7:26 [PATCH 0/2] rockchip-max98090: add driver for rockchip board with max98090 Jianqun
2014-09-12  7:32 ` [PATCH 2/2] ASoC: rockchip-max98090: add driver for rockchip board using a max98090 Jianqun
     [not found] ` <1410506806-15327-1-git-send-email-jay.xu-TNX95d0MmH7DzftRWevZcw@public.gmane.org>
2014-09-12  7:30   ` [PATCH 1/2] ASoC: rockchip-max98090: add documentation for rockchip-max98090 driver Jianqun
2014-09-12  9:10     ` Jianqun
     [not found]       ` <1410513055-17775-1-git-send-email-jay.xu-TNX95d0MmH7DzftRWevZcw@public.gmane.org>
2014-09-12 10:04         ` Heiko Stübner
2014-09-12 10:12           ` Jianqun
2014-09-12 13:44     ` Mark Brown
2014-09-28  0:54       ` Jianqun
     [not found]         ` <54275C43.8010205-TNX95d0MmH7DzftRWevZcw@public.gmane.org>
2014-09-28 10:48           ` Mark Brown
2014-09-28 11:05             ` Jianqun
2014-09-12  7:39   ` [PATCH] ASoC: rockchip-max98090: add driver for rockchip board using a max98090 Jianqun
2014-09-12 13:52     ` Mark Brown
     [not found]       ` <20140912135247.GU7960-GFdadSzt00ze9xe1eoZjHA@public.gmane.org>
2014-10-02  8:06         ` Jianqun [this message]
2014-09-12  7:43   ` [PATCH 2/2] " Jianqun
     [not found]     ` <1410507807-15795-1-git-send-email-jay.xu-TNX95d0MmH7DzftRWevZcw@public.gmane.org>
2014-10-02  8:36       ` [PATCH v2 " Jianqun
     [not found]         ` <1412238960-4220-1-git-send-email-jay.xu-TNX95d0MmH7DzftRWevZcw@public.gmane.org>
2014-10-02 10:22           ` Mark Brown
2014-09-12 13:42 ` [PATCH 0/2] rockchip-max98090: add driver for rockchip board with max98090 Mark Brown
2014-09-14  3:00   ` Jianqun

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=542D078D.2000103@rock-chips.com \
    --to=xjq-tnx95d0mmh7dzftrwevzcw@public.gmane.org \
    --cc=broonie-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org \
    --cc=cf-TNX95d0MmH7DzftRWevZcw@public.gmane.org \
    --cc=devicetree-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
    --cc=galak-sgV2jX0FEOL9JmXXK+q4OQ@public.gmane.org \
    --cc=grant.likely-QSEj5FYQhm4dnm+yROfE0A@public.gmane.org \
    --cc=heiko-4mtYJXux2i+zQB+pC5nmwQ@public.gmane.org \
    --cc=huangtao-TNX95d0MmH7DzftRWevZcw@public.gmane.org \
    --cc=ijc+devicetree-KcIKpvwj1kUDXYZnReoRVg@public.gmane.org \
    --cc=jay.xu-TNX95d0MmH7DzftRWevZcw@public.gmane.org \
    --cc=lgirdwood-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org \
    --cc=linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r@public.gmane.org \
    --cc=linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
    --cc=mark.rutland-5wv7dgnIgG8@public.gmane.org \
    --cc=pawel.moll-5wv7dgnIgG8@public.gmane.org \
    --cc=perex-/Fr2/VpizcU@public.gmane.org \
    --cc=robh+dt-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org \
    --cc=tiwai-l3A5Bk7waGM@public.gmane.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).