Received: by 2002:a05:6a10:5bc5:0:0:0:0 with SMTP id os5csp3616835pxb; Wed, 13 Oct 2021 09:27:42 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzIoPhcxwn8v0XqXzp5hYZ4GqaNzDavR8kP3OyPwj1Y8cO6vEnsnRXtTd3AQzgQICTkiz0j X-Received: by 2002:a17:902:9b8d:b0:13e:b693:c23d with SMTP id y13-20020a1709029b8d00b0013eb693c23dmr213062plp.11.1634142462032; Wed, 13 Oct 2021 09:27:42 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1634142462; cv=none; d=google.com; s=arc-20160816; b=zQcBp6mF69DqWnW/A6ToFhTBEtsYKaL7n0uvLiO3LAEkImk5FlkFdChY3z5XNAH79K ApvW6dASfvEMpMzE/aAs/MHvHvau1jFnsZEPRB7w1mbG+rtnNkYTaBnLID+1z1l3XvDf uiJwZ+pKRRLeJpCZoJYxSlC/VFfIcGhGe/mCiUxPNAW5vQWtYxUHztGJTH9JBeRvDYJY GQckbUs5lY5994esHSxkztvUxlJlwgNQnByHP9BZTgVPBeuVDt6U/CvSQLdm03p2xWNe HxaY9mZIbKmAfjRQnFEFdrJIEluGS26VsNORxl5OaK9hRHurL5XC845mxne4AdHCZhvb 7CIQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date; bh=R/ofVz9O9VC3AmZx1IsKPfC0aBfM78no6VisyaLuuDE=; b=zCMJe1HH/ilkjCz+sCVTizGpH5zxh5gyJtp2Jd03ecYlPas+636jkioS1Rpli1cmqO 2DyTsTrQRfgZdTh4BDdM1bWJDg6DpmirMCNJcLa2UI2CVLL8Y5drXfycM0XVUgKRGQCB J5B15NLwK58aW39f+BC7CNnzcWOlCUSlP1r4YIHo3bxAwyft4qbNc59tFjFTNQzQZc+3 BTm78YLi6ev+jG2BGToaS7l0/tx9sbmsLTZybxHEeUeoYuYMCu8Y7K6I3vd8cqvbLGKP 8BzwPDauOpoXMxOwB6lB4yEdtNE3OFqyrq9nW6Xv2FlH94odTXHZFInO2GT/DO6xndEG wuiQ== 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=collabora.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id t9si8549045pjd.21.2021.10.13.09.27.28; Wed, 13 Oct 2021 09:27:42 -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; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=collabora.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230312AbhJMQ1E (ORCPT + 99 others); Wed, 13 Oct 2021 12:27:04 -0400 Received: from bhuna.collabora.co.uk ([46.235.227.227]:38902 "EHLO bhuna.collabora.co.uk" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229941AbhJMQ1C (ORCPT ); Wed, 13 Oct 2021 12:27:02 -0400 Received: from [127.0.0.1] (localhost [127.0.0.1]) (Authenticated sender: sre) with ESMTPSA id F2D4C1F43B79 Received: by earth.universe (Postfix, from userid 1000) id 339733C0CA8; Wed, 13 Oct 2021 18:24:55 +0200 (CEST) Date: Wed, 13 Oct 2021 18:24:55 +0200 From: Sebastian Reichel To: Stephen Boyd , Linus Walleij Cc: Greg Kroah-Hartman , linux-kernel@vger.kernel.org, linux-arm-msm@vger.kernel.org, dri-devel@lists.freedesktop.org, freedreno@lists.freedesktop.org, linux-pm@vger.kernel.org, Daniel Vetter , "Rafael J. Wysocki" , Rob Clark , Russell King , Saravana Kannan Subject: Re: [PATCH v2 28/34] power: supply: ab8500: Migrate to aggregate driver Message-ID: <20211013162455.2srbgmxw6dgoplzo@earth.universe> References: <20211006193819.2654854-1-swboyd@chromium.org> <20211006193819.2654854-29-swboyd@chromium.org> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha512; protocol="application/pgp-signature"; boundary="5zizh2cyz6jxazcg" Content-Disposition: inline In-Reply-To: <20211006193819.2654854-29-swboyd@chromium.org> Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org --5zizh2cyz6jxazcg Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable Hi, [+cc Linus Walleij (I guess we should add a MAINTAINERS entry for the ab8500* power-supply drivers)] On Wed, Oct 06, 2021 at 12:38:13PM -0700, Stephen Boyd wrote: > Use an aggregate driver instead of component ops so that we can get > proper driver probe ordering of the aggregate device with respect to all > the component devices that make up the aggregate device. >=20 > Cc: Sebastian Reichel > Cc: > Cc: Daniel Vetter > Cc: "Rafael J. Wysocki" > Cc: Rob Clark > Cc: Russell King > Cc: Saravana Kannan > Signed-off-by: Stephen Boyd > --- Acked-by: Sebastian Reichel -- Sebastian > drivers/power/supply/ab8500_charger.c | 22 +++++++++++++--------- > 1 file changed, 13 insertions(+), 9 deletions(-) >=20 > diff --git a/drivers/power/supply/ab8500_charger.c b/drivers/power/supply= /ab8500_charger.c > index 15eadaf46f14..52d4105e28f2 100644 > --- a/drivers/power/supply/ab8500_charger.c > +++ b/drivers/power/supply/ab8500_charger.c > @@ -3312,8 +3312,9 @@ static const struct power_supply_desc ab8500_usb_ch= g_desc =3D { > .get_property =3D ab8500_charger_usb_get_property, > }; > =20 > -static int ab8500_charger_bind(struct device *dev) > +static int ab8500_charger_bind(struct aggregate_device *adev) > { > + struct device *dev =3D adev->parent; > struct ab8500_charger *di =3D dev_get_drvdata(dev); > int ch_stat; > int ret; > @@ -3354,8 +3355,9 @@ static int ab8500_charger_bind(struct device *dev) > return 0; > } > =20 > -static void ab8500_charger_unbind(struct device *dev) > +static void ab8500_charger_unbind(struct aggregate_device *adev) > { > + struct device *dev =3D adev->parent; > struct ab8500_charger *di =3D dev_get_drvdata(dev); > int ret; > =20 > @@ -3380,9 +3382,13 @@ static void ab8500_charger_unbind(struct device *d= ev) > component_unbind_all(dev, di); > } > =20 > -static const struct component_master_ops ab8500_charger_comp_ops =3D { > - .bind =3D ab8500_charger_bind, > - .unbind =3D ab8500_charger_unbind, > +static struct aggregate_driver ab8500_charger_aggregate_driver =3D { > + .probe =3D ab8500_charger_bind, > + .remove =3D ab8500_charger_unbind, > + .driver =3D { > + .name =3D "ab8500_charger_agg", > + .owner =3D THIS_MODULE, > + }, > }; > =20 > static struct platform_driver *const ab8500_charger_component_drivers[] = =3D { > @@ -3663,9 +3669,7 @@ static int ab8500_charger_probe(struct platform_dev= ice *pdev) > } > =20 > =20 > - ret =3D component_master_add_with_match(&pdev->dev, > - &ab8500_charger_comp_ops, > - match); > + ret =3D component_aggregate_register(&pdev->dev, &ab8500_charger_aggreg= ate_driver, match); > if (ret) { > dev_err(dev, "failed to add component master\n"); > goto free_notifier; > @@ -3688,7 +3692,7 @@ static int ab8500_charger_remove(struct platform_de= vice *pdev) > { > struct ab8500_charger *di =3D platform_get_drvdata(pdev); > =20 > - component_master_del(&pdev->dev, &ab8500_charger_comp_ops); > + component_aggregate_unregister(&pdev->dev, &ab8500_charger_aggregate_dr= iver); > =20 > usb_unregister_notifier(di->usb_phy, &di->nb); > usb_put_phy(di->usb_phy); > --=20 > https://chromeos.dev >=20 --5zizh2cyz6jxazcg Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQIzBAABCgAdFiEE72YNB0Y/i3JqeVQT2O7X88g7+poFAmFnCFcACgkQ2O7X88g7 +poL0g/9HRcH5yucLIwM0Y2DrOctm8HymvKJoN7B93ea2cEtO6LZKjyEhlOl5vtp 75+K607L5FgwhV/GFgrbfZxK3vdQw5CN0srVtZRpXVB05EURul1GLGKlPQEKW1kY cOzqPLZx6lJtO80OnDuClJSI+uP5MpwRZzXRdjCm63BR3/+rVHM1NY8LY7SCLM9v Edr812kResYp7WkbtYLwy5z/ddCebtE+t+3Cv31Ber6MVbhHHuM0igQ24FiEVQI8 SIUXFKMMAv1n7eRfWRMJf84ZBOzC7yFxFo4ZwC/saCiePvttjiE64KlG5TLcNjTA tPd/FWHeM6YVCU+YJ1vqfvh1tW69XpGFxv90eAX+nMIo0znaZir5pykGfDKCP1zL 3uVSiz+KnGdCNwljg8MEBXd2E742pLSwnnr/Sckyk6O4zDbTBul7pTSY6NIy2dZW +4ahnTtc0qq62+RH1wfbLHsVu04WTxZTMFbpTlQI7EGQsVMzGdx/TAwqbb1cVxjS 9hiZsgvXoP4C58VGLC/3DHcjzEm+O1U/emJRwo3MZ8M0K1bQY36bj3NWnIpDAgY+ hf/FkBbjSesZtBqG81wT85DA/rcDc+8qoEGVTnCt7jQrdyDqmQvKtioZLEhGtB/P BZOx9e+yo8JHDUlGSwPCZSvl3Uk9jBNIjstThsEjuZU6U+lcx1Q= =A2IV -----END PGP SIGNATURE----- --5zizh2cyz6jxazcg--