From: "Maso Huang (黃加竹)" <Maso.Huang@mediatek.com>
To: "linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
"robh+dt@kernel.org" <robh+dt@kernel.org>,
"linux-mediatek@lists.infradead.org"
<linux-mediatek@lists.infradead.org>,
"Trevor Wu (吳文良)" <Trevor.Wu@mediatek.com>,
"devicetree@vger.kernel.org" <devicetree@vger.kernel.org>,
"Allen-KH Cheng (程冠勳)" <Allen-KH.Cheng@mediatek.com>,
"broonie@kernel.org" <broonie@kernel.org>,
"renzhijie2@huawei.com" <renzhijie2@huawei.com>,
"conor+dt@kernel.org" <conor+dt@kernel.org>,
"tiwai@suse.com" <tiwai@suse.com>,
"lgirdwood@gmail.com" <lgirdwood@gmail.com>,
"linux-arm-kernel@lists.infradead.org"
<linux-arm-kernel@lists.infradead.org>,
"krzysztof.kozlowski+dt@linaro.org"
<krzysztof.kozlowski+dt@linaro.org>,
"matthias.bgg@gmail.com" <matthias.bgg@gmail.com>,
"perex@perex.cz" <perex@perex.cz>,
"Jiaxin Yu (俞家鑫)" <Jiaxin.Yu@mediatek.com>,
"angelogioacchino.delregno@collabora.com"
<angelogioacchino.delregno@collabora.com>,
"alsa-devel@alsa-project.org" <alsa-devel@alsa-project.org>
Subject: Re: [PATCH v2 1/7] ASoC: mediatek: mt7986: add common header
Date: Wed, 5 Jul 2023 07:58:48 +0000 [thread overview]
Message-ID: <2c1f1a22247ba54600950e4a4b089ec8dacb401c.camel@mediatek.com> (raw)
In-Reply-To: <bb13702f-801d-57f4-64d1-077dd977d43b@collabora.com>
On Tue, 2023-07-04 at 11:01 +0200, AngeloGioacchino Del Regno wrote:
>
> External email : Please do not click links or open attachments until
> you have verified the sender or the content.
> Il 26/06/23 04:34, Maso Huang ha scritto:
> > Add header files for register definition and structure.
> >
> > Signed-off-by: Maso Huang <maso.huang@mediatek.com>
> > ---
> > sound/soc/mediatek/mt7986/mt7986-afe-common.h | 51 +++++
> > sound/soc/mediatek/mt7986/mt7986-reg.h | 206
> ++++++++++++++++++
> > 2 files changed, 257 insertions(+)
> > create mode 100644 sound/soc/mediatek/mt7986/mt7986-afe-common.h
> > create mode 100644 sound/soc/mediatek/mt7986/mt7986-reg.h
> >
> > diff --git a/sound/soc/mediatek/mt7986/mt7986-afe-common.h
> b/sound/soc/mediatek/mt7986/mt7986-afe-common.h
> > new file mode 100644
> > index 000000000000..646e1be4fdce
> > --- /dev/null
> > +++ b/sound/soc/mediatek/mt7986/mt7986-afe-common.h
> > @@ -0,0 +1,51 @@
> > +/* SPDX-License-Identifier: GPL-2.0 */
> > +/*
> > + * mt7986-afe-common.h -- MediaTek 7986 audio driver definitions
> > + *
> > + * Copyright (c) 2021 MediaTek Inc.
> > + * Author: Vic Wu <vic.wu@mediatek.com>
> > + * Maso Huang <maso.huang@mediatek.com>
> > + */
> > +
> > +#ifndef _MT_7986_AFE_COMMON_H_
> > +#define _MT_7986_AFE_COMMON_H_
> > +
> > +#include <sound/soc.h>
> > +#include <linux/clk.h>
> > +#include <linux/list.h>
> > +#include <linux/regmap.h>
> > +#include "../common/mtk-base-afe.h"
> > +
> > +enum {
> > +MT7986_MEMIF_DL1,
> > +MT7986_MEMIF_VUL12,
> > +MT7986_MEMIF_NUM,
> > +MT7986_DAI_ETDM = MT7986_MEMIF_NUM,
> > +MT7986_DAI_NUM,
> > +};
> > +
> > +enum {
> > +MT7986_IRQ_0,
> > +MT7986_IRQ_1,
> > +MT7986_IRQ_2,
> > +MT7986_IRQ_NUM,
> > +};
> > +
> > +struct clk;
> > +
> > +struct mt7986_afe_private {
> > +struct clk_bulk_data *clks;
> > +int num_clks;
> > +
> > +int pm_runtime_bypass_reg_ctl;
> > +
> > +/* dai */
> > +void *dai_priv[MT7986_DAI_NUM];
> > +};
> > +
> > +unsigned int mt7986_afe_rate_transform(struct device *dev,
> > + unsigned int rate);
> > +
> > +/* dai register */
> > +int mt7986_dai_etdm_register(struct mtk_base_afe *afe);
> > +#endif
> > diff --git a/sound/soc/mediatek/mt7986/mt7986-reg.h
> b/sound/soc/mediatek/mt7986/mt7986-reg.h
> > new file mode 100644
> > index 000000000000..6433cdf3da92
> > --- /dev/null
> > +++ b/sound/soc/mediatek/mt7986/mt7986-reg.h
> > @@ -0,0 +1,206 @@
> > +/* SPDX-License-Identifier: GPL-2.0 */
> > +/*
> > + * mt7986-reg.h -- MediaTek 7986 audio driver reg definition
> > + *
> > + * Copyright (c) 2021 MediaTek Inc.
> > + * Author: Vic Wu <vic.wu@mediatek.com>
> > + * Maso Huang <maso.huang@mediatek.com>
> > + */
> > +
> > +#ifndef _MT7986_REG_H_
> > +#define _MT7986_REG_H_
>
> ..snip..
>
> > +/* ETDM_OUT5_CON4 */
> > +#define OUT_RELATCH(x) ((x) << 24)
> > +#define OUT_RELATCH_SFT 24
> > +#define OUT_RELATCH_MASK GENMASK(28, 24)
> > +#define OUT_CLK_SRC(x) ((x) << 6)
> > +#define OUT_CLK_SRC_SFT 6
> > +#define OUT_CLK_SRC_MASK GENMASK(8, 6)
> > +#define OUT_SEL_FS(x) ((x) << 0)
>
> A number shifted by zero bits is equal to itself, so, this statement
> doesn't
> make sense. I understand why you want a OUT_SEL_FS(x) definition
> though, so
> you could do it like:
>
> #define OUT_SEL_FS(x)(x)
>
> After which,
> Reviewed-by: AngeloGioacchino Del Regno <
> angelogioacchino.delregno@collabora.com>
>
> Regards,
> Angelo
Hi Angelo,
Thanks for your review.
I'll fix this in v3 patch.
Best regards,
Maso
next prev parent reply other threads:[~2023-07-05 7:59 UTC|newest]
Thread overview: 26+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-06-26 2:34 [PATCH v2 0/7] ASoC: mediatek: Add support for MT7986 SoC Maso Huang
2023-06-26 2:34 ` [PATCH v2 1/7] ASoC: mediatek: mt7986: add common header Maso Huang
2023-07-04 9:01 ` AngeloGioacchino Del Regno
2023-07-05 7:58 ` Maso Huang (黃加竹) [this message]
2023-06-26 2:34 ` [PATCH v2 2/7] ASoC: mediatek: mt7986: support audio clock control Maso Huang
2023-06-27 4:37 ` Claudiu.Beznea
2023-07-04 8:53 ` AngeloGioacchino Del Regno
2023-07-05 7:52 ` Maso Huang (黃加竹)
2023-06-26 2:34 ` [PATCH v2 3/7] ASoC: mediatek: mt7986: support etdm in platform driver Maso Huang
2023-07-04 8:58 ` AngeloGioacchino Del Regno
2023-07-05 7:57 ` Maso Huang (黃加竹)
2023-06-26 2:34 ` [PATCH v2 4/7] ASoC: mediatek: mt7986: add " Maso Huang
2023-06-27 4:43 ` Claudiu.Beznea
2023-06-27 6:25 ` Maso Huang (黃加竹)
2023-07-04 9:13 ` AngeloGioacchino Del Regno
2023-07-05 8:03 ` Maso Huang (黃加竹)
2023-07-13 7:44 ` Maso Huang (黃加竹)
2023-06-26 2:34 ` [PATCH v2 5/7] ASoC: mediatek: mt7986: add machine driver with wm8960 Maso Huang
2023-06-26 2:35 ` [PATCH v2 6/7] ASoC: dt-bindings: mediatek,mt7986-wm8960: add mt7986-wm8960 document Maso Huang
2023-06-29 14:58 ` Rob Herring
2023-06-30 9:29 ` Maso Huang (黃加竹)
2023-06-26 2:35 ` [PATCH v2 7/7] ASoC: dt-bindings: mediatek,mt7986-afe: add audio afe document Maso Huang
2023-06-29 15:05 ` Rob Herring
2023-06-30 2:26 ` Maso Huang (黃加竹)
2023-07-24 6:17 ` [PATCH v2 0/7] ASoC: mediatek: Add support for MT7986 SoC Maso Huang (黃加竹)
2023-07-24 7:25 ` Krzysztof Kozlowski
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=2c1f1a22247ba54600950e4a4b089ec8dacb401c.camel@mediatek.com \
--to=maso.huang@mediatek.com \
--cc=Allen-KH.Cheng@mediatek.com \
--cc=Jiaxin.Yu@mediatek.com \
--cc=Trevor.Wu@mediatek.com \
--cc=alsa-devel@alsa-project.org \
--cc=angelogioacchino.delregno@collabora.com \
--cc=broonie@kernel.org \
--cc=conor+dt@kernel.org \
--cc=devicetree@vger.kernel.org \
--cc=krzysztof.kozlowski+dt@linaro.org \
--cc=lgirdwood@gmail.com \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mediatek@lists.infradead.org \
--cc=matthias.bgg@gmail.com \
--cc=perex@perex.cz \
--cc=renzhijie2@huawei.com \
--cc=robh+dt@kernel.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;
as well as URLs for NNTP newsgroup(s).