Received: by 2002:a25:4158:0:0:0:0:0 with SMTP id o85csp2204115yba; Mon, 15 Apr 2019 07:06:15 -0700 (PDT) X-Google-Smtp-Source: APXvYqx9u2LfjTuUWwUrdpRSHnVreS306/t9FQukJAQ25Wg7y3YNcgk+wRmxY84nynWBXD3biFYS X-Received: by 2002:a17:902:a9c7:: with SMTP id b7mr72433367plr.145.1555337175386; Mon, 15 Apr 2019 07:06:15 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1555337175; cv=none; d=google.com; s=arc-20160816; b=mflIeayDheeRaiP3fKC0MCLRqebM5p5xLWr6EpAllfbG2QXeRC/iyjHHXZppfZpm04 gxvtBiF9HZ+GvQmQMv8fDLb3+erW+cYShaR4Ge9hfQVRBF5O+mqXbsYKT2jx27khxEU+ uHaNb7qb2GM5atBg4P8k6Up0aKox8vlx1IX3n9ov5h9p6N2N1RbOrV0nPNG1W9jBexcl iWXea5+1lQC22udQiUyEBjuTW94t+WVR6dY3UaK2BP0VBACdx240JvpQK7EnNyWlkcbP YUIHgeMDNpdjmluQqEnfJQDK8DcpMn0MtE7Tr6sRvVlFXu9T2L7Zuu0NndZpensZthsT lvcQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding :content-language:in-reply-to:mime-version:user-agent:date :message-id:from:references:cc:to:subject; bh=T5SYK2jXbgCvC9MWhToxbePkpR5THYbzprhBLs7Ffs4=; b=MyI00jvCoUjHd7tUmnvRsGaGmsrXy+lT3ayKksC6EtJ0/hru8WDq8z2B90EAFFfKVk Zq3jEbjX7AxWghHLa4iGEV1Uohj5pPKtjDXFghZlXbK72pGdKZhw6nqR+1dZVxrGZKjS eDtS0517qmSZQ+tYwKM5aDgNvTiCvsclkGwBV3zot1F04sxRUfkB5MVzSqALL3A3ykK6 tLmVnly03iiq5YXo7+Oi7fCYNxwSVUpPLvik5CO58pjTAHD9BMpQh9NanOCTHVb08+hG b8+BBr5w+qYPadx0JTLWumnw7wT2RxB0weDOIAfO2/Or2rdlahtAxuraC8+l0MUmvHvv VJmw== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=collabora.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id a70si26085049pge.556.2019.04.15.07.05.58; Mon, 15 Apr 2019 07:06:15 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=collabora.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727544AbfDOOEX (ORCPT + 99 others); Mon, 15 Apr 2019 10:04:23 -0400 Received: from bhuna.collabora.co.uk ([46.235.227.227]:45474 "EHLO bhuna.collabora.co.uk" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727261AbfDOOEX (ORCPT ); Mon, 15 Apr 2019 10:04:23 -0400 Received: from [127.0.0.1] (localhost [127.0.0.1]) (Authenticated sender: eballetbo) with ESMTPSA id 903A7281628 Subject: Re: [PATCH v4 2/2] platform/chrome: wilco_ec: Add h1_gpio status to debugfs To: Nick Crews , bleung@chromium.org Cc: linux-kernel@vger.kernel.org, dlaurie@chromium.org, derat@google.com, groeck@google.com, dtor@google.com, sjg@chromium.org, alevkoy@chromium.org, keithshort@chromium.org References: <20190412181443.239166-1-ncrews@chromium.org> <20190412181443.239166-2-ncrews@chromium.org> From: Enric Balletbo i Serra Message-ID: Date: Mon, 15 Apr 2019 16:04:18 +0200 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.6.1 MIME-Version: 1.0 In-Reply-To: <20190412181443.239166-2-ncrews@chromium.org> Content-Type: text/plain; charset=utf-8 Content-Language: en-GB Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 12/4/19 20:14, Nick Crews wrote: > As part of Chrome OS's FAFT (Fully Automated Firmware Testing) > tests, we need to ensure that the H1 chip is properly setting > some GPIO lines. The h1_gpio attribute exposes the state > of the lines: > - ENTRY_TO_FACT_MODE in BIT(0) > - SPI_CHROME_SEL in BIT(1) > > There are two reasons that I am exposing this in debugfs, > and not as a GPIO: > 1. This is only useful for testing, so end users shouldn't ever > care about this. In fact, if it passes the tests, then the value of > h1_gpio will always be 2, so it would be really uninteresting for users. > 2. This GPIO is not connected to, controlled by, or really even related > to the AP. The GPIO runs between the EC and the H1 security chip. > > Changes in v4: > - Use "0x02x\n" instead of "02x\n" for format string > - Use DEFINE_DEBUGFS_ATTRIBUTE() > - Add documentation > Changes in v3: > - Fix documentation to correspond with formatting change in v2. > Changes in v2: > - Zero out the unused fields in the request. > - Format result as "%02x\n" instead of as a decimal. > > Signed-off-by: Nick Crews Applied for 5.2 Thanks