Received: by 2002:ad5:474a:0:0:0:0:0 with SMTP id i10csp9614014imu; Wed, 5 Dec 2018 07:36:44 -0800 (PST) X-Google-Smtp-Source: AFSGD/VfQmknSrdLeRCgobcGOiakHxVgtrwozDZiITR1TztcmfMYCVvTo3WOeEGMevNtWIwHJ/xK X-Received: by 2002:a17:902:d806:: with SMTP id a6mr23680589plz.172.1544024204713; Wed, 05 Dec 2018 07:36:44 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1544024204; cv=none; d=google.com; s=arc-20160816; b=M5WMp99OsuoUcGZWnLImhcWvIT3Ch2iltCcIGLi3uRR4Rgn0N3vFS5FjlxvpNf0rDt NT8C6LsOe0oawiQpXxavMUQvcrmSBxs4vjznzNn3cT3R6qHHGe+zBwg2ay3qqbjGZphb a+s0GJxJAn6KZ+jiMlVXUbZNVqQaZUHGkUBPKvqjw+iw+Ld6yYCVseR5ddt2gg7V3knF oH4K5DrfKYvMzBTwxp5TJLrBJwq8K87omPm62HHmXcnJsshpm+D7pk+ajAuXszimFCCC TGQQUuZf/kaj/FEJRGIe6QMlVSHTfZ4xvoGjve6+iMEyjutNUenYknSK/Kw/AnOx5+n4 aE/w== 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=yFplxfAkz7zY6cqGyIDWiohJhxWO8+45E7iFp+b5/Pc=; b=AhJztQi+m2H0tnUBbGRzkWGFo2VIGv3xlCx/Zvoo/eHuOdwxdK8TJ7pc9cwnotm4Q7 xNPPMvpScYJMWPmjrDDFRBFFypwRYfQi+xodOwyW+tHVtbMxPd6gMIn/XwlZRXtelBcy N1ikKRQqpnkYLTDYTTWsYWf7w4RMjyAAWTEQsgwuRloKSEHYUe6lza/y+bsZ+O6dA4B0 lZ12pqAXz12AMWfyM7+2Ruxx5PWT7AZ8qOm9pijjXT8zchjPmmNK1/C182HwWzBybMrv 1jjhP+2o/8+a9e22l6E1j7LUMFAJwQ9nYBI2JB4F+OqZbzbbnCoJFSxY8KjvSmpo2BEU M9BA== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@sirena.org.uk header.s=20170815-heliosphere header.b=V4R2ojlV; 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 w2si16682596pgp.546.2018.12.05.07.36.27; Wed, 05 Dec 2018 07:36:44 -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=V4R2ojlV; 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 S1727701AbeLEPfj (ORCPT + 99 others); Wed, 5 Dec 2018 10:35:39 -0500 Received: from heliosphere.sirena.org.uk ([172.104.155.198]:41448 "EHLO heliosphere.sirena.org.uk" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727103AbeLEPfi (ORCPT ); Wed, 5 Dec 2018 10:35:38 -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=yFplxfAkz7zY6cqGyIDWiohJhxWO8+45E7iFp+b5/Pc=; b=V4R2ojlVzdD2//iOeAeE6ymWz GAlX+3ro60ee9G4V1RYk9jAwfC45aBxNFkNH8i9ECtY53w9l3i7YLhdUk8jdJD1L+jYSGZFMkQlVx M/dUXvMhLEbUfkQ/23znjqj/Q+7XVPcv8ayuAqVP1Wp68rq26owqyMj3tmmG6u5iESAoc=; Received: from cpc102320-sgyl38-2-0-cust46.18-2.cable.virginm.net ([82.37.168.47] helo=debutante.sirena.org.uk) by heliosphere.sirena.org.uk with esmtpa (Exim 4.89) (envelope-from ) id 1gUZD4-0005XN-Np; Wed, 05 Dec 2018 15:35:34 +0000 Received: by debutante.sirena.org.uk (Postfix, from userid 1000) id 1398A112533F; Wed, 5 Dec 2018 15:35:34 +0000 (GMT) Date: Wed, 5 Dec 2018 15:35:34 +0000 From: Mark Brown To: Bartosz Golaszewski Cc: Greg Kroah-Hartman , "Rafael J . Wysocki" , linux-kernel@vger.kernel.org, Bartosz Golaszewski Subject: Re: [PATCH 1/1] regmap: irq: handle HW using separate mask bits for edges Message-ID: <20181205153534.GF6205@sirena.org.uk> References: <20181204181550.29122-1-brgl@bgdev.pl> <20181204181550.29122-2-brgl@bgdev.pl> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha512; protocol="application/pgp-signature"; boundary="Y1L3PTX8QE8cb2T+" Content-Disposition: inline In-Reply-To: <20181204181550.29122-2-brgl@bgdev.pl> X-Cookie: Real Users never use the Help key. 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 --Y1L3PTX8QE8cb2T+ Content-Type: text/plain; charset=us-ascii Content-Disposition: inline On Tue, Dec 04, 2018 at 07:15:50PM +0100, Bartosz Golaszewski wrote: > Let's reuse the existing type fields in struct regmap_irq to make > regmap_irq_chip available to such HW. I'm not sure this is ideal, it makes the interface less clear for users especially since there's nothing in the comments in the header that users will look at which mentions the feature. > If the type_base and mask_base offsets are the same - assume there > are separate bits for falling and rising edge interrupts and use > the value previously written to the type buffer by the set_type() > callback instead of the entire mask specified for this interrupt > so that we only enable the requested edge interrupts. This feels like it's very strongly tied to a specific implementation of the feature and TBH I'm somewhat unclear on what this ends up concretely meaning. It sounds like this hardware represents the two edges as separate interrupts but you want to combine them into one but I can't see exactly how the interrupt number gets mapped with your change. --Y1L3PTX8QE8cb2T+ Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQEzBAABCgAdFiEEreZoqmdXGLWf4p/qJNaLcl1Uh9AFAlwH8EUACgkQJNaLcl1U h9CysAf/T8OMx17dmpEeG9+TJkFq7jreKtDyE30h8Q6yzJo5br3qYq/PUr2nO4a+ pil0dxTuZpl13uE5RKmZkD/YF3PP4QBTQMXE09yd8iMOe/HDHUbQh6yYzGpHmtir DCQ0Q5VutgY3MqotuG6lUbeKxAHTRcrQeYzoeIecP/xsa68U+WmnOYtWg6sP9Goh pcdWGSPAw5EOtGtwToGPBgdgv163GavsnFjxYzq7jBgsMWXxkqRfkE83Za015FN0 cMf6nJ7n9kk55KRrLsNXDbFNOxJKdRRCAK8jH+xiKQJ+QLUqUUu/qs3OtvG01JPO bs9jew7H1mGCj1zmTClLHwg3E8Lbfw== =UeUq -----END PGP SIGNATURE----- --Y1L3PTX8QE8cb2T+--