Received: by 2002:a05:6a10:16a7:0:0:0:0 with SMTP id gp39csp81058pxb; Mon, 2 Nov 2020 14:39:51 -0800 (PST) X-Google-Smtp-Source: ABdhPJzK5wKdvJpqmz83Y6ApE908uIuirv2tKmNrCb7KK7FAvIGDv6HjmE7OE5BOABQuURvez+/j X-Received: by 2002:a50:ab0e:: with SMTP id s14mr13220315edc.172.1604356791516; Mon, 02 Nov 2020 14:39:51 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1604356791; cv=none; d=google.com; s=arc-20160816; b=wclXXpCHJFZ9Fa4+42WblyCveNUaj4WZLwFXkkRqLMl9C5jzLADQA4YPcsk1XsSsYH OpKOEA5DC70Uiz+ai85yKjf11lo7BkZ5XCA4I2iI7EKfQCWFMbV6VDOcsrztg/vhHm33 QBTBPuUU/vP1ZFjU3vwJgn1NrsRzkCR2kaGrBORDb1CMh6sKGWJv/t/jqkCgR9WFaDyi 4DkEwwmavE5OEuL8vyfpCU0BIGhSl9b5BbnXRf4ICaV0zWx3gM/tu9bMSlnrR3wUJkNw SfD9Ntkx8rPpu/kk0PvqLY8a1SDN+6HQDafs8/Grgcb1ol89Dp+ockutXQaZ0D3Yss/k SOpg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:cc:to:subject:message-id:date:from:in-reply-to :references:mime-version:dkim-signature; bh=l5uJS/jEKGLUY7/54yb7PsXjkj4P5AmY3KEzFYsfwHE=; b=F4j7SVMWZV46jxanb57x7UH98OcgodjUJXpgJeUeVWeRGVMR1DAzgTt/jQLMJun1Yt 8zmiu/acEyw/7FXwg3gVQ/2fSbxX2gEpv0ndsT3x2E5irg5338jS0wYSRSo5f+6KgfPb LEO5s41Izedqp8LrDVLO97ycI6uQ0rE/CgwGMYOUHxmbkydsZZYuZKMH5rECPw6ZiKTE BGFcn+qk/PNoZ0DqmR6S+f6peg3yDVaiv5DS0pFpTBQQXn87nO5bG/n7vZCu2kAn55V+ Pg0xS3V+fvqdqlC+YKetGDEKk5+5SgoBef72b9ieiZ+NZLr3rOcJuflmVQpAwmxF3Q2z lzqw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@sartura-hr.20150623.gappssmtp.com header.s=20150623 header.b=n6SP1ZMb; 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id r3si6085980eda.352.2020.11.02.14.39.29; Mon, 02 Nov 2020 14:39:51 -0800 (PST) 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=@sartura-hr.20150623.gappssmtp.com header.s=20150623 header.b=n6SP1ZMb; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726570AbgKBWgw (ORCPT + 99 others); Mon, 2 Nov 2020 17:36:52 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:40638 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725807AbgKBWgv (ORCPT ); Mon, 2 Nov 2020 17:36:51 -0500 Received: from mail-il1-x144.google.com (mail-il1-x144.google.com [IPv6:2607:f8b0:4864:20::144]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 893C9C0617A6 for ; Mon, 2 Nov 2020 14:36:51 -0800 (PST) Received: by mail-il1-x144.google.com with SMTP id v18so14464863ilg.1 for ; Mon, 02 Nov 2020 14:36:51 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sartura-hr.20150623.gappssmtp.com; s=20150623; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=l5uJS/jEKGLUY7/54yb7PsXjkj4P5AmY3KEzFYsfwHE=; b=n6SP1ZMbkWoENlJDPiZ38Zcls5wfXCuU3IkRB7Xtq2Wp8wZHPQcxUvJSIZkszw4Jn7 o12UhWs69zVLd3cN1Az8bfLmqi3RLv5zGfKQ9JY/54iLiTr2Cb9cVvRQwts1P90eOXHm 0gdiC6U2wt/rGxcRuQE6OioCzZOtIbJDlWWH87qSyG9qU2JpEjrFmoUovx7eLVQ0tCt9 93W+hxDdSMJXhnuT8n62qY3ogMh+BxPSanvS2UoEa+rO2eorIxW/yzrtWszx6Gb9Ar6/ hV8bnN/akU4cFVnW6o+qLwYIs6lwmPmzv/CED8tOSn91Uvn8/RplY6TWm3cpuo20Uhgi NdIw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=l5uJS/jEKGLUY7/54yb7PsXjkj4P5AmY3KEzFYsfwHE=; b=bYwBaqLd0lDWiQJM8irWSVvw++7AS0bprl5ahIm0HDH/nguRKvvmY93pUxX3c9FOrG t7i0jw8XZW9D/tHI6YYaa/f1BUxwRbxEOh/R5TTTb25uOl76qDNCj4kAsPJB28nw7jiZ mUGt1CfK6KFIXXHy+BNeLFRI4ybvsaT+uleqcPXwaAQ1VVdVw2pu2jNR+b6BduEjbSe3 Fp2QdTcG4jMdiwt7qvvPylHdx+O1uzeaBo4WjF6M6VW+2d1r5KXxKocFcPzbQexu2Gkb EeMWQ2iQgfqQzeVuKIRSI+xOLP78xDn2gj3/ll/UTO+vSUwPck/Kw1ZJ1+I2YQ2crOrL i9+w== X-Gm-Message-State: AOAM5308N2PJYGylc2msyWfVl8xsGUm/2jXt6S/ICzTfYacwiNSAaaUU YjZXYq9A7XXZZ6MzxR7GD94uUgqvHwJ5NltZshUA2A== X-Received: by 2002:a92:41cf:: with SMTP id o198mr12656899ila.262.1604356610897; Mon, 02 Nov 2020 14:36:50 -0800 (PST) MIME-Version: 1.0 References: <20201025005916.64747-7-luka.kovacic@sartura.hr> <20201025005916.64747-6-luka.kovacic@sartura.hr> <20201025005916.64747-5-luka.kovacic@sartura.hr> <20201025005916.64747-4-luka.kovacic@sartura.hr> <20201025005916.64747-3-luka.kovacic@sartura.hr> <20201025005916.64747-2-luka.kovacic@sartura.hr> <20201025005916.64747-1-luka.kovacic@sartura.hr> <20201029180105.GD26053@duo.ucw.cz> <7821443b-ddbc-fc92-b990-14d116dda853@ti.com> In-Reply-To: <7821443b-ddbc-fc92-b990-14d116dda853@ti.com> From: Luka Kovacic Date: Mon, 2 Nov 2020 23:36:39 +0100 Message-ID: Subject: Re: [PATCH v7 0/6] Add support for the IEI WT61P803 PUZZLE MCU To: Dan Murphy Cc: Pavel Machek , Linux Kernel Mailing List , linux-hwmon@vger.kernel.org, Linux LED Subsystem , devicetree , Lee Jones , Rob Herring , Jean Delvare , Guenter Roeck , Marek Behun , Luka Perkov , Andy Shevchenko , Robert Marko Content-Type: text/plain; charset="UTF-8" Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hello, On Mon, Nov 2, 2020 at 7:30 PM Dan Murphy wrote: > > Hello > > On 11/1/20 3:56 AM, Luka Kovacic wrote: > > Hello Pavel, > > > > On Thu, Oct 29, 2020 at 7:01 PM Pavel Machek wrote: > >> Hi! > >> > >>> +What: /sys/bus/serial/devices/.../iei_wt61p803_puzzle_core/power_status > >>> +Date: September 2020 > >>> +Contact: Luka Kovacic > >>> +Description: (RO) Power status indicates the host platform power on method. > >>> + Value mapping (bitwise list): > >>> + 0x80 - Null > >>> + 0x40 - Firmware flag > >>> + 0x20 - Power loss detection flag (powered off) > >>> + 0x10 - Power loss detection flag (AC mode) > >>> + 0x08 - Button power on > >>> + 0x04 - WOL power on > >>> + 0x02 - RTC alarm power on > >>> + 0x01 - AC recover power on > >> It would be nice to put this into standard place somewhere. Many > >> machines will want to expose this information. > > As this is specific to this microcontroller and to how it encodes > > these values, I don't see a need to change this. > > This isn't used anywhere else. > > > >> If not, at least spell out WoL, as it is not that common of acronym. > > Okay. > > WoL is a very common acronym especially in the networking space By WOL I meant Wake-on-LAN, I will spell out the whole acronym. > > But the overall this section does not make sense > > The description says that it indicates platform power on method but what > is NULL power on? There are flags for power loss detection. I will clarify the value mapping and try to replicate some of these states so I can write a better description. > > Does the RTC mean that the processor real time clock woke up the uC? Or > that the internal RTC woke up the controller? These are all related to the platform as a whole. So the Marvell SoC and all of the required peripherals are turned on. > > And for the > /sys/bus/serial/devices/.../iei_wt61p803_puzzle_core/ac_recovery_status > what are those values? These values indicate whether the board has been shut down gracefully and whether it has been powered on automatically (when power came back) or by pressing the power button. I will also extend the documentation with the value mapping for this. > > It seems like some ABI's are documented well with formats and others are > just described without a format. > > For instance > > /sys/bus/serial/devices/.../iei_wt61p803_puzzle_core/version the format > of this version is not described but > /sys/bus/serial/devices/.../iei_wt61p803_puzzle_core/build_info is. I left out the version format descriptions as they are in the recognizable format and all of them are quite arbitrary (e.g. v1.000). > > > Dan > Kind regards, Luka