From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752570AbeBXB5y (ORCPT ); Fri, 23 Feb 2018 20:57:54 -0500 Received: from mail-oi0-f45.google.com ([209.85.218.45]:43572 "EHLO mail-oi0-f45.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752095AbeBXB5w (ORCPT ); Fri, 23 Feb 2018 20:57:52 -0500 X-Google-Smtp-Source: AG47ELu3kcFyh6ctvhuaUnMq7OJ2SD/QGivCL4gxDqCxr0To7LqALuEyKC6xuw8X3okW+il2g+sB3Vowmk4ADzEinq4= MIME-Version: 1.0 In-Reply-To: References: <2009936f10a349fc6a24796c60e7fea6551b8f0d.1519360872.git.baolin.wang@linaro.org> From: Baolin Wang Date: Sat, 24 Feb 2018 09:57:51 +0800 Message-ID: Subject: Re: [PATCH v4 2/2] gpio: Add GPIO driver for Spreadtrum SC9860 platform To: Andy Shevchenko Cc: Linus Walleij , Rob Herring , Mark Rutland , devicetree , Linux Kernel Mailing List , "open list:GPIO SUBSYSTEM" , Mark Brown Content-Type: text/plain; charset="UTF-8" Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi Andy, On 23 February 2018 at 21:35, Andy Shevchenko wrote: > On Fri, Feb 23, 2018 at 6:44 AM, Baolin Wang wrote: >> The Spreadtrum SC9860 platform GPIO controller contains 16 groups and >> each group contains 16 GPIOs. Each GPIO can set input/output and has >> the interrupt capability. >> > > Sorry, couple comments below. > >> Signed-off-by: Baolin Wang >> Reviewed-by: Andy Shevchenko > >> +/* We have 16 banks GPIOs and each bank contain 16 GPIOs */ >> +#define SPRD_GPIO_BANK_NR 16 >> +#define SPRD_GPIO_NR 256 > >> +#define SPRD_GPIO_BANK_SIZE 0x80 > > 128 ? Um, I still would like to use 0x80 here to keep consistent with our GPIO Spec. > >> + irq->handler = handle_simple_irq; > > Shouldn't be handle_bad_irq() ? Yes, handle_bad_irq() is better. >> +static const struct of_device_id sprd_gpio_of_match[] = { >> + { .compatible = "sprd,sc9860-gpio", }, > >> + { /* end of list */ }, > > Comma is redundant. Absence of it even better at compile time if at > some weird case the item goes after a terminator. Sure. Thanks. -- Baolin.wang Best Regards