From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751889AbcGORQE (ORCPT ); Fri, 15 Jul 2016 13:16:04 -0400 Received: from mail-pf0-f180.google.com ([209.85.192.180]:34724 "EHLO mail-pf0-f180.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750851AbcGORQB (ORCPT ); Fri, 15 Jul 2016 13:16:01 -0400 Date: Fri, 15 Jul 2016 10:15:57 -0700 From: Andrey Pronin To: Jason Gunthorpe Cc: Peter Huewe , Jarkko Sakkinen , Marcel Selhorst , tpmdd-devel@lists.sourceforge.net, linux-kernel@vger.kernel.org, groeck@chromium.org, smbarber@chromium.org, dianders@chromium.org Subject: Re: [PATCH 0/2] tpm: add driver for cr50 on SPI Message-ID: <20160715171557.GC109276@apronin> References: <1468549218-19215-1-git-send-email-apronin@chromium.org> <9A3CFCAE-F2FD-438D-A32B-AD59E0362E71@gmx.de> <20160715025026.GA21375@apronin> <20160715032814.GG9347@obsidianresearch.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20160715032814.GG9347@obsidianresearch.com> User-Agent: Mutt/1.5.21 (2010-09-15) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, Jul 14, 2016 at 09:28:14PM -0600, Jason Gunthorpe wrote: > On Thu, Jul 14, 2016 at 07:50:26PM -0700, Andrey Pronin wrote: > > Yes, it has a TCG-compliant interface, however, there are several things > > specific to this device: > > - need to ensure a certain delay between spi transactions, or else > > the chip can miss several first bytes. > > - if there is no spi activity for this chip, it may go to sleep, and > > needs to be waken up before sending further commands. > > - it has some vendor-specific registers accessible from spi bus. > > This all needs to be commented clearly in the driver.. > Will provide more details in the patch description. The driver code has comments about those cases in the code: see cr50_ensure_access_delay and cr50_needs_waking, for example.