Received: by 2002:ac0:a5b6:0:0:0:0:0 with SMTP id m51-v6csp3048850imm; Sun, 17 Jun 2018 09:54:18 -0700 (PDT) X-Google-Smtp-Source: ADUXVKJ23V/ecm3D8w4VAlhu4d/kK3mXu+Dc1cqmKUsjFuYbaltJxmNOGPrOJBOJmNKRzSukY2tl X-Received: by 2002:a17:902:1029:: with SMTP id b38-v6mr10548274pla.277.1529254458562; Sun, 17 Jun 2018 09:54:18 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1529254458; cv=none; d=google.com; s=arc-20160816; b=pHYShIAGPd/6348lPy+GP+CZ8cd8TILkx/3KvnkOCPxuhDeYBpE3IkrzAPfXkHl/J+ AIHFh6ac01XSqOYHHJkMxgtTODUtApTslfLtbnL2oKtl/RhbRZOKB4pButiUUtKAmOB1 OKuG/qMLyO9pkJwk0OJhaPM6W1Z7b741GxudjxwVeFgATCdvnpeItNs0zGSxRD3PXnbH omUQvmt96eh4ir8hncAgSHcxZ51cLKPK4Zb/RGbRx0WxDm3kzpdSY59IO+qVJYoL1ere CLtuDoqUomiWDYPXazsIYYLBGNM9QpLcc0vHAy34sFY5muUGp66v3keoYTIkZmgdYvpp 7Zzw== 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 :content-language:in-reply-to:mime-version:user-agent:date :message-id:from:references:cc:to:subject:dkim-signature :arc-authentication-results; bh=3grIIalnNEa4wifl/c2uHQTse8l0gDLiMfKpCvxDyA0=; b=zdaSoyzeJbaus5c+GT+cFnekdOzqi8bPZrA47oXxAe19twT5yApL3VfSeb5zGCaV92 nZK6J2/k6Me2NhjEQUnLgPfVFhUCald9T2FGXxtsuLIUTBvGPsC/9Nx02MpbLRsiHcGR 0YeVSI/XXWM6aXd9L0fBhOrQ65/8C9KbV+7VzzY4dznIFC/K3WgRMz1WDsVOESK64Y6/ Mv0JvsAVh0a+tpNoqMPHadZqx4bDHNNHILmjZYang3PRymET3E+7hLTOioZ+X8sR5MNB 8LUj8jx0kCMRFxG0Pz1ES/yU5oRJ8upK+3osIp8GafhAlfI+uwWnYz87TI+lXFSAYZyO BCUw== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@infradead.org header.s=bombadil.20170209 header.b=ol2vbKxj; 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 w15-v6si12722070plp.7.2018.06.17.09.54.04; Sun, 17 Jun 2018 09:54:18 -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=ol2vbKxj; 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 S934504AbeFQQwZ (ORCPT + 99 others); Sun, 17 Jun 2018 12:52:25 -0400 Received: from bombadil.infradead.org ([198.137.202.133]:47926 "EHLO bombadil.infradead.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S934108AbeFQQwX (ORCPT ); Sun, 17 Jun 2018 12:52:23 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=bombadil.20170209; h=Content-Transfer-Encoding: Content-Type:In-Reply-To:MIME-Version:Date:Message-ID:From:References:Cc:To: Subject:Sender:Reply-To: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=3grIIalnNEa4wifl/c2uHQTse8l0gDLiMfKpCvxDyA0=; b=ol2vbKxjH/aKPr17a48UzT7HH iz9fGSKZtjdlA7Iz5ZP5sxPwncXSUkZ14ZnDbIFxlen4KWvZk8gR8sw6P2zQXBedxv7al2cbeuNpa lASmNZwBtcmjhHsH8SnizPSkqHBXuPd6L2JpBtr/arK0Ebwbhz8jqtX0rSX5Ye1yor54hk6K11Dil kuABEDzKEibSQy+G7Gv+8YsDaZwqEFjpNGfWyKa/LKasVMGcJfPbZdWXWhc/3vhuueZU600RJH2Pr d3L9cByAwtYJzfaGNDPofhbByZGU9AxtgW85Vq53D9f4kVe3FvG98iuYTmRZQFoRPSpOqcu06TaLK MiBEsbDKA==; Received: from static-50-53-52-16.bvtn.or.frontiernet.net ([50.53.52.16] helo=midway.dunlab) by bombadil.infradead.org with esmtpsa (Exim 4.90_1 #2 (Red Hat Linux)) id 1fUauZ-0003Yn-3z; Sun, 17 Jun 2018 16:52:19 +0000 Subject: Re: [PATCH v6 6/8] platform/mellanox: Introduce support for Mellanox register access driver To: Vadim Pasternak , 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 References: <1529254615-88124-1-git-send-email-vadimp@mellanox.com> From: Randy Dunlap Message-ID: Date: Sun, 17 Jun 2018 09:52:16 -0700 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.8.0 MIME-Version: 1.0 In-Reply-To: <1529254615-88124-1-git-send-email-vadimp@mellanox.com> Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 06/17/2018 09:56 AM, Vadim Pasternak wrote: > --- > drivers/platform/mellanox/Kconfig | 11 ++ > drivers/platform/mellanox/Makefile | 1 + > drivers/platform/mellanox/mlxreg-io.c | 245 ++++++++++++++++++++++++++++++++++ > 3 files changed, 257 insertions(+) > create mode 100644 drivers/platform/mellanox/mlxreg-io.c Hi, > 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 through > + are defined per system type bases and includes the registers related and include the > + to system resets operation, system reset causes monitoring and some > + kinds of mux selection. > + > endif # MELLANOX_PLATFORM -- ~Randy