From: Dmitry Osipenko <digetx@gmail.com>
To: Sameer Pujar <spujar@nvidia.com>,
perex@perex.cz, tiwai@suse.com, robh+dt@kernel.org
Cc: broonie@kernel.org, lgirdwood@gmail.com,
thierry.reding@gmail.com, jonathanh@nvidia.com,
alsa-devel@alsa-project.org, devicetree@vger.kernel.org,
linux-tegra@vger.kernel.org, linux-kernel@vger.kernel.org,
sharadg@nvidia.com, mkumard@nvidia.com, viswanathl@nvidia.com,
rlokhande@nvidia.com, dramesh@nvidia.com, atalambedu@nvidia.com
Subject: Re: [PATCH v2 2/9] ASoC: tegra: add support for CIF programming
Date: Wed, 5 Feb 2020 20:02:22 +0300 [thread overview]
Message-ID: <7239e858-16b7-609f-c4e3-8135bee8450b@gmail.com> (raw)
In-Reply-To: <1580380422-3431-3-git-send-email-spujar@nvidia.com>
30.01.2020 13:33, Sameer Pujar пишет:
...
> +#include <linux/module.h>
> +#include <linux/regmap.h>
> +#include "tegra_cif.h"
> +
> +void tegra_set_cif(struct regmap *regmap, unsigned int reg,
> + struct tegra_cif_conf *conf)
> +{
> + unsigned int value;
> +
> + value = (conf->threshold << TEGRA_ACIF_CTRL_FIFO_TH_SHIFT) |
> + ((conf->audio_ch - 1) << TEGRA_ACIF_CTRL_AUDIO_CH_SHIFT) |
> + ((conf->client_ch - 1) << TEGRA_ACIF_CTRL_CLIENT_CH_SHIFT) |
> + (conf->audio_bits << TEGRA_ACIF_CTRL_AUDIO_BITS_SHIFT) |
> + (conf->client_bits << TEGRA_ACIF_CTRL_CLIENT_BITS_SHIFT) |
> + (conf->expand << TEGRA_ACIF_CTRL_EXPAND_SHIFT) |
> + (conf->stereo_conv << TEGRA_ACIF_CTRL_STEREO_CONV_SHIFT) |
> + (conf->replicate << TEGRA_ACIF_CTRL_REPLICATE_SHIFT) |
> + (conf->truncate << TEGRA_ACIF_CTRL_TRUNCATE_SHIFT) |
> + (conf->mono_conv << TEGRA_ACIF_CTRL_MONO_CONV_SHIFT);
> +
> + regmap_update_bits(regmap, reg, TEGRA_ACIF_UPDATE_MASK, value);
> +}
> +EXPORT_SYMBOL_GPL(tegra_set_cif);
Are you going to add more stuff into this source file later on?
If not, then it's too much to have a separate driver module just for a
single tiny function, you should move it into the header file (make it
inline).
next prev parent reply other threads:[~2020-02-05 17:02 UTC|newest]
Thread overview: 46+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-01-30 10:33 [PATCH v2 0/9] add ASoC components for AHUB Sameer Pujar
2020-01-30 10:33 ` [PATCH v2 1/9] dt-bindings: sound: tegra: add DT binding " Sameer Pujar
2020-02-03 20:19 ` Dmitry Osipenko
2020-02-04 4:24 ` Sameer Pujar
2020-02-06 18:10 ` Rob Herring
2020-02-10 11:30 ` Sameer Pujar
2020-02-11 18:15 ` Rob Herring
2020-01-30 10:33 ` [PATCH v2 2/9] ASoC: tegra: add support for CIF programming Sameer Pujar
2020-02-05 17:02 ` Dmitry Osipenko [this message]
2020-02-06 11:56 ` Sameer Pujar
2020-02-06 16:49 ` Dmitry Osipenko
2020-02-07 11:03 ` Sameer Pujar
2020-01-30 10:33 ` [PATCH v2 3/9] ASoC: tegra: add Tegra210 based DMIC driver Sameer Pujar
2020-02-06 16:53 ` Dmitry Osipenko
2020-02-07 11:06 ` Sameer Pujar
2020-02-08 16:19 ` Dmitry Osipenko
2020-01-30 10:33 ` [PATCH v2 4/9] ASoC: tegra: add Tegra210 based I2S driver Sameer Pujar
2020-02-06 16:59 ` Dmitry Osipenko
2020-02-06 17:06 ` David Laight
2020-02-07 11:23 ` Sameer Pujar
2020-02-07 11:24 ` Sameer Pujar
2020-01-30 10:33 ` [PATCH v2 5/9] ASoC: tegra: add Tegra210 based AHUB driver Sameer Pujar
2020-01-30 16:22 ` Dmitry Osipenko
2020-02-04 4:29 ` Sameer Pujar
2020-01-30 17:09 ` Dmitry Osipenko
2020-01-30 17:18 ` Dmitry Osipenko
2020-02-04 4:35 ` Sameer Pujar
2020-02-04 4:34 ` Sameer Pujar
2020-01-30 17:25 ` Dmitry Osipenko
2020-01-31 3:12 ` Sameer Pujar
2020-01-31 14:34 ` Dmitry Osipenko
2020-02-04 4:36 ` Sameer Pujar
2020-01-30 10:33 ` [PATCH v2 6/9] ASoC: tegra: add Tegra186 based DSPK driver Sameer Pujar
2020-02-06 17:15 ` Dmitry Osipenko
2020-02-07 11:26 ` Sameer Pujar
2020-02-07 18:22 ` Dmitry Osipenko
2020-02-10 11:15 ` Sameer Pujar
2020-02-10 12:22 ` Jon Hunter
2020-02-10 14:49 ` Sameer Pujar
2020-01-30 10:33 ` [PATCH v2 7/9] ASoC: tegra: add Tegra210 based ADMAIF driver Sameer Pujar
2020-01-30 10:33 ` [PATCH v2 8/9] arm64: tegra: add AHUB components for few Tegra chips Sameer Pujar
2020-01-30 10:33 ` [PATCH v2 9/9] arm64: tegra: enable AHUB modules " Sameer Pujar
2020-02-06 17:36 ` [PATCH v2 0/9] add ASoC components for AHUB Dmitry Osipenko
2020-02-07 11:30 ` Sameer Pujar
2020-02-07 18:25 ` Dmitry Osipenko
2020-02-10 11:22 ` Sameer Pujar
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=7239e858-16b7-609f-c4e3-8135bee8450b@gmail.com \
--to=digetx@gmail.com \
--cc=alsa-devel@alsa-project.org \
--cc=atalambedu@nvidia.com \
--cc=broonie@kernel.org \
--cc=devicetree@vger.kernel.org \
--cc=dramesh@nvidia.com \
--cc=jonathanh@nvidia.com \
--cc=lgirdwood@gmail.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-tegra@vger.kernel.org \
--cc=mkumard@nvidia.com \
--cc=perex@perex.cz \
--cc=rlokhande@nvidia.com \
--cc=robh+dt@kernel.org \
--cc=sharadg@nvidia.com \
--cc=spujar@nvidia.com \
--cc=thierry.reding@gmail.com \
--cc=tiwai@suse.com \
--cc=viswanathl@nvidia.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;
as well as URLs for NNTP newsgroup(s).