Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754117AbdCMSgC (ORCPT ); Mon, 13 Mar 2017 14:36:02 -0400 Received: from mga09.intel.com ([134.134.136.24]:60478 "EHLO mga09.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753348AbdCMSfy (ORCPT ); Mon, 13 Mar 2017 14:35:54 -0400 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.36,160,1486454400"; d="scan'208";a="76122993" Date: Mon, 13 Mar 2017 20:35:46 +0200 From: Jarkko Sakkinen To: Jason Gunthorpe Cc: "Li, Meng" , "linux-kernel@vger.kernel.org" , "peterhuewe@gmx.de" , "tpmdd@selhorst.net" , "tpmdd-devel@lists.sourceforge.net" Subject: Re: [PATCH] tpm: Add sysfs interface to show TPM family version Message-ID: <20170313183546.fvsyaq2l52hd3coq@intel.com> References: <1489396817-24855-1-git-send-email-Meng.Li@windriver.com> <20170313115415.2czyr4woaq4h3ncr@intel.com> <529F9A9100AE8045A7A5B5A00A39FBB83DE9325F@ALA-MBC.corp.ad.wrs.com> <20170313145958.zoh2fdxnh3ytyr2z@intel.com> <20170313165547.GB25664@obsidianresearch.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20170313165547.GB25664@obsidianresearch.com> Organization: Intel Finland Oy - BIC 0357606-4 - Westendinkatu 7, 02160 Espoo User-Agent: Mutt/1.6.2-neo (2016-08-21) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 462 Lines: 18 On Mon, Mar 13, 2017 at 10:55:47AM -0600, Jason Gunthorpe wrote: > On Mon, Mar 13, 2017 at 04:59:58PM +0200, Jarkko Sakkinen wrote: > > if (chip->flags & TPM_CHIP_FLAG_TPM2) > > ret = sprintf(buf, "TPM 2.0"); > > else > > ret = sprintf(buf, "TPM 1.x"); > > And 1.x should be 1.2 or 1.1 > > Jason Or maybe just create a patch that adds "family_major", which prints 1 or 2. That is sufficient to pick the right daemon in the user space for example. /Jarkko