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 Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 6FBA0C433EF for ; Thu, 21 Jul 2022 19:54:39 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230019AbiGUTyi (ORCPT ); Thu, 21 Jul 2022 15:54:38 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:33766 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229479AbiGUTyh (ORCPT ); Thu, 21 Jul 2022 15:54:37 -0400 Received: from dfw.source.kernel.org (dfw.source.kernel.org [IPv6:2604:1380:4641:c500::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 12603691D1; Thu, 21 Jul 2022 12:54:37 -0700 (PDT) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by dfw.source.kernel.org (Postfix) with ESMTPS id AFA9962098; Thu, 21 Jul 2022 19:54:36 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 9FFF2C3411E; Thu, 21 Jul 2022 19:54:35 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1658433276; bh=n0LUlDFRxvmloJIBnwb8oeIMcuhkLDWUpN3AnMOXSBc=; h=Date:From:To:Cc:Subject:From; b=Ck1VZV+5yea8vUj67fFZ9L0rykyv+jIoTeseyZpFa6kZX8n2AwKrluA1tOS5SKflr XHQioX4J3oNrA7V95QdX94vRktvDQ8OVFHx1futsGqK7LGkJcuKpYbx6nz8rgpPCxL PvupmD7f91D/gV75ItpLurZIiJKc1K299XiVWGyT0EXg7LIySe2ZJAmKtdzHUCCfmU s8kfGArkQx1o42KpRag8sm0RH8uFaUDVKIMG3ypX4zbALi6Nwh841ByuJPqr+ksbAL HB84rn13wW6/5vENx//kM2iznBU6oJI4ZCpO2dycg0nxNoTES8lDPHFZWP/g26jTYs ZaTPpFL20KSTw== Date: Thu, 21 Jul 2022 14:54:33 -0500 From: Bjorn Helgaas To: Kishon Vijay Abraham I , Xiaowei Song , Binghui Wang , Thierry Reding , Ryder Lee , Jianjun Wang Cc: linux-pci@vger.kernel.org, Tom Joseph , Krzysztof =?utf-8?Q?Wilczy=C5=84ski?= , Pali =?iso-8859-1?Q?Roh=E1r?= , Ley Foon Tan , linux-kernel@vger.kernel.org Subject: Why set .suppress_bind_attrs even though .remove() implemented? Message-ID: <20220721195433.GA1747571@bhelgaas> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Precedence: bulk List-ID: X-Mailing-List: linux-pci@vger.kernel.org The j721e, kirin, tegra, and mediatek drivers all implement .remove(). They also set ".suppress_bind_attrs = true". I think this means bus_add_driver() will not create the "bind" and "unbind" sysfs attributes for the driver that would allow users to users to manually attach and detach devices from it. Is there a reason for this, or should these drivers stop setting .suppress_bind_attrs? For example, Pali and Ley Foon *did* stop setting .suppress_bind_attrs when adding .remove() methods in these commits: 0746ae1be121 ("PCI: mvebu: Add support for compiling driver as module") 526a76991b7b ("PCI: aardvark: Implement driver 'remove' function and allow to build it as module") ec15c4d0d5d2 ("PCI: altera: Allow building as module") Bjorn