Received: by 2002:ac0:a582:0:0:0:0:0 with SMTP id m2-v6csp3194751imm; Fri, 19 Oct 2018 06:45:44 -0700 (PDT) X-Google-Smtp-Source: ACcGV63iViridXaUcDtvW3J8rtkZpoxsC8n/Rh8wE2hivK0J/SyeIpYXwkaKFMGBFMHgIT3DR5A3 X-Received: by 2002:a63:3143:: with SMTP id x64-v6mr10241468pgx.163.1539956744225; Fri, 19 Oct 2018 06:45:44 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1539956744; cv=none; d=google.com; s=arc-20160816; b=KLqlM2E5HRPss0swexRcf3I7ZNM7AOHDyJ8Vm0xyyt8HuH3qEDxhplfbIqvtaxmT++ Jnu1YWZ558kE+mD3uffY4CqN3IAPTKxdwjNj4/4aKicAHr5gcT7hj51xeRLPrJi/1hCF SYtTYFmgpGkhixKF2wKA1FK6Wx7RHQBgBcpgpTOEx5gGX+qhCe06vnThi67vWZL6HSzD CNsISb/hFfK8C0d2zhr+zzehxjzJ78jApro3wT467XkYd3Cban5t+RWoYbjSGDLJpTgx 5haNrGGrwGTP4tVEoJFJqr8XzTuqmhPhbNO+0bOc0On+aqLZdMprBLTXOIw5bsq7ftYC EpOQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:dkim-signature; bh=0KwGRl7FpIDhBFacpLBjjceNQS3WXJYar8/h3LGwxyE=; b=PmG1kgNqtLURPpk0aipPcPP84zFD2tIb8joQQgBjvjjgt0EF8t5ySdhuamNOIqgVO6 551x6Bo0Mg4J3PbtTqggMV9udU3CqR6O2bdTEbFU2W1g6icG1bHiaoX97PCZ8gH2PXRr jTwGIQEb5qRm95gVrdSvN+Tk1tGL/235VScoKIi9z8l0uNnAPKGfJUtFAEjBOcndDxJQ Wto/4OLDMe+anXZUmwg7AQz0dqxpVtg1Dv+ZOtS4BQHsYelJiBk+LhNP5Qh/IGifRpnz wgP5gkF1069VcMwyXpMweKDgMjz483B5QJlitUk5BfJkrY5dP40kG+q+FdfD6g7TlXFj bIgw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=ueqbbMfQ; 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=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id w19-v6si22967606plp.304.2018.10.19.06.45.28; Fri, 19 Oct 2018 06:45:44 -0700 (PDT) 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; dkim=pass header.i=@gmail.com header.s=20161025 header.b=ueqbbMfQ; 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=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727532AbeJSVtq (ORCPT + 99 others); Fri, 19 Oct 2018 17:49:46 -0400 Received: from mail-qt1-f193.google.com ([209.85.160.193]:39533 "EHLO mail-qt1-f193.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727189AbeJSVtq (ORCPT ); Fri, 19 Oct 2018 17:49:46 -0400 Received: by mail-qt1-f193.google.com with SMTP id e21-v6so2081784qtp.6; Fri, 19 Oct 2018 06:43:34 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=0KwGRl7FpIDhBFacpLBjjceNQS3WXJYar8/h3LGwxyE=; b=ueqbbMfQ42MELeu0/ZD76HBKI6iwjyvo7LiF0mulDbjLF+ZWBSFPBdohiBOXoGrn4V 6HUB/aogBwfZ1K6Gfng/YQtW8XCAdIhZniSJFkOuFMyQIgM1+8I7S53bmOYW2l13XmWp UnBarxalyugfDNhvQvMB2ZLrZP3245TNF9b49LZ7W/OzFJQERyQ7WdueEYd29uF1a6Ta I+0nX9HMg08+nGPgQhTi/jXHxcDeHAOY+5H8zb1GaJt06+JtHFyUAfbSEQdMJRq325rz Z7/125B5TFZgjqLw4MJfO6iik/LU8BhgvHzpox/wSv2NG6S2143HfIAouJqyIn/kzEBP TpPQ== 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:from:date :message-id:subject:to:cc; bh=0KwGRl7FpIDhBFacpLBjjceNQS3WXJYar8/h3LGwxyE=; b=ks9QBT0nHegfHyWtabEivYNAM0bBS/AxCUs3r6Cs0Q1EGMlgVu0+XCn+UKfM9qmyHI kgepUsREnY0XNzNwx94kkUwTG0FP9y/qT8PaFTkEkis1wbhRm8k/nbuil/o6xQKKln+Q jPJHAcBrGj3p4cip8QUxd/3iK4jXgskOWLEIC0FoPtB2qYizcjzWBEHmynOTo3YMhE/D j5YW+gRskeB/tgGSre4yYVrAsIshHaB0xnfId5teP0ULTiBaimSEyUSdGrfee+afLCoh 9cclUB50C9FJdonT1fh5hW6GyaEesqma1W0LcOLOjYz1kXUQEiaUKXcEEt8Gsp3N/dvZ AhPw== X-Gm-Message-State: ABuFfogT3zSlfmG7AzKQiFSzmDxyEjgSP37VJGtv2y1BTO6R+lzI5qHA agrmeDt/yjl2rpLB/zI5B1uuD1q7NVxrPEpzeq0= X-Received: by 2002:a0c:819c:: with SMTP id 28mr35193680qvd.7.1539956613974; Fri, 19 Oct 2018 06:43:33 -0700 (PDT) MIME-Version: 1.0 References: <20181010172300.317643-1-lkundrak@v3.sk> <20181010172300.317643-12-lkundrak@v3.sk> In-Reply-To: <20181010172300.317643-12-lkundrak@v3.sk> From: Andy Shevchenko Date: Fri, 19 Oct 2018 16:43:22 +0300 Message-ID: Subject: Re: [PATCH 11/15] x86, olpc: Use a correct version when making up a battery node To: Lubomir Rintel Cc: Mark Brown , Geert Uytterhoeven , Darren Hart , Andy Shevchenko , Greg Kroah-Hartman , quozl@laptop.org, Sebastian Reichel , Rob Herring , Mark Rutland , Eric Miao , Haojian Zhuang , Daniel Mack , Robert Jarzmik , linux-spi , devicetree , Linux Kernel Mailing List , linux-arm Mailing List , Platform Driver , devel@driverdev.osuosl.org, Linux PM Content-Type: text/plain; charset="UTF-8" Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, Oct 10, 2018 at 8:23 PM Lubomir Rintel wrote: > > The XO-1 and XO-1.5 batteries apparently differ in an ability to report > ambient temperature. Add a different compatible string to the 1.5 > battery. > +int olpc_dt_compatible_match(phandle node, const char *compat) > { > char buf[64]; > + int plen; > + char *p; > + int len; > + > + plen = olpc_dt_getproperty(node, "compatible", buf, sizeof(buf)); > + if (plen <= 0) > + return 0; > + > + len = strlen(compat); > + for (p = buf; p < buf + plen; p += strlen(p) + 1) { > + if (strcmp(p, compat) == 0) > + return 1; > + } > + > + return 0; > +} DT doesn't still have a helper for that?! I hardly believe in that. > + olpc_dt_interpret("\" /battery@0\" find-device" > + " \" olpc,xo1.5-battery\" +compatible" > + " device-end"); Please, don't split string literals. > olpc_dt_interpret("\" /pci/display@1\" find-device" > " new-device" > " \" dcon\" device-name \" olpc,xo1-dcon\" +compatible" > " finish-device device-end"); Yeah, this and similar also needs to be fixed. -- With Best Regards, Andy Shevchenko