Received: by 2002:a25:c593:0:0:0:0:0 with SMTP id v141csp133663ybe; Wed, 4 Sep 2019 16:36:41 -0700 (PDT) X-Google-Smtp-Source: APXvYqxznSu50xmh1EfFZbxCmeng3msWuFRXyzk+J6UYx2fXMFNyTJfJSNUvOKSC/c2e5tHBgg0E X-Received: by 2002:a17:90a:1110:: with SMTP id d16mr782103pja.29.1567640201239; Wed, 04 Sep 2019 16:36:41 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1567640201; cv=none; d=google.com; s=arc-20160816; b=k1mAfk1bLUH9RrGGgzrdy2GPq8TIrzhgtRdRjfu4/VnJmHU1SVJL4GRUgU9LybQ7MN 5GBsC/HRJu1XOQ+XWx293atOZgVrzOTQ0EgvYFpyqxPStEP1dgGzLCsrV4dumwty2Zew UJ6r9ggn+KFWdUOXok4juUfokyII/DNdRVeUl2qgc9uXyyShxkORvKy+YDfBg0ahLPSg IrnYeAv2u0Sve4oSLFzlhiy3DY1lmaeLw/WzmcDy6CBVs+UnvWD1tiRr1Fsod7nP95M/ /XXjWRqyc7lEcpdL12yTX39Q3l20MD1HnEWCuuVd/OYKjc8pXE9RgbxGkn3ze6xB4pWi vL0A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :user-agent:references:in-reply-to:date:cc:to:from:subject :message-id:dkim-signature; bh=zEfGTR202P+nwSsU1qSBd5C7kGsRpjPGHZxgayed3co=; b=zKhBFe9z0BB6kK2M8cZtyJFOzV1n0q+mcTOdJ8Pw1c0hvDdISTkVi7sSG++MQsfnzW erj28iBwR+F5CMOlNOYub9lZQ9V1K6oUdbmM8D6dTA00nw35EuZAKt++e02uJesNgsEK vx68dIACTbN+D+EedsgcX71yvbvCyL2UIuYbBPBtlDdmVH/2GIp1tWm7SanJ/M1DJC4D 17Z4lIpKAci39S7yoohx35ZA3W8Dy6z4DjKTkLe2kA7slv090pRZtNfd/+amH/vx7es/ 127JJao3/ZpUuOWn/93Y8313DycQIvmKVPHIH3SefjSmS2WCZ60zbThUjL/wnnkXvvd1 iSTg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=bgNGAHlo; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id w4si307684plq.1.2019.09.04.16.36.25; Wed, 04 Sep 2019 16:36:41 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=bgNGAHlo; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1730129AbfIDXeQ (ORCPT + 99 others); Wed, 4 Sep 2019 19:34:16 -0400 Received: from mail-pl1-f195.google.com ([209.85.214.195]:43599 "EHLO mail-pl1-f195.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727156AbfIDXeQ (ORCPT ); Wed, 4 Sep 2019 19:34:16 -0400 Received: by mail-pl1-f195.google.com with SMTP id 4so325919pld.10; Wed, 04 Sep 2019 16:34:15 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=message-id:subject:from:to:cc:date:in-reply-to:references :user-agent:mime-version:content-transfer-encoding; bh=zEfGTR202P+nwSsU1qSBd5C7kGsRpjPGHZxgayed3co=; b=bgNGAHlojCAsmb10/j/F4VrV1/7ILP14DPCXfjdhzRir4IZQWwkF6Hg4EJKc2JLDzb cgpVtDjEzBNDrKQEIvw55Uam/IjHauVNHZMcV702fkUgEYcFZJ5n7g+9MY1zHi6vMF5E jUoJ3GvvFLZsZvdxgYyVI6Y2u4EjUgciFSQFZoVkEKzXHD2HaVmayQYgfXwEYGHD7bM8 OVDp35v2L0+znwSHmDf4ljqbUB1Q52eIcyj3phJ28h4Znsr2pSYzjgqvNimEHF0RPZtl wH7Hd7K0vzSVh+vDM4bSH9SifMeSZaYfZ2e2C7CVJZQiwHPRvvms4cxoSe18y8QKWV3/ LE0g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:message-id:subject:from:to:cc:date:in-reply-to :references:user-agent:mime-version:content-transfer-encoding; bh=zEfGTR202P+nwSsU1qSBd5C7kGsRpjPGHZxgayed3co=; b=Bq6EFjCtvEZaikRTvio/DP6IT9oOuASjj86nTgzK7DXH8RfKLG7n04qyr/aju3NbP2 U2Vk0Xrgyn/CG1rg4S9QClcWOI4efTNZInjU088gS3BeeQYt+j/iBxTJd5l8pAzwJq5L iXjx4/AUd406/s4zvJPSfIS2/ftJVKxz+jTVJfjIEphX43iLe2rg/wdTLrPTEK990X1I 2R5OAqzuAEHAqw6vHx3+Ey8mibRfKin+seCV2HrG1ZRcgx+isFXCRsVTyBgl0DwZKf3t PhsRC8P0v367TTgS0Yu6pkZD+6tNj9JWtp15pwuRCp9OWW3yzQERqOjOUCwctsX1g+6r r/NA== X-Gm-Message-State: APjAAAUBZe15BdVOcozrrC+ysrHVp0wu3hF0yjHACF8dMPaXSMDwtPgv FDG3OTBQn1e5gt/Lnbo/A+s= X-Received: by 2002:a17:902:a415:: with SMTP id p21mr261987plq.319.1567640055590; Wed, 04 Sep 2019 16:34:15 -0700 (PDT) Received: from rashmica.ozlabs.ibm.com ([122.99.82.10]) by smtp.googlemail.com with ESMTPSA id c138sm179277pfc.80.2019.09.04.16.34.11 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 04 Sep 2019 16:34:14 -0700 (PDT) Message-ID: <1ca6ffddd2452e218ef19ea84ac6c6277e1a9725.camel@gmail.com> Subject: Re: [PATCH 3/4] gpio: Add in ast2600 details to Aspeed driver From: Rashmica Gupta To: Andy Shevchenko Cc: Linus Walleij , "open list:GPIO SUBSYSTEM" , Bartosz Golaszewski , linux-arm Mailing List , linux-aspeed@lists.ozlabs.org, Linux Kernel Mailing List , Joel Stanley , Andrew Jeffery Date: Thu, 05 Sep 2019 09:34:10 +1000 In-Reply-To: References: <20190904061245.30770-1-rashmica.g@gmail.com> <20190904061245.30770-3-rashmica.g@gmail.com> Content-Type: text/plain; charset="UTF-8" User-Agent: Evolution 3.30.5 (3.30.5-1.fc29) MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, 2019-09-04 at 19:30 +0300, Andy Shevchenko wrote: > On Wed, Sep 4, 2019 at 9:14 AM Rashmica Gupta > wrote: > > The ast2600 has two gpio controllers, one for 3.6V GPIOS and one > > for 1.8V GPIOS. > > > > Signed-off-by: Rashmica Gupta > > - for (i = 0; i < ARRAY_SIZE(aspeed_gpio_banks); i++) { > > + banks = (gpio->config->nr_gpios >> 5) + 1; > > Same comment as per the other patch. > > > + for (i = 0; i < banks; i++) { > > +static const struct aspeed_bank_props ast2600_bank_props[] = { > > + /* input output */ > > + {5, 0xffffffff, 0x0000ffff}, /* U/V/W/X */ > > + {6, 0xffff0000, 0x0fff0000}, /* Y/Z */ > > Perhaps GENMASK() for all values? Perhaps this and your other comments below would be best addressed in an additional cleanup patch? This patch follows the formatting of the existing code and it's not very clean to differ from that or to change the formatting of the current code in this patch. > > > + { }, > > Comma is not needed here. > > > +}; > > + > > +static const struct aspeed_gpio_config ast2600_config = > > + /* 208 3.6V GPIOs */ > > + { .nr_gpios = 208, .props = ast2600_bank_props, }; > > Seems curly braces missed their places. > > > +static const struct aspeed_bank_props ast2600_1_8v_bank_props[] = > > { > > + /* input output */ > > + {1, 0x0000000f, 0x0000000f}, /* E */ > > GENMASK()? > > > + { }, > > No comma. > > > +}; > > +static const struct aspeed_gpio_config ast2600_1_8v_config = > > + /* 36 1.8V GPIOs */ > > + { .nr_gpios = 36, .props = ast2600_1_8v_bank_props, }; > > Location of the curly braces? >