Received: by 2002:a05:6358:d09b:b0:dc:cd0c:909e with SMTP id jc27csp6727963rwb; Tue, 15 Nov 2022 02:55:09 -0800 (PST) X-Google-Smtp-Source: AA0mqf7g5+aiKHN39nYEdNsHu/Gga0VPxHRFozew5drgvHQ51L3G8j44WwhlTDXfK507hJjAjmDs X-Received: by 2002:a17:907:d10f:b0:7aa:8f6c:3347 with SMTP id uy15-20020a170907d10f00b007aa8f6c3347mr13681162ejc.659.1668509709455; Tue, 15 Nov 2022 02:55:09 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1668509709; cv=none; d=google.com; s=arc-20160816; b=pWSzsn7NR2oxkDe/b5AJh9U+jTcIkIRK6M4Cq75xdA2M/65Cr+98bsqD1dZiUGssAA JTow3RkH2tIToHg7dqaupxpKM4YLkcfbTRmcbw5hT4otVuPuVuMtU36YdqD/KNeRHpXS FR5pP00vhpZtA7q6XzKh8AOWPS0Vg/5S3URtvGd4zLU1zPvaA2FEtLLr80tN8jzCEXxV wVYS1bzEQoL/6MqEF/urQvmrLhuQVnHCUJJCnyTKAWT8X5vhFsdxe4CjW/+B63OeL8sn nUc22RqxahsbVzn/aOz2mn9b8UEznoi1dsXa8/Y1QEHlES+o4VL7CeHOLhboa6IsXL5d Yt5w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:user-agent:in-reply-to:content-disposition :mime-version:references:message-id:subject:cc:to:from:date; bh=CSGD2pPcUZwLPDK7NtdEtnj1omqdOU6Hay6/WiA96ag=; b=s34lpWr38LVcEDpCLEEDci/MDyKVIHyjNhEElIPjSNGdSsgz6w+bwsDfkadB087Htb Qf1ohfgBE4IgZEUItd56LXkCfUScm+ggrKAn4tkoRg7x+PdzxP+kd9sn7xyKpc11Gmfq uuShgxcx5k1o6HDr63aL4LNnzZiMnfxvQqbMh7bJ67zSKuzW4sNh1Tr2KJRtORCCTEQF j7RKoR3KZ205H09WYWRdvTEHATM5jf4xjzsBAN0udZSwaCAbmaxdoYsTMIJPlfgPidFl QjUk5mCBMJ6fyIqhTD1ihQtQrcPrVa4ImF0FPOro7fvTY2lUQXFC104yv42FJMzSSnnO Ho/Q== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id ho11-20020a1709070e8b00b007add0123aacsi10925849ejc.1006.2022.11.15.02.54.47; Tue, 15 Nov 2022 02:55:09 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229672AbiKOKV6 (ORCPT + 89 others); Tue, 15 Nov 2022 05:21:58 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:40630 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S237684AbiKOKVv (ORCPT ); Tue, 15 Nov 2022 05:21:51 -0500 Received: from elvis.franken.de (elvis.franken.de [193.175.24.41]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id 47B08CFB; Tue, 15 Nov 2022 02:21:50 -0800 (PST) Received: from uucp (helo=alpha) by elvis.franken.de with local-bsmtp (Exim 3.36 #1) id 1out4b-00084p-00; Tue, 15 Nov 2022 11:21:45 +0100 Received: by alpha.franken.de (Postfix, from userid 1000) id E5112C1ACA; Tue, 15 Nov 2022 11:20:50 +0100 (CET) Date: Tue, 15 Nov 2022 11:20:50 +0100 From: Thomas Bogendoerfer To: Yinbo Zhu Cc: Bartosz Golaszewski , Linus Walleij , Rob Herring , Krzysztof Kozlowski , WANG Xuerui , Jiaxun Yang , Juxin Gao , Bibo Mao , Yanteng Si , linux-gpio@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, loongarch@lists.linux.dev, linux-mips@vger.kernel.org, Arnaud Patard , Huacai Chen , lvjianmin , zhanghongchen , Liu Peibao Subject: Re: [PATCH v2 1/2] gpio: loongson: add dts/acpi gpio support Message-ID: <20221115102050.GA3167@alpha.franken.de> References: <20221114095332.21079-1-zhuyinbo@loongson.cn> <8b24e3df-8c22-bd09-cfc1-b27e39a05c25@loongson.cn> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <8b24e3df-8c22-bd09-cfc1-b27e39a05c25@loongson.cn> User-Agent: Mutt/1.10.1 (2018-07-13) X-Spam-Status: No, score=-2.6 required=5.0 tests=BAYES_00,RCVD_IN_DNSWL_LOW, SPF_HELO_PASS,SPF_PASS autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, Nov 15, 2022 at 05:53:26PM +0800, Yinbo Zhu wrote: > > > +/* ============== Data structrues =============== */ > > > + > > > +/* gpio data */ > > > +struct platform_gpio_data { > > > + u32 gpio_conf; > > > + u32 gpio_out; > > > + u32 gpio_in; > > > + u32 support_irq; > > > + char *label; > > > + int gpio_base; > > > + int ngpio; > > > +}; > > > > No idea why you would need to duplicate it like this either. And why > > put it in arch/. > because loongson platform include mips and loongarch, and the gpio device > data was defined in arch/ in leagcy loongson gpio driver. so the > latest loongson gpio drvier add platform_gpio_data in same dir. put the struct into a new file in include/linux/platform_data and use that. Thomas. -- Crap can work. Given enough thrust pigs will fly, but it's not necessarily a good idea. [ RFC1925, 2.3 ]