Received: by 2002:a05:6a10:6744:0:0:0:0 with SMTP id w4csp5171272pxu; Wed, 21 Oct 2020 15:57:12 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzSSuY1lDbHOqAwmH9MR1HMsnA1y2s62KLfewFQHw0AYxvrEkEDz+ZSRbqZs2zOeserVWpd X-Received: by 2002:a05:6402:744:: with SMTP id p4mr5159831edy.190.1603321031962; Wed, 21 Oct 2020 15:57:11 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1603321031; cv=none; d=google.com; s=arc-20160816; b=IB/EhFpaVqBa8HuoiSity8efiS/yYqXkbBhlzWiExFnApelW+6qzBIxX0FVLJDb+xp 9DX0MTkVQXIANsMVAH7xen1UoBo9Xqn1bKhw842nbZjDB5KJTn+9JjXfQf4T3LufUB2+ 7isiLzxfxTQUoCekW8I0C3//22WjxkBcNhWKnu4Wgou3qXqNmE60Z4B+7XydJWj73NIT j/spk9Z/h+iHu9sqDUXWfz9gsIe/52kBJHA8VUecCX/azk/uFs3lhWbNRg5cN2ZVfHgC N7D2mZar9/G8fkC9osvN4n/bzyD4+4pcEMgL9TtF+NA9ZyjezMiVBywLVTdUjhZXr6OM 2LEg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:cc:to:subject:message-id:date:from:in-reply-to :references:mime-version:dkim-signature; bh=sgdeaNLeFEVMNHVsrJv3x64Nz+VLWwYYdWEYLLEMUbs=; b=en2atPJJDBFZzV/mkloSYo/cRcei7eY6Rbm86DI0l1I/jcoKTeX1+XZ4Z6Jx6zvZfQ GNzKyUYXS5KMLQL4zyFecKqrZo1rJnYSbbQWd/TRPXtLQomTPbh8wgKr1WHpA/CWnzdx NSPq9Fw3mVJQDaYFlWvuasFfXwyvd17Sug9MXL4VIuBMyH7tz1JM5o5RXCicOm9rh6DD Rq7D6QtL9zu92Zanr10Cl2htYwkYqQ6K4mAlMOmTj/Y9t01Kqxi3GIsAdrj/+Wi1+rOc M09g1JN62UH+aw55nKKUWOFF6mTHwzsb00pCkb+tFK2OtR3PqK58+fcoO3ZommR1iJgV MfRw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@0x0f.com header.s=google header.b=IhXAiczr; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id u2si2255672ejt.588.2020.10.21.15.56.48; Wed, 21 Oct 2020 15:57:11 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@0x0f.com header.s=google header.b=IhXAiczr; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2438908AbgJULHu (ORCPT + 99 others); Wed, 21 Oct 2020 07:07:50 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:33994 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2439251AbgJULHu (ORCPT ); Wed, 21 Oct 2020 07:07:50 -0400 Received: from mail-wr1-x441.google.com (mail-wr1-x441.google.com [IPv6:2a00:1450:4864:20::441]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id F2736C0613D2 for ; Wed, 21 Oct 2020 04:07:49 -0700 (PDT) Received: by mail-wr1-x441.google.com with SMTP id j7so2543105wrt.9 for ; Wed, 21 Oct 2020 04:07:49 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=0x0f.com; s=google; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=sgdeaNLeFEVMNHVsrJv3x64Nz+VLWwYYdWEYLLEMUbs=; b=IhXAiczrLAmLzfqCcMtKKPHk3ybKQgdIvRyQ6PGaU2vUCiU4ByB7X2ZKVBDnfXc4yo C7K1uGXUd4VsnHgdwrT4fJvbiujw76q/UssPT40uFnaT5qUdTVw8P49APGQ30C1E5pdU pMU5JePGUTWu9GT/wP7q+aIsfJ9pTcio0W6EU= 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; bh=sgdeaNLeFEVMNHVsrJv3x64Nz+VLWwYYdWEYLLEMUbs=; b=GqKubXK6r2A6CiWhwIPMtOU4xAHkC44dB4wxcRDdYokkI+p0NEC4QtDZDQHJVr3ZVU 8xk/Zz2ISggYAFfiZkvGxgmV4m4mB0b4SXXKc3aF0Hqno3/Z98kasN0y6odfOU6R6t/A uRdxp6MnPwVL10JiP70N+sNKEQ2UU0j2e6CaXymS4VIxllkOshezIToIUk7ES/4xRrTN Qb395g3m2+d779W06PfAi3RcEpO1NYaXnkZ+H7d6WOEs+JZOd51Arv+ySMJe6nyvwK96 tukpu6VtiWTBBnLFFAwfnAgxf/uQVKghlGlXqwpHZtkoVl4RoL0fP3/bxLeLQR/hV9q3 9tYg== X-Gm-Message-State: AOAM533Gsodr9beZN6INX3Dd4X/hRXFMccgGCUwJwp2huEbvcXNjj239 bXKGDZNpSet3gJ20tfK6r3qlH9fDLRv3K6dT634v5g== X-Received: by 2002:a5d:4d8a:: with SMTP id b10mr4210682wru.5.1603278468446; Wed, 21 Oct 2020 04:07:48 -0700 (PDT) MIME-Version: 1.0 References: <20201011024831.3868571-1-daniel@0x0f.com> <20201011024831.3868571-4-daniel@0x0f.com> In-Reply-To: From: Daniel Palmer Date: Wed, 21 Oct 2020 20:07:37 +0900 Message-ID: Subject: Re: [PATCH 3/5] gpio: msc313: MStar MSC313 GPIO driver To: Linus Walleij Cc: "open list:GPIO SUBSYSTEM" , "open list:OPEN FIRMWARE AND FLATTENED DEVICE TREE BINDINGS" , Linux ARM , "linux-kernel@vger.kernel.org" Content-Type: text/plain; charset="UTF-8" Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi Linus, Sorry to pester you again... On Sat, 17 Oct 2020 at 01:56, Linus Walleij wrote: > > + gpiochip->to_irq = msc313_gpio_to_irq; > > + gpiochip->base = -1; > > + gpiochip->ngpio = gpio->gpio_data->num; > > + gpiochip->names = gpio->gpio_data->names; > > + > > + for (i = 0; i < gpiochip->ngpio; i++) > > + gpio->irqs[i] = of_irq_get_byname(pdev->dev.of_node, gpio->gpio_data->names[i]); > > Use hierarchical generic GPIO IRQs for these. > > Assign ->fwnode, ->parent_domain, ->child_to_parent_hwirq, > and probably also ->handler on the struct gpio_irq_chip *. > > Skip assigning gpiochip->to_irq, the generic code will > handle that. > > Again see gpio-ixp4xx.c for an example. I sent a v2 with this conversion already and it looks a lot better. Based on Andy Shevchenko's comments[0] I'll be sending a v3 that fixes up all style and other issues he found. Before I do that I have a question that maybe you could help me with: Andy noted a few times that I have this driver as a built in driver and not a module. The gpio-ixp4xx.c driver is also a built in driver. Is there a reason why it's ok there but not this driver? I've actually changed it to allow building as a module already but I don't want to push a v3 if something like the interrupt handling means it should actually be a built in and I'm just missing something. Thanks, Daniel 0 - https://lore.kernel.org/linux-gpio/CAHp75Vf5iUzKp32CqBbv_5MRo8q8CyBPsBcgzKsww6BFtGJwUA@mail.gmail.com/