From patchwork Wed May 13 11:04:55 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Linus Walleij X-Patchwork-Id: 471812 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by ozlabs.org (Postfix) with ESMTP id 7F117140758 for ; Wed, 13 May 2015 21:05:02 +1000 (AEST) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753585AbbEMLFB (ORCPT ); Wed, 13 May 2015 07:05:01 -0400 Received: from mail-lb0-f178.google.com ([209.85.217.178]:35299 "EHLO mail-lb0-f178.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752856AbbEMLFA (ORCPT ); Wed, 13 May 2015 07:05:00 -0400 Received: by lbbuc2 with SMTP id uc2so26611879lbb.2 for ; Wed, 13 May 2015 04:04:59 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:to:cc:subject:date:message-id; bh=3WEgv1fVoog20iuaJBju81elAYObfJqeaUlS37TMCMw=; b=Yw6ngmVOEuH4SUFIkwXQqOrsenbV9+S7pxmcB+DVHlunUdjjn3tNAKm0MnWqT169NY F2YHKnmxyHmnZrbDwvhs24eyFFz6NpnAFMV4bEA2dIC4iLRflZy79anhCvP5xCGHLkWJ 3vaFNfr1B9yjzFjuvK/a4VQbtjgtN1uSM9VgaHlQ9qcEGV5dos25x8+HHo/1GUj7ykvi FnHrjpg+2XZ1BB3HlVd4UoZRAHctL4tP6SLCvp42fG3FVuCu91mcYQ1EXgSSFzsWlGcE Wcj8HiYBpDTJ0A8GjeMXo57YVXS+tJFA/qKCcLzZ8shwncj1mD3QcKgsjfnbw8jaMpQG lgQQ== X-Gm-Message-State: ALoCoQmI/u58BgsT2UXGNhf0IrwbXhDqiXZOf8EgdPumP6vqR7B/kBk7I8AsU7Fe4XwB7oS2aMe+ X-Received: by 10.112.126.136 with SMTP id my8mr15464888lbb.18.1431515099249; Wed, 13 May 2015 04:04:59 -0700 (PDT) Received: from localhost.localdomain ([85.235.11.236]) by mx.google.com with ESMTPSA id ew6sm4863079lbc.40.2015.05.13.04.04.57 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 13 May 2015 04:04:58 -0700 (PDT) From: Linus Walleij To: linux-gpio@vger.kernel.org Cc: Alexandre Courbot , Linus Walleij Subject: [PATCH] gpio: discourage passing base to gpio_chip Date: Wed, 13 May 2015 13:04:55 +0200 Message-Id: <1431515095-29107-1-git-send-email-linus.walleij@linaro.org> X-Mailer: git-send-email 1.9.3 Sender: linux-gpio-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-gpio@vger.kernel.org Passing a fixed base in struct gpio_chip is done for legacy systems that cannot handle dynamic allocation. Discourage this behaviour in the kerneldoc. Signed-off-by: Linus Walleij Acked-by: Alexandre Courbot --- include/linux/gpio/driver.h | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/include/linux/gpio/driver.h b/include/linux/gpio/driver.h index 96a678842cde..cc7ec129b329 100644 --- a/include/linux/gpio/driver.h +++ b/include/linux/gpio/driver.h @@ -42,8 +42,12 @@ struct seq_file; * @dbg_show: optional routine to show contents in debugfs; default code * will be used when this is omitted, but custom code can show extra * state (such as pullup/pulldown configuration). - * @base: identifies the first GPIO number handled by this chip; or, if - * negative during registration, requests dynamic ID allocation. + * @base: identifies the first GPIO number handled by this chip; + * or, if negative during registration, requests dynamic ID allocation. + * DEPRECATION: providing anything non-negative and nailing the base + * base offset of GPIO chips is deprecated. Please pass -1 as base to + * let gpiolib select the chip base in all possible cases. We want to + * get rid of the static GPIO number space in the long run. * @ngpio: the number of GPIOs handled by this controller; the last GPIO * handled is (base + ngpio - 1). * @desc: array of ngpio descriptors. Private.