Message ID | 1589474298-29437-6-git-send-email-ajitp@codeaurora.org (mailing list archive) |
---|---|
State | New, archived |
Headers | show |
Series | ASoC: QCOM: Add support for SC7180 lpass variant | expand |
On Thu, May 14, 2020 at 10:08:16PM +0530, Ajit Pandey wrote: > +#define MI2S_PRIMARY 0 > +#define MI2S_SECONDARY 1 > + > +#define LPASS_MCLK0 0 These look like they could use namespacing. Is primary/secondary perhaps something that could be a boolean property?
On 5/14/2020 10:18 PM, Mark Brown wrote: > On Thu, May 14, 2020 at 10:08:16PM +0530, Ajit Pandey wrote: > >> +#define MI2S_PRIMARY 0 >> +#define MI2S_SECONDARY 1 >> + >> +#define LPASS_MCLK0 0 > These look like they could use namespacing. Is primary/secondary > perhaps something that could be a boolean property? Primary/secondary is a dai id and can be from 0-4 (SC7180 soc driver support only 0-1 at present). Such id is mainly used in dtsi and machine driver to do dai id based configuration for a soc hence we placed them in dt headers file for now.
On 14/05/2020 17:38, Ajit Pandey wrote: > Add header defining dai-id and mclk id for SC7180 lpass soc. > > Signed-off-by: Ajit Pandey <ajitp@codeaurora.org> > --- > include/dt-bindings/sound/sc7180-lpass.h | 10 ++++++++++ Why not reuse or rename include/dt-bindings/sound/apq8016-lpass.h to include/dt-bindings/sound/lpass.h and reuse across all the LPASS variants? --srini > 1 file changed, 10 insertions(+) > create mode 100644 include/dt-bindings/sound/sc7180-lpass.h > > diff --git a/include/dt-bindings/sound/sc7180-lpass.h b/include/dt-bindings/sound/sc7180-lpass.h > new file mode 100644 > index 0000000..7d988f6 > --- /dev/null > +++ b/include/dt-bindings/sound/sc7180-lpass.h > @@ -0,0 +1,10 @@ > +/* SPDX-License-Identifier: GPL-2.0 */ > +#ifndef __DT_SC7180_LPASS_H > +#define __DT_SC7180_LPASS_H > + > +#define MI2S_PRIMARY 0 > +#define MI2S_SECONDARY 1 > + > +#define LPASS_MCLK0 0 > + > +#endif /* __DT_APQ8016_LPASS_H */ >
diff --git a/include/dt-bindings/sound/sc7180-lpass.h b/include/dt-bindings/sound/sc7180-lpass.h new file mode 100644 index 0000000..7d988f6 --- /dev/null +++ b/include/dt-bindings/sound/sc7180-lpass.h @@ -0,0 +1,10 @@ +/* SPDX-License-Identifier: GPL-2.0 */ +#ifndef __DT_SC7180_LPASS_H +#define __DT_SC7180_LPASS_H + +#define MI2S_PRIMARY 0 +#define MI2S_SECONDARY 1 + +#define LPASS_MCLK0 0 + +#endif /* __DT_APQ8016_LPASS_H */
Add header defining dai-id and mclk id for SC7180 lpass soc. Signed-off-by: Ajit Pandey <ajitp@codeaurora.org> --- include/dt-bindings/sound/sc7180-lpass.h | 10 ++++++++++ 1 file changed, 10 insertions(+) create mode 100644 include/dt-bindings/sound/sc7180-lpass.h