Received: by 2002:ad5:474a:0:0:0:0:0 with SMTP id i10csp9935489imu; Wed, 5 Dec 2018 12:55:56 -0800 (PST) X-Google-Smtp-Source: AFSGD/Ub6Se1DT7GizIr2MMwHCZH2S2kQnEQ5MXAYX7pdOMdQTSzuHaxnjGmpQYr7h3P2cAsjL0O X-Received: by 2002:a17:902:b592:: with SMTP id a18mr17153362pls.293.1544043356088; Wed, 05 Dec 2018 12:55:56 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1544043356; cv=none; d=google.com; s=arc-20160816; b=UnreDbJSM+IwQEKRnVqy0nipEGG8x4I3wwGysmn0mTgfFxLK60L+M00zm0wysPFu4C Z3NrHRuemomqJeMjLiI/fUmLwfOFwpaYNl3IwMs2nS9b8UuVZSWi13lwoxEeI9akqz7X uFSVWsn6BTosxVbRuusjMCnfmj/ASh5bBOqVh0MPv7NUTWCZDINoHyvTaJRFy4RembhJ hFsN61lER1ls/O7dVmtsOiUpHtfv/CTu9fyr3kULIZlUmX73Vp6cEwDYiwFLp/Wrqc5U XVI3YbFfxecz033EvSYTKBwjj7iu7Ju9ljiT7BQ94SIA2E33/ENITmsDxcrjxZLpI959 ecKw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date; bh=+xYMvjccNBBfoPdZ90rhjCclUg6MJj2rr97h4pAAxU4=; b=BAKZrVYlH3zEDJr9beLzEryhuDkzzBc3y0Bhw9Uy3DivosFm2fxaq278LN8fLHnkNo qFf7YszGYHRsNhWW9ON2EsJ0Cw3nqc//5uWnz6P3OqYbsg4Pf+qIBOWUT4yEiBxXFska +Nz02tjI6c2ys6QI/mXHiqDqiI/5HBYGU7LUXPnYEH/fg7+UXhgpBZBhKvis8YEhUJ2L dxerJHhq7l7DWbAbRhGcGWLNMydZGSJDmswT7gk/W/izHyT3KX1C8/lRhIolR0tFoAGC m78q6w9pwYeD0weyFX/OfQQ7NhDSjk2iqfjueoGD/jPzLRj571g/qpY9XzSURcneQ3nC jLeQ== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 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. [209.132.180.67]) by mx.google.com with ESMTP id m3si21064811pld.331.2018.12.05.12.55.40; Wed, 05 Dec 2018 12:55:56 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 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 S1728460AbeLEUzF (ORCPT + 99 others); Wed, 5 Dec 2018 15:55:05 -0500 Received: from bhuna.collabora.co.uk ([46.235.227.227]:51146 "EHLO bhuna.collabora.co.uk" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727592AbeLEUzE (ORCPT ); Wed, 5 Dec 2018 15:55:04 -0500 Received: from [127.0.0.1] (localhost [127.0.0.1]) (Authenticated sender: sre) with ESMTPSA id 0E5E32761B6 Received: by earth.universe (Postfix, from userid 1000) id 99C8F3C08D6; Wed, 5 Dec 2018 21:54:59 +0100 (CET) Date: Wed, 5 Dec 2018 21:54:59 +0100 From: Sebastian Reichel To: Lubomir Rintel Cc: Mark Brown , Geert Uytterhoeven , Darren Hart , Andy Shevchenko , Greg Kroah-Hartman , James Cameron , Rob Herring , Mark Rutland , Eric Miao , Haojian Zhuang , Daniel Mack , Robert Jarzmik , linux-spi@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, platform-driver-x86@vger.kernel.org, devel@driverdev.osuosl.org, linux-pm@vger.kernel.org Subject: Re: [PATCH v2 13/17] power: supply: olpc_battery: Use DT to get battery version Message-ID: <20181205205459.bsumxn57hjjzvqaj@earth.universe> References: <20181116162403.49854-1-lkundrak@v3.sk> <20181116162403.49854-14-lkundrak@v3.sk> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha512; protocol="application/pgp-signature"; boundary="gka4uuyygtti7jd3" Content-Disposition: inline In-Reply-To: <20181116162403.49854-14-lkundrak@v3.sk> User-Agent: NeoMutt/20180716 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org --gka4uuyygtti7jd3 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable Hi, On Fri, Nov 16, 2018 at 05:23:59PM +0100, Lubomir Rintel wrote: > Avoid using the x86 OLPC platform specific call to get the board > version. It won't work on FDT-based ARM MMP2 platform. >=20 > Signed-off-by: Lubomir Rintel > Reviewed-by: Andy Shevchenko > Acked-by: Pavel Machek >=20 > --- Reviewed-by: Sebastian Reichel I assume this patch cannot be applied to power-supply without patch 12 having been merged to avoid breaking XO1.5 devices temporarily? -- Sebastian > Changes since v1: > - Sort the new include a bit higher >=20 > drivers/power/supply/olpc_battery.c | 10 +++++++--- > 1 file changed, 7 insertions(+), 3 deletions(-) >=20 > diff --git a/drivers/power/supply/olpc_battery.c b/drivers/power/supply/o= lpc_battery.c > index 5a97e42a3547..5323987d9284 100644 > --- a/drivers/power/supply/olpc_battery.c > +++ b/drivers/power/supply/olpc_battery.c > @@ -14,6 +14,7 @@ > #include > #include > #include > +#include > #include > #include > #include > @@ -622,11 +623,13 @@ static int olpc_battery_probe(struct platform_devic= e *pdev) > olpc_ac =3D power_supply_register(&pdev->dev, &olpc_ac_desc, NULL); > if (IS_ERR(olpc_ac)) > return PTR_ERR(olpc_ac); > - > - if (olpc_board_at_least(olpc_board_pre(0xd0))) { /* XO-1.5 */ > + if (of_property_match_string(pdev->dev.of_node, "compatible", > + "olpc,xo1.5-battery") >=3D 0) { > + /* XO-1.5 */ > olpc_bat_desc.properties =3D olpc_xo15_bat_props; > olpc_bat_desc.num_properties =3D ARRAY_SIZE(olpc_xo15_bat_props); > - } else { /* XO-1 */ > + } else { > + /* XO-1 */ > olpc_bat_desc.properties =3D olpc_xo1_bat_props; > olpc_bat_desc.num_properties =3D ARRAY_SIZE(olpc_xo1_bat_props); > } > @@ -672,6 +675,7 @@ static int olpc_battery_remove(struct platform_device= *pdev) > =20 > static const struct of_device_id olpc_battery_ids[] =3D { > { .compatible =3D "olpc,xo1-battery" }, > + { .compatible =3D "olpc,xo1.5-battery" }, > {} > }; > MODULE_DEVICE_TABLE(of, olpc_battery_ids); > --=20 > 2.19.1 >=20 --gka4uuyygtti7jd3 Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQIzBAEBCgAdFiEE72YNB0Y/i3JqeVQT2O7X88g7+poFAlwIOyMACgkQ2O7X88g7 +ppYQQ//eWJazyIvHlo7mhsllTEJxWn+akOo/zS8IcxjhAz+WxEFY62MgIjeuhXh slYouNvYyLNndhAkPxAPMS1OP68ySOZrjb93iMw5zoR93t17gAKydVWEMTo1p+Y3 PmkCPJ3pIbid0uPrehQY91sAanQpLXlSROnOsC8ZFpDaDDB0xR+JtQWvpwGWwmej iDCku0l4TG5bfXY5l4wDEzRe1/B8GAAqH49gqLLAjGVR0xAba0abhlxLaE/tqBdB T+8lD6637NK0+GKwszMYKfXhFTyF80M9UXRYImwgExXl7V3uUqk7wzZZzo8Q6RS8 hhyfX5dR7O7bu1UensrVFkJ1UTDvM/eYm0OZGMa8u61t1ly4TUtQOKM0WoJMTRLK mVVyHpPFzmoGovmBSknAUFqr2xX332mdkylzSUmr8DEBvsx2+9FL0UQQqnJve3rF YYJWqTXV+hP1oFbTYruZFtuEnMsWdmyoHIEjbHIxxi3a+kqZelVZrOFC6s4ZtcZy takcXz8bgsa4sSnEuhkZosHNz+cD1szzWJcnCcr9m0B9xrfDLFF8c4Syhm2MVdwa 3bhCdnfmbHrahwrE8DNbCck0CbtbYaYHnMLA+4L6q3oTqsPlVZcZ8esEubMesayH JP5Yd90FHYdP8pnWv+uR16ucjjTwZ0HDp8zqzHX51jHUIVD+h+g= =D9UJ -----END PGP SIGNATURE----- --gka4uuyygtti7jd3--