Received: by 2002:a05:6a10:1287:0:0:0:0 with SMTP id d7csp2646846pxv; Sat, 17 Jul 2021 20:53:22 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxS5QEyeQCExYrUV8eJNQ9hEsH3mqaqSG2XeId6IBvcceB8tkk0dsQYuY7hfbs1tjZRHK0Q X-Received: by 2002:a17:906:3814:: with SMTP id v20mr10356802ejc.378.1626580402381; Sat, 17 Jul 2021 20:53:22 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1626580402; cv=none; d=google.com; s=arc-20160816; b=MEYfRkXJ6z12cfT/clNzLmTv87ihZ3zJkE8AY83NPbl9BoRbkc6/LImDBY2Hqqizbz hhraUhcmiGLunm7VVYkCVsbWeAIYRb9b9f4uXyuebcur5Vm3xzeJYrpRJ11bYmcCFOHp 1gfP4ibYsQqAavfbEMFgyEtb1Fl7XvUEccJAp8Qx+TSFlt5kXSvr25RJ1rAwDdrkOWO9 SbdonTsrwpyYAPgYRPA4H5SoLn58TYg2yvzGG8nhJPhnXKd2wOa5K1hjFBEV4uaAvnSN Z8myps/uALoip9XVxFBi3XqrSYQCSTHd/OMqZC71FOftOT8iGYFsuTUVW+RQrjNKMoLB MU6g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:cc:to:subject:message-id:date:from:reply-to :in-reply-to:references:mime-version; bh=d/Drpnya1fdxaSmm7q/Snr3jS7yyspDnbd6u81b/Sbw=; b=vPpaIlpR/GD4xd5fvv62Hdvx7wa69lb8OESYYb29j0hrOtZRI4J6g4DV90TG4OAeFk HSNYThYBriSWf8dWMxXFs/TlYnc/d2SxYKihp+m2fjPQT1VfyXYxlswopD8N+ADUV/lR bLL0j54eSHkwMmrtfh0sSIh2wEMn5/LITQS6KtxSqOThH6CTN6vc54yWcXYPPHJ0u6Z/ 5tarrnfxrJjOZq9CtYvgzRP8rT6rUeqYHUGb5UNzT/QyFAW6597bxmCFwrMaKJgxR4d8 S/mPA3rv+DrvcEaMTGv2LcDQuPkiUHWpWzvyhtDmVd417qeqPeEaa8pe9YJKddnCVUIw ZFVA== 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id j23si17556728edr.110.2021.07.17.20.52.44; Sat, 17 Jul 2021 20:53:22 -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; 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 S232627AbhGRDyT (ORCPT + 99 others); Sat, 17 Jul 2021 23:54:19 -0400 Received: from mail-lj1-f182.google.com ([209.85.208.182]:44830 "EHLO mail-lj1-f182.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230102AbhGRDyT (ORCPT ); Sat, 17 Jul 2021 23:54:19 -0400 Received: by mail-lj1-f182.google.com with SMTP id u25so20169335ljj.11 for ; Sat, 17 Jul 2021 20:51:20 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:reply-to :from:date:message-id:subject:to:cc; bh=d/Drpnya1fdxaSmm7q/Snr3jS7yyspDnbd6u81b/Sbw=; b=rj8TF/z36qTCTzdR2Br/uVPZdA27qMx0kNA6m34MIwd/0J86LcxwSF5VBrlFN6/yS5 t6psLCdbfVwZipD4w7+zGe+ycoq5c4ZEI1WzzvD+yVGA3PNmKqsEb97+69eFxc5c5pZX 1qw2C4tlIOUMiNjRnX/TEuw5BCkj3WZEpsT6CsjIx0hpJFhYp+sUZDFi9T4KBgMwb86K pFUP6AslIfZd83PczADBRSA1KVSSCt28y4NI5m4vC7uiIW6+iSlPlTN0KQIG5zBk2n7f LNPJ7TzLBYn8W05GSnwRo8v6iBY7Vnrtj8z69133AqUmcwQY9QSUCewhTMa0Vu5cYm5w ZH8A== X-Gm-Message-State: AOAM531KcXL6qCmsJDziz08J1d0NDUn4vZsBgEYu8eovPi0wCKwjXkMK I+8MSRjxj1Yej9dMLJdccNSr53yLsuKs9Q== X-Received: by 2002:a2e:884e:: with SMTP id z14mr16444965ljj.39.1626580279856; Sat, 17 Jul 2021 20:51:19 -0700 (PDT) Received: from mail-lj1-f173.google.com (mail-lj1-f173.google.com. [209.85.208.173]) by smtp.gmail.com with ESMTPSA id q187sm1562495ljb.15.2021.07.17.20.51.19 for (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Sat, 17 Jul 2021 20:51:19 -0700 (PDT) Received: by mail-lj1-f173.google.com with SMTP id u14so20291653ljh.0 for ; Sat, 17 Jul 2021 20:51:19 -0700 (PDT) X-Received: by 2002:a2e:bd09:: with SMTP id n9mr16880789ljq.94.1626580279094; Sat, 17 Jul 2021 20:51:19 -0700 (PDT) MIME-Version: 1.0 References: <20210717162528.272797-1-hdegoede@redhat.com> In-Reply-To: <20210717162528.272797-1-hdegoede@redhat.com> Reply-To: wens@csie.org From: Chen-Yu Tsai Date: Sun, 18 Jul 2021 11:51:07 +0800 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: [PATCH] mfd: axp20x: Add supplied-from property to axp288_fuel_gauge cell To: Hans de Goede Cc: Lee Jones , "C++ / GCC" , linux-kernel Content-Type: text/plain; charset="UTF-8" Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Sun, Jul 18, 2021 at 12:25 AM Hans de Goede wrote: > > The power-supply framework has the notion of one power-supply device > being supplied by another. A typical example of this is a charger > charging a battery. > > A tablet getting plugged in to charge (or plugged out) only results in > events seen by the axp288_charger device / MFD cell. Which means that > a change udev-event only gets send for the charger power-supply class > device, not for the battery (the axp288_fuel_gauge device). > > The axp288_fuel_gauge does have an external_power_change'd callback > which will generate a change udev-event when called. But before this > commit this never got called because the power-supply core only calls > this when a power-supply class device's supplier changes and the > supplier link from axp288_charger to axp288_fuel_gauge was missing. > > Add a "supplied-from" property to axp288_fuel_gauge cell, pointing > to the "axp288_charger" power-supply class device, so that the > axp288_fuel_gauge's external_power_change'd callback gets called on > axp288_charger state changes. > > Signed-off-by: Hans de Goede Makes sense to me. Reviewed-by: Chen-Yu Tsai