lkml.org 
[lkml]   [2019]   [Oct]   [2]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
SubjectRE: [PATCH 2/7] ASoC: amd: Registering device endpoints using MFD framework
Date
> -----Original Message-----
> From: Lee Jones <lee.jones@linaro.org>
> Sent: Wednesday, October 2, 2019 8:38 AM
> To: Deucher, Alexander <Alexander.Deucher@amd.com>
> Cc: RAVULAPATI, VISHNU VARDHAN RAO
> <Vishnuvardhanrao.Ravulapati@amd.com>; Liam Girdwood
> <lgirdwood@gmail.com>; Mark Brown <broonie@kernel.org>; Jaroslav
> Kysela <perex@perex.cz>; Takashi Iwai <tiwai@suse.com>; Mukunda,
> Vijendar <Vijendar.Mukunda@amd.com>; Maruthi Srinivas Bayyavarapu
> <Maruthi.Bayyavarapu@amd.com>; Mehta, Sanju
> <Sanju.Mehta@amd.com>; Colin Ian King <colin.king@canonical.com>; Dan
> Carpenter <dan.carpenter@oracle.com>; moderated list:SOUND - SOC LAYER
> / DYNAMIC AUDIO POWER MANAGEM... <alsa-devel@alsa-project.org>;
> open list <linux-kernel@vger.kernel.org>
> 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@linaro.org>
> > > Sent: Tuesday, October 1, 2019 8:00 AM
> > > To: RAVULAPATI, VISHNU VARDHAN RAO
> > > <Vishnuvardhanrao.Ravulapati@amd.com>
> > > Cc: RAVULAPATI, VISHNU VARDHAN RAO
> > > <Vishnuvardhanrao.Ravulapati@amd.com>; Deucher, Alexander
> > > <Alexander.Deucher@amd.com>; Liam Girdwood
> <lgirdwood@gmail.com>;
> > > Mark Brown <broonie@kernel.org>; Jaroslav Kysela <perex@perex.cz>;
> > > Takashi Iwai <tiwai@suse.com>; Mukunda, Vijendar
> > > <Vijendar.Mukunda@amd.com>; Maruthi Srinivas Bayyavarapu
> > > <Maruthi.Bayyavarapu@amd.com>; Mehta, Sanju
> <Sanju.Mehta@amd.com>;
> > > Colin Ian King <colin.king@canonical.com>; Dan Carpenter
> > > <dan.carpenter@oracle.com>; moderated list:SOUND - SOC LAYER /
> > > DYNAMIC AUDIO POWER MANAGEM... <alsa-devel@alsa-project.org>;
> open
> > > list <linux-kernel@vger.kernel.org>
> > > 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 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.

Alex

\
 
 \ /
  Last update: 2019-10-02 15:12    [W:0.101 / U:11.956 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site