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: 48428 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-wi0-f197.google.com (mail-wi0-f197.google.com [209.85.212.197]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id DF8182121F for ; Wed, 13 May 2015 11:05:05 +0000 (UTC) Received: by wixv7 with SMTP id v7sf10229731wix.0 for ; Wed, 13 May 2015 04:05:05 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:delivered-to:from:to:cc:subject :date:message-id:sender:precedence:list-id:x-original-sender :x-original-authentication-results:mailing-list:list-post:list-help :list-archive:list-unsubscribe; bh=Y8HiYX60oXvzmt/6eq95svlDPVIrYwnywXjTJSIeANs=; b=A8Li8pAHK3dLYyKTCCgezFzdCvbg6B5mcoofAGBnec8jGdbd5CwgblsnQ4YWxaAhum j/JWKxI1W29oCFjm0YGCj2jLrMRbloncll7fbWa5X7gNlknM9F3z89kg7OZ3H68G+jUu +bCsr3wxG5Kot4urv09x1JVVkU4DSHC04VatKpU26+2q2hjzttRL9srw+PG8EZYCSOJs BvqCFKdSXQcFfR1cgCi602UFDwRiW1O5TL+y4qgD+u+FNbDHjbcUymsJh5nPOx6GF0PE /erNgEzmulpQVFjJgyMZPk57ZgZH2xEORnEBlHopQLQdyKLMJBjuDSX/3am2NGvdpTIH +zOg== X-Gm-Message-State: ALoCoQm2CuchhTqYDsI80K+xjdum1/bw09n13H91El3mU3FI+6VZUr7KD7eA2qXim3kXJZC8Ibeg X-Received: by 10.112.166.137 with SMTP id zg9mr13758447lbb.11.1431515105015; Wed, 13 May 2015 04:05:05 -0700 (PDT) MIME-Version: 1.0 X-BeenThere: patchwork-forward@linaro.org Received: by 10.152.204.103 with SMTP id kx7ls202320lac.62.gmail; Wed, 13 May 2015 04:05:04 -0700 (PDT) X-Received: by 10.152.170.136 with SMTP id am8mr16035711lac.102.1431515104876; Wed, 13 May 2015 04:05:04 -0700 (PDT) Received: from mail-lb0-f178.google.com (mail-lb0-f178.google.com. [209.85.217.178]) by mx.google.com with ESMTPS id o7si12154414lbk.100.2015.05.13.04.05.04 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 13 May 2015 04:05:04 -0700 (PDT) Received-SPF: pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 209.85.217.178 as permitted sender) client-ip=209.85.217.178; Received: by lbbzk7 with SMTP id zk7so26722726lbb.0 for ; Wed, 13 May 2015 04:05:04 -0700 (PDT) X-Received: by 10.152.9.66 with SMTP id x2mr15575974laa.36.1431515104752; Wed, 13 May 2015 04:05:04 -0700 (PDT) X-Forwarded-To: patchwork-forward@linaro.org X-Forwarded-For: patch@linaro.org patchwork-forward@linaro.org Delivered-To: patch@linaro.org Received: by 10.112.108.230 with SMTP id hn6csp458318lbb; Wed, 13 May 2015 04:05:03 -0700 (PDT) X-Received: by 10.68.198.36 with SMTP id iz4mr36587090pbc.167.1431515103042; Wed, 13 May 2015 04:05:03 -0700 (PDT) Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id gw3si26624249pac.117.2015.05.13.04.05.02; Wed, 13 May 2015 04:05:03 -0700 (PDT) Received-SPF: none (google.com: linux-gpio-owner@vger.kernel.org does not designate permitted sender hosts) client-ip=209.132.180.67; Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753585AbbEMLFB (ORCPT + 1 other); 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-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: list List-ID: X-Mailing-List: linux-gpio@vger.kernel.org X-Removed-Original-Auth: Dkim didn't pass. X-Original-Sender: linus.walleij@linaro.org X-Original-Authentication-Results: mx.google.com; spf=pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 209.85.217.178 as permitted sender) smtp.mail=patch+caf_=patchwork-forward=linaro.org@linaro.org Mailing-list: list patchwork-forward@linaro.org; contact patchwork-forward+owners@linaro.org X-Google-Group-Id: 836684582541 List-Post: , List-Help: , List-Archive: List-Unsubscribe: , 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 --- 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.