Received: by 2002:ac0:a5b6:0:0:0:0:0 with SMTP id m51-v6csp808235imm; Fri, 1 Jun 2018 09:53:38 -0700 (PDT) X-Google-Smtp-Source: ADUXVKLigX8u4yBBzyYIZdtZf4TvZGwLzZ9CGDANzmyMzZmfEOLjKaULWwSgEdYDik6g34TN4SQ5 X-Received: by 2002:a65:6190:: with SMTP id c16-v6mr5609212pgv.405.1527872018052; Fri, 01 Jun 2018 09:53:38 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1527872018; cv=none; d=google.com; s=arc-20160816; b=dXABLq1gkotm7wTDBl8ueal1rv8ShgsfmkGogMMHwWaFlPxarTvi4V5Lf7mNexDEAU mYWSr/SY00h0N0PtPSOS7qHZWoWNoFXBujw4UOyuaA8E+hjBcpesK8n6PyE+Gdbptke5 YDH6pPkSrM1pXpra31uggb3XL/4yxK+1gg42SQFUO9T9jWmz2sIiWcpqetYHKYk1/dg2 8Qz6/bBVg7FDZt+1q37AvhfPiYQi2KyjZzjkIt3j/V+TgBLBX754WYzRZD6Wfd9N8QLJ KVo2Gfikkx/GcXFkeKRHlEPceSskdqnU6zFAFoC/Fio8GXbxdhczKHhG+kcjxhClpOHu Uvlg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date:dkim-signature:arc-authentication-results; bh=9VWdozY2K1kCCfngKO+TQwthPJFaJpnKb0PusFI6A1M=; b=aPmUl4FQfQd4xVh5BW58LX8JfQdpTbSOYOQAt6WWWZUqVzYtVvnZ/dvn7hCRsx/j6s xj9s6TMPSKlCj/NkXXlfJgJPJ+DgkglAB8x8soDVd38x1QrcyUZ8g7OamEsKdAsWsdBW tSwR2+yFbhqzUs2Uf3cfebPOPsm/Q277tmG3yQJ5Qc3IFkr/I8vfoz3UzF2nOjvgnDSi iKZRYO6uXvomc4P5uFaC1+z1hW9HHviP+QUOnsCkVCa/b9nJJ1OkO3RmZiVbZfZ2Eu0Q ZCqJe2pun1BOhULY5hyk2V78LYycLBqySIRq8vdQPq68OJFGKVLGg5S6bb/xz2YmJzxc wuLA== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@infradead.org header.s=bombadil.20170209 header.b=l1oKweWF; 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id w25-v6si892411pgc.628.2018.06.01.09.53.23; Fri, 01 Jun 2018 09:53:38 -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=l1oKweWF; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752934AbeFAQw6 (ORCPT + 99 others); Fri, 1 Jun 2018 12:52:58 -0400 Received: from bombadil.infradead.org ([198.137.202.133]:47096 "EHLO bombadil.infradead.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752548AbeFAQw4 (ORCPT ); Fri, 1 Jun 2018 12:52:56 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=bombadil.20170209; h=In-Reply-To:Content-Type:MIME-Version :References:Message-ID:Subject:Cc:To:From:Date:Sender:Reply-To: Content-Transfer-Encoding:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Id: List-Help:List-Unsubscribe:List-Subscribe:List-Post:List-Owner:List-Archive; bh=9VWdozY2K1kCCfngKO+TQwthPJFaJpnKb0PusFI6A1M=; b=l1oKweWFEn7e0+HdI4pZNC3+y IqvfwfMFiQiNAq14vndoIbKU8oV2uD52XsB4LkNXm1vMriwPPxUaB8cw5jgzd4x2wmFqNvC0yCB/y HMx+l+wreIXNAYGhEd+CYSYVc9v51Yoa6KdOecUJnfRt5VnN3RDIOymguRYWZjG1APvtjNMVOE3Mz /k8CDTon2XJqNt4F6FkP4HK5+9SmepkXjKPK5phG1gdfc+b6uZV0J7xzYb0GqoD10IY8/L1NxrK4L GsfLeVfNbUEG/mKSfJhKS5Gu5N8kAG9k2obYQ54a5X5thI9g4R4FVZv8UlEYwpEysIxxvQM31DZl6 8nyCdnzDQ==; Received: from dvhart by bombadil.infradead.org with local (Exim 4.90_1 #2 (Red Hat Linux)) id 1fOnIL-0005Ag-GX; Fri, 01 Jun 2018 16:52:53 +0000 Date: Fri, 1 Jun 2018 09:52:47 -0700 From: Darren Hart To: Greg KH Cc: Vadim Pasternak , "andy.shevchenko@gmail.com" , "linux-kernel@vger.kernel.org" , "platform-driver-x86@vger.kernel.org" , "jiri@resnulli.us" , Michael Shych , "ivecera@redhat.com" Subject: Re: [PATCH v3 6/7] platform/mellanox: Introduce support for Mellanox register access driver Message-ID: <20180601165247.GB3599@localhost.localdomain> References: <1527439664-127317-1-git-send-email-vadimp@mellanox.com> <20180527151347.GA15487@kroah.com> <20180527153445.GA11051@kroah.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20180527153445.GA11051@kroah.com> User-Agent: Mutt/1.9.1 (2017-09-22) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Sun, May 27, 2018 at 05:34:45PM +0200, Greg Kroah-Hartman wrote: > On Sun, May 27, 2018 at 03:22:06PM +0000, Vadim Pasternak wrote: > > > > > > > -----Original Message----- > > > From: Greg KH [mailto:gregkh@linuxfoundation.org] > > > Sent: Sunday, May 27, 2018 6:14 PM > > > To: Vadim Pasternak > > > Cc: dvhart@infradead.org; andy.shevchenko@gmail.com; linux- > > > kernel@vger.kernel.org; platform-driver-x86@vger.kernel.org; jiri@resnulli.us; > > > Michael Shych ; ivecera@redhat.com > > > Subject: Re: [PATCH v3 6/7] platform/mellanox: Introduce support for Mellanox > > > register access driver > > > > > > On Sun, May 27, 2018 at 04:47:43PM +0000, Vadim Pasternak wrote: > > > > Introduce new Mellanox platform driver to allow access to Mellanox > > > > programmable device register space trough sysfs interface. > > > > The driver purpose is to provide sysfs interface for user space for > > > > the registers essential for system control and monitoring. > > > > The sets of registers for sysfs access are supposed to be defined per > > > > system type bases and include the registers related to system resets > > > > operation, system reset causes monitoring and some kinds of mux selection. > > > > > > > > Signed-off-by: Vadim Pasternak > > > > --- > > > > v1->v2: > > > > Changed added by Vadim: > > > > - Change ---help--- to help in Kconfig, according to new > > > > requirements; > > > > v2->v3: > > > > Comments pointed out by Darren: > > > > - Remove conditional assignment per attribute mode type, because mode > > > > will guard against not permitted access. > > > > Verified by Vadim. > > > > --- > > > > drivers/platform/mellanox/Kconfig | 11 ++ > > > > drivers/platform/mellanox/Makefile | 1 + > > > > drivers/platform/mellanox/mlxreg-io.c | 203 > > > > ++++++++++++++++++++++++++++++++++ > > > > 3 files changed, 215 insertions(+) > > > > create mode 100644 drivers/platform/mellanox/mlxreg-io.c > > > > > > > > diff --git a/drivers/platform/mellanox/Kconfig > > > > b/drivers/platform/mellanox/Kconfig > > > > index 591bccd..ddfae9fc 100644 > > > > --- a/drivers/platform/mellanox/Kconfig > > > > +++ b/drivers/platform/mellanox/Kconfig > > > > @@ -23,4 +23,15 @@ config MLXREG_HOTPLUG > > > > This driver handles hot-plug events for the power suppliers, power > > > > cables and fans on the wide range Mellanox IB and Ethernet systems. > > > > > > > > +config MLXREG_IO > > > > + tristate "Mellanox platform register access driver support" > > > > + depends on REGMAP > > > > + depends on HWMON > > > > + help > > > > + This driver allows access to Mellanox programmable device register > > > > + space trough sysfs interface. The sets of registers for sysfs access > > > > + are defined per system type bases and includes the registers related > > > > + to system resets operation, system reset causes monitoring and some > > > > + kinds of mux selection. > > > > > > No Documentation/ABI/ entries for these new sysfs files? Not good :( > > > > > > > Thanks Greg for your comment. > > > > Should I call doc file like: > > Documentation/ABI/stable/sysfs-driver-mlxreg-io > > ? > > What ever matches the naming scheme for the driver, yes. Vadim, I'm happy to help out with the docs if you like. Will you be able to document this in a static way, or is this likely to change significantly from platform to platform? I ask because of the automated attribute creation in the code. -- Darren Hart VMware Open Source Technology Center