Received: by 10.223.176.46 with SMTP id f43csp1002550wra; Wed, 24 Jan 2018 09:06:10 -0800 (PST) X-Google-Smtp-Source: AH8x227fIQEXsrMAGqHop0+6otg/DuYMCnxPN2FAPRTMJX8WZi5f8WWe2KJmI6SD+eA2nsM0eOES X-Received: by 2002:a17:902:6a81:: with SMTP id n1-v6mr8853548plk.11.1516813570802; Wed, 24 Jan 2018 09:06:10 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1516813570; cv=none; d=google.com; s=arc-20160816; b=Z3mpQOyqiimpUvoKKT0h443kCIFm/nglwuteLWWJmCRU+R7O/J5mtOa+7djHNP/Et6 i2evziT3HQysY6k1KVPZoXkVeosWZzY9/z4/yA4RrWW1sIH7GGik7kqN0vYQeKxwUqRt 7cvLe2mUbzAE8EHb23bCtDh2YskGwLqIL+4/WvtgD8cFX+CFYx+mDHwDfrtknCaC8FP8 c7k7gYqBq7R/wrdlemwOXI8O9+kNM6YUjKH/UPH6wCom5FVeKMIx3pWNzcQK4k2AVvTm 6520XNgw6kg11atKtaOALXcoCRoXH/yX42YJebC73i54zCR3qcuuxbscyyLZd8TAST9H hnrQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:mime-version:content-transfer-encoding :spamdiagnosticmetadata:spamdiagnosticoutput:content-language :accept-language:in-reply-to:references:message-id:date:thread-index :thread-topic:subject:cc:to:from:dkim-signature :arc-authentication-results; bh=XL1PyY0aCl1CqOszHnQjnt+PU6vMiUFAU+/n5BUtWxM=; b=m6Jzs0WF4uHJTzGxh9BC7adaRtpigHDM3PmsMSuHirU146oxjPlYxEuR/VEMSnAXke wNzaMLeSZTkBC+m3+uExJo9zX7r70e4etZP2k8Mljkma5fb0hJJ/wqA1iwd+/BmjV4AM xIIjzNvFKv8Q5HOtw9YgM4W+Dcrkgq5EWRY9CbeEmo+VGperpGefyGgt65FuOWRCik/7 EWeLrUSKH13WFj7GvmH1VmnUfpuW/z2t00jxdL37mltGGhU778/p1OjZYh5I7SO0wZI/ 2K6az1yhJ0NHQfZdoC6S605R/zl1+r05LfoIsXOoJ5x6pHftBs+LaqrnQ5+G0oKjTgEL lhpA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@Mellanox.com header.s=selector1 header.b=YIJQYkaA; 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=pass (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 y138si3107829pfc.365.2018.01.24.09.05.38; Wed, 24 Jan 2018 09:06:10 -0800 (PST) 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=pass header.i=@Mellanox.com header.s=selector1 header.b=YIJQYkaA; 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=pass (p=NONE sp=NONE dis=NONE) header.from=mellanox.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S964869AbeAXRFJ (ORCPT + 99 others); Wed, 24 Jan 2018 12:05:09 -0500 Received: from mail-eopbgr60070.outbound.protection.outlook.com ([40.107.6.70]:26759 "EHLO EUR01-DB5-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S964820AbeAXRFE (ORCPT ); Wed, 24 Jan 2018 12:05:04 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=Mellanox.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version; bh=XL1PyY0aCl1CqOszHnQjnt+PU6vMiUFAU+/n5BUtWxM=; b=YIJQYkaA+1mal7o0vMn7LPPsukuKeyUzkaIJ5zAMD497m2Lapwq9tH/L2XwJW2RJoI/+UrSLysCt6TNKBLP9lsOZIDVrOHfJQYHK2R2idRlOHoY61zCZI610c0ZYvwtxOk1YvCi4DU7EbBZwDzAL/yEcNITdlJGQHTj1PYmzU7U= Received: from VI1PR05MB3341.eurprd05.prod.outlook.com (10.170.238.142) by VI1PR05MB1101.eurprd05.prod.outlook.com (10.162.11.22) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384_P256) id 15.20.428.17; Wed, 24 Jan 2018 17:05:00 +0000 Received: from VI1PR05MB3341.eurprd05.prod.outlook.com ([fe80::ed1b:fd08:7a78:369]) by VI1PR05MB3341.eurprd05.prod.outlook.com ([fe80::ed1b:fd08:7a78:369%13]) with mapi id 15.20.0428.019; Wed, 24 Jan 2018 17:05:00 +0000 From: Vadim Pasternak To: Darren Hart CC: "andy.shevchenko@gmail.com" , "gregkh@linuxfoundation.org" , "linux-kernel@vger.kernel.org" , "platform-driver-x86@vger.kernel.org" , "jiri@resnulli.us" Subject: RE: [patch v10 4/6] platform/mellanox: mlxreg-hotplug: Modify to use a regmap interface Thread-Topic: [patch v10 4/6] platform/mellanox: mlxreg-hotplug: Modify to use a regmap interface Thread-Index: AQHTlHldkudUE+blp0KEh05WSPjBg6OCElyAgAEfgQA= Date: Wed, 24 Jan 2018 17:05:00 +0000 Message-ID: References: <1516739665-132304-1-git-send-email-vadimp@mellanox.com> <1516739665-132304-4-git-send-email-vadimp@mellanox.com> <20180123225817.GB16464@fury> In-Reply-To: <20180123225817.GB16464@fury> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: authentication-results: spf=none (sender IP is ) smtp.mailfrom=vadimp@mellanox.com; x-originating-ip: [193.47.165.251] x-ms-publictraffictype: Email x-microsoft-exchange-diagnostics: 1;VI1PR05MB1101;7:9ZBpa6o0tVKEKHNodnRAKgZcnSBAjNYqk+/L84kFhg0uG816Auk1i1w7v81C7Vcxt/RJnJmW9k8z6NUaAu5dR1YC56Lk43SzuWq5WHfnXNgnRMvKKzqOF7wZnSLh0WIFC6OOEjKYWDbKvQhjUC8ZQbky9tro8vuMqehRfyMc6nf+U0gBAzoP1cZ9Gg5owLwGqmoKz8HfwdX8OhtY4ijCj3S08Chjjl3LUH1XySZ/6Oa5ZYMp468usC5cnZZ8YWlj x-ms-exchange-antispam-srfa-diagnostics: SSOS; x-ms-office365-filtering-ht: Tenant x-ms-office365-filtering-correlation-id: d7e7550d-0679-47d3-c6d7-08d5634c9a73 x-microsoft-antispam: UriScan:;BCL:0;PCL:0;RULEID:(7020095)(4652020)(48565401081)(4534165)(4627221)(201703031133081)(201702281549075)(5600026)(4604075)(3008032)(2017052603307)(7153060)(7193020);SRVR:VI1PR05MB1101; x-ms-traffictypediagnostic: VI1PR05MB1101: x-microsoft-antispam-prvs: x-exchange-antispam-report-test: UriScan:(166708455590820)(9452136761055)(85827821059158); x-exchange-antispam-report-cfa-test: BCL:0;PCL:0;RULEID:(6040501)(2401047)(8121501046)(5005006)(3002001)(10201501046)(93006095)(93001095)(3231023)(2400081)(944501161)(6055026)(6041288)(20161123558120)(20161123564045)(201703131423095)(201702281528075)(20161123555045)(201703061421075)(201703061406153)(20161123560045)(20161123562045)(6072148)(201708071742011);SRVR:VI1PR05MB1101;BCL:0;PCL:0;RULEID:;SRVR:VI1PR05MB1101; x-forefront-prvs: 056297E276 x-forefront-antispam-report: SFV:NSPM;SFS:(10009020)(396003)(346002)(39380400002)(376002)(366004)(39860400002)(199004)(189003)(13464003)(55016002)(5890100001)(66066001)(26005)(2950100002)(81156014)(6916009)(6246003)(105586002)(7696005)(8676002)(76176011)(5250100002)(4326008)(14454004)(99286004)(6436002)(966005)(9686003)(316002)(86362001)(8936002)(3660700001)(59450400001)(33656002)(53546011)(3846002)(3280700002)(2906002)(305945005)(74316002)(102836004)(6116002)(6306002)(39060400002)(68736007)(5660300001)(106356001)(25786009)(478600001)(2900100001)(7736002)(54906003)(53936002)(6506007)(97736004)(81166006)(229853002);DIR:OUT;SFP:1101;SCL:1;SRVR:VI1PR05MB1101;H:VI1PR05MB3341.eurprd05.prod.outlook.com;FPR:;SPF:None;PTR:InfoNoRecords;A:1;MX:1;LANG:en; received-spf: None (protection.outlook.com: mellanox.com does not designate permitted sender hosts) x-microsoft-antispam-message-info: tzE68v6sgobsDwIwtGJxo9Ousp3LpL1+6bPZBan6NTyfuWis+9DPdSLrgnWOkYpXRX3BtA5Y+EbX6pUSUTT/nw== spamdiagnosticoutput: 1:99 spamdiagnosticmetadata: NSPM Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-OriginatorOrg: Mellanox.com X-MS-Exchange-CrossTenant-Network-Message-Id: d7e7550d-0679-47d3-c6d7-08d5634c9a73 X-MS-Exchange-CrossTenant-originalarrivaltime: 24 Jan 2018 17:05:00.1955 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: a652971c-7d2e-4d9b-a6a4-d149256f461b X-MS-Exchange-Transport-CrossTenantHeadersStamped: VI1PR05MB1101 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org > -----Original Message----- > From: Darren Hart [mailto:dvhart@infradead.org] > Sent: Wednesday, January 24, 2018 12:58 AM > To: Vadim Pasternak > Cc: andy.shevchenko@gmail.com; gregkh@linuxfoundation.org; linux- > kernel@vger.kernel.org; platform-driver-x86@vger.kernel.org; jiri@resnull= i.us > Subject: Re: [patch v10 4/6] platform/mellanox: mlxreg-hotplug: Modify to= use a > regmap interface >=20 > On Tue, Jan 23, 2018 at 08:34:23PM +0000, Vadim Pasternak wrote: > > Restructure mlxreg header for unification of hotplug item definitions. > > > > Unify hotplug items to allow any kind of item (power controller, fan > > eeprom, psu eeprom, asic health) in common way. > > > > Use a hardware independent regmap interface, enabling the support of > > hotplug events over programmable devices attached to different bus > > types, such as I2C, LPC, or SPI. Add a device node to the > > mlxreg_core_data structure. > > > > Signed-off-by: Vadim Pasternak > > Acked-by: Andy Shevchenko > > --- > > v10->v9: > > Fixes provided by Vadim: > > - add missed description of pdev_hotplug for struct mlxplat_priv; >=20 > I didn't see this in the diff from my version to this one. >=20 > > - remove struct mlxplat_mlxcpld_regmap_context, which contains only > > the field with base address. Instead obtain locally defined base > > address by devm_ioport_map in mlxplat_init and pass it to > > devm_regmap_init; > > - modify mlxplat_mlxcpld_reg_read/write to use directly pointer to > > context; >=20 > Also adds incorrect conversion of tabs to spaces in at least 3 locations = ... >=20 > I had also corrected various typos and the copyright statement, as well a= s > reworked the commit messages. So at this point, I'd rather see these as c= hanges > on top of what I have cleaned up. >=20 > Please compare what you have here with: > https://github.com/dvhart/linux-pdx86/tree/review-dvhart-mellanox-v10 >=20 > And send me any changes strictly on top of that. Hi Darren, I'll send you four patches on top review-dvhart-mellanox-v10. There are - Patch to simplify IO access to regmap context. - Register map configuration extension with IO access verification callbacks. - Adding check for negative adapter number value in hotplug; - Adding validation of return code of mlxreg_hotplug_device_create. This is instead of what have been removed in "FIXME:" But there were two Kbuild issues with these two patches: [4/9] FIXME platform/mellanox: Remove redundant dev_err messages on device_= create [6/8] platform/mellanox: mlxreg-hotplug: Modify to use a regmap interface This is because of incorrect order of patches: FIXME platform/mellanox uses filed nr which replaces field bus in Rename-i2c-bus-to-nr. 0003-FIXME-platform-mellanox-Remove-redundant-dev_err-mes.patch=20 0004-platform-mellanox-Group-create-destroy-with-attribut.patch 0005-platform-mellanox-Rename-i2c-bus-to-nr.patch So, I'll resend the above three patches marked v11 "re-ordered". If it's not good I'll redo it according to your input. >=20 > Are you anticipating any additional changes beyond those in this version? >=20 Additionally, after we are done with this series, I'd like to add: - several new systems to mlx-platform; - new module to mellanox folder with sysfs access to some special registers= , like resets and reset causes registers (mlxreg-io); - make configuration and activation of mlxreg-io in mlx-patfrom; And later, after I am done with upstream work with leds-mlxreg driver, I'd like to add configuration and activation of this driver in mlx-patform as w= ell. Thanks, Vadim. > -- > Darren Hart > VMware Open Source Technology Center