Message ID | 20231106110336.358-53-philmd@linaro.org |
---|---|
State | New |
Headers | show
Delivered-To: patch@linaro.org Received: by 2002:adf:fd90:0:b0:32d:baff:b0ca with SMTP id d16csp1025787wrr; Mon, 6 Nov 2023 03:14:19 -0800 (PST) X-Google-Smtp-Source: AGHT+IG5aH5YxgFxE518LftCCBMI4VqLFshzwtllFXlmFw6eIvu2TKBzf/va9HiKQDW+32NI8ebe X-Received: by 2002:a05:622a:138a:b0:41c:f729:8032 with SMTP id o10-20020a05622a138a00b0041cf7298032mr40654371qtk.63.1699269258819; Mon, 06 Nov 2023 03:14:18 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1699269258; cv=none; d=google.com; s=arc-20160816; b=MCO5w686fjjXPunExYfBEL8ue1/cLDTtvLfb8hKeMfcrvt02DrlLQ3N7j0VJFLQDi8 g5xZLhS2Pkwhsxeuay/L3/tkUvrBjQyyVibprzVlft/6+oE0SseM2vpwSX7rSdH5J2rM y3nhFg+l4L7IW7P3H4sclIWpdTymTvEJJvmbYidWnHTDMkm4tYZwfze3ZTvP6WlzWqH8 R0zMMBr7NunpsYbUaoMENi3AYzE12m/fUAHzPadmcDjcscJhlH5F55lcrLkxFsHMzr7k 49xCHXd8N0w202kv0AOoTJhPOjGDhRGI/LbZYZbONnmmAbfOygcNLJJcQyOie1KdXa16 9+IA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:content-transfer-encoding :mime-version:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=3MW0tyH68/nf1rlEHwZAluKpdYAi9tPVuWOS5/QAWBA=; fh=BrsXn2Mt19aqa/pgd+z/3CIJ3M3WCq93nIkOdCPdI3Q=; b=pA/CMa+M45b+5vGKBopSxYds5TbZjMfzyw0rDSMwVgKJVstG1EgYv4N8kFEqkrdq2o 6bWLt8FdoXuKzD3g6hMf3ziQBbohNDnRy5+kO3FxVmbJMqrJ1jPhbsG4nEjTeHC/oR2e TiNv/Hyxfz6p89FnAfcQZbjY8t2IP1Qg2WCQisrNZY0yq3tA8GsXd19ALj7QqDR97/Jn bVFx47LDIrKZ1hlaX5tHwzoHEBhvvlPaW+AMUBMNweYDFw8jbBy2mPlVAo4+mnFaTheS 5l5GmsBc0cNwqoPuBcqR+62gCGR8483LhjmweDj34pPmcFyZlNQzQLNzVM1gM5o8JAQK YuKg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=I1XktIPO; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: <qemu-devel-bounces+patch=linaro.org@nongnu.org> Received: from lists.gnu.org (lists.gnu.org. [209.51.188.17]) by mx.google.com with ESMTPS id f5-20020ac85d05000000b00417b98fafbasi5402888qtx.272.2023.11.06.03.14.18 for <patch@linaro.org> (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Mon, 06 Nov 2023 03:14:18 -0800 (PST) Received-SPF: pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=I1XktIPO; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from <qemu-devel-bounces@nongnu.org>) id 1qzxUN-00028l-VO; Mon, 06 Nov 2023 06:09:52 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from <philmd@linaro.org>) id 1qzxUA-0001pH-Q1 for qemu-devel@nongnu.org; Mon, 06 Nov 2023 06:09:39 -0500 Received: from mail-wr1-x435.google.com ([2a00:1450:4864:20::435]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from <philmd@linaro.org>) id 1qzxU6-0005Xb-MU for qemu-devel@nongnu.org; Mon, 06 Nov 2023 06:09:38 -0500 Received: by mail-wr1-x435.google.com with SMTP id ffacd0b85a97d-32f737deedfso2644297f8f.3 for <qemu-devel@nongnu.org>; Mon, 06 Nov 2023 03:09:34 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1699268973; x=1699873773; darn=nongnu.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=3MW0tyH68/nf1rlEHwZAluKpdYAi9tPVuWOS5/QAWBA=; b=I1XktIPOhYqdwG1Y9bMehrpjGF1Bhn/T6ILyWcoDrBvbvgqSRaVGUgXatQ9zhNBS0b cX+5K2AJST/kAOFELuJKUUtAzxjVw4riymyinZrF/DQecr82yB/ujWFnCXg5cKW3IYze 06exFyiqsDs+Ogmnka/MaAxZtVJVCU0OpTmx8ZXALCfA3loaXtR907K7DeWpDVK4pkH0 rnPql9yD/H6GA7NU90vK8/0kDvOiyQezAb4OpZGlEJKuhAKRo+2Oz3WNMtc5hQEjAEpO ckFUzFT705W897fAlZsqmtng7C9Rt+696kkVycSO0A3NoRpX6rVxDadlmrk8CsZ8DQL2 cSTw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1699268973; x=1699873773; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=3MW0tyH68/nf1rlEHwZAluKpdYAi9tPVuWOS5/QAWBA=; b=Ma1Yx5/F6s52DE0hqT+jGg2BHwNuPzm1ewRE7QCJYtWt+mCzXJ7FDJPrzRnlRXBPJ8 3v924X8r+5922FKouKnFbii7RfsVikjfmDF4VUMgFyDpwwDbb9h998LRSnwZODheOmiD 3zPJESLEwxPXxNGq0kNZEzkA4Pvgq7bBioOJ/wF3YH7jyOAKKLa7si73x8aNLP3YAUuv Qle72xegC3HzGhs2xKLEiSApv1CKZmkzv49BFYsdWEx9aCQgyMGijkSY/r1sKhOt2HGr XYMaGp7uE8tK2OFeifYsLP+sPl5El0OGV3XZRQ/PhihHNTSqW2/NTlGAh7QqHLTZikmt kjMQ== X-Gm-Message-State: AOJu0YwB5izt1UmBI5tsPnTnvVulVSC4zIz2QRZ7m7oG11089iF5AChd TWV7RmK7w7ijQ9z7d44SPGKP8r+3J90I2xgqzGw= X-Received: by 2002:a05:6000:2c5:b0:32f:7ae2:4165 with SMTP id o5-20020a05600002c500b0032f7ae24165mr27652837wry.9.1699268972999; Mon, 06 Nov 2023 03:09:32 -0800 (PST) Received: from m1x-phil.lan (176-131-220-199.abo.bbox.fr. [176.131.220.199]) by smtp.gmail.com with ESMTPSA id y8-20020a5d4708000000b0032d2f09d991sm9141944wrq.33.2023.11.06.03.09.31 (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Mon, 06 Nov 2023 03:09:32 -0800 (PST) From: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= <philmd@linaro.org> To: qemu-devel@nongnu.org Cc: kvm@vger.kernel.org, qemu-s390x@nongnu.org, qemu-block@nongnu.org, qemu-riscv@nongnu.org, qemu-ppc@nongnu.org, qemu-arm@nongnu.org, Titus Rwantare <titusr@google.com>, Benjamin Streb <bstreb@google.com>, Corey Minyard <cminyard@mvista.com>, =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= <philmd@linaro.org> Subject: [PULL 52/60] hw/i2c: pmbus: add VCAP register Date: Mon, 6 Nov 2023 12:03:24 +0100 Message-ID: <20231106110336.358-53-philmd@linaro.org> X-Mailer: git-send-email 2.41.0 In-Reply-To: <20231106110336.358-1-philmd@linaro.org> References: <20231106110336.358-1-philmd@linaro.org> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Received-SPF: pass client-ip=2a00:1450:4864:20::435; envelope-from=philmd@linaro.org; helo=mail-wr1-x435.google.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01 autolearn=unavailable autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: <qemu-devel.nongnu.org> List-Unsubscribe: <https://lists.nongnu.org/mailman/options/qemu-devel>, <mailto:qemu-devel-request@nongnu.org?subject=unsubscribe> List-Archive: <https://lists.nongnu.org/archive/html/qemu-devel> List-Post: <mailto:qemu-devel@nongnu.org> List-Help: <mailto:qemu-devel-request@nongnu.org?subject=help> List-Subscribe: <https://lists.nongnu.org/mailman/listinfo/qemu-devel>, <mailto:qemu-devel-request@nongnu.org?subject=subscribe> Errors-To: qemu-devel-bounces+patch=linaro.org@nongnu.org Sender: qemu-devel-bounces+patch=linaro.org@nongnu.org |
Series |
[PULL,01/60] vl: Free machine list
|
expand
|
diff --git a/include/hw/i2c/pmbus_device.h b/include/hw/i2c/pmbus_device.h index ad431bdc7c..f195c11384 100644 --- a/include/hw/i2c/pmbus_device.h +++ b/include/hw/i2c/pmbus_device.h @@ -243,6 +243,7 @@ OBJECT_DECLARE_TYPE(PMBusDevice, PMBusDeviceClass, #define PB_HAS_VIN_RATING BIT_ULL(13) #define PB_HAS_VOUT_RATING BIT_ULL(14) #define PB_HAS_VOUT_MODE BIT_ULL(15) +#define PB_HAS_VCAP BIT_ULL(16) #define PB_HAS_IOUT BIT_ULL(21) #define PB_HAS_IIN BIT_ULL(22) #define PB_HAS_IOUT_RATING BIT_ULL(23) diff --git a/hw/i2c/pmbus_device.c b/hw/i2c/pmbus_device.c index c1d8c93056..3bce39e84e 100644 --- a/hw/i2c/pmbus_device.c +++ b/hw/i2c/pmbus_device.c @@ -906,6 +906,14 @@ static uint8_t pmbus_receive_byte(SMBusDevice *smd) } break; + case PMBUS_READ_VCAP: /* Read-Only word */ + if (pmdev->pages[index].page_flags & PB_HAS_VCAP) { + pmbus_send16(pmdev, pmdev->pages[index].read_vcap); + } else { + goto passthough; + } + break; + case PMBUS_READ_VOUT: /* Read-Only word */ if (pmdev->pages[index].page_flags & PB_HAS_VOUT) { pmbus_send16(pmdev, pmdev->pages[index].read_vout);