Received: by 2002:ad5:474a:0:0:0:0:0 with SMTP id i10csp11073895imu; Mon, 31 Dec 2018 12:23:47 -0800 (PST) X-Google-Smtp-Source: ALg8bN7uA5GNrW1IR870LX61bfCMJxEqX2fbhSJg5rwu5hjlJ74l103pnS0aaN7Z0fYA6z/XocOc X-Received: by 2002:a63:85c6:: with SMTP id u189mr8324860pgd.156.1546287827864; Mon, 31 Dec 2018 12:23:47 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1546287827; cv=none; d=google.com; s=arc-20160816; b=lVz98W4iUot5QakTq/AtGUojcspoTBIxEHbSM9WVs5YfmT919conAPN7RpOxMJm4Mw cBAeCLTrmIs9cAQGILVTvqCLcTpDc5eFyy1nJmLr63/AKs0O4aRo/JYOEnt+O7Ds0UWz F1VKRUDbxKAEy/6l+FeYFRpyYtPw7vfpoJUqRsjIWsgQg/hDJh9AJe0nYqbJ6mNKlJ8T 3J0sWEdvTz8FJv0fj4hgzGhBflDX3C/jH/j1O2tp++1RYeO0ivEDC8NivxIodlUhfM1l 2ImzdPJDjGEj2Z85nzPZY2iQKpOqzP+Jrekx9unKJEiFh7frNtaYWyrfu1NGurCFmTeY luCQ== 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:message-id:subject:cc :to:from:date:dkim-signature; bh=Nj8Y+aQRIRkHU+7mC4UcT1kfh7PTHrf/SYAXsGJpvkQ=; b=iGt8Yw3YCzhv4r457eoKPyUpBgnMpWt4S/Ao8cv8UaFn0B7ENu0Ihv08n5ELPAiI4r /rfz2XaJ2dG0kS4+HzJc1EpoqNrzsLhQEF+1V8A27sP+PuTmehMp5xXPUp5upcJxz7X7 6hWx9FKkq1EMqyjOZuCH73RhMasPMjPOOEBe9A5K2Fb5ilXerQrOXFQtDgY6HZ2EsKZM V92lpf1fi0x/Bcn80AnCzqcCRtzhTN16zEgw0/TSnMTznpPc11fQ/BurYX+gIncj2kI9 B4LjQkWgy4XvEHNnI1cyy6+y/8bsYmGE1/m87Zr77RXgDJUGyBJpJfbLUyC4/OKiWszD /sew== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@sirena.org.uk header.s=20170815-heliosphere header.b=PKfmjnlx; 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=fail (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id e2si8562586pgj.316.2018.12.31.12.23.28; Mon, 31 Dec 2018 12:23:47 -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=fail header.i=@sirena.org.uk header.s=20170815-heliosphere header.b=PKfmjnlx; 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=fail (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727517AbeLaTLf (ORCPT + 99 others); Mon, 31 Dec 2018 14:11:35 -0500 Received: from heliosphere.sirena.org.uk ([172.104.155.198]:51978 "EHLO heliosphere.sirena.org.uk" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727379AbeLaTLf (ORCPT ); Mon, 31 Dec 2018 14:11:35 -0500 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=sirena.org.uk; s=20170815-heliosphere; h=In-Reply-To:Content-Type: MIME-Version:References:Message-ID:Subject:Cc:To:From:Date:Sender:Reply-To: Content-Transfer-Encoding:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Id: List-Help:List-Unsubscribe:List-Subscribe:List-Post:List-Owner:List-Archive; bh=Nj8Y+aQRIRkHU+7mC4UcT1kfh7PTHrf/SYAXsGJpvkQ=; b=PKfmjnlx9OQUgqBnz48XCh94H SzTQ8rEeQT/IDwh3skFLDK2nkjB8DRKnb0qXhR//gsjrBIvchKiATCH+lpEjlPZoZfOiWeypvmHWA ZNiEMzQU9xk8uSRsj1IRqgxrMHXZg0NJq/t2fpVV4C5gV05qFay7t4mUtZJ6khnKd/ZPQ=; Received: from cpc102320-sgyl38-2-0-cust46.18-2.cable.virginm.net ([82.37.168.47] helo=finisterre.ee.mobilebroadband) by heliosphere.sirena.org.uk with esmtpsa (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.89) (envelope-from ) id 1ge2yG-0002dF-I0; Mon, 31 Dec 2018 19:11:28 +0000 Received: by finisterre.ee.mobilebroadband (Postfix, from userid 1000) id C9FAC440080; Mon, 31 Dec 2018 19:11:27 +0000 (GMT) Date: Mon, 31 Dec 2018 19:11:27 +0000 From: Mark Brown To: Matti Vaittinen Cc: Geert Uytterhoeven , mazziesaccount@gmail.com, heikki.haikola@fi.rohmeurope.com, mikko.mutanen@fi.rohmeurope.com, Greg KH , "Rafael J. Wysocki" , Linus Walleij , Linux Kernel Mailing List , "open list:GPIO SUBSYSTEM" , Vladimir Zapolskiy , Linux-Renesas Subject: Re: [PATCH v3] regmap: regmap-irq/gpio-max77620: add level-irq support Message-ID: <20181231191127.GL1846@sirena.org.uk> References: <20181218115931.GA21253@localhost.localdomain> <20181227073531.GA2461@localhost.localdomain> <20181227075648.GB2461@localhost.localdomain> <20181228080533.GC2461@localhost.localdomain> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha512; protocol="application/pgp-signature"; boundary="eWbcAUUbgrfSEG1c" Content-Disposition: inline In-Reply-To: <20181228080533.GC2461@localhost.localdomain> X-Cookie: knowledge, n.: User-Agent: Mutt/1.10.1 (2018-07-13) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org --eWbcAUUbgrfSEG1c Content-Type: text/plain; charset=us-ascii Content-Disposition: inline On Fri, Dec 28, 2018 at 10:05:33AM +0200, Matti Vaittinen wrote: > Last night - just when I was about to get some sleep - it stroke me. I > think the correct thing to do would be leaving the irq_set_type to NULL > for those IRQ chips which do not support type setting. If we do that, > then the irq core will take care of situations where user requests type > setting but the chip does not support it. Which means the regmap-irq > would be no different from any other irq chip where type setting is not > supported. Yes, this is the best fix - let the framework handle things properly. We'll need a second set of operations and to select which to use based on having type information but that's fine. > So at the cost of removing "const" from regmap_irq_chip we could do: ... > Mark, Geert, what do you think? (And maybe same for the .irq_set_wake - > but I did omit this as I have never looked at the wake functionality > before). We need a separate struct as otherwise if there's multiple devices with regmap irq_chip implementations then they'll collide with each other but otherwise I like this approach (or we could copy the irq_chip struct when registering and then modify which is going to scale a bit better - you're probably right that we need to do the same thing for the wake configuration. I'll still look at applying your patch as a temporary fix though. --eWbcAUUbgrfSEG1c Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQEzBAABCgAdFiEEreZoqmdXGLWf4p/qJNaLcl1Uh9AFAlwqad4ACgkQJNaLcl1U h9Bc0Af8DMJruSFgiVs/MWljDlBa743YhF8i6QW5jYRmLkU6Rm6iD5FJAJ8sGXag R/h/8Z8o9HoZn62qHkinaOvZa/hg4at63kwp6riLnIsJFS1uCSacwBpCNTf1LvyW Zv5Cd4WVW+ldiaVEWJPcV23UWqjHWdSMEtYG2/FUycSoTMZNzHLiZc27euQ3Izi1 bGQEAGJU/5koBsDa2eoLkbmFg58Kc5HBcmw0wPgLnRX5/8LcXMrrh7dF8bypLJDG K7+WrkyFLgDBGZ8QHdzVUUHUj7+W5o2xkB5/yTedou/e0dr2jtgcrfHSvMitCePa eGKlmA0VqMLTsEhp+wvK55Iy0lmAjg== =U4/g -----END PGP SIGNATURE----- --eWbcAUUbgrfSEG1c--