Message ID | 1511222021-562-1-git-send-email-eajames@linux.vnet.ibm.com |
---|---|
Headers | show
Return-Path: <devicetree-owner@vger.kernel.org> X-Original-To: incoming-dt@patchwork.ozlabs.org Delivered-To: patchwork-incoming-dt@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=none (mailfrom) smtp.mailfrom=vger.kernel.org (client-ip=209.132.180.67; helo=vger.kernel.org; envelope-from=devicetree-owner@vger.kernel.org; receiver=<UNKNOWN>) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by ozlabs.org (Postfix) with ESMTP id 3yglxw0CdNz9sRn for <incoming-dt@patchwork.ozlabs.org>; Tue, 21 Nov 2017 10:57:08 +1100 (AEDT) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751673AbdKTXxv (ORCPT <rfc822;incoming-dt@patchwork.ozlabs.org>); Mon, 20 Nov 2017 18:53:51 -0500 Received: from mx0b-001b2d01.pphosted.com ([148.163.158.5]:33154 "EHLO mx0a-001b2d01.pphosted.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1751629AbdKTXxt (ORCPT <rfc822; devicetree@vger.kernel.org>); Mon, 20 Nov 2017 18:53:49 -0500 Received: from pps.filterd (m0098417.ppops.net [127.0.0.1]) by mx0a-001b2d01.pphosted.com (8.16.0.21/8.16.0.21) with SMTP id vAKNnO1B012171 for <devicetree@vger.kernel.org>; Mon, 20 Nov 2017 18:53:49 -0500 Received: from e33.co.us.ibm.com (e33.co.us.ibm.com [32.97.110.151]) by mx0a-001b2d01.pphosted.com with ESMTP id 2ec4eg4q79-1 (version=TLSv1.2 cipher=AES256-SHA bits=256 verify=NOT) for <devicetree@vger.kernel.org>; Mon, 20 Nov 2017 18:53:48 -0500 Received: from localhost by e33.co.us.ibm.com with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted for <devicetree@vger.kernel.org> from <eajames@linux.vnet.ibm.com>; Mon, 20 Nov 2017 16:53:48 -0700 Received: from b03cxnp07028.gho.boulder.ibm.com (9.17.130.15) by e33.co.us.ibm.com (192.168.1.133) with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted; Mon, 20 Nov 2017 16:53:44 -0700 Received: from b03ledav005.gho.boulder.ibm.com (b03ledav005.gho.boulder.ibm.com [9.17.130.236]) by b03cxnp07028.gho.boulder.ibm.com (8.14.9/8.14.9/NCO v10.0) with ESMTP id vAKNrhu960031082; Mon, 20 Nov 2017 16:53:43 -0700 Received: from b03ledav005.gho.boulder.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 981A6BE038; Mon, 20 Nov 2017 16:53:43 -0700 (MST) Received: from oc3016140333.ibm.com (unknown [9.41.174.252]) by b03ledav005.gho.boulder.ibm.com (Postfix) with ESMTP id EEF8BBE040; Mon, 20 Nov 2017 16:53:42 -0700 (MST) From: Eddie James <eajames@linux.vnet.ibm.com> To: linux-kernel@vger.kernel.org Cc: linux-hwmon@vger.kernel.org, devicetree@vger.kernel.org, linux-doc@vger.kernel.org, linux@roeck-us.net, jdelvare@suse.com, corbet@lwn.net, mark.rutland@arm.com, robh+dt@kernel.org, joel@jms.id.au, eajames@linux.vnet.ibm.com, "Edward A. James" <eajames@us.ibm.com> Subject: [PATCH v3 00/12] hwmon: Add On-Chip Controller hwmon driver Date: Mon, 20 Nov 2017 17:53:29 -0600 X-Mailer: git-send-email 1.8.3.1 X-TM-AS-GCONF: 00 x-cbid: 17112023-0008-0000-0000-000008E71FE1 X-IBM-SpamModules-Scores: X-IBM-SpamModules-Versions: BY=3.00008101; HX=3.00000241; KW=3.00000007; PH=3.00000004; SC=3.00000240; SDB=6.00948826; UDB=6.00479139; IPR=6.00729107; BA=6.00005702; NDR=6.00000001; ZLA=6.00000005; ZF=6.00000009; ZB=6.00000000; ZP=6.00000000; ZH=6.00000000; ZU=6.00000002; MB=3.00018113; XFM=3.00000015; UTC=2017-11-20 23:53:47 X-IBM-AV-DETECTION: SAVI=unused REMOTE=unused XFE=unused x-cbparentid: 17112023-0009-0000-0000-000044D83BAE Message-Id: <1511222021-562-1-git-send-email-eajames@linux.vnet.ibm.com> X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10432:, , definitions=2017-11-20_12:, , signatures=0 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 priorityscore=1501 malwarescore=0 suspectscore=1 phishscore=0 bulkscore=0 spamscore=0 clxscore=1015 lowpriorityscore=0 impostorscore=0 adultscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.0.1-1709140000 definitions=main-1711200318 Sender: devicetree-owner@vger.kernel.org Precedence: bulk List-ID: <devicetree.vger.kernel.org> X-Mailing-List: devicetree@vger.kernel.org |
Series |
hwmon: Add On-Chip Controller hwmon driver
|
expand
|
From: "Edward A. James" <eajames@us.ibm.com> This series adds a hwmon driver to support the OCC on POWER8 and POWER9 processors. The OCC is an embedded processor that provides realtime power and thermal monitoring and management. This driver has two different platform drivers as a "base" for the hwmon interface, as the means of communicating with the OCC on P8 and P9 is completely different. For P8, the driver is an I2C client driver. For P9 the driver is an FSI-based OCC client driver, and uses the OCC driver in-kernel API. The OCC driver is on the LKML (latest https://lkml.org/lkml/2017/11/20/631). Changes since v2: * Add sysfs_notify for the error and throttling attributes when change is detected. * Removed occs_present counting of devices bound. * Improved remove() of P9 driver to avoid bad behavior with relation to OCC driver when unbound. * Added default cases (return EINVAL) for all sensor show functions. * Added temperature fault sensor. * Added back dt binding documentation for P9 to address checkpatch warning. * Added occs_present attribute from the poll response. Changes since v1: * Remove wait loop in P9 code, as that is now handled by FSI OCC driver. * Removed dt binding documentation for P9, FSI OCC driver will probe OCC hwmon driver automatically. * Moved OCC response code definitions to the OCC include file. * Fixed includes. * Changed some structure fields to __beXX as that is what they are. * Changed some errnos. * Removed some dev_err(). * Refactored P8 code a bit to use #defined addresses and magic values, and changed "goto retry" to a loop. * Refactored error handling a bit. Edward A. James (12): Documentation: hwmon: Add OCC documentation Documentation: ABI: Add occ-hwmon driver sysfs documentation dt-bindings: i2c: Add P8 OCC hwmon device documentation dt-bindings: fsi: Add P9 OCC hwmon device documentation hwmon (occ): Add On-Chip Controller (OCC) hwmon driver hwmon (occ): Add command transport method for P8 and P9 hwmon (occ): Parse OCC poll response hwmon (occ): Add sensor types and versions hwmon (occ): Add sensor attributes and register hwmon device hwmon (occ): Add non-hwmon attributes hwmon (occ): Add error handling hwmon (occ): Add sysfs notification for errors and throttling Documentation/ABI/testing/sysfs-driver-occ-hwmon | 85 ++ .../devicetree/bindings/fsi/ibm,p9-occ-hwmon.txt | 16 + .../devicetree/bindings/i2c/ibm,p8-occ-hwmon.txt | 25 + Documentation/hwmon/occ | 75 ++ drivers/hwmon/Kconfig | 2 + drivers/hwmon/Makefile | 1 + drivers/hwmon/occ/Kconfig | 28 + drivers/hwmon/occ/Makefile | 11 + drivers/hwmon/occ/common.c | 1387 ++++++++++++++++++++ drivers/hwmon/occ/common.h | 124 ++ drivers/hwmon/occ/p8_i2c.c | 262 ++++ drivers/hwmon/occ/p9_sbe.c | 161 +++ 12 files changed, 2177 insertions(+) create mode 100644 Documentation/ABI/testing/sysfs-driver-occ-hwmon create mode 100644 Documentation/devicetree/bindings/fsi/ibm,p9-occ-hwmon.txt create mode 100644 Documentation/devicetree/bindings/i2c/ibm,p8-occ-hwmon.txt create mode 100644 Documentation/hwmon/occ create mode 100644 drivers/hwmon/occ/Kconfig create mode 100644 drivers/hwmon/occ/Makefile create mode 100644 drivers/hwmon/occ/common.c create mode 100644 drivers/hwmon/occ/common.h create mode 100644 drivers/hwmon/occ/p8_i2c.c create mode 100644 drivers/hwmon/occ/p9_sbe.c