From: Vinod <vkoul@kernel.org>
To: Srinivas Kandagatla <srinivas.kandagatla@linaro.org>
Cc: lee.jones@linaro.org, robh+dt@kernel.org, broonie@kernel.org,
mark.rutland@arm.com, lgirdwood@gmail.com, tiwai@suse.com,
bgoswami@codeaurora.org, devicetree@vger.kernel.org,
linux-kernel@vger.kernel.org, alsa-devel@alsa-project.org
Subject: Re: [PATCH v2 02/10] mfd: wcd9335: add support to wcd9335 core
Date: Mon, 30 Jul 2018 09:42:23 +0530 [thread overview]
Message-ID: <20180730041223.GD3661@vkoul-mobl> (raw)
In-Reply-To: <20180727121806.18209-3-srinivas.kandagatla@linaro.org>
On 27-07-18, 13:17, Srinivas Kandagatla wrote:
> +obj-$(CONFIG_MFD_WCD9335) += wcd9335.o
> +wcd9335-objs := wcd9335-core.o
> +
no slimbus objs?
> +static int wcd9335_bring_up(struct wcd9335 *wcd)
> +{
> + struct regmap *rm = wcd->regmap;
> + int val, byte0;
> + int ret = 0;
> +
> + regmap_read(rm, WCD9335_CHIP_TIER_CTRL_EFUSE_VAL_OUT0, &val);
> + regmap_read(rm, WCD9335_CHIP_TIER_CTRL_CHIP_ID_BYTE0, &byte0);
> +
> + if ((val < 0) || (byte0 < 0)) {
> + dev_err(wcd->dev, "wcd9335 codec version detection fail!\n");
> + return -EINVAL;
> + }
> +
> + if (byte0 == 0x1) {
> + dev_info(wcd->dev, "wcd9335 codec version is v2.0\n");
> + wcd->version = WCD9335_VERSION_2_0;
> + regmap_write(rm, WCD9335_CODEC_RPM_RST_CTL, 0x01);
> + regmap_write(rm, WCD9335_SIDO_SIDO_TEST_2, 0x00);
> + regmap_write(rm, WCD9335_SIDO_SIDO_CCL_8, 0x6F);
> + regmap_write(rm, WCD9335_BIAS_VBG_FINE_ADJ, 0x65);
> + regmap_write(rm, WCD9335_CODEC_RPM_PWR_CDC_DIG_HM_CTL, 0x5);
> + regmap_write(rm, WCD9335_CODEC_RPM_PWR_CDC_DIG_HM_CTL, 0x7);
> + regmap_write(rm, WCD9335_CODEC_RPM_PWR_CDC_DIG_HM_CTL, 0x3);
> + regmap_write(rm, WCD9335_CODEC_RPM_RST_CTL, 0x3);
> + } else {
> + dev_err(wcd->dev, "wcd9335 codec version not supported\n");
> + ret = -EINVAL;
> + }
> +
> + return ret;
we can do return 0 and remove the variable as it is not used anywhere
else.
> +static int wcd9335_slim_probe(struct slim_device *slim)
> +{
> + struct device *dev = &slim->dev;
> + struct wcd9335 *wcd;
> + int ret = 0;
> +
> + /* Interface device */
> + if (slim->e_addr.dev_index == 0)
> + return 0;
> +
> + wcd = devm_kzalloc(dev, sizeof(*wcd), GFP_KERNEL);
> + if (!wcd)
> + return -ENOMEM;
^^
double space
--
~Vinod
next prev parent reply other threads:[~2018-07-30 4:12 UTC|newest]
Thread overview: 44+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-07-27 12:17 [PATCH v2 00/10] ASoC: Add support to WCD9335 Audio Codec Srinivas Kandagatla
2018-07-27 12:17 ` [PATCH v2 01/10] ASoC: dt-bindings: add dt bindings for wcd9335 audio codec Srinivas Kandagatla
2018-07-31 20:43 ` Rob Herring
2018-08-01 8:56 ` Srinivas Kandagatla
2018-08-01 22:20 ` Rob Herring
2018-08-02 7:33 ` Srinivas Kandagatla
2018-08-02 14:07 ` Rob Herring
2018-08-01 11:20 ` Applied "ASoC: dt-bindings: add dt bindings for wcd9335 audio codec" to the asoc tree Mark Brown
2018-08-14 16:24 ` Rob Herring
2018-08-15 10:52 ` Mark Brown
2018-07-27 12:17 ` [PATCH v2 02/10] mfd: wcd9335: add support to wcd9335 core Srinivas Kandagatla
2018-07-30 4:12 ` Vinod [this message]
2018-08-01 8:57 ` Srinivas Kandagatla
2018-08-02 8:33 ` Lee Jones
2018-08-02 9:26 ` Srinivas Kandagatla
2018-08-02 9:57 ` Lee Jones
2018-07-27 12:17 ` [PATCH v2 03/10] mfd: wcd9335: add wcd irq support Srinivas Kandagatla
2018-07-31 20:45 ` Rob Herring
2018-08-01 8:57 ` Srinivas Kandagatla
2018-08-01 22:17 ` Rob Herring
2018-08-02 7:34 ` Srinivas Kandagatla
2018-08-02 8:05 ` Lee Jones
2018-08-02 8:54 ` Srinivas Kandagatla
2018-08-02 10:01 ` Lee Jones
2018-08-02 10:07 ` Srinivas Kandagatla
2018-07-27 12:18 ` [PATCH v2 04/10] ASoC: wcd9335: add support to wcd9335 codec Srinivas Kandagatla
2018-08-01 11:20 ` Applied "ASoC: wcd9335: add support to wcd9335 codec" to the asoc tree Mark Brown
2018-08-01 12:24 ` Srinivas Kandagatla
2018-08-02 6:32 ` Lee Jones
2018-07-27 12:18 ` [PATCH v2 05/10] ASoC: wcd9335: add CLASS-H Controller support Srinivas Kandagatla
2018-07-31 17:05 ` Mark Brown
2018-08-01 8:57 ` Srinivas Kandagatla
2018-08-01 11:20 ` Applied "ASoC: wcd9335: add CLASS-H Controller support" to the asoc tree Mark Brown
2018-08-01 12:26 ` Srinivas Kandagatla
2018-08-02 6:31 ` Lee Jones
2018-08-02 9:52 ` Mark Brown
2018-07-27 12:18 ` [PATCH v2 06/10] ASoC: wcd9335: add basic controls Srinivas Kandagatla
2018-07-31 17:16 ` Mark Brown
2018-08-01 8:57 ` Srinivas Kandagatla
2018-07-27 12:18 ` [PATCH v2 07/10] ASoC: wcd9335: add playback dapm widgets Srinivas Kandagatla
2018-07-27 12:18 ` [PATCH v2 08/10] ASoC: wcd9335: add capture " Srinivas Kandagatla
2018-07-27 12:18 ` [PATCH v2 09/10] ASoC: wcd9335: add audio routings Srinivas Kandagatla
2018-07-27 12:18 ` [PATCH v2 10/10] ASoC: apq8096: add support to Analog audio via WCD9335 slim Srinivas Kandagatla
2018-07-30 4:49 ` [PATCH v2 00/10] ASoC: Add support to WCD9335 Audio Codec Vinod
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=20180730041223.GD3661@vkoul-mobl \
--to=vkoul@kernel.org \
--cc=alsa-devel@alsa-project.org \
--cc=bgoswami@codeaurora.org \
--cc=broonie@kernel.org \
--cc=devicetree@vger.kernel.org \
--cc=lee.jones@linaro.org \
--cc=lgirdwood@gmail.com \
--cc=linux-kernel@vger.kernel.org \
--cc=mark.rutland@arm.com \
--cc=robh+dt@kernel.org \
--cc=srinivas.kandagatla@linaro.org \
--cc=tiwai@suse.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