Received: by 2002:ac0:a5b6:0:0:0:0:0 with SMTP id m51-v6csp756895imm; Tue, 5 Jun 2018 04:05:40 -0700 (PDT) X-Google-Smtp-Source: ADUXVKLsp7jB/hfx5Ia80pYPXubXqlIcmzYeoNf2Lu8ZooDQa20+uruVKp9k6yagT7ZMCG8q2Nig X-Received: by 2002:a63:3759:: with SMTP id g25-v6mr20918160pgn.59.1528196740318; Tue, 05 Jun 2018 04:05:40 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1528196740; cv=none; d=google.com; s=arc-20160816; b=X3ZDKZA+Su9ksxAQfnoeODcReuWc3HvMUBWbNS9B9jpTDwygmMZa9QUzpFUr3yNU1+ LXoJXe7BV8UlWrJNQTrp3KHd8X1fG9iW7cKS9A3/OoHr6UCtxVXNPlw13JMe8SfWSlVN ocTmSywMYe4ueM4ciifYCY87HC80uGDebChOMwDvORHOmlAJqWQ6jiXlbke8UEoU574W BiLR0DU1yG/qJ+GwUXMkv3bUBgqCKc3WM6w/Z0HIvC/8dbY37lhkpaU0X168hefWgUbj MytnN226A4HrJAHA+HkDXOs1daN+FrlyX20NPieqTYRGJMiMz5h4syV9+sVxVeOrmuW/ DxQw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:references:in-reply-to:message-id:date :subject:cc:to:from:arc-authentication-results; bh=HDR0YUXRNHH29foIuqAbJU8ercByUpmDjAddbr002ks=; b=NM7j2V0BVGE6TcIuU5RXNmMaHqLDo3/jT5FxOToPMhWfipGU0V/9oMwkfE54CZwDSE XVVtInegCUXCcsiAmq4YgLxWxIAx0ycutBcrpK2++7v8G6ig2/TlDhcPd6MObnEcoWyk LAKXRPINqi41RtlanoY7Xhg1kr+4Z/5pnOpug2stY6Ah4oFMNuik1mkfCdEIo9Je3PEJ v2KJbQLxhQFq0w4WrjXgGXTDFTMWcyduG382chK6h1/0KhpqgwLNJDJaP7YIGrwweeKR eJ3gnWG6lIB9agA1OHDZzQL1ucPrgW0A7AkbpaGsw036I+cuRXu2KIjU/hBfaOAMI9cL KSnw== 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=mellanox.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id r59-v6si47606241plb.314.2018.06.05.04.05.25; Tue, 05 Jun 2018 04:05:40 -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=mellanox.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751837AbeFELCo (ORCPT + 99 others); Tue, 5 Jun 2018 07:02:44 -0400 Received: from mail-il-dmz.mellanox.com ([193.47.165.129]:51235 "EHLO mellanox.co.il" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1751619AbeFELCl (ORCPT ); Tue, 5 Jun 2018 07:02:41 -0400 Received: from Internal Mail-Server by MTLPINE1 (envelope-from vadimp@mellanox.com) with ESMTPS (AES256-SHA encrypted); 5 Jun 2018 14:04:51 +0300 Received: from r-mgtswh-226.mtr.labs.mlnx. (r-mgtswh-226.mtr.labs.mlnx [10.209.1.51]) by labmailer.mlnx (8.13.8/8.13.8) with ESMTP id w55B2YsO019101; Tue, 5 Jun 2018 14:02:37 +0300 From: Vadim Pasternak To: dvhart@infradead.org, andy.shevchenko@gmail.com, gregkh@linuxfoundation.org Cc: linux-kernel@vger.kernel.org, platform-driver-x86@vger.kernel.org, jiri@resnulli.us, michaelsh@mellanox.com, ivecera@redhat.com, Vadim Pasternak Subject: [PATCH v5 8/8] Documentation/ABI: Add documentation mlxreg-io sysfs interfaces Date: Tue, 5 Jun 2018 12:58:21 +0000 Message-Id: <1528203501-129092-3-git-send-email-vadimp@mellanox.com> X-Mailer: git-send-email 2.1.4 In-Reply-To: <1528203501-129092-1-git-send-email-vadimp@mellanox.com> References: <1528203501-129092-1-git-send-email-vadimp@mellanox.com> Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Add documentation for mlxreg-io platform driver sysfs interfaces to allow user space access for system resets control, reset causes monitoring, programmable devices version reading and device selection control. Signed-off-by: Vadim Pasternak --- v4: Comments pointed out by Greg: Add Documentation/ABI/ entries for the new sysfs files. v4-v5: Comments pointed out by Darren: - Rename cause to reset. - Extend explanation in doc file. Changes added by Vadim: - Add two new attributes. - Re-arrange in alphabetic order after changes. - Change date from May to June. --- Documentation/ABI/stable/sysfs-driver-mlxreg-io | 77 +++++++++++++++++++++++++ 1 file changed, 77 insertions(+) create mode 100644 Documentation/ABI/stable/sysfs-driver-mlxreg-io diff --git a/Documentation/ABI/stable/sysfs-driver-mlxreg-io b/Documentation/ABI/stable/sysfs-driver-mlxreg-io new file mode 100644 index 0000000..7913a95 --- /dev/null +++ b/Documentation/ABI/stable/sysfs-driver-mlxreg-io @@ -0,0 +1,77 @@ +What: /sys/devices/platform/mlxplat/mlxreg-io/hwmon/hwmon*/ + asic_health + +Date: June 2018 +KernelVersion: 4.18 +Contact: Vadim Pasternak +Description: This file shows ASIC health status. The possible values are: + 0 - health failed, 2 - health OK, 3 - ASIC in booting state. + + The files are read only. + +What: /sys/devices/platform/mlxplat/mlxreg-io/hwmon/hwmon*/ + cpld1_version + cpld2_version + +Date: June 2018 +KernelVersion: 4.18 +Contact: Vadim Pasternak +Description: These files show with which CPLD versions have been burned + on carrier and switch boards. + + The files are read only. + +What: /sys/devices/platform/mlxplat/mlxreg-io/hwmon/hwmon*/select_iio +Date: June 2018 +KernelVersion: 4.18 +Contact: Vadim Pasternak +Description: This file allows iio devices selection. + + Attribute select_iio can be written with 0 or with 1. It + selects which one of iio devices can be accessed. + + The file is read/write. + +What: /sys/devices/platform/mlxplat/mlxreg-io/hwmon/hwmon*/psu1_on + /sys/devices/platform/mlxplat/mlxreg-io/hwmon/hwmon*/psu2_on + /sys/devices/platform/mlxplat/mlxreg-io/hwmon/hwmon*/pwr_cycle + /sys/devices/platform/mlxplat/mlxreg-io/hwmon/hwmon*/pwr_down +Date: June 2018 +KernelVersion: 4.18 +Contact: Vadim Pasternak +Description: These files allow asserting system power cycling, switching + power supply units on and off and system's main power domain + shutdown. + Expected behavior: + When pwr_cycle is written 1: auxiliary power domain will go + down and after short period (about 1 second) up. + When psu1_on or psu2_on is written 1, related unit will be + disconnected from the power source, when written 0 - connected. + If both are written 1 - power supplies main power domain will + go down. + When pwr_down is written 1, system's main power domain will go + down. + + The files are write only. + +What: /sys/devices/platform/mlxplat/mlxreg-io/hwmon/hwmon*/ + reset_aux_pwr_or_ref + reset_asic_thermal + reset_hotswap_or_wd + reset_fw_reset + reset_long_pb + reset_main_pwr_fail + reset_short_pb + reset_sw_reset +Date: June 2018 +KernelVersion: 4.18 +Contact: Vadim Pasternak +Description: These files show the system reset cause, as following: power + auxiliary outage or power refresh, ASIC thermal shutdown, + hotswap or watchdog, firmware reset, long press power button, + short press power button, software reset. Value 1 in file means + this is reset cause, 0 - otherwise. Only one of the above + causes could be 1 at the same time, representing only last + reset cause. + + The files are read only. -- 2.1.4