Received: by 2002:a25:f815:0:0:0:0:0 with SMTP id u21csp594047ybd; Sat, 29 Jun 2019 03:37:31 -0700 (PDT) X-Google-Smtp-Source: APXvYqzbZ3eAK8zRblmRh4TH2F7L5tIrtNuyCj3NDH6sffXIWmCUHTcX5HJLh0ZQRkObLjoKsPDH X-Received: by 2002:a17:902:2ae8:: with SMTP id j95mr15598528plb.276.1561804651042; Sat, 29 Jun 2019 03:37:31 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1561804651; cv=none; d=google.com; s=arc-20160816; b=TMoPRKDfghxIbEcNwBG5oimzJXEkwnq9owO68oX9tvFWEJ/LGhaREOUe47DZR/SN8h 8/euqjEvmT8vKPfJnVStMxmDaFHvv3GvG8AlzD/AlC7gN/KhVh4NeRVXWOKtwToXcGNc xaxOqQLSRtKvxcZtmFZUXDVufnXjRnKXzsX4yzFwW7DlabsZwaa7+p9045cAS7lC0qxZ nMTFJxFrZ94VgMC2fdZu16NKOJLCqnzUr36NW7VoyLj8MpSdb0XC7kk09IRKNIpAFmZE xHsDFOeRDNSJAeGIod4OvxwKnmE8iXIqv/TnE63Wsxvj7lKyKcZYUBF0s0KirffAMCHy pBOg== 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:mime-version :message-id:date:subject:cc:to:from:dkim-signature; bh=0ZTqox4zKZHSfjynSHuFlYTUSFoi9akGLNFU/TMkLz8=; b=Wz6J6N8MKk70qwTF7+u0LQ6mrbIfKr1lZCNKJLVhhKwcF2gwKzB4b8PPP4lCFN1JTC xjfAqijQtDeJ8UDVhpR219vdqs0NtNntbjXxzT3LkmREtZ7RvA34ojjThEUqcqJG82FD PK1NO3gJ36cpckYn4WkH/QJw+2a3F9p6xoI6C6drwlbu573zFvep1CpaG8NF8+Cj8pNj SES+OOMnbjrijUYvOGLGctPWKiaDeRRUHD2OaHZFt8CCoRdnA4VQWdWvQShU5hjoJdCh OZJSj9bhaxsI6Af8KyhfwTSh3RfIwEW0Hn8KIdNzi/up8ZyjFtvCU+oEQyiiG0yn8YIc f8uw== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@infradead.org header.s=bombadil.20170209 header.b=RQlxVlV+; 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=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id b23si873736pjp.62.2019.06.29.03.37.14; Sat, 29 Jun 2019 03:37:31 -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; dkim=fail header.i=@infradead.org header.s=bombadil.20170209 header.b=RQlxVlV+; 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=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727043AbfF2Kgw (ORCPT + 99 others); Sat, 29 Jun 2019 06:36:52 -0400 Received: from bombadil.infradead.org ([198.137.202.133]:32870 "EHLO bombadil.infradead.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726839AbfF2Kgv (ORCPT ); Sat, 29 Jun 2019 06:36:51 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=bombadil.20170209; h=Sender:Content-Transfer-Encoding: MIME-Version:Message-Id:Date:Subject:Cc:To:From:Reply-To:Content-Type: Content-ID:Content-Description:Resent-Date:Resent-From:Resent-Sender: Resent-To:Resent-Cc:Resent-Message-ID:In-Reply-To:References:List-Id: List-Help:List-Unsubscribe:List-Subscribe:List-Post:List-Owner:List-Archive; bh=0ZTqox4zKZHSfjynSHuFlYTUSFoi9akGLNFU/TMkLz8=; b=RQlxVlV+vnKr+HuhHrN/9tY/e LN2f40ZNR3ZcpjZqJosL+P4ZU6Cjb2XOJS+kmPEIYk6v8Bqht+w+OY4ticHvGN0iEPOalUYhCxg7y NjZS2XKOdl/ooLSoW8OpjAkI+M3KyQWH87SZtL9l+5sO7gikQXoNtXgYubcJ4EWQ0inUfXVOu0NVj JSK0qvaCkfhtfYMBLLzxEphxuK7oNoXrdJMsjKH1/K8Qqb3hukK7ivA6mNoANbMK6neuonbgcKioq 3fJDY5S2+rUh2EC/55AmIJQz0Dp6kaPFe7D877eHgcP6OUm22xhSZ9KCjTe2NbN3AI17IUFAjeB/d s3yaUFznA==; Received: from [187.113.3.250] (helo=bombadil.infradead.org) by bombadil.infradead.org with esmtpsa (Exim 4.92 #3 (Red Hat Linux)) id 1hhAiv-0002ct-C2; Sat, 29 Jun 2019 10:36:49 +0000 Received: from mchehab by bombadil.infradead.org with local (Exim 4.92) (envelope-from ) id 1hhAit-0006kO-8P; Sat, 29 Jun 2019 07:36:47 -0300 From: Mauro Carvalho Chehab To: Linux Doc Mailing List Cc: Mauro Carvalho Chehab , Mauro Carvalho Chehab , linux-kernel@vger.kernel.org, Jonathan Corbet , Greg Kroah-Hartman , Randy Dunlap , "Rafael J. Wysocki" , Logan Gunthorpe , Asmaa Mnebhi , Corey Minyard , vadimp@mellanox.com Subject: [PATCH] docs: ipmb: place it at driver-api and convert to ReST Date: Sat, 29 Jun 2019 07:36:46 -0300 Message-Id: X-Mailer: git-send-email 2.21.0 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org No new doc should be added at the main Documentation/ directory. Instead, new docs should be added as ReST files, within the Kernel documentation body. Fixes: 51bd6f291583 ("Add support for IPMB driver") Signed-off-by: Mauro Carvalho Chehab --- Documentation/driver-api/index.rst | 1 + .../{IPMB.txt => driver-api/ipmb.rst} | 62 ++++++++++--------- 2 files changed, 33 insertions(+), 30 deletions(-) rename Documentation/{IPMB.txt => driver-api/ipmb.rst} (71%) diff --git a/Documentation/driver-api/index.rst b/Documentation/driver-api/index.rst index e33849b948c7..e49c34bf16c0 100644 --- a/Documentation/driver-api/index.rst +++ b/Documentation/driver-api/index.rst @@ -75,6 +75,7 @@ available subsections can be seen below. dell_rbu edid eisa + ipmb isa isapnp generic-counter diff --git a/Documentation/IPMB.txt b/Documentation/driver-api/ipmb.rst similarity index 71% rename from Documentation/IPMB.txt rename to Documentation/driver-api/ipmb.rst index cd20c9764705..3ec3baed84c4 100644 --- a/Documentation/IPMB.txt +++ b/Documentation/driver-api/ipmb.rst @@ -32,11 +32,11 @@ This driver works with the I2C driver and a userspace program such as OpenIPMI: 1) It is an I2C slave backend driver. So, it defines a callback -function to set the Satellite MC as an I2C slave. -This callback function handles the received IPMI requests. + function to set the Satellite MC as an I2C slave. + This callback function handles the received IPMI requests. 2) It defines the read and write functions to enable a user -space program (such as OpenIPMI) to communicate with the kernel. + space program (such as OpenIPMI) to communicate with the kernel. Load the IPMB driver @@ -48,34 +48,35 @@ CONFIG_IPMB_DEVICE_INTERFACE=y 1) If you want the driver to be loaded at boot time: -a) Add this entry to your ACPI table, under the appropriate SMBus: +a) Add this entry to your ACPI table, under the appropriate SMBus:: -Device (SMB0) // Example SMBus host controller -{ - Name (_HID, "") // Vendor-Specific HID - Name (_UID, 0) // Unique ID of particular host controller - : - : - Device (IPMB) - { - Name (_HID, "IPMB0001") // IPMB device interface - Name (_UID, 0) // Unique device identifier - } -} + Device (SMB0) // Example SMBus host controller + { + Name (_HID, "") // Vendor-Specific HID + Name (_UID, 0) // Unique ID of particular host controller + : + : + Device (IPMB) + { + Name (_HID, "IPMB0001") // IPMB device interface + Name (_UID, 0) // Unique device identifier + } + } -b) Example for device tree: +b) Example for device tree:: -&i2c2 { - status = "okay"; + &i2c2 { + status = "okay"; - ipmb@10 { - compatible = "ipmb-dev"; - reg = <0x10>; - }; -}; + ipmb@10 { + compatible = "ipmb-dev"; + reg = <0x10>; + }; + }; -2) Manually from Linux: -modprobe ipmb-dev-int +2) Manually from Linux:: + + modprobe ipmb-dev-int Instantiate the device @@ -86,15 +87,16 @@ described in 'Documentation/i2c/instantiating-devices.rst'. If you have multiple BMCs, each connected to your Satellite MC via a different I2C bus, you can instantiate a device for each of those BMCs. + The name of the instantiated device contains the I2C bus number -associated with it as follows: +associated with it as follows:: -BMC1 ------ IPMB/I2C bus 1 ---------| /dev/ipmb-1 + BMC1 ------ IPMB/I2C bus 1 ---------| /dev/ipmb-1 Satellite MC -BMC1 ------ IPMB/I2C bus 2 ---------| /dev/ipmb-2 + BMC1 ------ IPMB/I2C bus 2 ---------| /dev/ipmb-2 For instance, you can instantiate the ipmb-dev-int device from -user space at the 7 bit address 0x10 on bus 2: +user space at the 7 bit address 0x10 on bus 2:: # echo ipmb-dev 0x1010 > /sys/bus/i2c/devices/i2c-2/new_device -- 2.21.0