Received: by 2002:a05:6a10:a0d1:0:0:0:0 with SMTP id j17csp501556pxa; Wed, 12 Aug 2020 07:21:24 -0700 (PDT) X-Google-Smtp-Source: ABdhPJz4Ic9k9UVzoc0mj5G0Nk5wwZlbtnei5kfmBg1LiOuZmpvZdpPltt/i/Cld3i/JuuyB2C3o X-Received: by 2002:a50:c38b:: with SMTP id h11mr148001edf.308.1597242084359; Wed, 12 Aug 2020 07:21:24 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1597242084; cv=none; d=google.com; s=arc-20160816; b=zeBGPXe/ZeiwlpiJesyLX5oKVqj/XxJMSmp11Os+/vk+boss2TkCh/pl34KPhR+JP7 SVpCQ+BC3LF0Q3Z7xqAIGVEZXgmw/647wq32cA2zlkQi93zx8GlW+KK4D64SIDN5vYsU f6ARc45bOwlJABNjvPMxnop79UN89QzqCU96UxdwsywP7ypsfsVU3pvWABxmXdv5T1OQ r00559k8qy3Ru7HtssayodzmCZ5yniigEFerAHNRpITLjK4iZyTLaJVgmd672u6Ryvxj FTuZyGceCLgeC6IX86aeUo/0EzleQftVWbuly8lukibIlTc6KZC0cBwIGtJ6KmnaEUUL QnaQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:mime-version:message-id:date:subject:cc :to:from; bh=lazUE1tSq70GXVLOPXwBYVaDLQRYb+D0npphE/QROX8=; b=svSxvaVvDOzWvlQ02fpUVOfUdDswJ4kIWTI4kX/Ih6PwWibAYwrLpPmkmzWQ0SGP7p cfq1YRyipILLgtgxfHuJnflszqNCwV268LhCLVpp3nXp9qAKLmGzxBUnhU/Ivd84PiYp Nfcio5fuEN5AZz6kH3lhJ/ncPpiAN8oKzDQY9eT0C2CdWJvyNBFRRLsbKA7MaFCTL1m1 VzzuI7/R0F9B3u3G7N+wNug4EGTnKfJwKX91NEDmTLV1vlYuYtgCfubyl0svn1kjH9xm PjZ+eW6/u3U/MZNk58m+v+8/WYa3kdDOYumYmwfQO1AcisDT4ATUQz2DwYvDi+Ot0r8F 6EeA== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=analog.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id p16si1208197ejx.540.2020.08.12.07.21.00; Wed, 12 Aug 2020 07:21:24 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=analog.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726891AbgHLOUO (ORCPT + 99 others); Wed, 12 Aug 2020 10:20:14 -0400 Received: from mx0a-00128a01.pphosted.com ([148.163.135.77]:11692 "EHLO mx0a-00128a01.pphosted.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726485AbgHLOUK (ORCPT ); Wed, 12 Aug 2020 10:20:10 -0400 Received: from pps.filterd (m0167089.ppops.net [127.0.0.1]) by mx0a-00128a01.pphosted.com (8.16.0.42/8.16.0.42) with SMTP id 07CECJGZ020952; Wed, 12 Aug 2020 10:19:56 -0400 Received: from nwd2mta4.analog.com ([137.71.173.58]) by mx0a-00128a01.pphosted.com with ESMTP id 32sry4drt8-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Wed, 12 Aug 2020 10:19:56 -0400 Received: from SCSQMBX10.ad.analog.com (scsqmbx10.ad.analog.com [10.77.17.5]) by nwd2mta4.analog.com (8.14.7/8.14.7) with ESMTP id 07CEJsFZ003645 (version=TLSv1/SSLv3 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128 verify=FAIL); Wed, 12 Aug 2020 10:19:55 -0400 Received: from SCSQMBX10.ad.analog.com (10.77.17.5) by SCSQMBX10.ad.analog.com (10.77.17.5) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.1779.2; Wed, 12 Aug 2020 07:19:53 -0700 Received: from zeus.spd.analog.com (10.64.82.11) by SCSQMBX10.ad.analog.com (10.77.17.5) with Microsoft SMTP Server id 15.1.1779.2 via Frontend Transport; Wed, 12 Aug 2020 07:19:53 -0700 Received: from localhost.localdomain ([10.48.65.12]) by zeus.spd.analog.com (8.15.1/8.15.1) with ESMTP id 07CEJoSt020255; Wed, 12 Aug 2020 10:19:51 -0400 From: To: , , CC: , , Alexandru Tachici Subject: [PATCH v8 0/6] hwmon: pmbus: adm1266: add support Date: Wed, 12 Aug 2020 17:20:49 +0300 Message-ID: <20200812142055.9213-1-alexandru.tachici@analog.com> X-Mailer: git-send-email 2.17.1 MIME-Version: 1.0 Content-Type: text/plain X-ADIRoutedOnPrem: True X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10434:6.0.235,18.0.687 definitions=2020-08-12_06:2020-08-11,2020-08-12 signatures=0 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 mlxlogscore=999 mlxscore=0 lowpriorityscore=0 clxscore=1015 priorityscore=1501 adultscore=0 phishscore=0 suspectscore=0 impostorscore=0 malwarescore=0 spamscore=0 bulkscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2006250000 definitions=main-2008120101 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Alexandru Tachici Add PMBus probing driver for the adm1266 Cascadable Super Sequencer with Margin Control and Fault Recording. Driver is using the pmbus_core, creating sysfs files under hwmon for inputs: vh1->vh4 and vp1->vp13. 1. Add PMBus probing driver for inputs vh1->vh4 and vp1->vp13. 2. Add Block Write-Read Process Call command. A PMBus specific implementation was required because block write with I2C_SMBUS_PROC_CALL flag allows a maximum of 32 bytes to be received. 3. This makes adm1266 driver expose GPIOs to user-space. Currently are read only. Future developments on the firmware will allow them to be writable. 4. Allow the current sate of the sequencer to be read through debugfs. 5. Blackboxes are 64 bytes of chip state related data that is generated on faults. Use the nvmem kernel api to expose the blackbox chip functionality to userspace. 6. DT bindings for ADM1266. Alexandru Tachici (6): hwmon: pmbus: adm1266: add support hwmon: pmbus: adm1266: Add Block process call hwmon: pmbus: adm1266: Add support for GPIOs hwmon: pmbus: adm1266: add debugfs for states hwmon: pmbus: adm1266: read blackbox dt-bindings: hwmon: Add bindings for ADM1266 Changelog v7 -> v8: - removed firmware/config programming - in adm1266_pmbus_block_xfer unlock buf mutex on error paths - added "depends on GPIOLIB" in kconfig ("select GPIOLIB" triggers a recursive dependency error) - removed cell access check (only blackbox cell will be used) - removed #if IS_ENABLED(CONFIG_NVMEM) - dt-bindings: removed adi,master-adm1266 property .../bindings/hwmon/adi,adm1266.yaml | 51 ++ Documentation/hwmon/adm1266.rst | 37 ++ Documentation/hwmon/index.rst | 1 + drivers/hwmon/pmbus/Kconfig | 11 + drivers/hwmon/pmbus/Makefile | 1 + drivers/hwmon/pmbus/adm1266.c | 513 ++++++++++++++++++ 6 files changed, 614 insertions(+) create mode 100644 Documentation/devicetree/bindings/hwmon/adi,adm1266.yaml create mode 100644 Documentation/hwmon/adm1266.rst create mode 100644 drivers/hwmon/pmbus/adm1266.c -- 2.20.1