From nobody Sun Feb 8 13:09:09 2026 Received: from mail-pl1-f178.google.com (mail-pl1-f178.google.com [209.85.214.178]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id DAB9030DD00 for ; Tue, 16 Dec 2025 09:16:31 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.214.178 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1765876593; cv=none; b=ShGWLE8lOfEIYiT0d3IwV/G5cf2epCsg1jSKaMv5DPA4u7EX5TuQ0eNxVmn5/JGwzFEc5QPcQJONMg+QmkEWejVbUU4ONOPywSoHwmvkR9mJQMMdrgUofQWVzLVTwD/I1dkLQ0o8T7T7eRwhFuqYVacpxvt8lrXCAzlSc9CD7hs= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1765876593; c=relaxed/simple; bh=nxihr4bM6SwoIuP74JqPO4CIieT/EQFFXuYBb7z27Jk=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: MIME-Version; b=jvK60rDjeu54mccFRJPciT2ZEYCLCPUf8vT9FZ28jRLjaRvbRnhu5EY+IcenJ0kAQtEtIaqIN63MPVhIDtmezTQ6CdbDPt1Tta5SnmTv52AJYmn3F1dCxYPeTZuSfuROyqjR79fEWalJVtxOhr4ITUlqfTtiID53HoNSG/2awf0= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com; spf=pass smtp.mailfrom=gmail.com; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b=NYD30+sd; arc=none smtp.client-ip=209.85.214.178 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=gmail.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="NYD30+sd" Received: by mail-pl1-f178.google.com with SMTP id d9443c01a7336-2a0b4320665so32846675ad.1 for ; Tue, 16 Dec 2025 01:16:31 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1765876591; x=1766481391; darn=vger.kernel.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=Ye8yEV1eGUuHWu7Z7vTP0U9+3pJnrq/4OhS7TgVXGKM=; b=NYD30+sdPGsC6Y4scON+QHFtrF0Fq0PQyblnO4O/78ls/7iesTdKjtSdT1XMm8uNBD rUC0/SIQa36VtHPq4DBrC9N306EDaYlZRfe3ycuKjamKcTxCOh4Rcudmm2ry87eYyT96 0Qg8bgGYI0z2EruKgi8kRyzdDRJZVLiSLzrAU19V6+SOLWga4RKMnK5Obtr51XYJtsVT OYbuBkO5KuhNDGvVJNnGJZTnDYkbfOE/EEZB9kh91ceXRFyNdcIIYwzDfaTovaVq3diZ 77clJgYuN10/8RE6VNWyPKRZSOJ0ClEnfLk6SO2GXYhP82N24nMCKPGYbyWdEFVRH9Hh HRfQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1765876591; x=1766481391; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-gg:x-gm-message-state:from :to:cc:subject:date:message-id:reply-to; bh=Ye8yEV1eGUuHWu7Z7vTP0U9+3pJnrq/4OhS7TgVXGKM=; b=Pnl12ST3KQ0s0ZqoU/g+4T5QZs4Wt4aeMSlVwew7pvhGsXDJ57hxRIB5ey9XWDeyaT G8ATSOkVzk3XA9INIxXtvaw2U4U250XW9lMqbun/oUEPi8y4AVj8p8EftX46lj1GAxvw ybK6mcj0GXLgKQ6/5/lqz5Fk2+Lic78Ao7z3MT96FZ99e5UzoiffN+mnuLOmDQgN2XyH 5HB5jQNYVn6vmPeF6zGV0sluyf0q/1ZFI9gRjtijR9RGe2oa1T+g3cMZpqMCwRrWLCE0 72l2IUEVOp/gAsqQxBvkylSueTaw2Zwpknw45fPUX10f/pRRB+fuOVBYzbbATgdeAiyd lWZQ== X-Forwarded-Encrypted: i=1; AJvYcCWa0wDHdAdeLbS44towqPjkqMrGFN4anpHR0m8ZASaDZFXyd3WNRDWuMm/NItr3iYnVuZGgluSzkONZA/k=@vger.kernel.org X-Gm-Message-State: AOJu0Yz1DWXZh+8tSSYrrUVYkTebmkivk5NphkKNaT8K4MnyZC3tE/ox 0Nhg79PUilCbWxA1raTDyCViCff7dml9Kd/l44o1C0DkIfsjru40Sy0I X-Gm-Gg: AY/fxX6bPE1ceuxf6t+37m4Z+K4uvVbxmDoqGu8nDuhKRQyU+nb+lnNaX5zHVPbdJlW 0BGL6lYRAN7uT26vqsRVmbmeCHYSLmQTKwEsZimETotj1Jv5H5LunLYYMxOWw9AMLud+4GIDL6J juvy8n5dRCewZ5fiOlShNGoDXwiMOnpCSSHZC/0iS1OZjbSgBkjHR6sa3GCGt1ZOCDZDlbU6ggH SUz5OXBonDVNBTu0p9/1cQGyL+QxhcULXYBilQ9MH1V0xiyK0jOIW41vS/FazfeNEgdmJtW4MA1 +yjiE8bqqbihrUNYo2sBuBocxKI069iAGfeAMRgnCFdyL+hxZ80LEEr/ijBCWtoeW8bYbxNdij8 Oec932pyBBiNk/qKOgbi7C5ODInrjhxeRnmwA8KVTIrmpf91OIqwMk+81Owas0vW6aKixmZ8KyB bFVBlQvmv0DgzBNq2dIiMou2OuWVOPy0/55LV3ZeSgSjBXvvvx3BuHZ/P6naYxB1MgWOygEEQ= X-Google-Smtp-Source: AGHT+IF6aIbidUCfbgp7219SCW8FyhJj+uv7pq1JYb1F1cjKkTnBJO2LF9Y92roiq0o5WhzYVsur4A== X-Received: by 2002:a17:902:f68a:b0:2a0:c1be:f436 with SMTP id d9443c01a7336-2a0c1bef542mr79424005ad.59.1765876591045; Tue, 16 Dec 2025 01:16:31 -0800 (PST) Received: from JF.dhcpserver.bu9bmc.local (61-220-246-151.hinet-ip.hinet.net. [61.220.246.151]) by smtp.gmail.com with ESMTPSA id d9443c01a7336-29ee9d50f9fsm156470525ad.44.2025.12.16.01.16.28 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 16 Dec 2025 01:16:30 -0800 (PST) From: Jeff Lin To: linux@roeck-us.net Cc: jefflin994697@gmail.com, grantpeltier93@gmail.com, karanja99erick@gmail.com, chiang.brian@inventec.com, krzk@kernel.org, william@wkennington.com, tzungbi@kernel.org, thorsten.blum@linux.dev, ninad@linux.ibm.com, linux-hwmon@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH 1/2] hwmon: (pmbus) Add support for multiple-function pin Date: Tue, 16 Dec 2025 17:16:16 +0800 Message-Id: <20251216091617.2581192-2-jefflin994697@gmail.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20251216091617.2581192-1-jefflin994697@gmail.com> References: <20251216091617.2581192-1-jefflin994697@gmail.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" Some pmbus chip support the additional multiple-function pin, which can detect and provide the connected device's current reading. The data format of the multiple-function ping must be confirmed with the chip vendor, as it may vary between different chips. However, it is problematic if the data format differs from the original 'iin' and 'iout' and we want to show both the current from multiple-function pin and the original 'iin' and 'iout'. To solve the problem, add support for additional virtual current input and virtual current output, call it 'viin' and 'viout', respectively. Signed-off-by: Jeff Lin --- drivers/hwmon/pmbus/pmbus.h | 12 ++++++++++++ drivers/hwmon/pmbus/pmbus_core.c | 18 ++++++++++++++++++ 2 files changed, 30 insertions(+) diff --git a/drivers/hwmon/pmbus/pmbus.h b/drivers/hwmon/pmbus/pmbus.h index d2e9bfb5320f..8a1c3a7a4f32 100644 --- a/drivers/hwmon/pmbus/pmbus.h +++ b/drivers/hwmon/pmbus/pmbus.h @@ -236,6 +236,14 @@ enum pmbus_regs { PMBUS_VIRT_CURR_SAMPLES, PMBUS_VIRT_POWER_SAMPLES, PMBUS_VIRT_TEMP_SAMPLES, + + /* Multiple function pin + * + * Drivers wanting to expose the value from multiple function pin + * should implement support in read_word_data callback. + */ + PMBUS_VIRT_READ_IIN, + PMBUS_VIRT_READ_IOUT, }; =20 /* @@ -381,6 +389,8 @@ enum pmbus_sensor_classes { PSC_TEMPERATURE, PSC_FAN, PSC_PWM, + PSC_VIRT_CURRENT_IN, + PSC_VIRT_CURRENT_OUT, PSC_NUM_CLASSES /* Number of power sensor classes */ }; =20 @@ -411,6 +421,8 @@ enum pmbus_sensor_classes { #define PMBUS_HAVE_PWM12 BIT(20) #define PMBUS_HAVE_PWM34 BIT(21) #define PMBUS_HAVE_SAMPLES BIT(22) +#define PMBUS_HAVE_VIRT_IIN BIT(23) +#define PMBUS_HAVE_VIRT_IOUT BIT(24) =20 #define PMBUS_PHASE_VIRTUAL BIT(30) /* Phases on this page are virtual */ #define PMBUS_PAGE_VIRTUAL BIT(31) /* Page is virtual */ diff --git a/drivers/hwmon/pmbus/pmbus_core.c b/drivers/hwmon/pmbus/pmbus_c= ore.c index be6d05def115..9a8eec5d3945 100644 --- a/drivers/hwmon/pmbus/pmbus_core.c +++ b/drivers/hwmon/pmbus/pmbus_core.c @@ -1929,6 +1929,16 @@ static const struct pmbus_sensor_attr current_attrib= utes[] =3D { .gbit =3D PB_STATUS_IOUT_OC, .limit =3D iout_limit_attrs, .nlimit =3D ARRAY_SIZE(iout_limit_attrs), + }, { + .reg =3D PMBUS_VIRT_READ_IIN, + .class =3D PSC_VIRT_CURRENT_IN, + .label =3D "viin", + .func =3D PMBUS_HAVE_VIRT_IIN + }, { + .reg =3D PMBUS_VIRT_READ_IOUT, + .class =3D PSC_VIRT_CURRENT_OUT, + .label =3D "viout", + .func =3D PMBUS_HAVE_VIRT_IOUT } }; =20 @@ -2501,6 +2511,14 @@ static const struct pmbus_class_attr_map class_attr_= map[] =3D { .class =3D PSC_TEMPERATURE, .attr =3D temp_attributes, .nattr =3D ARRAY_SIZE(temp_attributes), + }, { + .class =3D PSC_VIRT_CURRENT_IN, + .attr =3D current_attributes, + .nattr =3D ARRAY_SIZE(current_attributes), + }, { + .class =3D PSC_VIRT_CURRENT_OUT, + .attr =3D current_attributes, + .nattr =3D ARRAY_SIZE(current_attributes), } }; =20 --=20 2.34.1 From nobody Sun Feb 8 13:09:09 2026 Received: from mail-pl1-f171.google.com (mail-pl1-f171.google.com [209.85.214.171]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id EE4893233EE for ; Tue, 16 Dec 2025 09:16:35 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.214.171 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1765876597; cv=none; b=F9qUtTBdVEnfpWuJxsn9xXfV3oPrb14A2LQcdOLys0rJ5uNP263G8NCsD5kUBETVDZbEEzrWfIz0cRiLfoGC5h67ImD4Yaw2w7v+QIZeFi8y6ZWCjb6sTxUWdMo5745OLo907r1snrXzAIRVfkKe3/Y76bTEKRF35Yh3DZcnMKo= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1765876597; c=relaxed/simple; bh=1io2b+cGCwpQfwdasxnweJ72z/V4NLyKD6KXX3X0ApQ=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: MIME-Version; b=EkzWqwYbou4uV6rvLRprVLzr9iUmNLGrcrSjensWdsJqgLtfbmYzJhCpmOJDbaEW3ZJQGdqFSyLYBCapz50/pzrm1pC0xCC4V9eUkYDovVe8PLRR9HLtLXi0de9d5L9hC+47aVPuJpRNkE8PJbcHCOjqq11ymNrJAHjOhpOIPQU= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com; spf=pass smtp.mailfrom=gmail.com; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b=ZUeSR+dl; arc=none smtp.client-ip=209.85.214.171 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=gmail.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="ZUeSR+dl" Received: by mail-pl1-f171.google.com with SMTP id d9443c01a7336-2a0bb2f093aso25691095ad.3 for ; Tue, 16 Dec 2025 01:16:35 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1765876595; x=1766481395; darn=vger.kernel.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=wUk1kM50n0Uxz+X4Sasil+Qsrm9+azMKZxJy1CXcwvQ=; b=ZUeSR+dlclzbXw4jbzgZ3I7HYN2U0tBuOd3TOZwB2171q+8enMz0vNin9nqU1BS9jY oY00xqnT5iq5Uy5sYTR3K8GmS+JlENhICIHRFe7D3ApTTf9wy4Emp7+X+PF4ifC+FKMS 08lZpqrwFAtA8L8trtpDenvQdPeo/AdS1WW7Mddf2zP5k0h1bO/KuQoMZCoCiwLf8j6b 1/kX10jIUN90G0Gkv5hDHielupo8lzZtuZBhlsB4Md9ztZlBOUtWgSRUIAA70D7t0c/u ELzV4ahK3sp4n2fFMSdZkTBRs/PC1MqhqJPoWoMfJC+Gum3b9h01cq00j0iSyo2JQor1 h42A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1765876595; x=1766481395; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-gg:x-gm-message-state:from :to:cc:subject:date:message-id:reply-to; bh=wUk1kM50n0Uxz+X4Sasil+Qsrm9+azMKZxJy1CXcwvQ=; b=kkzZk2YkGs99Pgd0WZMPQGTUhpDFEcNJTDM0R1JbJrfK9pifC4TOkWIEnha6kz3qG2 +KWQhZIDydbDnwYLrOzVlQba+YcA6l6N4Yp6iEHkr9Hn/wPBNQakCR70Eeyq8fiyQfGh 589WrI6F5Nd79udAKYc71AJ3j3eIy3FoJy9MzuSRJQCaV+76H+poFLByX734MoJyokDi ww5cV+l4EQpv40zj+EX0U/ivukuYM3UsNfYjTel/Ufpnw22hFjx1BCAB9nKpOjNIXMVu USxT3G2C5T2CWPIvzp7CLb83z+TzFej8xHAOuudJ0PVVGJqtzd81Wlamzuexril2EJ8h urCA== X-Forwarded-Encrypted: i=1; AJvYcCX8pPS/xLqlQdQwbykktd4TVa9gdLXjPYTKEHKuUVDGGmWMlYScoGrnx5KyWY+0POAtiqjBBlwGLtOrHaQ=@vger.kernel.org X-Gm-Message-State: AOJu0YwGZesUckKtKjb2E56xu9YaWGoQ3b7UrakWquixtQG8Nbe4g1AY PVyk/IXA/3RiRXD6LQbMeQ0ICpLQnvMoIwC5Xxq5QMJ78iQYShKxUZhu X-Gm-Gg: AY/fxX6SeH8w3CkcasGtX9Vty0650KhEh1aC58oPJnmTST/GvO7fQ7Sc6gVw00gtK6C UvhA1hfsnNI07Y98gwNQMKHYk8L7N78MfWTzDsyQkWbG4yBTL9bnsYXRicL/lR0QlpgV5WrAJAI Y1c81NvalfMQ1r05GFwJujejbb9iWo8QuCMLS3z+h2Iheq/CfedzTiC6dYu0GTssW0H8vMcz7kp dCG6RFmkvZhC1jFN9Avkv6yOGvX6B4/Zn4HFTb6Ji8HTGBxxhtaNFJDRsBFrTjd9/rhTQJygqNN YYa1ImLrqUh0AAhKdx4GV0GCX54Pdc3AEuMuN1q+0G62UAhp3BH8+9bbUHdS2cYre+1NCmFfkeO pJ5Vg3bjcicAylHDMkxh7chRlvg06/HYZCGaVPXdkAwRz6T1Iw7poUfxvKN/xQsrVOazMr5LYSy fp+lLZEMb6rkLU9NANaQqi1Yh4Az+Ab16A4UWuYPrjd5QYE6PMPFpDAlUiGZjOUBm+gP9vxrc= X-Google-Smtp-Source: AGHT+IGcvtb7IJ+L808dDmiv7YL9MyFInQQcQQ78RD7Bqy08HKGO1TupLqENXqYdsVnBF5ZbUDBpgg== X-Received: by 2002:a17:903:2281:b0:2a0:fe4a:d67c with SMTP id d9443c01a7336-2a0fe5a2192mr62892025ad.10.1765876595089; Tue, 16 Dec 2025 01:16:35 -0800 (PST) Received: from JF.dhcpserver.bu9bmc.local (61-220-246-151.hinet-ip.hinet.net. [61.220.246.151]) by smtp.gmail.com with ESMTPSA id d9443c01a7336-29ee9d50f9fsm156470525ad.44.2025.12.16.01.16.32 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 16 Dec 2025 01:16:34 -0800 (PST) From: Jeff Lin To: linux@roeck-us.net Cc: jefflin994697@gmail.com, grantpeltier93@gmail.com, karanja99erick@gmail.com, chiang.brian@inventec.com, krzk@kernel.org, william@wkennington.com, tzungbi@kernel.org, thorsten.blum@linux.dev, ninad@linux.ibm.com, linux-hwmon@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH 2/2] hwmon/pmbus: (isl68137) Add multiple-function pin for raa229141a Date: Tue, 16 Dec 2025 17:16:17 +0800 Message-Id: <20251216091617.2581192-3-jefflin994697@gmail.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20251216091617.2581192-1-jefflin994697@gmail.com> References: <20251216091617.2581192-1-jefflin994697@gmail.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" In addition to supporting PMBus-based current monitoring, the RAA229141A also provides two multifunction pins(PIN44,PIN45) that can be used to sense the input and output current of nearby devices. Readings from these multifunction pins are not reported using the standard PMBus direct or linear data formats. Instead, they must be retrieved via the Renesas-specific Dicrect Memory Access(DMA) command codes and scaled by a factor of 10. Signed-off-by: Jeff Lin --- drivers/hwmon/pmbus/isl68137.c | 45 ++++++++++++++++++++++++++++++++++ 1 file changed, 45 insertions(+) diff --git a/drivers/hwmon/pmbus/isl68137.c b/drivers/hwmon/pmbus/isl68137.c index 97b61836f53a..e60771614941 100644 --- a/drivers/hwmon/pmbus/isl68137.c +++ b/drivers/hwmon/pmbus/isl68137.c @@ -178,6 +178,33 @@ static const struct attribute_group *isl68137_attribut= e_groups[] =3D { NULL, }; =20 +#define RAA_READ_DMA_DATA 0xc5 +#define RAA_WRITE_DMA_ADDRESS 0xc7 + +/* DMA address for input current in PIN44 and output current in PIN45 */ +static const unsigned char dma_address_in[] =3D { 0xD3, 0xE0 }; +static const unsigned char dma_address_out[] =3D { 0x42, 0xEE }; +static int read_val_route_by_dma(struct i2c_client *client, const char *ad= dr) +{ + int ret; + /* Set up DMA address */ + ret =3D i2c_smbus_write_i2c_block_data(client, RAA_WRITE_DMA_ADDRESS, 2, = addr); + + if (ret < 0) { + dev_err(&client->dev, + "Set DMA address failed for address 0x%02x 0x%02x\n", addr[0], addr[1]); + return ret; + } + /* Read DMA data */ + u8 buf[2]; + + ret =3D i2c_smbus_read_i2c_block_data(client, RAA_READ_DMA_DATA, 2, buf); + if (ret < 0) + return ret; + u16 value =3D ((u16)buf[1]<<8) | buf[0]; + return value; +}; + static int raa_dmpvr2_read_word_data(struct i2c_client *client, int page, int phase, int reg) { @@ -207,6 +234,12 @@ static int raa_dmpvr2_read_word_data(struct i2c_client= *client, int page, ret =3D clamp_val(temp, 0, 0xffff); } break; + case PMBUS_VIRT_READ_IIN: + ret =3D read_val_route_by_dma(client, dma_address_in); + break; + case PMBUS_VIRT_READ_IOUT: + ret =3D read_val_route_by_dma(client, dma_address_out); + break; default: ret =3D -ENODATA; break; @@ -408,6 +441,18 @@ static int isl68137_probe(struct i2c_client *client) info->format[PSC_CURRENT_OUT] =3D linear; info->format[PSC_POWER] =3D linear; info->format[PSC_TEMPERATURE] =3D linear; + info->format[PSC_VIRT_CURRENT_IN] =3D direct, + info->format[PSC_VIRT_CURRENT_OUT] =3D direct, + /* DIRECT read format 10mA/LSB */ + info->m[PSC_VIRT_CURRENT_IN] =3D 1, + info->b[PSC_VIRT_CURRENT_IN] =3D 0, + info->R[PSC_VIRT_CURRENT_IN] =3D 2, + /* DIRECT read format 10mA/LSB */ + info->m[PSC_VIRT_CURRENT_OUT] =3D 1, + info->b[PSC_VIRT_CURRENT_OUT] =3D 0, + info->R[PSC_VIRT_CURRENT_OUT] =3D 2, + info->func[0] |=3D PMBUS_HAVE_VIRT_IIN; + info->func[0] |=3D PMBUS_HAVE_VIRT_IOUT; info->pages =3D 2; info->read_word_data =3D raa_dmpvr2_read_word_data; info->write_word_data =3D raa_dmpvr2_write_word_data; --=20 2.34.1