From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S934840AbbI2R1M (ORCPT ); Tue, 29 Sep 2015 13:27:12 -0400 Received: from quartz.orcorp.ca ([184.70.90.242]:45031 "EHLO quartz.orcorp.ca" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1755567AbbI2R1B (ORCPT ); Tue, 29 Sep 2015 13:27:01 -0400 Date: Tue, 29 Sep 2015 11:26:53 -0600 From: Jason Gunthorpe To: Jarkko Sakkinen Cc: tpmdd-devel@lists.sourceforge.net, linux-kernel@vger.kernel.org, peterhuewe@gmx.de, gregkh@linuxfoundation.org, akpm@linux-foundation.org, mjg59@srcf.ucam.org, Marcel Selhorst Subject: Re: [PATCH 1/2] tpm, tpm_tis: use acpi_driver instead of pnp_driver Message-ID: <20150929172653.GB23056@obsidianresearch.com> References: <1443546431-14948-1-git-send-email-jarkko.sakkinen@linux.intel.com> <1443546431-14948-2-git-send-email-jarkko.sakkinen@linux.intel.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1443546431-14948-2-git-send-email-jarkko.sakkinen@linux.intel.com> User-Agent: Mutt/1.5.23 (2014-03-12) X-Broken-Reverse-DNS: no host name found for IP address 10.0.0.160 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, Sep 29, 2015 at 08:07:10PM +0300, Jarkko Sakkinen wrote: > -static struct pnp_device_id tpm_pnp_tbl[] = { > +static struct acpi_device_id tpm_acpi_tbl[] = { > {"PNP0C31", 0}, /* TPM */ > {"ATM1200", 0}, /* Atmel */ > {"IFX0102", 0}, /* Infineon */ > @@ -925,28 +941,34 @@ static struct pnp_device_id tpm_pnp_tbl[] = { > {"", 0}, /* User Specified */ > {"", 0} /* Terminator */ > }; Is this OK? I don't know alot about x86 PNP, but I thought the pnp_device_id scheme would work with ACPI and legacy PNPBIOS stuff, and changing to ACPI means ACPI only? If so, should we care? Is there a spec for non-ACPI TPM discovery we need to be following here? > struct tpm_chip *chip; > -#ifdef CONFIG_PNP > +#ifdef CONFIG_ACPI Can you look at the various ifdefs and see if they can be something like: > if (!force) { > - pnp_unregister_driver(&tis_pnp_driver); > + acpi_bus_unregister_driver(&tis_acpi_driver); if (IS_ENABLED(CONFIG_ACPI)) acpi_bus_unregister_driver(&tis_acpi_driver); I think alot of the core driver stuff supports that now? Jason