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 X-Spam-Level: X-Spam-Status: No, score=-5.6 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI, SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED,USER_AGENT_SANE_1 autolearn=no autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 3DDE9C47096 for ; Fri, 4 Jun 2021 02:18:40 +0000 (UTC) Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 00E52613B4 for ; Fri, 4 Jun 2021 02:18:39 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 00E52613B4 Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=aspeedtech.com Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:In-Reply-To:MIME-Version:References: Message-ID:Subject:CC:To:From:Date:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=NJvozFNe24Qn2eH44DTPMTXAgL3eVVxamKjSPDp0og4=; b=xCk/Y5hqBelpJQ qrBeYea9r0/EMZ+a+za66yv8pa7uu+EsvRehIlxK+ssLmc/JhB5A8VAojA5LaOzESUwV1Z9WM+2T5 nNj3u6QiDFeBCcsgZjvqPVVzAr8yMdr0faQVk5UD73HkiFE9pQN91wuNIMyXcl7vS5RemYrgLNWEG 2fa+sGl4OS/CP3V9FWe5ter4cWkHQk9dYz8tTxa6Oam19g8ApVHQBUmhzSru7TcICyv4P4EACbE94 ewaruzJMY8+ssorMbf5sk+WMtddfMQ07zxQoVTzGx9YnD3JEzYDfWqFbpPii6HXN9KfLgULPG8Udj UgSvZcE+hYNtNrGqcHGQ==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1lozMP-00BEgI-Nt; Fri, 04 Jun 2021 02:14:57 +0000 Received: from twspam01.aspeedtech.com ([211.20.114.71]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1lozML-00BEfK-4m for linux-arm-kernel@lists.infradead.org; Fri, 04 Jun 2021 02:14:54 +0000 Received: from mail.aspeedtech.com ([192.168.0.24]) by twspam01.aspeedtech.com with ESMTP id 15420tHr031948; Fri, 4 Jun 2021 10:00:55 +0800 (GMT-8) (envelope-from steven_lee@aspeedtech.com) Received: from aspeedtech.com (192.168.100.253) by TWMBX02.aspeed.com (192.168.0.24) with Microsoft SMTP Server (TLS) id 15.0.1497.2; Fri, 4 Jun 2021 10:14:26 +0800 Date: Fri, 4 Jun 2021 10:14:23 +0800 From: Steven Lee To: Andy Shevchenko CC: Linus Walleij , Bartosz Golaszewski , Rob Herring , Joel Stanley , Andrew Jeffery , "open list:GPIO SUBSYSTEM" , "open list:OPEN FIRMWARE AND FLATTENED DEVICE TREE BINDINGS" , "moderated list:ARM/ASPEED MACHINE SUPPORT" , "moderated list:ARM/ASPEED MACHINE SUPPORT" , open list , "Hongweiz@ami.com" , Ryan Chen , Billy Tsai Subject: Re: [PATCH v3 3/5] gpio: gpio-aspeed-sgpio: Add AST2600 sgpio support Message-ID: <20210604021422.GA25112@aspeedtech.com> References: <20210603101822.9645-1-steven_lee@aspeedtech.com> <20210603101822.9645-4-steven_lee@aspeedtech.com> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.9.4 (2018-02-28) X-Originating-IP: [192.168.100.253] X-ClientProxiedBy: TWMBX02.aspeed.com (192.168.0.24) To TWMBX02.aspeed.com (192.168.0.24) X-DNSRBL: X-MAIL: twspam01.aspeedtech.com 15420tHr031948 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20210603_191453_494257_4AEDD805 X-CRM114-Status: GOOD ( 19.24 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org The 06/03/2021 19:05, Andy Shevchenko wrote: > On Thu, Jun 3, 2021 at 1:19 PM Steven Lee wrote: > > > > AST2600 SoC has 2 SGPIO master interfaces one with 128 pins another one > > with 80 pins. > > In the current driver, the maximum number of gpio pins of SoC is hardcoded > > as 80 and the gpio pin count mask for GPIO Configuration register is > > hardcode as GENMASK(9,6). In addition, some functions uses the hardcoded > > use > > > value to calculate the gpio offset. > > The patch adds ast2600 compatibles and platform data that includes the > > max number of gpio pins supported by ast2600 and gpio pin count mask for > > GPIO Configuration register. > > The patch also modifies some functions to pass aspeed_sgpio struct for > > calculating gpio offset wihtout using the hardcoded value. > > without > > ... > > > +#include > > Why? > > ... > I will remove it as of_device_get_match_data() will be replaced to device_get_match_data() > > +#define GPIO_OFFSET(x) ((x) & 0x1f) > > GENMASK() > > ... > Do you mean the macro should be modified as follows? #define GPIO_OFFSET(x) ((x) & GENMASK(4, 0)) > > + pdata = of_device_get_match_data(&pdev->dev); > > device_get_match_data() > > I guess you may replace all those of_*() to the corresponding > device_*() or fwnode_*() calls. > Thanks for the reviews, I will add a new patch for replacing all of_*() to device_*(). > -- > With Best Regards, > Andy Shevchenko _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel