From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 9D8DFC43219 for ; Tue, 15 Nov 2022 10:21:59 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229600AbiKOKV6 (ORCPT ); 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) 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 ]