From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-6.8 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,SIGNED_OFF_BY, SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED autolearn=no autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 42ABAC4727E for ; Wed, 7 Oct 2020 15:58:56 +0000 (UTC) Received: from alsa0.perex.cz (alsa0.perex.cz [77.48.224.243]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 6EA2A21707 for ; Wed, 7 Oct 2020 15:58:55 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (1024-bit key) header.d=alsa-project.org header.i=@alsa-project.org header.b="T/VRUHBH" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 6EA2A21707 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=intel.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=alsa-devel-bounces@alsa-project.org Received: from alsa1.perex.cz (alsa1.perex.cz [207.180.221.201]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by alsa0.perex.cz (Postfix) with ESMTPS id BD45616C3; Wed, 7 Oct 2020 17:58:03 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa0.perex.cz BD45616C3 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=alsa-project.org; s=default; t=1602086333; bh=HnPfyx9TIbu4aDo//bY1VQG8mLxNh+7Qj2l+8eAqw/s=; h=From:To:Subject:Date:References:In-Reply-To:Cc:List-Id: List-Unsubscribe:List-Archive:List-Post:List-Help:List-Subscribe: From; b=T/VRUHBHWoIvfxg4UFPVpsdC1xOpvm5svhfYcZEfPBA9w/gzkGeTO3P/+AHJD11aN bfBUfNyV7tsFcv732Bxc1/ZLpTSpIApPy3j+1B3rkUdI3QCeB8sgr7MV3sJqccR9+3 QJ94QqD65a1lKcN2/7CsECZlsshTWEctfI94Vnms= Received: from alsa1.perex.cz (localhost.localdomain [127.0.0.1]) by alsa1.perex.cz (Postfix) with ESMTP id 461CEF80297; Wed, 7 Oct 2020 17:54:53 +0200 (CEST) Received: by alsa1.perex.cz (Postfix, from userid 50401) id E6C69F8012A; Tue, 6 Oct 2020 19:45:56 +0200 (CEST) Received: from mga03.intel.com (mga03.intel.com [134.134.136.65]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by alsa1.perex.cz (Postfix) with ESMTPS id 312D1F80053 for ; Tue, 6 Oct 2020 19:45:49 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa1.perex.cz 312D1F80053 IronPort-SDR: 29kHX2Ap7MtPGGblz92qIAOP6qHQaG99cFJMx++fuuXsQwWVuE60MTY2fcb3jauqNe8FTI8Ovf v7l+jUrWixJw== X-IronPort-AV: E=McAfee;i="6000,8403,9765"; a="164669937" X-IronPort-AV: E=Sophos;i="5.77,343,1596524400"; d="scan'208";a="164669937" X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from orsmga004.jf.intel.com ([10.7.209.38]) by orsmga103.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 06 Oct 2020 10:45:46 -0700 IronPort-SDR: p2zLtZq8QrsYooxe9aWXVEy0jeqWU1a5IsPjcCtcmiCTScD85iGD5A25ihB/Cz66yPNTT2kM5w xJ+Nj42tuFCw== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.77,343,1596524400"; d="scan'208";a="460905673" Received: from fmsmsx602.amr.corp.intel.com ([10.18.126.82]) by orsmga004.jf.intel.com with ESMTP; 06 Oct 2020 10:45:42 -0700 Received: from fmsmsx610.amr.corp.intel.com (10.18.126.90) by fmsmsx602.amr.corp.intel.com (10.18.126.82) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.1713.5; Tue, 6 Oct 2020 10:45:42 -0700 Received: from fmsmsx612.amr.corp.intel.com (10.18.126.92) by fmsmsx610.amr.corp.intel.com (10.18.126.90) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.1713.5; Tue, 6 Oct 2020 10:45:42 -0700 Received: from fmsmsx612.amr.corp.intel.com ([10.18.126.92]) by fmsmsx612.amr.corp.intel.com ([10.18.126.92]) with mapi id 15.01.1713.004; Tue, 6 Oct 2020 10:45:41 -0700 From: "Saleem, Shiraz" To: Leon Romanovsky , "Ertman, David M" Subject: RE: [PATCH v2 1/6] Add ancillary bus support Thread-Topic: [PATCH v2 1/6] Add ancillary bus support Thread-Index: AQHWm0x+bCEx5k0iU0+RSRzmm941iKmLSYGA//+QDSA= Date: Tue, 6 Oct 2020 17:45:41 +0000 Message-ID: References: <20201005182446.977325-1-david.m.ertman@intel.com> <20201005182446.977325-2-david.m.ertman@intel.com> <20201006172317.GN1874917@unreal> In-Reply-To: <20201006172317.GN1874917@unreal> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: dlp-product: dlpe-windows dlp-reaction: no-action dlp-version: 11.5.1.3 x-originating-ip: [10.1.200.100] Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-Mailman-Approved-At: Wed, 07 Oct 2020 17:54:46 +0200 Cc: "alsa-devel@alsa-project.org" , "parav@mellanox.com" , "tiwai@suse.de" , "netdev@vger.kernel.org" , "ranjani.sridharan@linux.intel.com" , "pierre-louis.bossart@linux.intel.com" , "fred.oh@linux.intel.com" , "linux-rdma@vger.kernel.org" , "dledford@redhat.com" , "broonie@kernel.org" , "jgg@nvidia.com" , "gregkh@linuxfoundation.org" , "kuba@kernel.org" , "Williams, Dan J" , "davem@davemloft.net" , "Patil, Kiran" X-BeenThere: alsa-devel@alsa-project.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: "Alsa-devel mailing list for ALSA developers - http://www.alsa-project.org" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: alsa-devel-bounces@alsa-project.org Sender: "Alsa-devel" > Subject: Re: [PATCH v2 1/6] Add ancillary bus support >=20 > On Mon, Oct 05, 2020 at 11:24:41AM -0700, Dave Ertman wrote: > > Add support for the Ancillary Bus, ancillary_device and ancillary_drive= r. > > It enables drivers to create an ancillary_device and bind an > > ancillary_driver to it. > > > > The bus supports probe/remove shutdown and suspend/resume callbacks. > > Each ancillary_device has a unique string based id; driver binds to an > > ancillary_device based on this id through the bus. > > > > Co-developed-by: Kiran Patil > > Signed-off-by: Kiran Patil > > Co-developed-by: Ranjani Sridharan > > Signed-off-by: Ranjani Sridharan > > Co-developed-by: Fred Oh > > Signed-off-by: Fred Oh > > Reviewed-by: Pierre-Louis Bossart > > > > Reviewed-by: Shiraz Saleem > > Reviewed-by: Parav Pandit > > Reviewed-by: Dan Williams > > Signed-off-by: Dave Ertman > > --- >=20 > <...> >=20 > > +/** > > + * __ancillary_driver_register - register a driver for ancillary bus > > +devices > > + * @ancildrv: ancillary_driver structure > > + * @owner: owning module/driver > > + */ > > +int __ancillary_driver_register(struct ancillary_driver *ancildrv, > > +struct module *owner) { > > + if (WARN_ON(!ancildrv->probe) || WARN_ON(!ancildrv->remove) || > > + WARN_ON(!ancildrv->shutdown) || WARN_ON(!ancildrv->id_table)) > > + return -EINVAL; >=20 > In our driver ->shutdown is empty, it will be best if ancillary bus will = do "if (- > >remove) ..->remove()" pattern. >=20 I prefer that too if its possible. We will look into it.