Received: by 2002:a05:6a10:f347:0:0:0:0 with SMTP id d7csp109986pxu; Tue, 24 Nov 2020 20:49:28 -0800 (PST) X-Google-Smtp-Source: ABdhPJycqPOb3ekGiHwtUk2Z09h/PTAgobiP6qLafA9H3EmtZxtSwxzrpgZlGyudUr8owG9dsiKQ X-Received: by 2002:a50:e0c9:: with SMTP id j9mr1788335edl.380.1606279768030; Tue, 24 Nov 2020 20:49:28 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1606279768; cv=none; d=google.com; s=arc-20160816; b=TiW8qzdZSknl2FwjXGzF+AFyECa9OSV0KAMVQo0/w4ta0+SljetS9mZAwqoGNFtauU ugGme58sNCMcNxuhwlDWqBWgnEhsPuSulErrFazQx6M3R5PdlowMncgvDxLYhA+hdYVH rqvIC3C9RYzITTYS1IZGaY0YfufXYR9N7UMaNbPKbhF+waMLppG4Y4NUxc7Wt8YwO3zG 7qgsbMPGGKD51XDkUaGX4aLyYJ6n2lr4npIJnU3D1dZdiUF0PHgboNJmDHuTV00M2BLA Pw/7qQrD92H2AsI63YpbIx0njAksn6jgZVtWzhD2vrbRjeLFF2Ki+HQuMZTAr4/YkE/p Yz0g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:message-id:date :subject:cc:to:from; bh=5fJno2+dH/8McB5M6pwuN1uakJotMyp19uH5PzrssQk=; b=xSbV/vt0vXBg6yxkTIZW98cShinvKqkAqTjvnrTfFk3StwlsVics2J/K+KDfRVTC74 TUN2w3JZKgvCBe6DzVN43oxSOyyxBbEZmLSLX983q5VoLsAU0Fu1HB3yLnfBabtZG49g nKKrUtipi77uS7jVKKMzuG6zmZCYnnK4xFCVxlAlM4rL9hOFJqPXPUdzn9V0wHlCrq5j N2eTZbt7cTq0AB+lAvmXAfjFRw/EWvxAwRBTf5RS1qYj6nisjP2jDExstCotP5nzYT3j Q8BCVNBrJqvXFQT1iFjc9HVfHNTekssdeSHR93uaYzgSXchHNUv1ZgFBWmxSAjyq98vy u6Ww== 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=puri.sm Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id p13si599033ejx.702.2020.11.24.20.49.05; Tue, 24 Nov 2020 20:49:28 -0800 (PST) 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=puri.sm Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727998AbgKYEpU (ORCPT + 99 others); Tue, 24 Nov 2020 23:45:20 -0500 Received: from comms.puri.sm ([159.203.221.185]:48000 "EHLO comms.puri.sm" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726985AbgKYEpT (ORCPT ); Tue, 24 Nov 2020 23:45:19 -0500 Received: from localhost (localhost [127.0.0.1]) by comms.puri.sm (Postfix) with ESMTP id 0560AE0141; Tue, 24 Nov 2020 20:44:49 -0800 (PST) Received: from comms.puri.sm ([127.0.0.1]) by localhost (comms.puri.sm [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id d2T0OxrIJYPM; Tue, 24 Nov 2020 20:44:47 -0800 (PST) From: Sebastian Krzyszkowiak To: Sebastian Reichel Cc: Geordan Neukum , linux-pm@vger.kernel.org, linux-kernel@vger.kernel.org, kernel@puri.sm Subject: [PATCH 1/4] power: max17042_battery: Fix current_{avg,now} hiding with no current sense Date: Wed, 25 Nov 2020 05:44:44 +0100 Message-ID: <2264396.HPVdm0XNkV@pliszka> Content-Transfer-Encoding: 7Bit Content-Type: text/plain; charset="UTF-8" Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org When current sense is disabled, max17042_no_current_sense_psy_desc gets used which ignores two last properties from the list. Fixes: 21b01cc879cc ("power: supply: max17042_battery: Add support for the TTE_NOW prop") Signed-off-by: Sebastian Krzyszkowiak --- drivers/power/supply/max17042_battery.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/drivers/power/supply/max17042_battery.c b/drivers/power/supply/max17042_battery.c index f284547913d6..2e9672fe4df1 100644 --- a/drivers/power/supply/max17042_battery.c +++ b/drivers/power/supply/max17042_battery.c @@ -85,9 +85,10 @@ static enum power_supply_property max17042_battery_props[] = { POWER_SUPPLY_PROP_TEMP_MAX, POWER_SUPPLY_PROP_HEALTH, POWER_SUPPLY_PROP_SCOPE, + POWER_SUPPLY_PROP_TIME_TO_EMPTY_NOW, + // these two have to be at the end on the list POWER_SUPPLY_PROP_CURRENT_NOW, POWER_SUPPLY_PROP_CURRENT_AVG, - POWER_SUPPLY_PROP_TIME_TO_EMPTY_NOW, }; static int max17042_get_temperature(struct max17042_chip *chip, int *temp) -- 2.29.2