Received: by 10.213.65.68 with SMTP id h4csp645751imn; Fri, 16 Mar 2018 14:24:38 -0700 (PDT) X-Google-Smtp-Source: AG47ELviX1PU9zl5XwuL6FEphj0RThYxdS5P/sug1Wbf/vf6GUdfhTAVTOxzReZ8foahDIWU5+vB X-Received: by 2002:a17:902:724b:: with SMTP id c11-v6mr3704553pll.352.1521235478812; Fri, 16 Mar 2018 14:24:38 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1521235478; cv=none; d=google.com; s=arc-20160816; b=hPC6fK8o6mPZGyKf+yPjwkM/8lO6mv6kfS8DA+umrw2/1vCqqaqeeKsAthe9KdwJAu 3kUwXqmbFoSS1OZZ1wOchRhIe4S79zo4/6XkVXdNGoz9P5L7ywPUVrr2jy2SjZ2MlrNY Ieo/VkgInkx/KI5KnFA54JcEE0QOsOP1UKSkXy9f2PCW3osP+uB8886Tis01p0RrjpX4 CfRGqxsuJVLeLF5k6QqCa5doQdKDG2/8gbk7seSZHwfFke54Co0y153SyeOTQIblB/kY cRu4yacC3iNvWTW0BFcZDhsowV/Tv4IySE09ryV5gUDEwzG3eMFEyayz2gqE0L9lhAw5 p3Ag== 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=foRx4dHOGpDEZXYf8qQAKxjVQRuyJ0zMWvNd5A5obew=; b=JFz3t0Xd2hKcuZY6uvo2wtQsoBfX2O4oxUSTyQfq9SL+3chzeHEooqo/L4R+PfUf0s LrOVXhHpq9O6LpLt0jPwS48AkNVRET9BdomwXF+8qfewW+xQbj1Z16XrYnVpg586NjGr /AFf4eRPCYR5gb2jHXY9+9HjjNOqdUZViEnsi8QbfpxLE3v3Vq+wHHuQW2KZck0dM9DT xEGYNDBRsLQXwWVxkZpEyGZ54/XcrM1R67xqbN6eAfvRMUBFoyevv4Np1x4gP9e9VBAt gYKTr6NOs8MrhpTRmes19TmmdEaelX2kbD75LbqlcdUe/WhF9WMIaNdseyQQODerhKbx XIrQ== 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 k22-v6si6854479pls.182.2018.03.16.14.24.24; Fri, 16 Mar 2018 14:24:38 -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; 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 S1751567AbeCPVWP (ORCPT + 99 others); Fri, 16 Mar 2018 17:22:15 -0400 Received: from mx0b-001b2d01.pphosted.com ([148.163.158.5]:47168 "EHLO mx0a-001b2d01.pphosted.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1750921AbeCPVWM (ORCPT ); Fri, 16 Mar 2018 17:22:12 -0400 Received: from pps.filterd (m0098413.ppops.net [127.0.0.1]) by mx0b-001b2d01.pphosted.com (8.16.0.22/8.16.0.22) with SMTP id w2GLJb5B144892 for ; Fri, 16 Mar 2018 17:22:12 -0400 Received: from e16.ny.us.ibm.com (e16.ny.us.ibm.com [129.33.205.206]) by mx0b-001b2d01.pphosted.com with ESMTP id 2grhkg1axb-1 (version=TLSv1.2 cipher=AES256-SHA256 bits=256 verify=NOT) for ; Fri, 16 Mar 2018 17:22:11 -0400 Received: from localhost by e16.ny.us.ibm.com with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted for from ; Fri, 16 Mar 2018 17:22:11 -0400 Received: from b01cxnp23034.gho.pok.ibm.com (9.57.198.29) by e16.ny.us.ibm.com (146.89.104.203) with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted; Fri, 16 Mar 2018 17:22:09 -0400 Received: from b01ledav004.gho.pok.ibm.com (b01ledav004.gho.pok.ibm.com [9.57.199.109]) by b01cxnp23034.gho.pok.ibm.com (8.14.9/8.14.9/NCO v10.0) with ESMTP id w2GLM8Ex47054886; Fri, 16 Mar 2018 21:22:08 GMT Received: from b01ledav004.gho.pok.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id A61DC112051; Fri, 16 Mar 2018 17:20:48 -0400 (EDT) Received: from talon7.ibm.com (unknown [9.80.236.173]) by b01ledav004.gho.pok.ibm.com (Postfix) with ESMTP id 1432A112056; Fri, 16 Mar 2018 17:20:48 -0400 (EDT) From: Eddie James To: linux-hwmon@vger.kernel.org Cc: linux-kernel@vger.kernel.org, jdelvare@suse.com, linux@roeck-us.net, joel@jms.id.au, Eddie James Subject: [PATCH v7 0/2] hwmon: (ucd9000) Add gpio and debugfs interfaces Date: Fri, 16 Mar 2018 16:22:04 -0500 X-Mailer: git-send-email 1.8.3.1 X-TM-AS-GCONF: 00 x-cbid: 18031621-0024-0000-0000-00000337ECFB X-IBM-SpamModules-Scores: X-IBM-SpamModules-Versions: BY=3.00008686; HX=3.00000241; KW=3.00000007; PH=3.00000004; SC=3.00000254; SDB=6.01004043; UDB=6.00511029; IPR=6.00783332; MB=3.00020079; MTD=3.00000008; XFM=3.00000015; UTC=2018-03-16 21:22:10 X-IBM-AV-DETECTION: SAVI=unused REMOTE=unused XFE=unused x-cbparentid: 18031621-0025-0000-0000-00004759D622 Message-Id: <1521235326-24310-1-git-send-email-eajames@linux.vnet.ibm.com> X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10432:,, definitions=2018-03-16_13:,, 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-1803160250 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org The ucd9000 series chips have gpio pins. Add a gpio chip interface to the ucd device so that users can query and set the state of the gpio pins. Add a debugfs interface using the existing pmbus debugfs directory to provide MFR_STATUS and the status of the gpi faults to users. Changes since v6: - don't return null terminator for mfr_status Changes since v5: - enclose gpio code in #ifdef GPIOLIB - don't initialize buffers for mfr_status; set last char to 0 instead - cap the size argument to bin2hex Changes since v4: - max-sized buffers for smbus transfers - used bin2hex instead of my own code Changes since v3: - remove setting of gpio_chip->owner - format the mfr_status data - switch to #ifdef rather than #if IS_ENABLED for debugfs Changes since v2: - split the gpio registration into it's own function Changes since v1: - dropped dev_err messages - made gpio chip registration conditional on having gpio pins - made mfr_status debugfs attribute more simple Christopher Bostic (2): hwmon: (ucd9000) Add gpio chip interface hwmon: (ucd9000) Add debugfs attributes to provide mfr_status drivers/hwmon/pmbus/ucd9000.c | 350 +++++++++++++++++++++++++++++++++++++++++- 1 file changed, 349 insertions(+), 1 deletion(-) -- 1.8.3.1