Received: by 2002:ad5:474a:0:0:0:0:0 with SMTP id i10csp3853194imu; Mon, 7 Jan 2019 10:38:38 -0800 (PST) X-Google-Smtp-Source: ALg8bN6vH3GKccogy1Lib97bRU0V0AjJHrHAFp4gZphbY9wsGeXzP5ucB1FqrF+bY36Oy1Lellu3 X-Received: by 2002:a65:49cd:: with SMTP id t13mr11999563pgs.376.1546886318589; Mon, 07 Jan 2019 10:38:38 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1546886318; cv=none; d=google.com; s=arc-20160816; b=Z6AmSY/kzP3kGpugRCFsZXW0eC9n0ZKh921SAUAit+C4XgJ3zqtZG4j0wHjTejxfh7 zMtSq07I/pIaOuLv0gxTnt8oRWXUT1dAWRC9DdN30dFHRivdsUZrJQmOPJQ3S3ARBhiV m/+Se1RGQMV4ZFkjlbDN2K0OdtsFoKovHmp2h0ADx3M8vQMmkVkNRe5P5reAXBNpjptC Nf6KmEHMFSuKcyVQifRV8ON7SNOJWVEu1RBPptgIcm8oe7up1c6gVmWEkK0O8Px+X0ZG UAIogJ0bw4ZdylS/y4tKNFZocTDFoPyK1Q0Mt88uhggFgn7FHUOHA6QJHiRP25SMatqk qzYw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :user-agent:references:in-reply-to:date:cc:to:from:subject :message-id; bh=M1cNg4ejjWUOfsT+vmiJLWyFusrMS8RYWyzllzflTc0=; b=eX4YOQZH1PsPekNYQrx1lcjD6+Pdx5OiwfVzvRWnnhDb3pUFa+beNILDfr8XIjOmhV VkyWYQIrqUawHjDbOJUZktrPybGGZlXkzXBjb2VNctJgfCv+tTS9NY3/FG0G+Lv/Uecz 5tqcyslV8yja8hfu2LbR9XoWFfP00IU3mH/yWIs4D0F/iX/XRC+K+FhlV8XCLnVp+0du 2WPmO85En0K0Vq/7hJRUWCzE9iKpb5N71o+rHSCvnfTK02rtlmoforJ1qKzEqaPlSJnB EpNm4SlSfPSL8r71BEiPacdd4QvmyDk51njbKdZDOR0XKfH5j8SJE67d610zfMdKRh5x SFAQ== 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id f13si45399033pln.368.2019.01.07.10.38.23; Mon, 07 Jan 2019 10:38:38 -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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728637AbfAGS0E (ORCPT + 99 others); Mon, 7 Jan 2019 13:26:04 -0500 Received: from shell.v3.sk ([90.176.6.54]:44360 "EHLO shell.v3.sk" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727090AbfAGS0E (ORCPT ); Mon, 7 Jan 2019 13:26:04 -0500 Received: from localhost (localhost [127.0.0.1]) by zimbra.v3.sk (Postfix) with ESMTP id E73C3FFD7D; Mon, 7 Jan 2019 19:25:58 +0100 (CET) Received: from shell.v3.sk ([127.0.0.1]) by localhost (zimbra.v3.sk [127.0.0.1]) (amavisd-new, port 10032) with ESMTP id wkQBFvO01pwA; Mon, 7 Jan 2019 19:25:55 +0100 (CET) Received: from localhost (localhost [127.0.0.1]) by zimbra.v3.sk (Postfix) with ESMTP id E1B35FFD7E; Mon, 7 Jan 2019 19:25:54 +0100 (CET) X-Virus-Scanned: amavisd-new at zimbra.v3.sk Received: from shell.v3.sk ([127.0.0.1]) by localhost (zimbra.v3.sk [127.0.0.1]) (amavisd-new, port 10026) with ESMTP id LUdJIGp02hQm; Mon, 7 Jan 2019 19:25:53 +0100 (CET) Received: from belphegor (nat-pool-brq-t.redhat.com [213.175.37.10]) by zimbra.v3.sk (Postfix) with ESMTPSA id 43495FFD7D; Mon, 7 Jan 2019 19:25:53 +0100 (CET) Message-ID: <4364d7c4dc1266ca45255cdad5ba40fb20a9bea3.camel@v3.sk> Subject: Re: [PATCH v2 13/17] power: supply: olpc_battery: Use DT to get battery version From: Lubomir Rintel To: Sebastian Reichel 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 Date: Mon, 07 Jan 2019 19:25:52 +0100 In-Reply-To: <20181205205459.bsumxn57hjjzvqaj@earth.universe> References: <20181116162403.49854-1-lkundrak@v3.sk> <20181116162403.49854-14-lkundrak@v3.sk> <20181205205459.bsumxn57hjjzvqaj@earth.universe> Content-Type: text/plain; charset="UTF-8" User-Agent: Evolution 3.30.3 (3.30.3-1.fc29) Mime-Version: 1.0 Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, 2018-12-05 at 21:54 +0100, Sebastian Reichel wrote: > 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. > > > > Signed-off-by: Lubomir Rintel > > Reviewed-by: Andy Shevchenko > > Acked-by: Pavel Machek > > > > --- > > 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? That is true. What's the correct way to deal with a situation like this? Just hold the patch until the other changes get in, perhaps via linux-platform-drivers-x86.git? Or maybe this can go in together via that tree along with the other patches? Thanks Lubo > -- Sebastian > > > Changes since v1: > > - Sort the new include a bit higher > > > > drivers/power/supply/olpc_battery.c | 10 +++++++--- > > 1 file changed, 7 insertions(+), 3 deletions(-) > > > > diff --git a/drivers/power/supply/olpc_battery.c > > b/drivers/power/supply/olpc_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_device *pdev) > > olpc_ac = 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") >= 0) { > > + /* XO-1.5 */ > > olpc_bat_desc.properties = olpc_xo15_bat_props; > > olpc_bat_desc.num_properties = > > ARRAY_SIZE(olpc_xo15_bat_props); > > - } else { /* XO-1 */ > > + } else { > > + /* XO-1 */ > > olpc_bat_desc.properties = olpc_xo1_bat_props; > > olpc_bat_desc.num_properties = > > ARRAY_SIZE(olpc_xo1_bat_props); > > } > > @@ -672,6 +675,7 @@ static int olpc_battery_remove(struct > > platform_device *pdev) > > > > static const struct of_device_id olpc_battery_ids[] = { > > { .compatible = "olpc,xo1-battery" }, > > + { .compatible = "olpc,xo1.5-battery" }, > > {} > > }; > > MODULE_DEVICE_TABLE(of, olpc_battery_ids); > > -- > > 2.19.1 > >