Received: by 2002:a05:6a10:5bc5:0:0:0:0 with SMTP id os5csp254901pxb; Mon, 8 Nov 2021 13:06:40 -0800 (PST) X-Google-Smtp-Source: ABdhPJwxs0Smx9ntsSIvaMHLnNaTxzfva6NA7Rf5J/U6A/5ItYp1RNcsXuxh49tvE8FsRqdrD2kg X-Received: by 2002:a05:6e02:1a83:: with SMTP id k3mr1401667ilv.202.1636405600547; Mon, 08 Nov 2021 13:06:40 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1636405600; cv=none; d=google.com; s=arc-20160816; b=erkgbzjInWUhZRr6aMyUb51/tL2eCo1rGVAZLyc4hH45XIzCrE6TztGb/JEZGaX/ij ssWp4cgtVUg2K31mOE/yFu3aF1uNSySbrY8M78pNRu8MDYamACEzl10QDYi/0fjgoUbx rHIF4nG822SOEpu4QXd9A5BHq0k4QIWfyZpq3CehW4ogzZNTrM/zjxPphsRmf2fXrgE/ yjRG7pkwftKT3it+3b0ioEgxVA/ROVOps7EeWuAs+ycnzhh2/YAJC5cdULg7DsN+FehL yD7uYD+q6UvTtRfcTxb/GIDPB0kC/c5d0ploxPiGX8/9IA6EkAMPcOngY1e3qWcYUJof HFsg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:in-reply-to:from :references:cc:to:content-language:subject:user-agent:mime-version :date:message-id:dkim-signature; bh=8KYz763bboOxbMn20cIS2HzETWIJmR4WwhBPXCqWbVg=; b=kD3OdpLdiDGtoYGhUIlYiajt3aDlbXfbFzCmvFeAYxzmoFgWY0qOZTHm8J+8zFrii1 F/RddsZnKJzROvBFD1YekqEfe4pixAkmteNRTI14ucQazmGAAuglI+TOBZdjo9YvzNWZ 7yniqQh64LpA5+8+IZC+BuEAYz6zaT0h/WEbJ7gaXxlk3w3JAKpz7WX+FCDAusz991SN IIChJk6q8NbQMN9P15slSqS4aFsbS6EZiMQA7xe2myZ6To4E7AjRwYP+Pjp76JRAC0k8 jGzYEf78CTQOX2jn8H8alm+Bk4LkRqbdZTN3IcAPbjmlA0/RIcgiLbL2WnoRVsSON+qR llag== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=AtmVuMh0; 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=NONE dis=NONE) header.from=redhat.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id b8si23952077ios.12.2021.11.08.13.06.25; Mon, 08 Nov 2021 13:06:40 -0800 (PST) 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=@redhat.com header.s=mimecast20190719 header.b=AtmVuMh0; 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=NONE dis=NONE) header.from=redhat.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S241110AbhKHQAf (ORCPT + 99 others); Mon, 8 Nov 2021 11:00:35 -0500 Received: from us-smtp-delivery-124.mimecast.com ([170.10.133.124]:45407 "EHLO us-smtp-delivery-124.mimecast.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S241111AbhKHQAc (ORCPT ); Mon, 8 Nov 2021 11:00:32 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1636387067; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=8KYz763bboOxbMn20cIS2HzETWIJmR4WwhBPXCqWbVg=; b=AtmVuMh0zrIyoQYuerGxzyQJFJ4lBFfUkq2g6rhqHWfVzeMmu1H42avDVasQDMDnfUc5Q4 If8yJlm/1NZqGe1A9ZGm/oA6QYAc0Ue5sJaUD1wvAr2tDu7QAqkx5licJGsFRz02miFDwG uRHqXJ4QaWF7bOQxtfG68keNY1PhxD8= Received: from mail-ed1-f70.google.com (mail-ed1-f70.google.com [209.85.208.70]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-454-7iUxjqqaOxaMyjpwb-s72A-1; Mon, 08 Nov 2021 10:57:46 -0500 X-MC-Unique: 7iUxjqqaOxaMyjpwb-s72A-1 Received: by mail-ed1-f70.google.com with SMTP id s6-20020a056402520600b003e2dea4f9b4so12241607edd.12 for ; Mon, 08 Nov 2021 07:57:46 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:message-id:date:mime-version:user-agent:subject :content-language:to:cc:references:from:in-reply-to :content-transfer-encoding; bh=8KYz763bboOxbMn20cIS2HzETWIJmR4WwhBPXCqWbVg=; b=I6Xudj43xCQEUHov3KkZdVh055yLCWVB73RpUm/4/JGTq07NjnY4dfSWAEdUM8QZQT vulMyt/3x1/WeJYzw8h027bMfnRzG+U2a0hKTh6efnWkhdVwWMdh1sPBc6D8+KFClRxD lLSOGJBqQo/NygKhZVPU54rl9O9qPiAffvn52OjK61Uh3Rc3VrbuAiQbTHu3dyiGVKex qM1KMLusMZ5v0birvma3gFdmRdJxtOCyaMeFVnuVjlrDj0qm9JAGujT1qeVvqKeRsgil 4H4ILvjWT6idMmK7WrFNPNjg37ECoed5hyswxW3kIkxw3cNnHMu3gBrH/B9oTj3v19W7 qEEw== X-Gm-Message-State: AOAM533YOGMxFdNrpWBGchzawsOXfuzmymnDdsLDpXs0JMXiZYdlS+ux YLCImZSlMHYboN6LbEsxE0jU/fJ2+lPH/AK13LIycIhuGpGLkYsssVXKocEOfbbgCZzVyVI1xLN CWn2FOm0tVmU4fXGs6fpSTw8H X-Received: by 2002:a17:907:8a12:: with SMTP id sc18mr430354ejc.274.1636387065486; Mon, 08 Nov 2021 07:57:45 -0800 (PST) X-Received: by 2002:a17:907:8a12:: with SMTP id sc18mr430325ejc.274.1636387065338; Mon, 08 Nov 2021 07:57:45 -0800 (PST) Received: from [10.40.1.223] ([81.30.35.201]) by smtp.gmail.com with ESMTPSA id e20sm9389142edv.64.2021.11.08.07.57.44 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Mon, 08 Nov 2021 07:57:44 -0800 (PST) Message-ID: <10c9d774-dcae-e80d-e6fa-235410658b84@redhat.com> Date: Mon, 8 Nov 2021 16:57:44 +0100 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:91.0) Gecko/20100101 Thunderbird/91.2.0 Subject: Re: [PATCH 06/13] power: supply: bq25890: Add support for skipping initialization Content-Language: en-US To: Andy Shevchenko 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 References: <20211030182813.116672-1-hdegoede@redhat.com> <20211030182813.116672-7-hdegoede@redhat.com> From: Hans de Goede In-Reply-To: Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi, On 10/31/21 00:07, Andy Shevchenko wrote: > 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. Good point, changed for v2. > ... > >> + 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. Because in all places except this one we want to know if we need to write the cfg to the device, removing the double negation here would mean adding negation to a init->skip_init check in many places, so this is cleaner. Regards, Hans