Received: by 10.213.65.68 with SMTP id h4csp1282851imn; Wed, 14 Mar 2018 15:33:36 -0700 (PDT) X-Google-Smtp-Source: AG47ELsjZFGyZT1YJG7DVHacDk7hE9lZKCu3qM6xrc7LPyefam9F5GSG1BlyWmlsVR2cFxy0mypj X-Received: by 2002:a17:902:9009:: with SMTP id a9-v6mr5439109plp.272.1521066816103; Wed, 14 Mar 2018 15:33:36 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1521066816; cv=none; d=google.com; s=arc-20160816; b=iD37Xa/c+z6UslCDzt8nr2iKpssyqZdViB/QM/alKwFPOoDtpv/hPuYMLiJSB+tZct sKiFvymgzay3Jcuo9mJm8bsH+t4GhHXiJnm3RZRRgrq9DzVoEfTGZ5qmriBwk/CmI398 FE1t2x6eT0sl4WzLWK3gRFfLWsfjwJ1xkFqTfgnuioLEyIxpJfwsfHhHObkcIE0LWWUg yAXVCQV4oNM5cbCJLNuZvQ9cWpvbkrFwqT7iAo5mzWlsBPFt8Isvm7/iqsIIjXKrGVaA wEf3HdOR5ZXXaZIFPOn7WeeDJDEff5NPGcNdIDgqwrSxr0mtkCwSA/jehbgL431tmZBH Z6WQ== 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=gBC8Z3fji6Ng+mWVYEFZvCEM4C0AXusMnhPlLL/OZSw=; b=sLNMUxsdqYdnIveb73nt3wbPGoKIFEJX3oLcVttRi80MFdf2GgfhNKJ8pxnbwD4PyN sY1Y11KbgmIba633veHUfLAdNiWl/kuLIo0rwU6ZwWSN7Rjhv9PoagGENJPo/TQX0SUf Enm0dxPMrPyRttOs0r7XHFuJfdXOHLaCPWlDjD5fBYdGKr2ymsSUInfipcHTJ+/82Ita RlrzAeOTxO1aMbfx/V1oqpyWHTKH2KnyKdf+YX3a08amEv2jTDHSoubuzQ0gXo2BhXG9 6NE5oErWH60mOYtVJ3/78tXsRGUF8KLF8hNuJ6diash4yju9QZbN7UESpDdc+6p288nh iS0w== 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 n18si2788765pfj.58.2018.03.14.15.33.19; Wed, 14 Mar 2018 15:33:36 -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 S1751599AbeCNWcX (ORCPT + 99 others); Wed, 14 Mar 2018 18:32:23 -0400 Received: from mx0b-001b2d01.pphosted.com ([148.163.158.5]:60990 "EHLO mx0a-001b2d01.pphosted.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1750779AbeCNWcW (ORCPT ); Wed, 14 Mar 2018 18:32:22 -0400 Received: from pps.filterd (m0098420.ppops.net [127.0.0.1]) by mx0b-001b2d01.pphosted.com (8.16.0.22/8.16.0.22) with SMTP id w2EMULCC109195 for ; Wed, 14 Mar 2018 18:32:21 -0400 Received: from e18.ny.us.ibm.com (e18.ny.us.ibm.com [129.33.205.208]) by mx0b-001b2d01.pphosted.com with ESMTP id 2gq88psp9j-1 (version=TLSv1.2 cipher=AES256-SHA256 bits=256 verify=NOT) for ; Wed, 14 Mar 2018 18:32:21 -0400 Received: from localhost by e18.ny.us.ibm.com with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted for from ; Wed, 14 Mar 2018 18:32:20 -0400 Received: from b01cxnp23033.gho.pok.ibm.com (9.57.198.28) by e18.ny.us.ibm.com (146.89.104.205) with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted; Wed, 14 Mar 2018 18:32:17 -0400 Received: from b01ledav005.gho.pok.ibm.com (b01ledav005.gho.pok.ibm.com [9.57.199.110]) by b01cxnp23033.gho.pok.ibm.com (8.14.9/8.14.9/NCO v10.0) with ESMTP id w2EMWHwY54263932; Wed, 14 Mar 2018 22:32:17 GMT Received: from b01ledav005.gho.pok.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 59CE1AE03C; Wed, 14 Mar 2018 18:33:47 -0400 (EDT) Received: from talon7.ibm.com (unknown [9.41.241.240]) by b01ledav005.gho.pok.ibm.com (Postfix) with ESMTP id C3602AE034; Wed, 14 Mar 2018 18:33:46 -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, andy.shevchenko@gmail.com, Eddie James Subject: [PATCH v4 0/2] hwmon: (ucd9000) Add gpio and debugfs interfaces Date: Wed, 14 Mar 2018 17:32:12 -0500 X-Mailer: git-send-email 1.8.3.1 X-TM-AS-GCONF: 00 x-cbid: 18031422-0044-0000-0000-000003F398E8 X-IBM-SpamModules-Scores: X-IBM-SpamModules-Versions: BY=3.00008675; HX=3.00000241; KW=3.00000007; PH=3.00000004; SC=3.00000254; SDB=6.01003107; UDB=6.00510473; IPR=6.00782437; MB=3.00020038; MTD=3.00000008; XFM=3.00000015; UTC=2018-03-14 22:32:19 X-IBM-AV-DETECTION: SAVI=unused REMOTE=unused XFE=unused x-cbparentid: 18031422-0045-0000-0000-0000082399F9 Message-Id: <1521066734-7985-1-git-send-email-eajames@linux.vnet.ibm.com> X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10432:,, definitions=2018-03-14_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-1803140240 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 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 | 354 +++++++++++++++++++++++++++++++++++++++++- 1 file changed, 353 insertions(+), 1 deletion(-) -- 1.8.3.1