From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752305AbdAaOVD (ORCPT ); Tue, 31 Jan 2017 09:21:03 -0500 Received: from mail-it0-f50.google.com ([209.85.214.50]:36032 "EHLO mail-it0-f50.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752073AbdAaOUp (ORCPT ); Tue, 31 Jan 2017 09:20:45 -0500 MIME-Version: 1.0 In-Reply-To: <20170125185207.23902-5-paul@crapouillou.net> References: <27071da2f01d48141e8ac3dfaa13255d@mail.crapouillou.net> <20170125185207.23902-1-paul@crapouillou.net> <20170125185207.23902-5-paul@crapouillou.net> From: Linus Walleij Date: Tue, 31 Jan 2017 15:20:04 +0100 Message-ID: Subject: Re: [PATCH v3 04/14] GPIO: Add gpio-ingenic driver To: Paul Cercueil Cc: Rob Herring , Mark Rutland , Ralf Baechle , Ulf Hansson , Boris Brezillon , Thierry Reding , Bartlomiej Zolnierkiewicz , Maarten ter Huurne , Lars-Peter Clausen , Paul Burton , "linux-gpio@vger.kernel.org" , "devicetree@vger.kernel.org" , "linux-kernel@vger.kernel.org" , Linux MIPS , "linux-mmc@vger.kernel.org" , "linux-mtd@lists.infradead.org" , "linux-pwm@vger.kernel.org" , "linux-fbdev@vger.kernel.org" , James Hogan Content-Type: text/plain; charset=UTF-8 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Forgot to mention this: On Wed, Jan 25, 2017 at 7:51 PM, Paul Cercueil wrote: > This driver handles the GPIOs of all the Ingenic JZ47xx SoCs > currently supported by the upsteam Linux kernel. > > Signed-off-by: Paul Cercueil (...) > + jzgc->gc.base = -1; Nice > + of_property_read_u32(dev->of_node, "base", &jzgc->gc.base); Remove this. Dynamic allocation should be fine, if you're using the new userspace ABI like tools/gpio/* or libgpiod and only that and in-kernel consumers, dynamic numbers are just fine. If you have old sysfs userspace that you need to support using the global GPIO numberspace, please look into ways to phase that out. Yours, Linus Walleij