Received: by 2002:ac0:946b:0:0:0:0:0 with SMTP id j40csp3713268imj; Tue, 12 Feb 2019 03:28:17 -0800 (PST) X-Google-Smtp-Source: AHgI3IbCNiBuzA0EiDhErN7EXcZ5UPwqvkdpk6dql1dv+Xq904lLkQNiHz9MnDRw5e+gRpfrfPen X-Received: by 2002:a17:902:820f:: with SMTP id x15mr3444520pln.224.1549970897139; Tue, 12 Feb 2019 03:28:17 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1549970897; cv=none; d=google.com; s=arc-20160816; b=0A0mNY69HpKszr8vafYGjpls25XYAWqhH2qVwxPtIp3tw+vkE1P2RP7CHOIRwUkvd0 osP8tPgTWmLCUcr24x65f+s4KToHv671wABdhYoVjI8ZQCH0dVrC0vwgfgS/fKVmVuzJ Jb3hXiiI8e5F5DNW4+BllzOcLdGuBuxe/qJWF1XkhMZ88YWAy5h6SdsuI/iWgCn/r8cl hGNMAi2s5mLV9l4K+lHISLsUnd6YSyTvmRoQl6Cb26rEpN792xsr+wzqHvZm6Qt6Xhxx XZ7yU2fv72q080cdYFRVY/fMXiDiChBFQVuOitxfFlFt0UJoZqftQ7PQbO4Gjb9Qjew5 vuTg== 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-transfer-encoding:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature; bh=4hIHLwfUAJSeqewYADEu2g7Z4YgZdnPP16ibpzE0COE=; b=qT8TtUwaI0rqK1EO1iHQTw35fd/ZKkGZIYeHtF2liHgVk47Z0ioiG2JL5gT7Y675hb upup9M/vhP3Veuq/n/QSVxuWl9//vaFMrZ/xdpdlx53wjyA1rmcxNr7pAMFt8VYQ1aAN hBdXNM1CIUHI4uNvkvo35uAhYPYEQeB2DmhM4KK7BLGLSfImxo2gXsKAOh53YQUxjmrc LZRQKyb+19F8+HmhyStpS8B6sbGSiQ9f7ICbhZTPAQlVpYktiCfaKUGsR7sf6ckEzPeD 7AaxWjZ1GiCcJT4ow9bksajmFr+YQjd8SgyhhpU127StIDTiwtzXNlWcPdsfhpWGJlCA 6Ucg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=DPtteqb9; 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=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id p23si3057819plo.7.2019.02.12.03.28.01; Tue, 12 Feb 2019 03:28:17 -0800 (PST) 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=@linaro.org header.s=google header.b=DPtteqb9; 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=NONE dis=NONE) header.from=linaro.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729080AbfBLLOL (ORCPT + 99 others); Tue, 12 Feb 2019 06:14:11 -0500 Received: from mail-wr1-f66.google.com ([209.85.221.66]:41477 "EHLO mail-wr1-f66.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728900AbfBLLOJ (ORCPT ); Tue, 12 Feb 2019 06:14:09 -0500 Received: by mail-wr1-f66.google.com with SMTP id x10so2193086wrs.8 for ; Tue, 12 Feb 2019 03:14:08 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:content-transfer-encoding:in-reply-to :user-agent; bh=4hIHLwfUAJSeqewYADEu2g7Z4YgZdnPP16ibpzE0COE=; b=DPtteqb9o+xC6gdPJxVi8kytlxbR64zM3dMeRZiKRB4cZ07KYwL49siXslw42i4Lkd bPrwywXwRRBLb/7/lJnGfSUR/4f/WDboiqlAC1woyg05lt1xB5SDVQRWQ4rYBSSM5z5m mt9uj2kj9mtPd2btnZlCkFbCThKXOFj3Y4XEUeoRJzxqGXrHRrsi1nzd67dv50gv/K0u +DSJwnjYFAFhv+xAIjHh40FvT4ZdOm9FYBUNmXu8kiHPWjFJqgIw2DxQaN6aVy6q2Hfq 7UdyCKONkxeaZDy2B5qyr3/SJACKDKIjmdnXaIqIDLmFljSKKDgXz8vhMkrs5O/VT1hH AVzg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:content-transfer-encoding :in-reply-to:user-agent; bh=4hIHLwfUAJSeqewYADEu2g7Z4YgZdnPP16ibpzE0COE=; b=Z02W6dopW7dLZMFh205EmDAqgkA0oEUHlOKUk6LWmUQ6QbiRe3BIncD7HiAEllIqFE nuvsfz3SwF1iFaVa8cPopDaRdic739KqRms5GQOpLEeOJFluiwaFPDEbr+CC/HtJ4KWm zc8we3qwaPxJ5VLtZu0cqRh9WK41/PHkQHNpubFzganbTb4ONDgo77d9ylth1ECT/d+2 HdmblLztSPXhn56mmZ22jb3Wrcs3w8xgl6hOy+UJ2V2xHPAzJ97pc8BAH/B6+nf04JA+ curjNqwvGAyPtgLllLCEVmUxuo/hJHz4st6JMS/GVoPaHgBTynDw+zYVof23H/Yibnyq knsw== X-Gm-Message-State: AHQUAuaMrLunVmMNEl62wMBnFF9XkMowz4cGzmjMTf/EqMbjENNzh1h4 gch60WW8Bm1eUkzbL/lJDtE6rQ== X-Received: by 2002:adf:ba12:: with SMTP id o18mr2664464wrg.326.1549970047469; Tue, 12 Feb 2019 03:14:07 -0800 (PST) Received: from dell ([2.27.35.171]) by smtp.gmail.com with ESMTPSA id c10sm9828984wrr.69.2019.02.12.03.14.05 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Tue, 12 Feb 2019 03:14:06 -0800 (PST) Date: Tue, 12 Feb 2019 11:14:03 +0000 From: Lee Jones To: Bartosz Golaszewski Cc: Rob Herring , Mark Rutland , Linus Walleij , Dmitry Torokhov , Jacek Anaszewski , Pavel Machek , Sebastian Reichel , Liam Girdwood , Greg Kroah-Hartman , Linux Kernel Mailing List , "open list:GPIO SUBSYSTEM" , devicetree , Linux Input , Linux LED Subsystem , Linux PM list , Bartosz Golaszewski Subject: Re: [PATCH v4 05/10] mfd: max77650: new core mfd driver Message-ID: <20190212111403.GC20638@dell> References: <20190205091237.6448-1-brgl@bgdev.pl> <20190205091237.6448-6-brgl@bgdev.pl> <20190212083642.GT20638@dell> <20190212095457.GA20638@dell> <20190212101835.GB20638@dell> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: User-Agent: Mutt/1.9.4 (2018-02-28) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, 12 Feb 2019, Bartosz Golaszewski wrote: > wt., 12 lut 2019 o 11:18 Lee Jones napisał(a): > > > > On Tue, 12 Feb 2019, Bartosz Golaszewski wrote: > > > > > wt., 12 lut 2019 o 10:55 Lee Jones napisał(a): > > > > > > > > * The declaration of a superfluous struct > > > > * 100 lines of additional/avoidable code > > > > * Hacky hoop jumping trying to fudge VIRQs into resources > > > > * Resources were designed for HWIRQs (unless a domain is present) > > > > * Loads of additional/avoidable CPU cycles setting all this up > > > > > > While the above may be right, this one is negligible and you know it. :) > > > > You have nested for() loops. You *are* wasting lots of cycles. > > > > > > Need I go on? :) > > > > > > > > Surely the fact that you are using both sides of an API > > > > (devm_regmap_init_i2c and regmap_irq_get_*) in the same driver, must > > > > set some alarm bells ringing? > > > > > > > > This whole HWIRQ setting, VIRQ getting, resource hacking is a mess. > > > > > > > > And for what? To avoid passing IRQ data to a child driver? > > > > > > What do you propose? Should I go back to the approach in v1 and pass > > > the regmap_irq_chip_data to child drivers? > > > > I'm saying you should remove all of this hackery and pass IRQs as they > > are supposed to be passed (like everyone else does). > > I'm not sure what you mean by "like everyone else does" - different > mfd drivers seem to be doing different things. Is a simple struct > containing virtual irq numbers passed to sub-drivers fine? How do you plan on deriving the VIRQs to place into the struct? -- Lee Jones [李琼斯] Linaro Services Technical Lead Linaro.org │ Open source software for ARM SoCs Follow Linaro: Facebook | Twitter | Blog