lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <20191002133553.GA21172@dell>
Date:   Wed, 2 Oct 2019 14:35:53 +0100
From:   Lee Jones <lee.jones@...aro.org>
To:     "Deucher, Alexander" <Alexander.Deucher@....com>
Cc:     "RAVULAPATI, VISHNU VARDHAN RAO" 
        <Vishnuvardhanrao.Ravulapati@....com>,
        Liam Girdwood <lgirdwood@...il.com>,
        Mark Brown <broonie@...nel.org>,
        Jaroslav Kysela <perex@...ex.cz>,
        Takashi Iwai <tiwai@...e.com>,
        "Mukunda, Vijendar" <Vijendar.Mukunda@....com>,
        Maruthi Srinivas Bayyavarapu <Maruthi.Bayyavarapu@....com>,
        "Mehta, Sanju" <Sanju.Mehta@....com>,
        Colin Ian King <colin.king@...onical.com>,
        Dan Carpenter <dan.carpenter@...cle.com>,
        "moderated list:SOUND - SOC LAYER / DYNAMIC AUDIO POWER MANAGEM..." 
        <alsa-devel@...a-project.org>,
        open list <linux-kernel@...r.kernel.org>
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@...aro.org>
> > Sent: Wednesday, October 2, 2019 8:38 AM
> > To: Deucher, Alexander <Alexander.Deucher@....com>
> > Cc: RAVULAPATI, VISHNU VARDHAN RAO
> > <Vishnuvardhanrao.Ravulapati@....com>; Liam Girdwood
> > <lgirdwood@...il.com>; Mark Brown <broonie@...nel.org>; Jaroslav
> > Kysela <perex@...ex.cz>; Takashi Iwai <tiwai@...e.com>; Mukunda,
> > Vijendar <Vijendar.Mukunda@....com>; Maruthi Srinivas Bayyavarapu
> > <Maruthi.Bayyavarapu@....com>; Mehta, Sanju
> > <Sanju.Mehta@....com>; Colin Ian King <colin.king@...onical.com>; Dan
> > Carpenter <dan.carpenter@...cle.com>; moderated list:SOUND - SOC LAYER
> > / DYNAMIC AUDIO POWER MANAGEM... <alsa-devel@...a-project.org>;
> > open list <linux-kernel@...r.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@...aro.org>
> > > > Sent: Tuesday, October 1, 2019 8:00 AM
> > > > To: RAVULAPATI, VISHNU VARDHAN RAO
> > > > <Vishnuvardhanrao.Ravulapati@....com>
> > > > Cc: RAVULAPATI, VISHNU VARDHAN RAO
> > > > <Vishnuvardhanrao.Ravulapati@....com>; Deucher, Alexander
> > > > <Alexander.Deucher@....com>; Liam Girdwood
> > <lgirdwood@...il.com>;
> > > > Mark Brown <broonie@...nel.org>; Jaroslav Kysela <perex@...ex.cz>;
> > > > Takashi Iwai <tiwai@...e.com>; Mukunda, Vijendar
> > > > <Vijendar.Mukunda@....com>; Maruthi Srinivas Bayyavarapu
> > > > <Maruthi.Bayyavarapu@....com>; Mehta, Sanju
> > <Sanju.Mehta@....com>;
> > > > Colin Ian King <colin.king@...onical.com>; Dan Carpenter
> > > > <dan.carpenter@...cle.com>; moderated list:SOUND - SOC LAYER /
> > > > DYNAMIC AUDIO POWER MANAGEM... <alsa-devel@...a-project.org>;
> > open
> > > > list <linux-kernel@...r.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

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

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ