Received: by 10.223.164.202 with SMTP id h10csp4447819wrb; Mon, 20 Nov 2017 15:58:54 -0800 (PST) X-Google-Smtp-Source: AGs4zMb9QfV0g04iWes/NtgQG5zl9Pf2Ng6uGwnnqM+2SIvZebYiptMPwvz7zYg4GuA5uw8kVQbb X-Received: by 10.99.124.23 with SMTP id x23mr15036722pgc.189.1511222334850; Mon, 20 Nov 2017 15:58:54 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1511222334; cv=none; d=google.com; s=arc-20160816; b=bN3N7wwuJaEsIChyNVliFojCFxvyMN0EpSjgB0wy4G8uxI3D2YNvJ3RGLe1tBmY7Pe LbuMSyvch0qLyunZ9L0XG0tU96wldFta60OHtfqpstBwS6WHnczYpSiTL/jsJUP/ExLC KLrcuCbkCuMvr88lcHVzHRW34fQdAAAEGakIfbFlAD9YiVogHif6rrl6UK8GI5NliXX0 rRHdvlTf4yBg1BreJ3YYk7H5r3HJCUOVfHtQ6MzTva7TKvuE5qcxHj5Z6m1aiWwDuGzE RyjDf77929Q0sVNpRUsailDf4YYVcKCEEK3LXiMvxYC0yLwYyA+iTMcfSklPUWc+4GV/ wf2A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:message-id:date:subject:cc:to:from :arc-authentication-results; bh=k461eW3GiTD98NLzJ4SuKnARlvrfuEMmmHha7wWU/xU=; b=RGU9D1mE6uLgODivAPqMQevs5h1HhzQ0Ed2mFJ/trrn6X5cWW68fCkZf690qHV1LTa sGFLOJTpj7EmJBNLpEKHWRuTvmc4+/+pHBLeWXx2qjr4yaygyh+VWFceLed87OoRn8SZ WrCMIVM9ReLascFn9e/m7Kr0OlVYsw7Vt/ereMpAQiSoDy2pSebDKv7Q4j1NCQohgEDv byozOLm0nvPu1TkguQv239G/LFALcGPTJioLd59McAq8mmKA4VtJDqURR/RW9h2X+ihR qW4FWjR8jPsJB1a2DyOZBSt5X3Z3nRygQCrLXP8YicqzH8C3W8M1b1sJaxuQkH8uks/H MO3w== ARC-Authentication-Results: i=1; mx.google.com; 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=fail (p=NONE sp=NONE dis=NONE) header.from=ibm.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id k9si8117641pgo.763.2017.11.20.15.58.44; Mon, 20 Nov 2017 15:58:54 -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; 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=fail (p=NONE sp=NONE dis=NONE) header.from=ibm.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751863AbdKTXxv (ORCPT + 69 others); Mon, 20 Nov 2017 18:53:51 -0500 Received: from mx0a-001b2d01.pphosted.com ([148.163.156.1]:41822 "EHLO mx0a-001b2d01.pphosted.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751616AbdKTXxt (ORCPT ); Mon, 20 Nov 2017 18:53:49 -0500 Received: from pps.filterd (m0098404.ppops.net [127.0.0.1]) by mx0a-001b2d01.pphosted.com (8.16.0.21/8.16.0.21) with SMTP id vAKNqgp5016352 for ; 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 2ec79g4h6p-1 (version=TLSv1.2 cipher=AES256-SHA bits=256 verify=NOT) for ; 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 from ; 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 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" 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: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: "Edward A. James" 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 -- 1.8.3.1 From 1584611077088958265@xxx Mon Nov 20 18:34:45 +0000 2017 X-GM-THRID: 1584611077088958265 X-Gmail-Labels: Inbox,Category Forums,HistoricalUnread