Received: by 2002:a05:7208:9594:b0:7e:5202:c8b4 with SMTP id gs20csp129309rbb; Fri, 23 Feb 2024 14:32:50 -0800 (PST) X-Forwarded-Encrypted: i=3; AJvYcCU5pJmhh9rabQu7jbQKJbNMabWNLKL+XIy9Wkl13oDTLdB8rZYhfsMpu2dDk9iq6ZALy9IhOzwzGzSYnqCSjtH54piXB1yEl9B/kEQ4OA== X-Google-Smtp-Source: AGHT+IFJA/GffgJVa7xR/pz48yEdNuhVPKoiF1bN6Eu1oikpQ96GXvxexwTFlkdxfwHvDG63LSMH X-Received: by 2002:a05:6870:7f05:b0:21f:a6ba:18f2 with SMTP id xa5-20020a0568707f0500b0021fa6ba18f2mr1156299oab.58.1708727570302; Fri, 23 Feb 2024 14:32:50 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1708727570; cv=pass; d=google.com; s=arc-20160816; b=tx4WtFRo/3fPsugsC8lpP6N9Gx1hOA2o40sPbKIXXyNES77q8SWvfmq4nMFmSjDl0s y0m5DLU320XMcEcKkTug1m3t6rbNuU6Lyp3sX+ebcFWOHeLWfXdSzgDkHzHStnlAl9rC vQ18iGysheYOvxkK1lpSHhohOAD3lHIG3kzDyXaM4MJQkBVFj4ncTFoh48NTB7xKyMi/ xSsZBneRkGa8ru3X/C+RDt4gK2d6E/pLA/bW/B2BF7ooA2vEoh4LNVZHpl6IgUBexYts raStTSqI/vUUxvzwowVSoOjjkZYoymHXSYgIZfKFne67mchcRf4Kz9cGQvAjIj7/WgP7 hpqQ== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=in-reply-to:content-disposition:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:references:message-id:subject:cc :to:from:date:dkim-signature; bh=PSs1k4yhOaJo0FhDXl1IC/61LVXaUjlUC3glDlqHR+s=; fh=Cj8TR+idZWY7K+lKiQ5pb6LdruCRkvLHqCku8TXKC6U=; b=f1RSC1gtvt6occW1LJYN0/RWlewuNEfC8C2Hxrl6FBAWZ9/UdC2WBl7xRatw60COJe M5H/l+C43NoVgvECBbJj+PSUpyZqyC4dBjRTvJmB741MyLsUnAv9teIGk3tuEgWXRBWM RM0+5mNcFEbNgToUATFmdJYY44Jtqa+AdxG64lGZBrWcpaRm5cwk5aD/M3V6f+WhYBUX fH1kojJLvYPxvoejkLYkilNOryM9Kj4I9xxb2UpW2D6khJoSG6Dok/RLUFg8e7kTbxxl KflXttg7JwDH55wOPHfFiwMcr9ja9XCaKZGvJuNTEPczdSGrbwzLYDDq9KnufwBTnYdB HNqQ==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@collabora.com header.s=mail header.b=KDiQaAq1; arc=pass (i=1 spf=pass spfdomain=collabora.com dkim=pass dkdomain=collabora.com dmarc=pass fromdomain=collabora.com); spf=pass (google.com: domain of linux-kernel+bounces-79264-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-79264-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=collabora.com Return-Path: Received: from ny.mirrors.kernel.org (ny.mirrors.kernel.org. [2604:1380:45d1:ec00::1]) by mx.google.com with ESMTPS id q11-20020ae9e40b000000b00787a19f2362si3947086qkc.517.2024.02.23.14.32.50 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 23 Feb 2024 14:32:50 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-79264-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) client-ip=2604:1380:45d1:ec00::1; Authentication-Results: mx.google.com; dkim=pass header.i=@collabora.com header.s=mail header.b=KDiQaAq1; arc=pass (i=1 spf=pass spfdomain=collabora.com dkim=pass dkdomain=collabora.com dmarc=pass fromdomain=collabora.com); spf=pass (google.com: domain of linux-kernel+bounces-79264-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-79264-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=collabora.com Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ny.mirrors.kernel.org (Postfix) with ESMTPS id 101781C23BD6 for ; Fri, 23 Feb 2024 22:32:50 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 5403324B52; Fri, 23 Feb 2024 22:32:41 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=collabora.com header.i=@collabora.com header.b="KDiQaAq1" Received: from madrid.collaboradmins.com (madrid.collaboradmins.com [46.235.227.194]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id DA9C91119B; Fri, 23 Feb 2024 22:32:38 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=46.235.227.194 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1708727560; cv=none; b=hPKTGyp9TTFIlorEqLeq4lHOJ5RvYGWezT5ICmEyFMCU2zS5ZS/FybDQ/390fwDaZdf+Fg1WHUKIBvcaFhpTIX7yjgHFK9wxlz02epxXfNuMibG6LWiH7Z9PuoJ9Tbi2JxTbh4KbgiV3YhY2Xag/eBYMuWoa/L5OqsRcB/5LyQI= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1708727560; c=relaxed/simple; bh=PSs1k4yhOaJo0FhDXl1IC/61LVXaUjlUC3glDlqHR+s=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=fO0i7LcyLgV2PN8k2kNf4G+io1RPmdLHzF9IQ04Xf4avyN9+QBeeFErwQIGmPER7ymxqGw0jIhKNKwYLczls4FHS8lLrIeYYHldIDDpTwGnDsuTfF/ykp1n6ur4A+slfNXuSIVZNewnS19oNZkHtA31iBJmC8M6pHSnOMKnURUs= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=collabora.com; spf=pass smtp.mailfrom=collabora.com; dkim=pass (2048-bit key) header.d=collabora.com header.i=@collabora.com header.b=KDiQaAq1; arc=none smtp.client-ip=46.235.227.194 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=collabora.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=collabora.com DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=collabora.com; s=mail; t=1708727554; bh=PSs1k4yhOaJo0FhDXl1IC/61LVXaUjlUC3glDlqHR+s=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=KDiQaAq1lyRcjhTQW47KCHDEbmn5dw4W0sqCeown0uhw6TzmHSV93fpjvZU7swVkI +KXHOAjYoD/aE5QDrVnCfbI2k1hOSE7EDK9EM59hbVqhXqYj0345NiO/75as3pQJdr zGONe1b+drG4lF1T8vkB/mewsMfc8XJmd0VKY1POhpnut9rDJ/qF5uGj96+k5eBxFY G4Bu1fgzzbHkFsPjhWljBjV+hgUPexoljU9qGO9YTfzrHmjqq33JMir2C46wM/em+E X+6cxY3dC5gCPfR8z5zl72ZmyVpfxeTZTNUGUJPVxKHVMLZ741ADY3cO42YAMTllGK ADnx4v9lvELjA== Received: from mercury (cola.collaboradmins.com [195.201.22.229]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) (Authenticated sender: sre) by madrid.collaboradmins.com (Postfix) with ESMTPSA id CB97C3780627; Fri, 23 Feb 2024 22:32:34 +0000 (UTC) Received: by mercury (Postfix, from userid 1000) id 4818D1060C95; Fri, 23 Feb 2024 23:32:34 +0100 (CET) Date: Fri, 23 Feb 2024 23:32:34 +0100 From: Sebastian Reichel To: Nikita Travkin Cc: Hans de Goede , Rob Herring , Krzysztof Kozlowski , Conor Dooley , cros-qcom-dts-watchers@chromium.org, Andy Gross , Bjorn Andersson , Konrad Dybcio , Rob Herring , linux-pm@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, linux-arm-msm@vger.kernel.org, platform-driver-x86@vger.kernel.org Subject: Re: [PATCH v3 2/3] power: supply: Add Acer Aspire 1 embedded controller driver Message-ID: References: <20240220-aspire1-ec-v3-0-02cb139a4931@trvn.ru> <20240220-aspire1-ec-v3-2-02cb139a4931@trvn.ru> <7c429d2110dbac68d0c82c8fb8bfb742@trvn.ru> <6e3fb1080c54cfc38dc3c3e79e32a53d@trvn.ru> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha512; protocol="application/pgp-signature"; boundary="x3dnrs6dj67zatrw" Content-Disposition: inline In-Reply-To: <6e3fb1080c54cfc38dc3c3e79e32a53d@trvn.ru> --x3dnrs6dj67zatrw Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable Hi, On Fri, Feb 23, 2024 at 08:34:29PM +0500, Nikita Travkin wrote: > Sebastian Reichel =D0=BF=D0=B8=D1=81=D0=B0=D0=BB(=D0=B0) 23.02.2024 20:04: > > On Fri, Feb 23, 2024 at 07:32:17PM +0500, Nikita Travkin wrote: > >> >> + This driver provides battery and AC status support for the mentio= ned > >> > I did not see any AC status bits? > >> > >> I was referring to whatever ACPI spec calls "AC Adapter" but I guess > >> I should have used the word "charger" instead... Will reword this. > >=20 > > But you only register a power-supply device for the battery and not > > for the AC adapter/charger. When you write "and AC status support" I > > would have expected something similar to this (that's from ACPI AC > > adapter driver): > >=20 > > $ cat /sys/class/power_supply/AC/uevent > > POWER_SUPPLY_NAME=3DAC > > POWER_SUPPLY_TYPE=3DMains > > POWER_SUPPLY_ONLINE=3D1 >=20 > Ah, I see... Yeah looking at it one more time, I mistakenly assumed the > acpi ac code uses the same data fields as the battery but seems like it > reads the single online flag from a different place. I don't think there > is really a point on implementing that field since we can still easily > track the battery charging/discharging status so I will probably omit it > for now. Will reword the help text to not mention charger/ac adapter. If you have the information easily available, it's a good plan to expose it. Without a charger reporting online status at least the kernel's power_supply_is_system_supplied() will return false (which is e.g. used by AMD GPU driver to select power profile). Generic userspace (i.e. upower) probably behaves similar, since battery status is not the same as AC connceted. A system might not charge the battery but still run from AC itself. -- Sebastian --x3dnrs6dj67zatrw Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQIzBAABCgAdFiEE72YNB0Y/i3JqeVQT2O7X88g7+poFAmXZHPcACgkQ2O7X88g7 +ppExA/6Ay7wM3uN5mNgDtWxq1XLrsykjXSgSsYKJzByjQuageupwDlF6Rx6lKXQ X8UjL4r8YlEaGyce2L8uYaoH9KN0ge45v/CiEKZo2PJyCBpQGW8rbO1rNlZampi+ y2jSurRj8aUrbgToM0Q2tiZQWU3CLJzu0TsFZ0/7sfgEzaEzFurQ0k3nvTNYARLN ayqnP6NIDb18AFwToW5jdoe8c+MweBK4XhjNNZeiFAsnCe4LgKSjr0aHdeGwJh1F AGffLuHnc/TSWecDaKQG8NaZV9KIjzYHZwULTWFQwvIaFnMSNFJLyaZX91NGV4Sc R7HZVdSm/3Q60PvKQ9ZkseRbLSHHRJQTvj8akX5sLfD4L7CMe19tPqcaDB50jIUi VJdqCrq9lZLJVfbJDKVysLHfTNHBrm948FxOdFgd/chETFCDODrRJZ+W96+rb7uC m/CoGtow7mSP1Tm183JktlamMk7c+D2qj2xF6mfRJMIT1816qA7hfZNB6YQyky++ pw8kRos46RCCOrhRInZqJGy5DBz3JDZqqMWJFDQYdxQaZM0m7J2PST/auCUhK14v Uo8bjWdbR7BBFLB5FXAGONH/bdihhnD8er1H5LIDzPmxv8ASQxC924BEozSya/4J aEox1XhdHHsQpCByVX7kL2afGt574rkvnyOwT9WLf8RA2KCjROg= =gazE -----END PGP SIGNATURE----- --x3dnrs6dj67zatrw--