Received: by 10.213.65.68 with SMTP id h4csp25549imn; Thu, 15 Mar 2018 15:23:55 -0700 (PDT) X-Google-Smtp-Source: AG47ELt6e1HdGc/cVQPAfG7zCYpeKwrRvZ/aPuFzhNtbw1XhQyDPCU1JSMi0h5hlLjI3P4U5OeUz X-Received: by 10.98.86.15 with SMTP id k15mr9062304pfb.187.1521152635190; Thu, 15 Mar 2018 15:23:55 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1521152635; cv=none; d=google.com; s=arc-20160816; b=Qb4zJnKTyLt2RqDph8yqkO88uSEiF55yUYiQPG7/j0ET1t4ytyDR/pGYQWax74Ynr0 IeuhMyiasJLy0stPj3JLDFcz7+S8xSCJzkvF14X2pphuFnoevh5oGRVlTwuiqcxVo2op ik2LkZU12d+LuCFzahkvGuobalS+wTM/uwp8nwng8cCEX4PiPYxHPT+2xs/xnHfD+MpP TH9qu8IvJ+rd7tYNmynA+CzzUY2eW85gdOX33Bd4P4TkuQlOvXv+ecnbKy6CBa6MVN4o VtIACXvWpV5F8xg0/AArZCk19nxMMJHRW2J+gBaG/6fAwh3idhCK75tg3+JpItoxTsrA LFdA== 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=y2UMCMKckpM1frLJxP9/vLyhLt6Umi0XBlB0mZ/Z2yU=; b=nHEiDKG2taZQ3WXrivc8WEnl9fc/p7+KXx2nkkQ3jttvGCpHxOnkzZSB+PoL5tmqQh KtpYbRr02UywbE+uQR/phvnny3gk+nZC13+PoQtCi0SElCGY0GNHKsKWEPCT6+P7+z/m viX6GTJ8Y6x/iId6CT+HI2frRqcsdAwBy9lHi3xeSSo+pzkRaH7QtdGRPt9KhEXKvM16 6GJj+CLcnSf3AT/qxCRSuUyK04NHV+LW0oEME2e6vVyS9lfSuDRSO5JFmoRBCrGWseEU OgzulK/Vj5NZgWfFoG6HZQsMljk8x3o4F5Y4Y3IA2RR/UUmB5QC9pdm21KlPZbUFFiAf AfhA== 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 c15si4025773pgn.25.2018.03.15.15.23.39; Thu, 15 Mar 2018 15:23:55 -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 S932729AbeCOWWJ (ORCPT + 99 others); Thu, 15 Mar 2018 18:22:09 -0400 Received: from mx0b-001b2d01.pphosted.com ([148.163.158.5]:48448 "EHLO mx0a-001b2d01.pphosted.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S932686AbeCOWWE (ORCPT ); Thu, 15 Mar 2018 18:22:04 -0400 Received: from pps.filterd (m0098421.ppops.net [127.0.0.1]) by mx0a-001b2d01.pphosted.com (8.16.0.22/8.16.0.22) with SMTP id w2FMJNQa117055 for ; Thu, 15 Mar 2018 18:22:03 -0400 Received: from e19.ny.us.ibm.com (e19.ny.us.ibm.com [129.33.205.209]) by mx0a-001b2d01.pphosted.com with ESMTP id 2gqy945pw2-1 (version=TLSv1.2 cipher=AES256-SHA256 bits=256 verify=NOT) for ; Thu, 15 Mar 2018 18:22:03 -0400 Received: from localhost by e19.ny.us.ibm.com with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted for from ; Thu, 15 Mar 2018 18:22:02 -0400 Received: from b01cxnp23034.gho.pok.ibm.com (9.57.198.29) by e19.ny.us.ibm.com (146.89.104.206) with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted; Thu, 15 Mar 2018 18:21:58 -0400 Received: from b01ledav006.gho.pok.ibm.com (b01ledav006.gho.pok.ibm.com [9.57.199.111]) by b01cxnp23034.gho.pok.ibm.com (8.14.9/8.14.9/NCO v10.0) with ESMTP id w2FMLw7l41156666; Thu, 15 Mar 2018 22:21:58 GMT Received: from b01ledav006.gho.pok.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 5D399AC046; Thu, 15 Mar 2018 18:23:14 -0400 (EDT) Received: from talon7.ibm.com (unknown [9.41.241.240]) by b01ledav006.gho.pok.ibm.com (Postfix) with ESMTP id B5781AC041; Thu, 15 Mar 2018 18:23:13 -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 v5 0/2] hwmon: (ucd9000) Add gpio and debugfs interfaces Date: Thu, 15 Mar 2018 17:21:54 -0500 X-Mailer: git-send-email 1.8.3.1 X-TM-AS-GCONF: 00 x-cbid: 18031522-0056-0000-0000-0000042E5580 X-IBM-SpamModules-Scores: X-IBM-SpamModules-Versions: BY=3.00008681; HX=3.00000241; KW=3.00000007; PH=3.00000004; SC=3.00000254; SDB=6.01003583; UDB=6.00510758; IPR=6.00782910; MB=3.00020057; MTD=3.00000008; XFM=3.00000015; UTC=2018-03-15 22:22:00 X-IBM-AV-DETECTION: SAVI=unused REMOTE=unused XFE=unused x-cbparentid: 18031522-0057-0000-0000-00000870577A Message-Id: <1521152516-10829-1-git-send-email-eajames@linux.vnet.ibm.com> X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10432:,, definitions=2018-03-15_11:,, 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-1803150244 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 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 | 338 +++++++++++++++++++++++++++++++++++++++++- 1 file changed, 337 insertions(+), 1 deletion(-) -- 1.8.3.1