Received: by 2002:ac0:946b:0:0:0:0:0 with SMTP id j40csp3655711imj; Tue, 12 Feb 2019 02:25:37 -0800 (PST) X-Google-Smtp-Source: AHgI3IbTsSQIUg4qa6CvfOYDnU1XYqwwye9x/pjgTIYT95HTPzqqgFxxlQyxup5R10zNted6VN9O X-Received: by 2002:a63:5964:: with SMTP id j36mr2973928pgm.210.1549967136973; Tue, 12 Feb 2019 02:25:36 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1549967136; cv=none; d=google.com; s=arc-20160816; b=n0bNuh9QQKI7qBmtqdgnf6uS9tbtm/qXSeLifrsU4b7arA1azO8ysCTvXLbSnGwSAf 1XP2Rx3Uy5ejlnsB111AdrGJLcIETKzXI8fKO0rV3L47djPL+ZKU8XDb5dgS0/23ZmAs jb8BkZhVB5jOAz0shtoXvpUQbrGAUP3gqYzkuF5c2aOPBtikzvP11juC+1S2Ichs17XP 76Uak7p5OLn4Jy7pdVDrKfIo5f9F/+RkZZKDnHx5hluodtRGtPqNSOs3abbPTgpOylsv QW31GTrDXgW9tCzTPsPO0vIH3s/U0AIEeXSv84AOCZMUo7g9DVYRr0L+SoKx/LBGK/uo rUPQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:cc:to:subject :message-id:date:from:in-reply-to:references:mime-version :dkim-signature; bh=OOI8B7HyQw2dzyQxkjkOOnTIw0ylaTwZx4zlYCeOPes=; b=t+cnRBW7jYY7fjlb1rae2pJFlQbu4CRp9IIVjkTLDR3s0yC8/bJohfJ1nGL/CwX4Cl Z8AJREzNysJTurojNsAb9j/LGTRvFruNGE2yeF98HeXQ1Minhp/0VVjd/wOEL+ZjBp64 s+T1fgM42FzQa8nzasvAxm8GmfF53REOdbNQmTgg7QWuueZq5n15QCILg8e+jFNALgCh 7c3/iL9dZUScnaKLtW7Wq+oIGJlskJHRjSh4Qz/L0F1zOaWNW0YWP4Kn/L/yy4fCDdha WNN8j/fMGH6y8O3OIYnYI0l71KB0JUheIroKAUzRWp1bxqD1U27nJdULRlfd5cnQ2n64 l7+g== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@bgdev-pl.20150623.gappssmtp.com header.s=20150623 header.b=c9bkZv8g; 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id 59si5813078plf.72.2019.02.12.02.25.21; Tue, 12 Feb 2019 02:25:36 -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=@bgdev-pl.20150623.gappssmtp.com header.s=20150623 header.b=c9bkZv8g; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728763AbfBLKYp (ORCPT + 99 others); Tue, 12 Feb 2019 05:24:45 -0500 Received: from mail-it1-f193.google.com ([209.85.166.193]:51105 "EHLO mail-it1-f193.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726003AbfBLKYo (ORCPT ); Tue, 12 Feb 2019 05:24:44 -0500 Received: by mail-it1-f193.google.com with SMTP id z7so5981366iti.0 for ; Tue, 12 Feb 2019 02:24:44 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bgdev-pl.20150623.gappssmtp.com; s=20150623; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc:content-transfer-encoding; bh=OOI8B7HyQw2dzyQxkjkOOnTIw0ylaTwZx4zlYCeOPes=; b=c9bkZv8grRSuhVKWvGwv5r6pXezREVJ2ZxARiOIc08fqzurxY/XH07tKMx5X3QQUUx ohKo2a4NxsD7cLCHis7Wdy1k8rHbK5iWna7naJJ/Mim021CPTRfqeNMd7rirSxx684TZ k4R4PBY1FtqoyUf1q4KplScpIsOeMSIVjPW4WjsfHs021t4neNv0PexA+Q3/p10emRIj eqP6nHOZwKqjP37zQgmGKoqG5MIVWMJjXLFMfS+GNQ9+kkKtWCnoTxMOe2dqX8k/igIb VywiXfSD3DykR/Tm6yVYmOx2qQct2Jm0Ozt9Uzt8BnMfrj+PM9nOfEaipGX04Q6MwkNJ azBw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc:content-transfer-encoding; bh=OOI8B7HyQw2dzyQxkjkOOnTIw0ylaTwZx4zlYCeOPes=; b=nLXFxTGQfl8pVKH3sVjtJ64Llp/3mi7cF+ki9gfq7v3WEHyg1BWFLvBRWHkpsDQdS4 KAIehWX9mnJE4qlXoH67xblhKvtsYObT44aE3K0M+6Qo7GL1ZGMP9uUOA4X4o+Eb9h3l hyCxd5aF790bUpMcy2jPBIzX7bDqhX31S6NM7j8mC77jY/IMMPa54a3A74owAxVWUdMb OT5duJTkm1jETKc6aOxTpKrXbYP/WdHQ6BUWXD8GPIJpj01dwqKv5O03CpPLcUmc1ace J26Jq/fnHMi4yOApf1+ONITPF8mmUbyWQ9DEb3r2RD5zTyNkHw3/6bpACyw+n5D5k78+ qpdw== X-Gm-Message-State: AHQUAuaGNFli097DrGy9uwZkKOcI2uLjVr+UdxEJuJToulIVShI5bip2 a8/t1wZoX4ESNd1hvnRERJZFQJLDb71DUpJbyhx9Sg== X-Received: by 2002:a5d:91d3:: with SMTP id k19mr1575071ior.258.1549967083638; Tue, 12 Feb 2019 02:24:43 -0800 (PST) MIME-Version: 1.0 References: <20190205091237.6448-1-brgl@bgdev.pl> <20190205091237.6448-6-brgl@bgdev.pl> <20190212083642.GT20638@dell> <20190212095457.GA20638@dell> <20190212101835.GB20638@dell> In-Reply-To: <20190212101835.GB20638@dell> From: Bartosz Golaszewski Date: Tue, 12 Feb 2019 11:24:32 +0100 Message-ID: Subject: Re: [PATCH v4 05/10] mfd: max77650: new core mfd driver To: Lee Jones 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 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org wt., 12 lut 2019 o 11:18 Lee Jones napisa=C5=82(a): > > On Tue, 12 Feb 2019, Bartosz Golaszewski wrote: > > > wt., 12 lut 2019 o 10:55 Lee Jones napisa=C5=82(= 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? Bart