Received: by 2002:a05:6a10:5bc5:0:0:0:0 with SMTP id os5csp1494935pxb; Sat, 30 Oct 2021 15:10:32 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzBRlksbX7ilvEv69Ob+WT+G0efrHz6PbG3ZqYZHXEZX8eic5xDPA1cQD4+OA5nDj26nUmd X-Received: by 2002:a5d:91ca:: with SMTP id k10mr14122504ior.25.1635631832700; Sat, 30 Oct 2021 15:10:32 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1635631832; cv=none; d=google.com; s=arc-20160816; b=Twf+NsztoTnjYLSs1dbLV/EOfKHDxk48lQpaJgGRZiSNtW2+Rw5f0/ffNwIvlqRiGM 4SuOoFq/aTTvau2r2AWB/OmdC2jsFMqBmdVNDm396pEgicqPzBxV9yijY1DDvZU4ez2Q DnHklM6j3wEJ5BvBNtkKyYmV0KtsWsGwa1udUefCfImV84iqwkNCgKcyxSncDrLtfan5 9a4oFFfDaKDr0YxVuPQCtg3rT3jQNW1JwGktjIq4rY2YjFLi1mIAo2vA3rcAAq7WxZd4 cz4bzswjUf/mJCv7ueaLxIC8ou8JMhduZqV8iiz+1o2TMronNblsXEngNZTUEFakCDeQ P8Pg== 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:in-reply-to :references:mime-version:dkim-signature; bh=pee8ZBtW4J/0kHa2OihH1OTdXP4DPJUldbwhC8A9wBE=; b=c12v8xxio+PtiSjjjKbWv7K9PaCm7nfQVE430kbAQmWF/4sxhZ0OtQFGcQh/REZdIB BROHQ9f0M+qOeJuFygztVfXeQSB6MaShV3Phth/QmILply+pe7o1XxNlN0RaiDEmA35+ 9CJIcGuAhrNZp3bhmprLwlTWXXwScUUltN+9qPaOCDHmr7tj7epe66LY/9chnjc2M1CZ j6p80rTHBlz5IqMbNUEoGbM4d/gBAvyYjpgEu15Zxp0GkX83/3PQ6B1yx7ViShAlviy/ ZzYOiLUfv0NEJfyXStNvfjjhb3vqDzt3QXR9ectW2qxtGcZzOjBGtTN89lUVP+o8o+U0 FUwg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20210112 header.b=kCkKp61r; 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=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id y7si14505306ilv.168.2021.10.30.15.10.21; Sat, 30 Oct 2021 15:10:32 -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; dkim=pass header.i=@gmail.com header.s=20210112 header.b=kCkKp61r; 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=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231993AbhJ3WKS (ORCPT + 99 others); Sat, 30 Oct 2021 18:10:18 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:37386 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231165AbhJ3WKR (ORCPT ); Sat, 30 Oct 2021 18:10:17 -0400 Received: from mail-ed1-x529.google.com (mail-ed1-x529.google.com [IPv6:2a00:1450:4864:20::529]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id EECB0C061570; Sat, 30 Oct 2021 15:07:46 -0700 (PDT) Received: by mail-ed1-x529.google.com with SMTP id r12so51088923edt.6; Sat, 30 Oct 2021 15:07:46 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=pee8ZBtW4J/0kHa2OihH1OTdXP4DPJUldbwhC8A9wBE=; b=kCkKp61ro4nZid08tKGrglOJMO/IRih7RMyywJgwZLQWJwzgCAxUWV8iGbb0Atu6yB HreZ8HYflsHdIIqizdB5uaz5NLPSAAP304NwvfzRRSyIh3LkXCXj3FZMR4YhTvzdKUNQ NnCsqLMwMNLA694yLi5yI43w/0eOQE39J7b30aODi3lJTZBDIHG/a7E0s47RF3+uBmp9 6BG/+n3zG4tSW3FfP4vRTJjFRALgUlBjprDTzeJYmd0WPA+HvvcxycIsHc5BiK2CmApQ U36mvSrMhumO6ukucWS8ciIi9ayTeXjo+jeMYIw4zdZhimT5HhpOQz8TAHItvj/wLEnL UuZw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=pee8ZBtW4J/0kHa2OihH1OTdXP4DPJUldbwhC8A9wBE=; b=NCJsCvFr3fTKqOWeOzjCV7wjoGpQJPZVDmSSytauPiBVJPfdwK5CbeTkC4KDCDc/dL ozw7DsEFd0ym7kZZjx/wCAQp+7MhITWhLgDL3G2iVQ+CdHZkQciHLtiaugIBoGT7qX5U ar18MCAmMYhlhbIGZbDvHik0HiuefGn8C0aI02vstlYLWobvU2oQpaiS8WQllBzABmJu HB8F72pTm2cz//jEQYRNURfhm6ZUjLPnPl4kbg7DGUgzg7iqavbRZnlS3mR4fcYqrHwI q0J5EDF+8Pf8zJjZG5ESxlunGJOmkV/ZQtqFJFy9/HoSL+eaDTkbQ+E2+kb9o2xtMChz 7IdQ== X-Gm-Message-State: AOAM533cV/AuCAACk7AWHnNKdOBjpTRMqF1ovl8czLw/hS8O2Cy2KipZ mxMxsBvwKYUkBjYASFBryRwNQrdI5YxjldVFnO8= X-Received: by 2002:a17:906:a158:: with SMTP id bu24mr22419463ejb.356.1635631665372; Sat, 30 Oct 2021 15:07:45 -0700 (PDT) MIME-Version: 1.0 References: <20211030182813.116672-1-hdegoede@redhat.com> <20211030182813.116672-7-hdegoede@redhat.com> In-Reply-To: <20211030182813.116672-7-hdegoede@redhat.com> From: Andy Shevchenko Date: Sun, 31 Oct 2021 01:07:09 +0300 Message-ID: Subject: Re: [PATCH 06/13] power: supply: bq25890: Add support for skipping initialization To: Hans de Goede Cc: Mark Gross , Andy Shevchenko , Wolfram Sang , Sebastian Reichel , MyungJoo Ham , Chanwoo Choi , Ard Biesheuvel , Yauhen Kharuzhy , Tsuchiya Yuto , Platform Driver , linux-i2c , Linux PM , Linux Kernel Mailing List , linux-efi Content-Type: text/plain; charset="UTF-8" Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Sat, Oct 30, 2021 at 9:28 PM Hans de Goede wrote: > > On most X86/ACPI devices there is no devicetree to supply the necessary > init-data. Instead the firmware already fully initializes the bq25890 > charger at boot. > > At support for a new "ti,skip-init" boolean property to support this. > So far this new property is only used on X86/ACPI (non devicetree) devs, > IOW it is not used in actual devicetree files. The devicetree-bindings > maintainers have requested properties like these to not be added to the > devicetree-bindings, so the new property is deliberately not added > to the existing devicetree-bindings. With 'ti,' prefix it can be a potential collision in name space, for internal properties I would rather use 'linux,' one. ... > + init->write_cfg = !device_property_read_bool(bq->dev, "ti,skip-init"); > + if (!init->write_cfg) > + return 0; Why to have double negation here? I would rather expect that you will have direct value in the structure and do a respective check in the functions. -- With Best Regards, Andy Shevchenko