Received: by 2002:a05:6a11:4021:0:0:0:0 with SMTP id ky33csp4163392pxb; Mon, 27 Sep 2021 10:40:54 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwE/U5Vs96IwmihpQEjwzKVTobnwW70adxQQBrQECG8EfPsPQIP88fDXcKd1PzC5wz+TtBS X-Received: by 2002:a17:90a:1f05:: with SMTP id u5mr311605pja.193.1632764453947; Mon, 27 Sep 2021 10:40:53 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1632764453; cv=none; d=google.com; s=arc-20160816; b=YQmWeiJKJyILeg8v25jaNUVrf3n5PLF0cI0nvKQ7tYOjm6FP0bd5WQaeKVxNHGZ1vC Qxk2Q3EfwYIfxHblrMmjhPz1WkTWOUHHPsPP8QjmRhnnZnUiOrbj1wlHIwcoU5uF18J9 S7eJeextqd48T2MsKYCpSzirZik81H4oo/yOKA5mxqt+hA3Mkz7COGoFCuuVu1csCxDj gdFP9VZzgQzcZOU7u8ggp6ArQi8NYxW/ElEUdP5oQX5XwopXIkYECkkFPfFdmrKsasme WvVvD9XGoAaX5N6/yBk20pMYrYI4RfXONbNUgz2YNP5dH51xuOaxfNr5t17LOQxesPEE kCJw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-transfer-encoding :content-disposition:mime-version:references:message-id:subject:cc :to:from:date:dkim-signature; bh=e0H1d5xV3j0aLJjQ+SY6GNuNPs6932tDGjHGKWCTXXU=; b=ZRW7flG+iJVPD2Vczaafv24L5aeyZ533bur+bbVIewfL+s9p7ZR3P3orV7/BaQmVf1 jtOmCdwcZt4n1TQr482vQTQy+TdB+TlmiyoNFkoQt07ogHKnKzWLYRhjDALmvyS4wi0t FMCL+srjZQYpRBNPMWpikyhK9fE9alYmRzTAFlHghI1AyPjG5bhDrl2IO///ZILvW+XD /qBUNSDxjhlNaw5WJBv6K20nTk+FOkkdarrEa9u4Or8dOVJwcMfaGR3eVqW1RtoDqCjL Bde7UcdwNYce4b3MeNDtZdkBsnhhtiT0uDgNibuBwu6BhWW8sbBWzoX6lrYELDAYyAob G7Fg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=OqURat9A; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id t40si24283661pfg.221.2021.09.27.10.40.40; Mon, 27 Sep 2021 10:40:53 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=OqURat9A; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S238467AbhI0Rj6 (ORCPT + 99 others); Mon, 27 Sep 2021 13:39:58 -0400 Received: from mail.kernel.org ([198.145.29.99]:52760 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S238746AbhI0RiW (ORCPT ); Mon, 27 Sep 2021 13:38:22 -0400 Received: by mail.kernel.org (Postfix) with ESMTPSA id 8F20060F4A; Mon, 27 Sep 2021 17:36:43 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1632764204; bh=tM73L6tUpKXE+ynihqygxcYqjleELU0EBQA2XuR0hX4=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=OqURat9AGPOteAcKdZ5kfwQL8rKK8zMPlyvuEd7QZRabxyXpUSQJi8iWJYHn0waU5 Q8kdCrW9onubWRaaA2ltFTiXOumOc640NZ795VlyHaU/pZVMFfcRTS5zQGhfEyL2Am 23n4+dcYQydDcFDqvI23qDaem3nnesy+E3ON4+CU= Date: Mon, 27 Sep 2021 19:36:41 +0200 From: Greg KH To: "David E. Box" Cc: lee.jones@linaro.org, hdegoede@redhat.com, mgross@linux.intel.com, andriy.shevchenko@linux.intel.com, srinivas.pandruvada@intel.com, linux-doc@vger.kernel.org, linux-kernel@vger.kernel.org, platform-driver-x86@vger.kernel.org Subject: Re: [PATCH 2/2] platform/x86: Add Intel Software Defined Silicon driver Message-ID: References: <20210924213157.3584061-1-david.e.box@linux.intel.com> <20210924213157.3584061-2-david.e.box@linux.intel.com> <3392aea6b112926b063bbe46b1decaad4c9f9e6e.camel@linux.intel.com> <7295cafaf6da34e31390fe621198205d18eac525.camel@linux.intel.com> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <7295cafaf6da34e31390fe621198205d18eac525.camel@linux.intel.com> Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon, Sep 27, 2021 at 10:27:28AM -0700, David E. Box wrote: > On Mon, 2021-09-27 at 06:04 +0200, Greg KH wrote: > > On Sun, Sep 26, 2021 at 06:15:16PM -0700, David E. Box wrote: > > > > > +static struct platform_driver sdsi_driver = { > > > > > +???????.driver = { > > > > > +???????????????.name???????????= SDSI_DEV_NAME, > > > > > +???????????????.dev_groups?????= sdsi_groups, > > > > > +???????}, > > > > > +???????.probe? = sdsi_probe, > > > > > +???????.remove = sdsi_remove, > > > > > +}; > > > > > +module_platform_driver(sdsi_driver); > > > > > > > > What causes the platform to know to register, and enable, this platform > > > > driver?? Shouldn't there be some hardware involved that is discoverable > > > > to enable it to load dynamically? > > > > > > Ah. The patch that adds the SDSi platform device string was added to a series for the intel_pmt > > > MFD > > > driver and it's still waiting review. I see that complicates things. I can combine the two series > > > together. > > > > Do you have a pointer to the lore.kernel.org location of that series? > > https://lore.kernel.org/all/20210922213007.2738388-1-david.e.box@linux.intel.com/ > > > > > Your code right here will bind to any system that it is loaded on, a > > very dangerous thing... > > It won't. It uses module alias to load against the SDSi specific MFD cell. module aliases do not prevent someone from building the driver into their kernel, or doing a simple 'modprobe'. You need to bind your driver to a real hardware resource (and reject it if it is not present), otherwise this driver will break systems quite easily. And again, why is this a platform driver and not just a "real" device on a bus? Heck, why not just use the auxiliary bus for stuff like this, why are you craming pci attributes into the MFD subsystem? thanks, greg k-h