Re: [PATCH 2/7] ASoC: amd: Registering device endpoints using MFD framework

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi Lee,

We have two instances BT and I2S.
We need to create devices with same name added with number of device
like example:
acp3x_i2s_playcap.1.auto<http://1.auto>
acp3x_i2s_playcap.2.auto<http://2.auto>

by using MFD we can make it happen automatically by giving
"acp3x_i2s_playcap" and other extension will be added by MFD add device API.
This helps us by rectifying the renaming issue which we get by using
Platform_dev_create API`s.If we have to use platform related APIs then
we need to give different naming conventions while creating the devices
and cant use it in loop as we have 3 devices we need to call three
explicitly.This make our code lengthy.
If we use MFD it would help us a lot.

Please suggest us how can we proceed.

Thanks,
Vishnu


Get Outlook for Android<https://aka.ms/ghei36>

________________________________
From: Lee Jones <lee.jones@xxxxxxxxxx>
Sent: Wednesday, October 2, 2019 7:05:53 PM
To: Deucher, Alexander <Alexander.Deucher@xxxxxxx>
Cc: RAVULAPATI, VISHNU VARDHAN RAO <Vishnuvardhanrao.Ravulapati@xxxxxxx>; Liam Girdwood <lgirdwood@xxxxxxxxx>; Mark Brown <broonie@xxxxxxxxxx>; Jaroslav Kysela <perex@xxxxxxxx>; Takashi Iwai <tiwai@xxxxxxxx>; Mukunda, Vijendar <Vijendar.Mukunda@xxxxxxx>; Maruthi Srinivas Bayyavarapu <Maruthi.Bayyavarapu@xxxxxxx>; Mehta, Sanju <Sanju.Mehta@xxxxxxx>; Colin Ian King <colin.king@xxxxxxxxxxxxx>; Dan Carpenter <dan.carpenter@xxxxxxxxxx>; moderated list:SOUND - SOC LAYER / DYNAMIC AUDIO POWER MANAGEM... <alsa-devel@xxxxxxxxxxxxxxxx>; open list <linux-kernel@xxxxxxxxxxxxxxx>
Subject: Re: [PATCH 2/7] ASoC: amd: Registering device endpoints using MFD framework

On Wed, 02 Oct 2019, Deucher, Alexander wrote:

> > -----Original Message-----
> > From: Lee Jones <lee.jones@xxxxxxxxxx>
> > Sent: Wednesday, October 2, 2019 8:38 AM
> > To: Deucher, Alexander <Alexander.Deucher@xxxxxxx>
> > Cc: RAVULAPATI, VISHNU VARDHAN RAO
> > <Vishnuvardhanrao.Ravulapati@xxxxxxx>; Liam Girdwood
> > <lgirdwood@xxxxxxxxx>; Mark Brown <broonie@xxxxxxxxxx>; Jaroslav
> > Kysela <perex@xxxxxxxx>; Takashi Iwai <tiwai@xxxxxxxx>; Mukunda,
> > Vijendar <Vijendar.Mukunda@xxxxxxx>; Maruthi Srinivas Bayyavarapu
> > <Maruthi.Bayyavarapu@xxxxxxx>; Mehta, Sanju
> > <Sanju.Mehta@xxxxxxx>; Colin Ian King <colin.king@xxxxxxxxxxxxx>; Dan
> > Carpenter <dan.carpenter@xxxxxxxxxx>; moderated list:SOUND - SOC LAYER
> > / DYNAMIC AUDIO POWER MANAGEM... <alsa-devel@xxxxxxxxxxxxxxxx>;
> > open list <linux-kernel@xxxxxxxxxxxxxxx>
> > Subject: Re: [PATCH 2/7] ASoC: amd: Registering device endpoints using MFD
> > framework
> >
> > On Tue, 01 Oct 2019, Deucher, Alexander wrote:
> >
> > > > -----Original Message-----
> > > > From: Lee Jones <lee.jones@xxxxxxxxxx>
> > > > Sent: Tuesday, October 1, 2019 8:00 AM
> > > > To: RAVULAPATI, VISHNU VARDHAN RAO
> > > > <Vishnuvardhanrao.Ravulapati@xxxxxxx>
> > > > Cc: RAVULAPATI, VISHNU VARDHAN RAO
> > > > <Vishnuvardhanrao.Ravulapati@xxxxxxx>; Deucher, Alexander
> > > > <Alexander.Deucher@xxxxxxx>; Liam Girdwood
> > <lgirdwood@xxxxxxxxx>;
> > > > Mark Brown <broonie@xxxxxxxxxx>; Jaroslav Kysela <perex@xxxxxxxx>;
> > > > Takashi Iwai <tiwai@xxxxxxxx>; Mukunda, Vijendar
> > > > <Vijendar.Mukunda@xxxxxxx>; Maruthi Srinivas Bayyavarapu
> > > > <Maruthi.Bayyavarapu@xxxxxxx>; Mehta, Sanju
> > <Sanju.Mehta@xxxxxxx>;
> > > > Colin Ian King <colin.king@xxxxxxxxxxxxx>; Dan Carpenter
> > > > <dan.carpenter@xxxxxxxxxx>; moderated list:SOUND - SOC LAYER /
> > > > DYNAMIC AUDIO POWER MANAGEM... <alsa-devel@xxxxxxxxxxxxxxxx>;
> > open
> > > > list <linux-kernel@xxxxxxxxxxxxxxx>
> > > > Subject: Re: [PATCH 2/7] ASoC: amd: Registering device endpoints
> > > > using MFD framework
> > > >
> > > > On Tue, 01 Oct 2019, vishnu wrote:
> > > >
> > > > > Hi Jones,
> > > > >
> > > > > I am very Thankful to your review comments.
> > > > >
> > > > > Actually The driver is not totally based on MFD. It just uses
> > > > > mfd_add_hotplug_devices() and mfd_remove_devices() for adding
> > the
> > > > > devices automatically.
> > > > >
> > > > > Remaining code has nothing to do with MFD framework.
> > > > >
> > > > > So I thought It would not break the coding style and moved ahead
> > > > > by using the MFD API by adding its header file.
> > > > >
> > > > > If it is any violation of coding standard then I can move it to
> > > > > drivers/mfd.
> > > > >
> > > > > This patch could be a show stopper for us.Please suggest us how
> > > > > can we move ahead ASAP.
> > > >
> > > > Either move the MFD parts to drivers/mfd, or stop using the MFD API.
> > >
> > > There are more drivers outside of drivers/mfd using this API than
> > > drivers in drivers/mfd.
> >
> > People do wrong things all the time.  It doesn't make them right.
> >
> > > In a lot of cases it doesn't make sense to move the driver to drivers/mfd.
> >
> > In those cases, the platform_device_*() API should be used.
>
> Why do we have both?  It's not clear to me on when we should use one

The platform_device_*() API is the de facto API to use for registering
devices.  mfd_*() is a framework built on-top of that for devices
which register sub-devices that do not reasonably reside elsewhere.

The mfd_*() helper functions should only be used by MFD devices.

> vs the other.  These are not platforms per se, they are PCI devices
> that happen to have other devices on them.  On previous projects, I
> was told to use mfd and no objections were raised at that time.

Who told you to use MFD API outside of drivers/mfd?  That's a hack.

--
Lee Jones [李琼斯]
Linaro Services Technical Lead
Linaro.org │ Open source software for ARM SoCs
Follow Linaro: Facebook | Twitter | Blog
_______________________________________________
Alsa-devel mailing list
Alsa-devel@xxxxxxxxxxxxxxxx
https://mailman.alsa-project.org/mailman/listinfo/alsa-devel




[Index of Archives]     [ALSA User]     [Linux Audio Users]     [Pulse Audio]     [Kernel Archive]     [Asterisk PBX]     [Photo Sharing]     [Linux Sound]     [Video 4 Linux]     [Gimp]     [Yosemite News]

  Powered by Linux