Received: by 2002:a05:6a10:206:0:0:0:0 with SMTP id 6csp4602758pxj; Wed, 12 May 2021 09:03:39 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwIoGhn4w323+FuFXMR1bNQGjKaFyUEebZd3h68JXNydMnRgtPm5+6g3cZO3/tVWBTu0eAp X-Received: by 2002:a17:907:161f:: with SMTP id hb31mr38695174ejc.514.1620835418930; Wed, 12 May 2021 09:03:38 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1620835418; cv=none; d=google.com; s=arc-20160816; b=iT3lvzdZjK5WfmjsrO86mBvH8YNsY+b6sJ/AwKARRg5frLYAJoaL2Gc2qBYYDxq/zd KS36986SuDiZOI/0LB0LPUMEo6KmaFdkpXPw1rDoZEAX9YTrnJuMMk7jkumt48i3nww6 X5Q9qShke3itLSuTIOoa4kNIDwvFKvfbscKZ3Ii7uTkuets610o9MiS0feLN7hnmJRtG SkqYN8VCHoq7ER7CDpx+skLZ19gUIz0gNRkCDSr5k8ELsohVmZM+ZukO735bj4AbcIdo 78w+95DlvDLO/wW93LMPtrba0QDQkN9aoCktiMcyPsDrvpjA+OMl+Bz7JXtFHgL0OJ5h yABw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :user-agent:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=aGat+kcAa96x9JZBSjHwT9qNNZCUmnGtxLyMAkc88wQ=; b=M3aN6aGgU7b9+S5jrew8A7uzB/aU1W4Vs5JkI63VKR5yIB0QCaIzpETkXbh02Yerlh jZOR490yiGdWIyzg9gII/jb0dKC+uIiPs7e0OKsZLuHXgb1bvFWL7uyrwkOEc0F6RW1y DxF+j3NKDJ6avvAbjAWi6ke4ozpiNmX5Qm5x9Zios/Ad6H1O+uERZoEU1dV+9hS50xBg KDyuaoneLWZgr1rCaY8lCfXwWFAOz4wzyADRqexBlpqs2oduFQsQ3Xv19gAGswquxaIQ 9dPPjDtJZNHj3Cfjky6W9KbQ8Xf1nk1/YGFVRTAluSgQtRohqni6euv1PZK5qphgg2Kt clcA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=uXyk6TEC; 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=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id jg39si240714ejc.63.2021.05.12.09.03.12; Wed, 12 May 2021 09:03:38 -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; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=uXyk6TEC; 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=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S235524AbhELQCk (ORCPT + 99 others); Wed, 12 May 2021 12:02:40 -0400 Received: from mail.kernel.org ([198.145.29.99]:40954 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S235513AbhELP2S (ORCPT ); Wed, 12 May 2021 11:28:18 -0400 Received: by mail.kernel.org (Postfix) with ESMTPSA id 0ED1C61C19; Wed, 12 May 2021 15:13:24 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1620832405; bh=s/t2MZaoj+R1WtBWyvCUsuvLhuOeKy3Mxpl2amGquMY=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=uXyk6TECgdkJ4t/zts/k2MENWsskmb+OqTpHKwlXt1ID+rrEmF60psybybUbBkEyr JubDABkZglAJuoaYQ+PTpG6x4rJ3KVnct/ajsjS2EydVsrLysH1e3dgBYChx5DvYe7 JZAV3yWjZO3kgBDTT5CXiCGYHefjSiJHMXMjbmxU= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Paul Fertser , Guenter Roeck , Sasha Levin Subject: [PATCH 5.10 267/530] hwmon: (pmbus/pxe1610) dont bail out when not all pages are active Date: Wed, 12 May 2021 16:46:17 +0200 Message-Id: <20210512144828.592577627@linuxfoundation.org> X-Mailer: git-send-email 2.31.1 In-Reply-To: <20210512144819.664462530@linuxfoundation.org> References: <20210512144819.664462530@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Paul Fertser [ Upstream commit f025314306ae17a3fdaf2874d7e878ce19cea363 ] Certain VRs might be configured to use only the first output channel and so the mode for the second will be 0. Handle this gracefully. Fixes: b9fa0a3acfd8 ("hwmon: (pmbus/core) Add support for vid mode detection per page bases") Signed-off-by: Paul Fertser Link: https://lore.kernel.org/r/20210416102926.13614-1-fercerpav@gmail.com Signed-off-by: Guenter Roeck Signed-off-by: Sasha Levin --- drivers/hwmon/pmbus/pxe1610.c | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/drivers/hwmon/pmbus/pxe1610.c b/drivers/hwmon/pmbus/pxe1610.c index fa5c5dd29b7a..212433eb6cc3 100644 --- a/drivers/hwmon/pmbus/pxe1610.c +++ b/drivers/hwmon/pmbus/pxe1610.c @@ -41,6 +41,15 @@ static int pxe1610_identify(struct i2c_client *client, info->vrm_version[i] = vr13; break; default: + /* + * If prior pages are available limit operation + * to them + */ + if (i != 0) { + info->pages = i; + return 0; + } + return -ENODEV; } } -- 2.30.2