From: Charles Keepax <ckeepax@opensource.cirrus.com>
To: James Schulman <james.schulman@cirrus.com>
Cc: mark.rutland@arm.com, brian.austin@cirrus.com,
alsa-devel@alsa-project.org, paul.handrigan@cirrus.com,
lgirdwood@gmail.com, robh+dt@kernel.org
Subject: Re: [PATCH v4 1/2] ASoC: cs35l36: Add support for Cirrus CS35L36 Amplifier
Date: Fri, 21 Dec 2018 11:12:08 +0000 [thread overview]
Message-ID: <20181221111208.GB16508@imbe.wolfsonmicro.main> (raw)
In-Reply-To: <1545334876-12054-1-git-send-email-james.schulman@cirrus.com>
On Thu, Dec 20, 2018 at 01:41:15PM -0600, James Schulman wrote:
> Add driver support for Cirrus Logic CS35L36 boosted
> speaker amplifier
>
> Signed-off-by: James Schulman <james.schulman@cirrus.com>
> ---
> +struct cs35l36_platform_data {
> + bool sclk_frc;
> + bool lrclk_frc;
These two are now unused.
> + bool multi_amp_mode;
> + bool dcm_mode;
> + int ldm_mode_sel;
> + bool amp_gain_zc;
As is this guy.
> + bool amp_pcm_inv;
> + bool pdm_ldm_exit;
> + bool pdm_ldm_enter;
And these two.
> + bool imon_pol_inv;
> + bool vmon_pol_inv;
> + int boost_ind;
> + int bst_vctl;
> + int bst_vctl_sel;
> + int bst_ipk;
> + bool extern_boost;
> + int temp_warn_thld;
> + struct cs35l36_vpbr_cfg vpbr_config;
> + struct cs35l36_irq_cfg irq_config;
> +};
> +
> + /* INT/GPIO Pin Config */
> + irq_gpio = of_get_child_by_name(np, "cirrus,irq-config");
> + irq_gpio_config->is_present = irq_gpio ? true : false;
Should this be based off the interrupts property itself? The
defaults for both of the properties in this block seem quite sane
so it seems like people might use the IRQ but not specify this
block.
> + if (irq_gpio_config->is_present) {
> + if (of_property_read_u32(irq_gpio, "cirrus,irq-drive-select",
> + &val) >= 0)
> + irq_gpio_config->irq_drv_sel = val;
> + if (of_property_read_u32(irq_gpio, "cirrus,irq-gpio-select",
> + &val) >= 0)
> + irq_gpio_config->irq_gpio_sel = val;
> +
> + irq_d = irq_get_irq_data(i2c_client->irq);
> + if (!irq_d) {
> + dev_err(&i2c_client->dev, "Invalid IRQ: %d\n",
> + i2c_client->irq);
> + return -EINVAL;
> + }
> +
> + irq_gpio_config->irq_pol = irqd_get_trigger_type(irq_d);
> + }
> +
> + dev_info(&i2c_client->dev, "Cirrus Logic CS35L%d, Revision: %02X\n",
> + cs35l36->chip_version, reg_revid >> 8);
> +
> + ret = snd_soc_register_component(dev, &soc_component_dev_cs35l36,
> + cs35l36_dai, ARRAY_SIZE(cs35l36_dai));
Could use devm_ here.
Fix up those and you can add my:
Reviewed-by: Charles Keepax <ckeepax@opensource.cirrus.com>
Thanks,
Charles
next prev parent reply other threads:[~2018-12-21 11:12 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-12-20 19:41 [PATCH v4 1/2] ASoC: cs35l36: Add support for Cirrus CS35L36 Amplifier James Schulman
2018-12-20 19:41 ` [PATCH v4 2/2] ASoC: cs35l36: Add device tree documentation for CS35L36 James Schulman
2018-12-21 11:12 ` Charles Keepax
2018-12-21 19:52 ` Schulman, James
2018-12-21 11:12 ` Charles Keepax [this message]
2018-12-21 19:51 ` [PATCH v4 1/2] ASoC: cs35l36: Add support for Cirrus CS35L36 Amplifier Schulman, James
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=20181221111208.GB16508@imbe.wolfsonmicro.main \
--to=ckeepax@opensource.cirrus.com \
--cc=alsa-devel@alsa-project.org \
--cc=brian.austin@cirrus.com \
--cc=james.schulman@cirrus.com \
--cc=lgirdwood@gmail.com \
--cc=mark.rutland@arm.com \
--cc=paul.handrigan@cirrus.com \
--cc=robh+dt@kernel.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.