Received: by 2002:ad5:474a:0:0:0:0:0 with SMTP id i10csp9926987imu; Wed, 5 Dec 2018 12:45:42 -0800 (PST) X-Google-Smtp-Source: AFSGD/WrWsnkQwU9PPPmf6OWtLdYDsfo2EZWvm4rwH/DUUg/DhYfHs7ffzeMqOMdAFImvnd1vUqG X-Received: by 2002:a17:902:780a:: with SMTP id p10mr26278685pll.54.1544042742838; Wed, 05 Dec 2018 12:45:42 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1544042742; cv=none; d=google.com; s=arc-20160816; b=V3g1vHPTtwuS1+WVfjUk6qBX6pO9yJt/wFD5nqseR0TGqdEfOsHQ9FzYjFwwzpvGb2 G7EsYP7/w/0U81egesAXLCRma9VXQYiVehj86WnABwJb0hJAYbKiHzGg3Y6gQXA5Nixd WFjxKgnOz5rSGtUr8N+sWh0dWHEwOpOZIjr1C7HtnQujAVATk89Bi+Rc7L9xzuD9rHeE 2F0XqJL9Xdllcbt1m7pXSiKGqEsWTeWwFtZVOOHKSmbnoFU/fZuNrdIo7pyIf34y35u3 Yb07Cbc1wUlTJN7YrX8uG2wSdSNPhjoATeCk73Uvjr/iIeXu+emu2UFRz1jHSJM9acOv mjTA== 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=itL+PDZ6L8PljYHpMiPFekz6RKZZlMPLOO6AiiV/B1g=; b=dH0AQyFXTpebTSC6934yZFUzcmvMysrtVMxZXUeBajxmEEENw5tGCkG3T7LY2tNwJy eL02LY5BdvRJorKp93KGjTlkeMm8RL0FL3Uqb4vPmJv+zcGxsuvPWOZleZqdq84nxlO1 ufNQpZ6ZmsPooiRnKsbFAPtLr34Ln6bwJsS0zY/uQj4MGQjIUkONBukoPBEKKyOfhHVm 65GwM6eDBHQ5hmT2+eSOsXTe+qlpzVOxfsau/tWkUcrNwkAgGSxrRaPXJozsln7pkcK+ sp5MNwxi6qyfMj74NamYiFBmlg6fhqolEQlh5mZz8Dum7+PxniV02pLgnXSNq3a20uvh ghwQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@baylibre-com.20150623.gappssmtp.com header.s=20150623 header.b=hgUBenEY; 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 l66si21472271pfl.258.2018.12.05.12.45.27; Wed, 05 Dec 2018 12:45:42 -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=@baylibre-com.20150623.gappssmtp.com header.s=20150623 header.b=hgUBenEY; 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 S1728442AbeLEUot (ORCPT + 99 others); Wed, 5 Dec 2018 15:44:49 -0500 Received: from mail-ot1-f68.google.com ([209.85.210.68]:38444 "EHLO mail-ot1-f68.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728083AbeLEUos (ORCPT ); Wed, 5 Dec 2018 15:44:48 -0500 Received: by mail-ot1-f68.google.com with SMTP id e12so19978762otl.5 for ; Wed, 05 Dec 2018 12:44:48 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=baylibre-com.20150623.gappssmtp.com; s=20150623; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc:content-transfer-encoding; bh=itL+PDZ6L8PljYHpMiPFekz6RKZZlMPLOO6AiiV/B1g=; b=hgUBenEYALvl9hb0vydFgeLvSL/eaEHRdMHdscyJRhyjXpODAt4IO5QUpr3tFB+B+N +TDCR1CMxJH0a9k4D0JQhPkjAUit/9gf+YpH+1y3TzuWIUtszKQej3B7+d6j6eVYd+Vb btyPFg2PekqFwYgtDF2WL7V5E5+352/o7JnyGYoN4bj+xxhOCS3lymo9OL6ossnJjNZj UxMLXXJVc0SzXSjLJRHKi9987erJjEWWeKQQDKSeeDWXTnwOWd4td6hicKY+Hn04Numq 66lqDg1u+b700/x6g8El1mrt0YsHs2s+v/9y5SM8BYnTBk8WL0/H19opAEptT0kFcZYn iwbQ== 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=itL+PDZ6L8PljYHpMiPFekz6RKZZlMPLOO6AiiV/B1g=; b=QY9LcVgPCJseGKNSYUsr9CCOwNLuFUo4O0x5tnCWAH8aCBVDEwUv4dLDAWtUNfvSa8 B0zbNnY8lMaqYS+6dkA+QXTWtlfIs1sNO9obbB0t30JUUEkXXR6hRvLUo9Ph/ggNk1ey RJ5gBh+DjDhIkFkip2GeefCvSaQ+RLRf7nG+a0WyJZa8qPGclTQEwCuGFpUVMNesz/fS AS31sYjw8Uf+KNOdZd++jpqFjUCX92OULHmiTGkcPaX5U2qDh2RCWfLVZ2Exv3Tajvrc y93mOAsga17nyPQtjNFBBZTXTsV9TDkGGcOsJag10XmIB51QYW7LYTA3FKxHXjeLGRwO b6Dg== X-Gm-Message-State: AA+aEWZOUbZNLnZTdVr18+tZWSKEk/G4YY4Fo3GClTiz3HwH36taMuHJ hvh4pjiKQXvvRP8YlSG4eHk1aT0c9zBe8BQGnCzxfQ== X-Received: by 2002:a9d:4595:: with SMTP id x21mr15842221ote.234.1544042688102; Wed, 05 Dec 2018 12:44:48 -0800 (PST) MIME-Version: 1.0 References: <20181204181550.29122-1-brgl@bgdev.pl> <20181204181550.29122-2-brgl@bgdev.pl> <20181205153534.GF6205@sirena.org.uk> In-Reply-To: <20181205153534.GF6205@sirena.org.uk> From: Bartosz Golaszewski Date: Wed, 5 Dec 2018 21:44:37 +0100 Message-ID: Subject: Re: [PATCH 1/1] regmap: irq: handle HW using separate mask bits for edges To: Mark Brown Cc: Bartosz Golaszewski , Greg KH , rafael@kernel.org, LKML 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 =C5=9Br., 5 gru 2018 o 16:35 Mark Brown napisa=C5=82(a= ): > > 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. Yes, it's two edges represented as separate interrupts. I will post a patch with a different (hopefully clearer) approach together with an example snippet from the code actually using it. Bart