Received: by 2002:a25:8b12:0:0:0:0:0 with SMTP id i18csp2135729ybl; Sun, 18 Aug 2019 19:21:25 -0700 (PDT) X-Google-Smtp-Source: APXvYqxenhGjLuvyLiHPTJFV6CMQu2WdK5sftW35Y9n8EsUQq9o0+/7qvs37XJS9wlTX5nzLglYH X-Received: by 2002:a17:90a:ac02:: with SMTP id o2mr18700376pjq.134.1566181285280; Sun, 18 Aug 2019 19:21:25 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1566181285; cv=none; d=google.com; s=arc-20160816; b=uw1+Z/NV9mn+MTgFDDS4WQH26QL32XLBJFvon82UV4rdXRf/giwilDomPBCyTus6j8 HcB2zNK+fZWf6h75QG65/4GNLXhTgk+DlswLZZawqLaciSFSFuPyOuwW5/zvhvCiCJTv j6RQWyJkjIaHts9f7wqXKlNeXJMnSEChSN/POQb6yHUElnbFuzeSifjb6BX8dbOGdFCf gBYcty7+HNc5FcXmuwuGrELxO8VNErFTF3djVZFeppm29R0pmVwmL+iKkXBHy72IB6sn g/UHwbS38JeGK5uMizhvedAP7XK5l/FZv+2q91wY3UbFXcTv14/zayPsB/ensdrCnAJk J5WA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:dkim-signature; bh=b7rnR1qd4xgOUxyyaF6IjQnLml5tXyZWdkBe61/XKs8=; b=rFLNAtUPkXnfxsqgNgkdsDZyuVctKhqx7Kxd1ayxJk0xJ3sPaEYRnPAnnbLH+MN8gE faxJt7Erx9FaHjE2uqMxvYPPE1He5vG5OmXzs4Ob4jmjZ2Oe6GX7Q8PygG2V2dWaEUMA eynfU+n5JyDJJpQCy9v/leFE/iENNnZaWQzDlrKYpyGK3upNeSpqU4yPjp/PXkQfksXY yO8F8OnfVS3RTBLrwwxeGXHBduYSG+qD3bMOqmmWtxtlEG0Knldo9i4NpH8BtbQJ2X/L Ash8N0GPnhXFEigBvI1i3o7aa50+tXQNCRL5raMct3qoQcsl2LlolJChIcT6Rg6gbEHX yyBw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@jms.id.au header.s=google header.b=ZfSBy0mA; 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 b19si6223224pjo.55.2019.08.18.19.21.10; Sun, 18 Aug 2019 19:21:25 -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=pass header.i=@jms.id.au header.s=google header.b=ZfSBy0mA; 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 S1726482AbfHSCUX (ORCPT + 99 others); Sun, 18 Aug 2019 22:20:23 -0400 Received: from mail-qt1-f194.google.com ([209.85.160.194]:43034 "EHLO mail-qt1-f194.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726028AbfHSCUX (ORCPT ); Sun, 18 Aug 2019 22:20:23 -0400 Received: by mail-qt1-f194.google.com with SMTP id b11so330375qtp.10; Sun, 18 Aug 2019 19:20:22 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=jms.id.au; s=google; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=b7rnR1qd4xgOUxyyaF6IjQnLml5tXyZWdkBe61/XKs8=; b=ZfSBy0mAR7LEIy8hyM1zGqml5g+qdngvkT5lgRQzobe8DZoZiyvOsHbDb4niMhGwPk DmVDkeIFtlyTEv8OZw8KneGVipNN4tY1Fkb6KDwQqloV43aVD3rLLppOikxeAWHkeGnh 3Fk+Bj8lsj8Oq4jL9OGuEGGy8Sg1gF8Ch/qdg= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=b7rnR1qd4xgOUxyyaF6IjQnLml5tXyZWdkBe61/XKs8=; b=Mf7zme+XL7L1gTK5TmZayWp3GLCZtFugxDhujDV1tFjgVyy3HKFan47Fvlcq0+Wcmt nIuYBPSy8CxK9SuFepJWnyhGan4MWrMad+Z3dM+ujAcXSEqM1u3pgC/8AkG3LNgFZnUV +pK5/tbB1gC/VCuuBMkbcAAp5P7cEG0/2ZIVzJIp5t/jqEYDLBK6tR7DDpzA/s77p+2L YTBGbHXB8+ia1DAN3onLqPDhH6rep7arICuZeKN5IkisPG/0mOE6bVtjZ7N9zs0u5vTE gcmDtpTf1qn2S9CjYyNsScjmZt8hQsYL0L2/xduhUGgVnJ3YuFIHz1GXf2H4Sb9oioDV eFpA== X-Gm-Message-State: APjAAAUePrc7jtHLZcIcxAbZ/W+3ud8Z/BdCaSRbvNlzuOmxeO776TFV a8l71thCiXSpN85BNiPi0/35oQoT6KUZ6/gopNsSpmpE X-Received: by 2002:ac8:46cc:: with SMTP id h12mr19146680qto.234.1566181222265; Sun, 18 Aug 2019 19:20:22 -0700 (PDT) MIME-Version: 1.0 References: <20190816101944.3586-1-wangzqbj@inspur.com> In-Reply-To: <20190816101944.3586-1-wangzqbj@inspur.com> From: Joel Stanley Date: Mon, 19 Aug 2019 02:20:10 +0000 Message-ID: Subject: Re: [PATCH v5 2/2] hwmon: pmbus: Add Inspur Power System power supply driver To: John Wang Cc: Jean Delvare , Guenter Roeck , Jonathan Corbet , linux-hwmon@vger.kernel.org, linux-doc@vger.kernel.org, Linux Kernel Mailing List , OpenBMC Maillist , duanzhijia01@inspur.com, Lei YU Content-Type: text/plain; charset="UTF-8" Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Fri, 16 Aug 2019 at 10:19, John Wang wrote: > > Add the driver to monitor Inspur Power System power supplies > with hwmon over pmbus. > > This driver adds sysfs attributes for additional power supply data, > including vendor, model, part_number, serial number, > firmware revision, hardware revision, and psu mode(active/standby). > > Signed-off-by: John Wang > +static const struct i2c_device_id ipsps_id[] = { > + { "inspur_ipsps1", 0 }, Convention would be to use "ipsps" here, instead of "vendor_device"? > + {} > +}; > +MODULE_DEVICE_TABLE(i2c, ipsps_id); > + > +static const struct of_device_id ipsps_of_match[] = { > + { .compatible = "inspur,ipsps1" }, > + {} > +}; > +MODULE_DEVICE_TABLE(of, ipsps_of_match); Do we need the of match table? I thought the match on the device name from the i2c table would be enough. I will defer to Guenter here though. Assuming the device tables are okay: Reviewed-by: Joel Stanley Cheers, Joel > + > +static struct i2c_driver ipsps_driver = { > + .driver = { > + .name = "inspur-ipsps", > + .of_match_table = ipsps_of_match, > + }, > + .probe = ipsps_probe, > + .remove = pmbus_do_remove, > + .id_table = ipsps_id, > +};