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=-2.4 required=3.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,SPF_HELO_NONE, SPF_PASS,USER_AGENT_SANE_1 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 B6883C433E0 for ; Thu, 28 May 2020 00:12:15 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 7FFA6208B8 for ; Thu, 28 May 2020 00:12:15 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=ziepe.ca header.i=@ziepe.ca header.b="oO2rCFM7" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1725780AbgE1AMO (ORCPT ); Wed, 27 May 2020 20:12:14 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:50504 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725267AbgE1AMO (ORCPT ); Wed, 27 May 2020 20:12:14 -0400 Received: from mail-il1-x144.google.com (mail-il1-x144.google.com [IPv6:2607:f8b0:4864:20::144]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id D35CFC05BD1E for ; Wed, 27 May 2020 17:12:12 -0700 (PDT) Received: by mail-il1-x144.google.com with SMTP id v11so8549709ilh.1 for ; Wed, 27 May 2020 17:12:12 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ziepe.ca; s=google; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to:user-agent; bh=EZ5OmQ9S/j0BkOm/hjMRMHbK3BDLmC+jsiwSGq9LQNU=; b=oO2rCFM7/qw/eQTVVG9GExo0Z6RYjNx7a76i1zWd2FkIrFbjDyNJyAXD79lQjIWcpW e4Gc57aBPNKabVXMWuXD4oK5Ne92lfpSrq8GAzpXAj21ZhlxkeX07lkuozNIp0X3HWyF dvPPQ3Jtu4R/+6NlTf/Ylr6eZ4w1FL102ZU5Kd4YI//3jD6kzfSxf2/FVxZ826aKypH/ iWGAaj/1hBbS6DPmYXUj+nseq0m2xleLOY9vxncstz3SNaWGTkFuovdh+F4P3JD0TsZ0 +/nMJC+40DfVgH74P2XQJ27IvoJjLIRXBvukJa8solRxXZcvkZowp2OC8k8QNrWnvdJA HTVg== 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:in-reply-to:user-agent; bh=EZ5OmQ9S/j0BkOm/hjMRMHbK3BDLmC+jsiwSGq9LQNU=; b=UC6RAQelXVHRPqyzRNbO5TKVwmgPBLLmLJu7S6AeOTi7gm58LV0UUCtibaRFq9KkUc qfvnk6cxccurL09AMtkGA9uScThethiNy3P6dnJdfpqhKyNAPDxoP9HrjiU8WLADj+9B YYTdOWuHBph+8Qi+iOhgWYtQMW1W92uu48HjGw2oVPmknC8FoVPetntJaParN5TjRRZ4 q/BS7SkYJ6cPl6ivlmZvpPQryEW8J5Rc3NIHe95pFu4KpF7XT80aQ5r3mnIz+ewIqFAt kayEh3zCU3LiluIsZY/4GQ+ftGBCNc6x1+z9WJOU+kKp6rACLIkalPLzei+7cTzyd4Fh eY5g== X-Gm-Message-State: AOAM531jwR4MDyxCPDZy9iLvWH3SFUSFaSN/4YSxfd4OoNEIHrtupoJc 4b1d99gHu6JpZpewyqLuhZa64Q== X-Google-Smtp-Source: ABdhPJwxIa+iF7NOAA4V1wZCknoI9q3H8HjHrA2YalnS7KpcAeI/d9JitBKZvF+qN7yytR2qGcxPCA== X-Received: by 2002:a05:6e02:13e2:: with SMTP id w2mr762029ilj.264.1590624732091; Wed, 27 May 2020 17:12:12 -0700 (PDT) Received: from ziepe.ca ([206.223.160.26]) by smtp.gmail.com with ESMTPSA id s71sm2392688ilc.32.2020.05.27.17.12.08 (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Wed, 27 May 2020 17:12:08 -0700 (PDT) Received: from jgg by mlx.ziepe.ca with local (Exim 4.90_1) (envelope-from ) id 1je69X-0002vd-Nz; Wed, 27 May 2020 21:12:07 -0300 Date: Wed, 27 May 2020 21:12:07 -0300 From: Jason Gunthorpe To: Ranjani Sridharan Cc: Jeff Kirsher , davem@davemloft.net, gregkh@linuxfoundation.org, netdev@vger.kernel.org, linux-rdma@vger.kernel.org, nhorman@redhat.com, sassmann@redhat.com, pierre-louis.bossart@linux.intel.com, Fred Oh Subject: Re: [net-next v4 11/12] ASoC: SOF: Create client driver for IPC test Message-ID: <20200528001207.GR744@ziepe.ca> References: <20200520070227.3392100-1-jeffrey.t.kirsher@intel.com> <20200520070227.3392100-12-jeffrey.t.kirsher@intel.com> <20200520125611.GI31189@ziepe.ca> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.9.4 (2018-02-28) Sender: linux-rdma-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-rdma@vger.kernel.org On Wed, May 27, 2020 at 01:18:35PM -0700, Ranjani Sridharan wrote: > On Wed, 2020-05-20 at 09:56 -0300, Jason Gunthorpe wrote: > > On Wed, May 20, 2020 at 12:02:26AM -0700, Jeff Kirsher wrote: > > > +static const struct virtbus_dev_id sof_ipc_virtbus_id_table[] = { > > > + {"sof-ipc-test"}, > > > + {}, > > > +}; > > > + > > > +static struct sof_client_drv sof_ipc_test_client_drv = { > > > + .name = "sof-ipc-test-client-drv", > > > + .type = SOF_CLIENT_IPC, > > > + .virtbus_drv = { > > > + .driver = { > > > + .name = "sof-ipc-test-virtbus-drv", > > > + }, > > > + .id_table = sof_ipc_virtbus_id_table, > > > + .probe = sof_ipc_test_probe, > > > + .remove = sof_ipc_test_remove, > > > + .shutdown = sof_ipc_test_shutdown, > > > + }, > > > +}; > > > + > > > +module_sof_client_driver(sof_ipc_test_client_drv); > > > + > > > +MODULE_DESCRIPTION("SOF IPC Test Client Driver"); > > > +MODULE_LICENSE("GPL v2"); > > > +MODULE_IMPORT_NS(SND_SOC_SOF_CLIENT); > > > +MODULE_ALIAS("virtbus:sof-ipc-test"); > > > > Usually the MODULE_ALIAS happens automatically rhough the struct > > virtbus_dev_id - is something missing in the enabling patches? > Hi Jason, > > Without the MODULE_ALIAS, the driver never probes when the virtual bus > device is registered. The MODULE_ALIAS is not different from the ones > we typically have in the platform drivers. Could you please give me > some pointers on what you think might be missing? Look at how the stuff in include/linux/mod_devicetable.h works and do the same for virtbus Looks like you push a MODALIAS= uevent when creating the device and the generic machinery does the rest based on the matching table, once mod_devicetable.h and related is updated. But it has been a long time since I looked at this.. Jason