Received: by 2002:a25:ef43:0:0:0:0:0 with SMTP id w3csp527571ybm; Fri, 29 May 2020 06:10:36 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyKuvNxvFtm3XLyRDVNbuf3RZ6BATRSaI4xUCZrC70rzsRUU2C97r+LWSJwm6reGZUzUAG5 X-Received: by 2002:a05:6402:17e6:: with SMTP id t6mr7765171edy.243.1590757835884; Fri, 29 May 2020 06:10:35 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1590757835; cv=none; d=google.com; s=arc-20160816; b=iDTwNHVAgJg0Uyz1k9wNWuVDqfZT9VTlpJYKiw9Ye6hXR533sreE3eYgYw0XVsWJ89 fVlIvrv0/bK2ZHwfea4rRfbMsu32POl9/gmjzCTBOPf/8f0+227tfa0mXq2y365dIlMW yddUDUJbowHRW7Q817xLLhQLhmOH5/7ZCttj68NvnVdir4GkzalAplEUEHe8g6Cdqk+m VWznUZEv+33FcvR+94B44RUlfBu3EGnOubY/iGcKMAnRvQyKbqINa5+iwhaRkLBN7ntl QQG/4dsEz7PEEbxSeZyb4h885CsjSZTnh4Osu+THKTCpbF+9rYjs3o7CJrL661VAPKb3 D7Kg== 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=7kc+UntOznWSHwAp9fh10RspHd2n63H5V9RBALR1eQI=; b=GdGNzSfP5xJcX4TCw5gG/xMbCQz+2iKnNaOVorjPqZkimYKsDcFRMEVeYLEQEzll3i RACr7u6g3wipMa/LrsY33TnnTixbILZ9cHiVVLMGOscXFBbH+mXaXd74zCAKgzp/WnEb uxdT9H4uac6ZVVVroRxN4KyJZE1uG5+5QtGTKMu80wWjl7i5PfHW+dK0u6uhHLUjFgQC D+tRWpaI0QNLHQum899oy0VaZuA5yZ8q4siqmXsaf5aJ7VgHHCpySyD9ETByp1ZfIGBN hMkpZq6iu+9HuuPA6dFrDmmMKhFOLzSdbbdv1G1hg6cyY51DR/7v3cViDZHQrqhNLfxf kSVQ== 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id v5si5602849edy.511.2020.05.29.06.10.12; Fri, 29 May 2020 06:10:35 -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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727063AbgE2NGU (ORCPT + 99 others); Fri, 29 May 2020 09:06:20 -0400 Received: from mx0a-00128a01.pphosted.com ([148.163.135.77]:16754 "EHLO mx0a-00128a01.pphosted.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726629AbgE2NGR (ORCPT ); Fri, 29 May 2020 09:06:17 -0400 Received: from pps.filterd (m0167088.ppops.net [127.0.0.1]) by mx0a-00128a01.pphosted.com (8.16.0.42/8.16.0.42) with SMTP id 04TCxZMv028270; Fri, 29 May 2020 09:05:58 -0400 Received: from nwd2mta4.analog.com ([137.71.173.58]) by mx0a-00128a01.pphosted.com with ESMTP id 316wp8c20d-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Fri, 29 May 2020 09:05:58 -0400 Received: from SCSQMBX11.ad.analog.com (scsqmbx11.ad.analog.com [10.77.17.10]) by nwd2mta4.analog.com (8.14.7/8.14.7) with ESMTP id 04TD5u0X003709 (version=TLSv1/SSLv3 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128 verify=FAIL); Fri, 29 May 2020 09:05:57 -0400 Received: from SCSQCASHYB6.ad.analog.com (10.77.17.132) by SCSQMBX11.ad.analog.com (10.77.17.10) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.1779.2; Fri, 29 May 2020 06:05:55 -0700 Received: from SCSQMBX10.ad.analog.com (10.77.17.5) by SCSQCASHYB6.ad.analog.com (10.77.17.132) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.1779.2; Fri, 29 May 2020 06:05:13 -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; Fri, 29 May 2020 06:05:55 -0700 Received: from localhost.localdomain ([10.48.65.12]) by zeus.spd.analog.com (8.15.1/8.15.1) with ESMTP id 04TD5pKM026894; Fri, 29 May 2020 09:05:52 -0400 From: To: , , CC: , , Alexandru Tachici Subject: [PATCH v3 0/6] hwmon: pmbus: adm1266: add support Date: Fri, 29 May 2020 16:05:00 +0300 Message-ID: <20200529130506.73511-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.216,18.0.687 definitions=2020-05-29_07:2020-05-28,2020-05-29 signatures=0 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 suspectscore=0 bulkscore=0 phishscore=0 adultscore=0 mlxlogscore=999 impostorscore=0 clxscore=1011 malwarescore=0 mlxscore=0 lowpriorityscore=0 cotscore=-2147483648 spamscore=0 priorityscore=1501 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2004280000 definitions=main-2005290104 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 WR 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. Add debugfs files for go_command and read_state. 5. Blakcboxes 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. Device tree bindings for ADM1266. Alexandru Tachici (6): hwmon: pmbus: adm1266: add support hwmon: (pmbus/core) Add Block WR hwmon: pmbus: adm1266: Add support for GPIOs hwmon: pmbus: adm1266: add debugfs attr for states hwmon: pmbus: adm1266: read blackbox dt-bindings: hwmon: Add bindings for ADM1266 Changelog v2 -> v3: - added block write-read process call in pmbus-core - expose GPIOs/PDIOs to user-space as readonly - allow the user to issue commands to adm1266 in go_command debugfs file - allow the user to read state of the adm1266 sequencer from debugfs file read_state - chip generated blackboxes can now be read from the nvmem file .../bindings/hwmon/adi,adm1266.yaml | 56 ++ Documentation/hwmon/adm1266.rst | 35 ++ drivers/hwmon/pmbus/Kconfig | 11 +- drivers/hwmon/pmbus/Makefile | 1 + drivers/hwmon/pmbus/adm1266.c | 500 ++++++++++++++++++ drivers/hwmon/pmbus/pmbus.h | 4 + drivers/hwmon/pmbus/pmbus_core.c | 88 +++ 7 files changed, 694 insertions(+), 1 deletion(-) 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