Received: by 2002:a05:6a10:22f:0:0:0:0 with SMTP id 15csp2470334pxk; Sun, 27 Sep 2020 08:50:25 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzX+fCm9bCFG0juXz3qOGvLeeTSltcwCUk4mjwzoZPd+QYkOZk0Fiiz/gZpSrYkz/btBR4e X-Received: by 2002:aa7:cd06:: with SMTP id b6mr11204997edw.196.1601221825107; Sun, 27 Sep 2020 08:50:25 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1601221825; cv=none; d=google.com; s=arc-20160816; b=0aO4S0ZIn8pyw9655LE93mh5xtlR6/eA9SWZ0Or1fgPsmjJo9vzTZx6ZBVife+32yt 97BgXGqosHqMxxzx1g/pB85A3x/qDbh//9WNOGaOUqCuB74FoJJW2Gu49VUJaqZOoFxA +Wq50ey+dZs2KQeVXN9ResKyyofgxEECqze5nccrfs2HApOYqH7oP23kzUjaFseV30r5 nAeY/jfjWcp/0cQWF+QE0VHUEhT/56074D3xsQghXcI8GgjKSbl9OdCOw0q45FwmKXzm ccyO3uTgP5yIM/S2at2fvlbvbizsAUtTZlxhEQVsfL/bZ+zjtQW8SBVNusYNmeFAeXfd TXoA== 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=kMOePL7SuunhCQJvUEzJENmJqI2ZT46rRLTR1oHruk0=; b=Dn40vSPvJ9DPdDQq7LvPyv9ebry61JJqmM2mR6Qp2x0WeM4xg63BrhFQWwnN0mAaX4 SdcyFS+Y/G5Y6p4gsws67vHC5VzSQPHDM0e5yhZzsKFB3/Kp7K8F3UhELo+vuaVTEJvo a3VBfyUsnq/JfkzyqsiPmgogo/wzC+aoSuM7w/k/d8NzcI3Ulk7hGnLxojbNRFI+8SXA yTRzLSO+Mb86UlVLliFjDvAFWj3W16BHgnUtLC/5rlvjzg47mgrMQBDBEE1L+5B3OFLY lYlLONLOGhpQ3Kp4dgY5NKVKhd/zGxD0FT/XQsht1tcFUTqWc+x3boECGYuBj6nWFHhT yZvg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@sartura-hr.20150623.gappssmtp.com header.s=20150623 header.b=ZTMmsNrK; 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 y22si6237453edo.147.2020.09.27.08.50.01; Sun, 27 Sep 2020 08:50:25 -0700 (PDT) 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=ZTMmsNrK; 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 S1726280AbgI0PtD (ORCPT + 99 others); Sun, 27 Sep 2020 11:49:03 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:56844 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726149AbgI0PtC (ORCPT ); Sun, 27 Sep 2020 11:49:02 -0400 Received: from mail-io1-xd43.google.com (mail-io1-xd43.google.com [IPv6:2607:f8b0:4864:20::d43]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 916E0C0613D3 for ; Sun, 27 Sep 2020 08:49:01 -0700 (PDT) Received: by mail-io1-xd43.google.com with SMTP id g7so8486903iov.13 for ; Sun, 27 Sep 2020 08:49:01 -0700 (PDT) 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=kMOePL7SuunhCQJvUEzJENmJqI2ZT46rRLTR1oHruk0=; b=ZTMmsNrKXqA5RsQNSpCRZDHhk9W97uuDmVabN2P9vN4e1WJs8BF/4ZjloizBFL+WkR msL1QgJLxWFzN6a/3hK1ckvb2SY8rwaM4i2obvKJ4cPUWSgCi2lYA3VXr/Oeomljz1Cl 01iXgXHM9C6QXBkysMMMA072Rq0HfH9SwBH6GxksToMnPySeABgE0Yq7futAwLLCbHSJ 63AAMEKr9H6fFRQsvrC7AAcv+31cuKciPJvCwb5Mz9nNzbfzzXtQ/C5cJEuAQCx8JDZ1 yH8rt2YF7WnOHmSIPuc2MJdY6zJjNx46UKhlbRLfEGkHIv7cFUfrk+uiUs2RAp8a3eGZ 8/4w== 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=kMOePL7SuunhCQJvUEzJENmJqI2ZT46rRLTR1oHruk0=; b=t1HM665bBGKjX+5IBhAaSkqE2dxdivhWLk6bSswR/Y8qBg4NMiCoL+UJbzZOxOfoAj XFRrPsV2vpTPbcaZuRf4f0B0v3dRWV87bsxw+o+SKL/QI6IxaRDRYwRAjzyqggaqmK/o p6Vk8I/LaWIfCSpNab9iK0lcsPfYyeAIb6mKiNCo6tTv49cQ9WDYwOLVZGnUPCXOONp/ Fqu1QZ/zqpK+N1+zzWA0U7xLD97eN9nIyI+C5IsyAAiLqZM1SO3CJlmoYgsXiHfq60gd DtHtNyz71BrAkpNXOLyCJKtf92OHUgZZLvq7Dwj+tTLXjaI31rMSwQR7uDEHMj5HICM0 kk4A== X-Gm-Message-State: AOAM532Z9Hcw9jc2M53DD/Us7JQKtNs8STO5bL55+odOh/e/3LhP3qop ZsRM3f7jklUO1wC1KYYv1ZmCwhEJuNfGTvF0taDxLw== X-Received: by 2002:a02:4b07:: with SMTP id q7mr6144862jaa.84.1601221740947; Sun, 27 Sep 2020 08:49:00 -0700 (PDT) MIME-Version: 1.0 References: <20200926135514.26189-1-luka.kovacic@sartura.hr> <20200926135514.26189-6-luka.kovacic@sartura.hr> <20200926202521.100d17f8@nic.cz> In-Reply-To: <20200926202521.100d17f8@nic.cz> From: Luka Kovacic Date: Sun, 27 Sep 2020 17:49:02 +0200 Message-ID: Subject: Re: [PATCH v2 5/7] Documentation/ABI: Add iei-wt61p803-puzzle driver sysfs interface documentation To: Marek Behun Cc: Linux Kernel Mailing List , linux-hwmon@vger.kernel.org, linux-arm Mailing List , Linux LED Subsystem , Lee Jones , Pavel Machek , Dan Murphy , Rob Herring , Jean Delvare , Guenter Roeck , Andrew Lunn , Jason Cooper , Gregory Clement , Luka Perkov , Robert Marko Content-Type: text/plain; charset="UTF-8" Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org I agree, I'll move this over to testing. These values are stored in the microcontroller EEPROM and can be modified. Some test units might be shipped with unpopulated MAC address and S/N values so I exposed this functionality to enable the user to use some internal value there. Kind regards, Luka On Sat, Sep 26, 2020 at 8:25 PM Marek Behun wrote: > > On Sat, 26 Sep 2020 15:55:12 +0200 > Luka Kovacic wrote: > > > Add the iei-wt61p803-puzzle driver sysfs interface documentation to allow > > monitoring and control of the microcontroller from user space. > > > > Signed-off-by: Luka Kovacic > > Cc: Luka Perkov > > Cc: Robert Marko > > --- > > .../stable/sysfs-driver-iei-wt61p803-puzzle | 65 +++++++++++++++++++ > > 1 file changed, 65 insertions(+) > > create mode 100644 Documentation/ABI/stable/sysfs-driver-iei-wt61p803-puzzle > > > > diff --git a/Documentation/ABI/stable/sysfs-driver-iei-wt61p803-puzzle b/Documentation/ABI/stable/sysfs-driver-iei-wt61p803-puzzle > > new file mode 100644 > > index 000000000000..36fca70d66ef > > --- /dev/null > > +++ b/Documentation/ABI/stable/sysfs-driver-iei-wt61p803-puzzle > > I think this should go to testing, not stable. It should go to stable > only after it is stable for some time. > > > @@ -0,0 +1,65 @@ > > +What: /sys/bus/serial/devices/.../iei_wt61p803_puzzle_core/mac_address_* > > +Date: September 2020 > > +Contact: Luka Kovacic > > +Description: Read the internal iEi WT61P803 PUZZLE MCU MAC address values. > > + These are factory assigned and can be changed. > > + > > +What: /sys/bus/serial/devices/.../iei_wt61p803_puzzle_core/serial_number > > +Date: September 2020 > > +Contact: Luka Kovacic > > +Description: Read the internal iEi WT61P803 PUZZLE MCU serial number. > > + This value is factory assigned and can be changed. > > + > > Please use (RO) and (RW) prefixes before the Description, instead of > writing "This value is read only", i.e.: > Description: (RO) Internal ... serial number. > > JFI: Why can these values be changed? Shouldn't they be burned into OTP? > > Marek > > > +What: /sys/bus/serial/devices/.../iei_wt61p803_puzzle_core/version > > +Date: September 2020 > > +Contact: Luka Kovacic > > +Description: Read the internal iEi WT61P803 PUZZLE MCU version. > > + This value is read only. > > + > > +What: /sys/bus/serial/devices/.../iei_wt61p803_puzzle_core/protocol_version > > +Date: September 2020 > > +Contact: Luka Kovacic > > +Description: Read the internal iEi WT61P803 PUZZLE MCU protocol version. > > + This value is read only. > > + > > +What: /sys/bus/serial/devices/.../iei_wt61p803_puzzle_core/power_loss_recovery > > +Date: September 2020 > > +Contact: Luka Kovacic > > +Description: Read the iEi WT61P803 PUZZLE MCU power loss recovery value. > > + This value is read write. > > + Value mapping: 0 - Always-On, 1 - Always-Off, 2 - Always-AC, 3 - Always-WA > > + > > +What: /sys/bus/serial/devices/.../iei_wt61p803_puzzle_core/bootloader_mode > > +Date: September 2020 > > +Contact: Luka Kovacic > > +Description: Read whether the MCU is in bootloader mode. > > + This value is read only. > > + > > +What: /sys/bus/serial/devices/.../iei_wt61p803_puzzle_core/power_status > > +Date: September 2020 > > +Contact: Luka Kovacic > > +Description: Read the iEi WT61P803 PUZZLE MCU power status. Power status indicates > > + the power on method. > > + This value is read only. > > + 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 > > + > > +What: /sys/bus/serial/devices/.../iei_wt61p803_puzzle_core/build_info > > +Date: September 2020 > > +Contact: Luka Kovacic > > +Description: Read the iEi WT61P803 PUZZLE MCU firmware build date. > > + This value is read only. > > + Format: yyyy/mm/dd hh:mm > > + > > +What: /sys/bus/serial/devices/.../iei_wt61p803_puzzle_core/ac_recovery_status > > +Date: September 2020 > > +Contact: Luka Kovacic > > +Description: Read the iEi WT61P803 PUZZLE MCU AC recovery status. > > + This value is read only. >