Received: by 2002:a05:6a10:16a7:0:0:0:0 with SMTP id gp39csp568772pxb; Thu, 5 Nov 2020 07:26:48 -0800 (PST) X-Google-Smtp-Source: ABdhPJwAbrH41vbsWRj12CrJSxxdGs7udj0wWaP1Ap5TKjVBBqVZ/6ehclYYN46Fjs9D3tAh9Q+W X-Received: by 2002:a50:e185:: with SMTP id k5mr3072412edl.48.1604590008194; Thu, 05 Nov 2020 07:26:48 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1604590008; cv=none; d=google.com; s=arc-20160816; b=pFb8gx+ZoEL5NaobeXZh52Z3yWl8892zPx5y7CBKs1LiFgSidX5JG74SR2sEqOQ+k3 TctXVngxL6n7XEv9K/mBoXdMi+HPVd+SUD+tEcDgWyCIosDdT2FBIXyfvz7QVxpYC5kT Atqt5YNOfcsb2s8xS4rjv7qCeBplKzLDHNs32igFD8OQy30cCHexEN/2AyeJikHm7VDM Hc3csLUS8nNKwcoqqyCGATpgUa7B8nAF7UWyPeJik2e9Ihy4mZhxUA/GyqhSSs2NETae U6vA/ZTjDsoGBEMmd1zP7H3TmU1sJkJV7ByT9Nm1IH7jB38YrrPg3OOgLkwti4iaHYIX AwFA== 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=1SxuLZqP7expcmyIeWKucvYuGkstgspzMuDDrhMmksY=; b=CKbfgmt/vGSBw1vG1Ew78wS069RTnFMGB9wJb+epZfLG7fkQm7XVD7w0Hrm13IojZt nTRocrZ6QgeNZckyHYxPgTSehMAF5cyatE2yOwnGuaZq+SIg89N1nobsRZHkLfwtvCeQ +/dBawUluOe3wREifWVcRCnMT1PAZVFNotjMSxLsVetovU/CYRFKTd3X8PK9k3iI9HgZ OAlpfYLSM0qveZWvG1e++BtWsSyMmjSnubWLBq6A3TErdEa87SNxEIUQQTzEMjMGger3 qDdsRqj92YHn2HFi2WcdWpgBxax8QyX6NdhMDYnooRzn1uox/114+yzUqyK9IhPt6y4r NcSw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@0x0f.com header.s=google header.b=QgkcEaYb; 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 t16si1270601ejb.494.2020.11.05.07.26.24; Thu, 05 Nov 2020 07:26:48 -0800 (PST) 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=QgkcEaYb; 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 S1731278AbgKEPXI (ORCPT + 99 others); Thu, 5 Nov 2020 10:23:08 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:52892 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1731263AbgKEPXI (ORCPT ); Thu, 5 Nov 2020 10:23:08 -0500 Received: from mail-qk1-x741.google.com (mail-qk1-x741.google.com [IPv6:2607:f8b0:4864:20::741]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 843A7C0613D2 for ; Thu, 5 Nov 2020 07:23:06 -0800 (PST) Received: by mail-qk1-x741.google.com with SMTP id i21so1454653qka.12 for ; Thu, 05 Nov 2020 07:23:06 -0800 (PST) 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=1SxuLZqP7expcmyIeWKucvYuGkstgspzMuDDrhMmksY=; b=QgkcEaYbFwTbauWuAVLqGTRxvWi76twgcpDbNcMEkx8DmTQPUhNPmJTCJnGwcitJZ+ EcvTydCY9JAEc0P8ZsX8G4IO4KlR5W//1ksdtn7VPaN0RNh3NYcVSnEaXXQgJb94Wwij RtwwcVVTXOiXvAtpie6fdSsuT/TNr9UEs2EOs= 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=1SxuLZqP7expcmyIeWKucvYuGkstgspzMuDDrhMmksY=; b=rcNUXPxcgpmW22w9OgjxhFn2GczR4CeiOaznVKTQYjt2d/2LUH9387DG7AOr9OBS9P mgiIaAPnOCPTHrz1fRfzPhEaHHozXM+9Wc/zi3EPiJyX5+Mslx4yIzqTjnOleHKLqwFp XdAvPYCSmhsA3KTCYSkwycIsM1WuTyHX5vFqRurkZ2mBqFaGc2KayJOhs11F+pkE9DBV z4HfnPlgxQJuOG4N5U15M0fZnHZOB3lTpaV+SKAk96XdT5R6BINTPX5dtsSt4npPv6Av Il3r6YuIK6cBN+M2zkV7H/Mzkw1HNXvV3mDWB226fFhbmLVTRd6pxlphezRy3G8ZS5c8 WjQg== X-Gm-Message-State: AOAM5327xFrrujMW1UgAyUBnkwyXDlArThX8/jaWJ5DsUSZ3jYnyy5Hz DcUmqSF+gn3guQ4rIuNWMhjLx5Z7Vej0urQkZaZEsw== X-Received: by 2002:a37:7687:: with SMTP id r129mr1781089qkc.54.1604589785561; Thu, 05 Nov 2020 07:23:05 -0800 (PST) MIME-Version: 1.0 References: <20201019141008.871177-1-daniel@0x0f.com> <20201019141008.871177-4-daniel@0x0f.com> <3fd04aeb5047d8059ddecc1eda19c2e4@kernel.org> In-Reply-To: <3fd04aeb5047d8059ddecc1eda19c2e4@kernel.org> From: Daniel Palmer Date: Fri, 6 Nov 2020 00:23:52 +0900 Message-ID: Subject: Re: [PATCH v2 3/5] gpio: msc313: MStar MSC313 GPIO driver To: Marc Zyngier Cc: Linus Walleij , "open list:GPIO SUBSYSTEM" , "open list:OPEN FIRMWARE AND FLATTENED DEVICE TREE BINDINGS" , arm-kernel@lists.infradead.org, Linux Kernel Mailing List Content-Type: text/plain; charset="UTF-8" Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi Marc, On Thu, 5 Nov 2020 at 21:08, Marc Zyngier wrote: > > On 2020-11-05 09:40, Linus Walleij wrote: > > On Mon, Oct 19, 2020 at 4:10 PM Daniel Palmer wrote: > > [...] > > >> +/* The parent interrupt controller needs the GIC interrupt type set > >> to GIC_SPI > >> + * so we need to provide the fwspec. Essentially > >> gpiochip_populate_parent_fwspec_twocell > >> + * that puts GIC_SPI into the first cell. > >> + */ > > nit: comment style. I've fixed these and some other bits for the v3. I've held off on pushing that until the rest of it seemed right. > >> +static void *msc313_gpio_populate_parent_fwspec(struct gpio_chip *gc, > >> + unsigned int > >> parent_hwirq, > >> + unsigned int parent_type) > >> +{ > >> + struct irq_fwspec *fwspec; > >> + > >> + fwspec = kmalloc(sizeof(*fwspec), GFP_KERNEL); > >> + if (!fwspec) > >> + return NULL; > >> + > >> + fwspec->fwnode = gc->irq.parent_domain->fwnode; > >> + fwspec->param_count = 3; > >> + fwspec->param[0] = GIC_SPI; > >> + fwspec->param[1] = parent_hwirq; > >> + fwspec->param[2] = parent_type; > >> + > >> + return fwspec; > >> +} > > > > Clever. Looping in Marc Z so he can say if this looks allright to him. > > Yup, this looks correct. However, looking at the bit of the patch that > isn't quoted here, I see that msc313_gpio_irqchip doesn't have a > .irq_set_affinity callback. Is this system UP only? What is in mainline right now is UP only but there are chips with a second cortex A7 that I have working in my tree. So I will add that in for v3 if I can work out what I should actually do there. :) Thanks, Daniel