Received: by 2002:a25:824b:0:0:0:0:0 with SMTP id d11csp819848ybn; Wed, 2 Oct 2019 06:44:48 -0700 (PDT) X-Google-Smtp-Source: APXvYqz68jJPmBO5e9RdegKBEIupDLXfx+8LJJ6FCcwQHkfWobWxFDPzM9K6Hwk8/bLYjsZ5CvP1 X-Received: by 2002:a17:906:f6d1:: with SMTP id jo17mr3192937ejb.62.1570023888580; Wed, 02 Oct 2019 06:44:48 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1570023888; cv=none; d=google.com; s=arc-20160816; b=k0COX/W0v8OQXOYBT8epRAWIbM50kZJWIUcs8t/S7Eo449FK+U8A1NbKf+cygeYdQU /2ROLro6rmlZd2lyGjY2AMvN1vcmwxR1hmH4zrjx80Csicf0vBYZ9S+huCCh6pLXx5L7 pMCkPQe2QuclX88mvdRz61kjAcewf7CpkKa254vCgmB1jdGKQk3RMAXTQGNhkotaH+lH sFBCHWV37WkyDci4lLKNezLfB8Q0yKgVPc5vzDCq6sHr34vYwApQPu8LSPz1/U80E3Ur CLO1hiMtk0kT7txbyVv/wniH/8zZItxsyclg+VipTqDNW0j6b3rCjG+EdauiTgDxjEZn 54nw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-transfer-encoding:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature; bh=SKsMv8qnMo+5vAVsJhy/p0hqFSrqBGNR2va/5wYlCuM=; b=jIR8DFfeNKHLJcgYM/QcOkACu8r94B7aN4Vjxsq2O5jFfU0wXt8a3ikE2d/DNSnlAJ +WAPqh9TD7qMmXsMSfdX7TL9se3AoPuaEIaxxBs3c8v+Z8V2hS6IZIW0Mk/quWV1aL/o jmqRDyc+as7x3yd3lSiSQfbx9rjrwUzDL4tCsPoyBZZHJX5on0nb+tYOa8+vLFUx8HHN hR2Vypuwan75MVCRHD14irL2lLyW/8jpq6FzMl+ZoAdVU/9AAWJtP1duAtUfmr/mwbIl jl3v4LzB2nnDnkR3ksvTf5ypsVCuDsnZsP6HInPrjbU5IE/mIN5gHKJ0jcfjB62e9s02 uzWA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=CEwJVEoE; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id v22si10510669edq.239.2019.10.02.06.44.23; Wed, 02 Oct 2019 06:44:48 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=CEwJVEoE; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727951AbfJBNf7 (ORCPT + 99 others); Wed, 2 Oct 2019 09:35:59 -0400 Received: from mail-wr1-f68.google.com ([209.85.221.68]:38049 "EHLO mail-wr1-f68.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727854AbfJBNf6 (ORCPT ); Wed, 2 Oct 2019 09:35:58 -0400 Received: by mail-wr1-f68.google.com with SMTP id w12so19711548wro.5 for ; Wed, 02 Oct 2019 06:35:56 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:content-transfer-encoding:in-reply-to :user-agent; bh=SKsMv8qnMo+5vAVsJhy/p0hqFSrqBGNR2va/5wYlCuM=; b=CEwJVEoE0/j9CZxiEx8eaD9UtVNmxSeBk+wSYk0Ie4EqY8VXts8uiIcXkz+nV50KXu yKdlBWYBdjU2d2dEgqeyVK70H6nm/GN2aoIrvE3GxkvaqFYa6pmrVa9iV51u9/J25UoW cvRIh4cpLWJ6r2tXFe5dU4Eja4scW/+Jf/dVf9blzrjUhqBBVi6fdkfWDAlT2m4VYw9j RS1aUXbe1apSFbPzvdFUBTrZsiNYDvViq6YCDRMYebDVzvsORWFdvB4S4q3Mf+YPQyl9 5lxeJL8TFr+Zx1zQbjeKLVPl0sAR3PWqHeCBpK8ZwtJMiuLws18C+B1rzUO8JsTTB2XM z+Fg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:content-transfer-encoding :in-reply-to:user-agent; bh=SKsMv8qnMo+5vAVsJhy/p0hqFSrqBGNR2va/5wYlCuM=; b=YYjW18Ure8mpg9VkWiToQZFXJ0Y4Mr5Ds8l8QoLk4O7CEfJtM8Rxg+OgTP6bB+rIcs wZ3+7cYokp/Wn1D4wDPx1tHEABAnOc/eAz6VjixNyW990IkbYStxnbJ2aN83//KzMykL 4ZgirYUd+VtLZKGqeNwE+ShYWDAIE7otnWhXLJZHcgxoDMmRRWdWPwDeWswTZJ7EIqOf Gk0Hp1FFPMu+QMHEjK9FQUpyTKRVKJpXAJDjvmVGJRxyDoH9+81YeXe8DNh4VzU6IICh bvSeiL5m626yXpsYvT/9o9Yh6msBadJ275gt2KPpO1zjR1QGIDG57FcKsyIQ67caQOwW Jarw== X-Gm-Message-State: APjAAAVLrANqCVGEoo2cFU8IHXFa/0738jpg14lNNA8FRbWhNLwaHWjH YtTYr3vYnoH2LMHxC7fiBavflw== X-Received: by 2002:a5d:43d0:: with SMTP id v16mr2822249wrr.390.1570023355697; Wed, 02 Oct 2019 06:35:55 -0700 (PDT) Received: from dell ([2.27.167.122]) by smtp.gmail.com with ESMTPSA id m18sm23191103wrg.97.2019.10.02.06.35.54 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Wed, 02 Oct 2019 06:35:55 -0700 (PDT) Date: Wed, 2 Oct 2019 14:35:53 +0100 From: Lee Jones To: "Deucher, Alexander" Cc: "RAVULAPATI, VISHNU VARDHAN RAO" , Liam Girdwood , Mark Brown , Jaroslav Kysela , Takashi Iwai , "Mukunda, Vijendar" , Maruthi Srinivas Bayyavarapu , "Mehta, Sanju" , Colin Ian King , Dan Carpenter , "moderated list:SOUND - SOC LAYER / DYNAMIC AUDIO POWER MANAGEM..." , open list Subject: Re: [PATCH 2/7] ASoC: amd: Registering device endpoints using MFD framework Message-ID: <20191002133553.GA21172@dell> References: <1569891524-18875-1-git-send-email-Vishnuvardhanrao.Ravulapati@amd.com> <1569891524-18875-2-git-send-email-Vishnuvardhanrao.Ravulapati@amd.com> <20191001064539.GB11769@dell> <2ff13a61-a346-4d49-ab3a-da5d2126727c@amd.com> <20191001120020.GC11769@dell> <20191002123759.GD11769@dell> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: User-Agent: Mutt/1.9.4 (2018-02-28) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, 02 Oct 2019, Deucher, Alexander wrote: > > -----Original Message----- > > From: Lee Jones > > Sent: Wednesday, October 2, 2019 8:38 AM > > To: Deucher, Alexander > > Cc: RAVULAPATI, VISHNU VARDHAN RAO > > ; Liam Girdwood > > ; Mark Brown ; Jaroslav > > Kysela ; Takashi Iwai ; Mukunda, > > Vijendar ; Maruthi Srinivas Bayyavarapu > > ; Mehta, Sanju > > ; Colin Ian King ; Dan > > Carpenter ; moderated list:SOUND - SOC LAYER > > / DYNAMIC AUDIO POWER MANAGEM... ; > > open list > > 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 > > > > Sent: Tuesday, October 1, 2019 8:00 AM > > > > To: RAVULAPATI, VISHNU VARDHAN RAO > > > > > > > > Cc: RAVULAPATI, VISHNU VARDHAN RAO > > > > ; Deucher, Alexander > > > > ; Liam Girdwood > > ; > > > > Mark Brown ; Jaroslav Kysela ; > > > > Takashi Iwai ; Mukunda, Vijendar > > > > ; Maruthi Srinivas Bayyavarapu > > > > ; Mehta, Sanju > > ; > > > > Colin Ian King ; Dan Carpenter > > > > ; moderated list:SOUND - SOC LAYER / > > > > DYNAMIC AUDIO POWER MANAGEM... ; > > open > > > > list > > > > 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