Received: by 2002:a25:868d:0:0:0:0:0 with SMTP id z13csp3747868ybk; Tue, 19 May 2020 12:00:15 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxPGObwIlH0TF3d4IXe3JkWedXoGHqjFco5RGIYhx5TXEEi5/A6v6f2WWnYcbOKCOcPY4Dr X-Received: by 2002:a17:906:c112:: with SMTP id do18mr526259ejc.231.1589914814773; Tue, 19 May 2020 12:00:14 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1589914814; cv=none; d=google.com; s=arc-20160816; b=DJojAwEiNS5Jrua/yOm5vThATTcXuE32Ab0YGpCj2ODf3OLXrPJrvJwQ+nJ4CN+830 52seAPoa62cFOlwgalpOR32EzHMTUc8QHdVIMoUk+roNpy00pF+OAv+z53NV60YcLTgJ VDyJGVODqOdX2IfXF0QKiNkAGZr/gqeITZNA4V8DGjUFt/G0OvpH3qShEdrSIBgnXaJL te5hPyNnlit3hWHDnsnc/K4dU1H8Rf6ICCLgZ0jqOCKbwJrDNFZqW/r15VANLI5w9twL 3KHYx0HJFnBBg3fQRTaCpihb+22tOM2ZzmWPCt56ssRMVOW4cm0ALwh+LpaSQ5HqR3Lb rzMg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:mail-followup-to :message-id:subject:cc:to:from:date; bh=usQD3IOMKGCfH4M/Vpu8O10UQvui4dr4b/Sc9tNjCac=; b=xAhtTT9N/lcdcV5mZz2Lbkv5oB/9Qp+qyeO05XqKXHjzeUT65hUjvGxAhydrCyBGr5 /IvGVt1D//3mQEEX0Yhcs2UgGw/tv3cqpPwzdNsOqu4nN1jPyp2FsV4x34gzciN4EAAU RHSvdsu5Krie3mVMpwoDWh1vlLBcd4Q12hmNbmTAo5SCxpTKs53nDIsqXV2SvmcTIpd2 GIZhtRvIQRdEWZbCm3smcNMHFYejfD+dGV8TChaalTo7J9le962r8ltQi31xHfnRj0kf 7OaJSV0pB0R1oFA9qyuhVWgLeGqmk1Pa0aTSBnwlOGeWEjB1nvyq7eW9n1KnIJwZNCSn K3bA== ARC-Authentication-Results: i=1; mx.google.com; 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id k6si432647ejv.454.2020.05.19.11.59.50; Tue, 19 May 2020 12:00:14 -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; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726903AbgESS56 (ORCPT + 99 others); Tue, 19 May 2020 14:57:58 -0400 Received: from alexa-out-sd-01.qualcomm.com ([199.106.114.38]:35588 "EHLO alexa-out-sd-01.qualcomm.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726567AbgESS56 (ORCPT ); Tue, 19 May 2020 14:57:58 -0400 Received: from unknown (HELO ironmsg02-sd.qualcomm.com) ([10.53.140.142]) by alexa-out-sd-01.qualcomm.com with ESMTP; 19 May 2020 11:57:57 -0700 Received: from gurus-linux.qualcomm.com ([10.46.162.81]) by ironmsg02-sd.qualcomm.com with ESMTP; 19 May 2020 11:57:57 -0700 Received: by gurus-linux.qualcomm.com (Postfix, from userid 383780) id A91324CCD; Tue, 19 May 2020 11:57:57 -0700 (PDT) Date: Tue, 19 May 2020 11:57:57 -0700 From: Guru Das Srinagesh To: Lee Jones Cc: devicetree@vger.kernel.org, linux-arm-msm , Rob Herring , Subbaraman Narayanamurthy , David Collins , linux-kernel@vger.kernel.org Subject: Re: [PATCH v1 2/2] mfd: Introduce QTI I2C PMIC controller Message-ID: <20200519185757.GA13992@codeaurora.org> Mail-Followup-To: Lee Jones , devicetree@vger.kernel.org, linux-arm-msm , Rob Herring , Subbaraman Narayanamurthy , David Collins , linux-kernel@vger.kernel.org References: <5644dea146f8b49a5b827c56392ff916bfb343e9.1588115326.git.gurus@codeaurora.org> <20200429075010.GX3559@dell> <20200501011319.GA28441@codeaurora.org> <20200515104520.GK271301@dell> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20200515104520.GK271301@dell> User-Agent: Mutt/1.5.21 (2010-09-15) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Fri, May 15, 2020 at 11:45:20AM +0100, Lee Jones wrote: > On Thu, 30 Apr 2020, Guru Das Srinagesh wrote: > > > On Wed, Apr 29, 2020 at 08:50:10AM +0100, Lee Jones wrote: > > > On Tue, 28 Apr 2020, Guru Das Srinagesh wrote: > > > > > > > The Qualcomm Technologies, Inc. I2C PMIC Controller is used by > > > > multi-function PMIC devices which communicate over the I2C bus. The > > > > controller enumerates all child nodes as platform devices, and > > > > instantiates a regmap interface for them to communicate over the I2C > > > > bus. > > > > > > > > The controller also controls interrupts for all of the children platform > > > > devices. The controller handles the summary interrupt by deciphering > > > > which peripheral triggered the interrupt, and which of the peripheral > > > > interrupts were triggered. Finally, it calls the interrupt handlers for > > > > each of the virtual interrupts that were registered. > > > > > > > > Nicholas Troast is the original author of this driver. > > > > > > > > Signed-off-by: Guru Das Srinagesh > > > > --- > > > > drivers/mfd/Kconfig | 11 + > > > > drivers/mfd/Makefile | 1 + > > > > drivers/mfd/qcom-i2c-pmic.c | 737 ++++++++++++++++++++++++++++++++++++++++++++ > > > > > > The vast majority of this driver deals with IRQ handling. Why can't > > > this be split out into its own IRQ Chip driver and moved to > > > drivers/irqchip? > > > > There appear to be quite a few in-tree MFD drivers that register IRQ > > controllers, like this driver does: > > > > $ grep --exclude-dir=.git -rnE "irq_domain_(add|create).+\(" drivers/mfd | wc -l > > 23 > > > > As a further example, drivers/mfd/stpmic1.c closely resembles this > > driver in that it uses both devm_regmap_add_irq_chip() as well as > > devm_of_platform_populate(). > > > > As such, it seems like this driver is in line with some of the > > architectural choices that have been accepted in already-merged drivers. > > Could you please elaborate on your concerns? > > It is true that *basic* IRQ domain support has been added to these > drivers in the past. However, IMHO the support added to this driver > goes beyond those realms such that it would justify a driver of its > own. I am exploring an option to see if the regmap-irq APIs may be used in this driver, similar to stpmic1.c. Just to let you know, it might be a few days before I am able to post my next patchset as I'll have to make the necessary changes and test them out first. Thank you. Guru Das.