Received: by 2002:a05:6359:6284:b0:131:369:b2a3 with SMTP id se4csp3002597rwb; Mon, 7 Aug 2023 06:56:49 -0700 (PDT) X-Google-Smtp-Source: AGHT+IHGC52/0DIa8/fKRI39jCt1g3f2PLQXksQfutbEdk85d+FeJUIqk4qK67SctKL/8MzSym4X X-Received: by 2002:a17:90b:4c4b:b0:269:4886:b388 with SMTP id np11-20020a17090b4c4b00b002694886b388mr4803099pjb.16.1691416609596; Mon, 07 Aug 2023 06:56:49 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1691416609; cv=none; d=google.com; s=arc-20160816; b=cXOYUwG/YXUHDUxnrqZD7lHtAlTe//zIVg3S3IsA0mvud4RSNdAWOC/LbTUccNdKjG oXUDqnIjyLI+mAQKUpIeEflKb/HmbHdulGhnm7GZdFJsc7SIuvAIGeSYENoocoaHJ3g9 W/8/Ukxx4HuGqT1VeV1E8dA7JQxnr7SsRIljxhmfbS9svWAwkHom9DirLab4jcjlxAFJ oFeLgasgvD/UQbWxbpxwrw77ev12jRQSouy4buKF06bUcNTzDGPx11I1+62vuFAApAZQ TijL2/WWfkR9Mi2Dp2nqj5eIOSxv+rJpvCHGooF9be+NBaG9HMDqV2IEgnypGbFzDZZU ZNtA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :organization:references:in-reply-to:message-id:subject:cc:to:from :date; bh=RHdmXpOD/KVFy+FJ8oLJATkxB1AWgwWn4N7hmYW2erc=; fh=QNVPgfJDBdPwsP3jah6gf669IghgkH39opNBuWrH4rg=; b=zwTV1TEU3z2H/vWjWnb4J1uiKCWJxTPUiuDizlI8cmzZ16jM8uBiGBfHtObxCSICyP ti5NicuVe7bbgoXyzzpVeSxm029EYPW7KSLwvyYoeNUW+bXyhzTMpA0xoDlVUivRx78S 4r+KcJVTMlvvvs7Lna1nB8uJ0kZERIxu2PMa47pE/d0X1LDL7Jtl4i5Il/+W2OupR6A2 +xeAgtPWE9FglgswITk2c2B4M21isi7243IxIbwf6WdmnacNIzxyc7elROIDQDI9G+FQ FWgZZePiEVsGRg9NtWvV7XY7rycjOS2UYEZsVmkl5UJxGQuFv1QWE8WCvxLPkhUg0Se+ EeFw== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=arm.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id jo3-20020a17090b140300b00263e423753dsi3719738pjb.42.2023.08.07.06.56.36; Mon, 07 Aug 2023 06:56:49 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=arm.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S234428AbjHGNoC (ORCPT + 99 others); Mon, 7 Aug 2023 09:44:02 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:59162 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234321AbjHGNnh (ORCPT ); Mon, 7 Aug 2023 09:43:37 -0400 Received: from foss.arm.com (foss.arm.com [217.140.110.172]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id 2E2222136; Mon, 7 Aug 2023 06:43:06 -0700 (PDT) Received: from usa-sjc-imap-foss1.foss.arm.com (unknown [10.121.207.14]) by usa-sjc-mx-foss1.foss.arm.com (Postfix) with ESMTP id 811DE1FB; Mon, 7 Aug 2023 06:43:23 -0700 (PDT) Received: from donnerap.manchester.arm.com (usa-sjc-imap-foss1.foss.arm.com [10.121.207.14]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id 06E863F64C; Mon, 7 Aug 2023 06:42:38 -0700 (PDT) Date: Mon, 7 Aug 2023 14:42:29 +0100 From: Andre Przywara To: Rob Herring Cc: Lee Jones , Krzysztof Kozlowski , Conor Dooley , Chen-Yu Tsai , devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, Icenowy Zheng , Shengyu Qu , Martin Botka , Martin Botka , Mark Brown Subject: Re: [PATCH] dt-bindings: mfd: x-powers,axp152: make interrupt optional for more chips Message-ID: <20230807144229.5710738d@donnerap.manchester.arm.com> In-Reply-To: <20230804153432.GA1388331-robh@kernel.org> References: <20230802141829.522595-1-andre.przywara@arm.com> <20230804153432.GA1388331-robh@kernel.org> Organization: ARM X-Mailer: Claws Mail 3.18.0 (GTK+ 2.24.32; aarch64-unknown-linux-gnu) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=-4.2 required=5.0 tests=BAYES_00,RCVD_IN_DNSWL_MED, SPF_HELO_NONE,SPF_NONE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Fri, 4 Aug 2023 09:34:32 -0600 Rob Herring wrote: Hi, > On Wed, Aug 02, 2023 at 03:18:29PM +0100, Andre Przywara wrote: > > All X-Powers PMICs described by this binding have an IRQ pin, and so > > far (almost) all boards connected this to some NMI pin or GPIO on the SoC > > they are connected to. > > However we start to see boards that omit this connection, and technically > > the IRQ pin is not essential to the basic PMIC operation. > > The existing Linux driver allows skipping an IRQ pin setup for some > > chips already, so update the binding to also make the DT property > > optional for these chips, so that we can actually have DTs describing > > boards with the PMIC interrupt not wired up. > > > > Signed-off-by: Andre Przywara > > --- > > Hi, > > > > arguably the IRQ functionality is optional for many more PMICs, > > especially if a board doesn't use GPIOs or a power key. > > So I wonder if the interrupts property should become optional for all? > > After all it's more a board designer's decision to wire up the IRQ pin > > or not, and nothing that's really related to a particular PMIC. > > I would say yes. Particularly if it gets rid of a conditional schema. I see your point, and we might get there, but after some digging extending this to more/all PMICs needs more work, see below. Given that I was wondering if we can merge this patch now, as this blocks multiple DTs from being merged (and Connor already ACKed it). I sent an MFD driver fix to make this actually work for the AXP313a: https://lore.kernel.org/lkml/20230807133930.94309-1-andre.przywara@arm.com/ For supporting this on more PMICs: Currently many Linux (sub-)drivers registered by the MFD driver crash when there is no valid interrupt registered, and we so far just special cased the very simple PMICs to skip just the power key driver registration, which works for those chips. However this affects more drivers (I tested ac-power-supply), so it's not clear if that's really something useful for the other PMICs providing more functionality. I guess we can postpone this until either there is actually a use case for those other PMICs (boards without the IRQ line connected), or when this list of exceptions grows too large. Cheers, Andre