Received: by 2002:a4f:b056:0:0:0:0:0 with SMTP id m22csp1411743ivi; Fri, 2 Oct 2020 09:27:01 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxyAE1xx2WRTWsrf9XNyXQLiQScfrnV19wppJ4ij51Ga7YQ9gxSh2y/ylLFNXCRPCqBc7TY X-Received: by 2002:a17:906:934f:: with SMTP id p15mr3170948ejw.497.1601656021165; Fri, 02 Oct 2020 09:27:01 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1601656021; cv=none; d=google.com; s=arc-20160816; b=Md3pN3dxH+d7alfA6ZwwdNFgfc3B12RDiBA4XCsGTLsqJFe16ydifAjfSrlxyIb67H 5dBRna02+WxKzTCLDBTxMntjadpmzLdotzPz+uQe92lz9jtgGQBFn2SLrMN11Nz3NuoD PSihmW/E0y8+PYho++qN3A0eomPVobot15mHWrQ7qBzSiwilEGaiS/Gq1uuCcOQkTdyy 1JxwNFKWilDEk91A4aCLKis5MXiqSpU4n5IXkuc0nssc2zvWH2qiNQhT01lGkR7cbaPi xh92+9jycB2ccTGGmXQO465dsn6+O2jNM/U6cGWprSStaci1xzYDdSSQg1VEra/U7C7V 33/Q== 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 :references:in-reply-to:message-id:subject:cc:to:from:date :dkim-signature; bh=z4MGYJtuhPd38PKWjqnG9wYyjqiUQeeeO69PRxHNyoE=; b=L2Cfysupzs3zb/4wuh4WikvsCp5GCqvlRoJ5wLbF76H0YhoIJcfH0fzvNU9VooXtlm BhotCdzousHOF3G5S5sf6P2ghRZw6zzucqu5SpNzAbT2DYP5xXxA02WpL7uJVF3EaNuw zlK2/RzhgM0zSPDPWWTahdzmdZbfXC1unPK3Rl0LjDNXfKTWsSyH5Gs325Gt9GfEFfQt 0lPadYyflTkPf4/Ga9FZjfDecdsjRRK64scPAaaq1y3nR53ZJeQhUDr1ixurS0W2mAex zZAML4GZOnIqQSuxgXWSgUknZtlAgPNJf90h3i6xduy79NeWAIYt6R4HsCP/3oCnNHsy qIAg== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@kemnade.info header.s=20180802 header.b=GPeQ9mHO; 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 y25si1420870edv.59.2020.10.02.09.26.39; Fri, 02 Oct 2020 09:27:01 -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=fail header.i=@kemnade.info header.s=20180802 header.b=GPeQ9mHO; 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 S2388028AbgJBQXN (ORCPT + 99 others); Fri, 2 Oct 2020 12:23:13 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:43886 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726386AbgJBQXM (ORCPT ); Fri, 2 Oct 2020 12:23:12 -0400 Received: from mail.andi.de1.cc (mail.andi.de1.cc [IPv6:2a01:238:4321:8900:456f:ecd6:43e:202c]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 55454C0613D0; Fri, 2 Oct 2020 09:23:12 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=kemnade.info; s=20180802; h=Content-Transfer-Encoding:Content-Type: MIME-Version:References:In-Reply-To:Message-ID:Subject:Cc:To:From:Date:Sender :Reply-To:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Id:List-Help: List-Unsubscribe:List-Subscribe:List-Post:List-Owner:List-Archive; bh=z4MGYJtuhPd38PKWjqnG9wYyjqiUQeeeO69PRxHNyoE=; b=GPeQ9mHO7kiEN8voDAzztyd60g JwT/Y6l0mSaLVTYSkILFcPYMROO5417qY8Z4kr5kWqKQagdM59Fux/Aanx43I/hf7eWEmJ1o9mLcM dABKEpU8k5YrRUF6w/54d5l9ci7BosaU7VJXNglQnFD6nNAKs8+66FKUsTyrr5/glCyo=; Received: from p200300ccff0a30001a3da2fffebfd33a.dip0.t-ipconnect.de ([2003:cc:ff0a:3000:1a3d:a2ff:febf:d33a] helo=aktux) by mail.andi.de1.cc with esmtpsa (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.89) (envelope-from ) id 1kONpo-0004HK-SZ; Fri, 02 Oct 2020 18:23:05 +0200 Date: Fri, 2 Oct 2020 18:23:03 +0200 From: Andreas Kemnade To: Sebastian Reichel Cc: Sebastian Reichel , linux-pm@vger.kernel.org, linux-kernel@vger.kernel.org, kernel@collabora.com Subject: Re: [PATCHv1] power: supply: document current direction Message-ID: <20201002182303.51db1289@aktux> In-Reply-To: <20200827140248.37749-1-sebastian.reichel@collabora.com> References: <20200827140248.37749-1-sebastian.reichel@collabora.com> X-Mailer: Claws Mail 3.17.3 (GTK+ 2.24.32; x86_64-pc-linux-gnu) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-Spam-Score: -1.0 (-) Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, 27 Aug 2020 16:02:48 +0200 Sebastian Reichel wrote: > Currently the sign for CURRENT_NOW and CURRENT_AVG is a bit > of a mess. There are basically 3 different ways battery fuel > gauges report the current: > > 1. uses negative values for discharging and positive values > for charging > 2. uses positive values for discharging and negative values > for discharging (opposit of 1) > 3. only uses positive values > > As a result userspace currently cannot use the sign at all in > a generic way. Let's solve the issue by documenting a canonical > way for reporting the data and ensure new drivers follow this > way. Then existing drivers can be fixed on a case-by-case basis. > > The 'negative value = battery discharging' has been choosen, > since there are only very few drivers doing it the other way > around. > > Signed-off-by: Sebastian Reichel > --- would be nice if this comes in, so that is it clearly specified. Regards, Andreas