From patchwork Mon Jul 24 14:57:23 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Thierry Reding X-Patchwork-Id: 792840 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=none (mailfrom) smtp.mailfrom=vger.kernel.org (client-ip=209.132.180.67; helo=vger.kernel.org; envelope-from=linux-gpio-owner@vger.kernel.org; receiver=) Authentication-Results: ozlabs.org; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.b="tgnYw/4h"; dkim-atps=neutral Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by ozlabs.org (Postfix) with ESMTP id 3xGPcp1099z9s65 for ; Tue, 25 Jul 2017 00:58:02 +1000 (AEST) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S932381AbdGXO56 (ORCPT ); Mon, 24 Jul 2017 10:57:58 -0400 Received: from mail-wm0-f68.google.com ([74.125.82.68]:33299 "EHLO mail-wm0-f68.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1756266AbdGXO5d (ORCPT ); Mon, 24 Jul 2017 10:57:33 -0400 Received: by mail-wm0-f68.google.com with SMTP id q189so1786353wmd.0; Mon, 24 Jul 2017 07:57:32 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=t03IKbsMR72d7c/zBjhekoT4mceEKcfil/iRjznBIqE=; b=tgnYw/4hsbkdcioP88SpTeNpUCuOx7yf8tM48NkbfHraxGnh/QVfeq+NginrkIohnQ lIUIoKeCak6PVnMQcbIExMVIyKqsTfMTjEwFk8m3bllk2f1B1rN/K68Ua32+rjy7HsjW 8a1gwb19mhdrJLT/3O6VzA6ZYDW35PLt/PGl6BuZd0V/HwWCl/OQS3RetssTRuvoCMOK 7xKcbo6LjuxZsxinTnLHvYO+0xQE9P7ZWW3pQyion/dl9a0gwZrWurJ3JUVfT5hmXCqf igqhpaWZtPenUTctTjECGejH5XLB5uNSmGSQU38kBinCoMyRDpjEeTcqlDnwdOGj0Vjb zhng== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=t03IKbsMR72d7c/zBjhekoT4mceEKcfil/iRjznBIqE=; b=ZgwFEaIw9ux3PMxc9uy1wTKLj/mnNcKoNCPArwxIm1XcEWz3iqN4xQEbgU9g+8kMpQ BDrGOje5LYZM01xsQlUpYuYUGsu6HnhS3/7ShuY9lHppv8Fo5++nvOAXoc7eZMCcPcL7 s1h7s7RhT7u2IALvQr8xCpSVjY9d6PzF3a4CQhcBZN2y+bTBX+WKD+g6gYAGn1gaozuh mWrak0qBPMa8AmlSz0wFF5sDP7TBh6iqEpiWtAFDwRJSTMShgBrHMyjW33ynz6B14iix YM9+1to7GE+sEhqIKi/gdI6BVJd18sNCMPE89WQjPLlw7QEy1gzfAHJi8Ro9jmipn3BB ZFBg== X-Gm-Message-State: AIVw110r7o8IO2TXk2uD7PdjdRsXpa6VNlYzZq5PL4VYb3LSWeXM7kOO LMfprGaN5IjyBw== X-Received: by 10.28.57.193 with SMTP id g184mr3667398wma.32.1500908251547; Mon, 24 Jul 2017 07:57:31 -0700 (PDT) Received: from localhost (p200300E41BDFF20076D02BFFFE273F51.dip0.t-ipconnect.de. [2003:e4:1bdf:f200:76d0:2bff:fe27:3f51]) by smtp.gmail.com with ESMTPSA id 63sm9264524wmi.8.2017.07.24.07.57.30 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Mon, 24 Jul 2017 07:57:30 -0700 (PDT) From: Thierry Reding To: Linus Walleij Cc: Mika Westerberg , Andy Shevchenko , Jonathan Corbet , linux-gpio@vger.kernel.org, linux-acpi@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH 2/7] gpio: of: Improve kerneldoc Date: Mon, 24 Jul 2017 16:57:23 +0200 Message-Id: <20170724145728.7662-2-thierry.reding@gmail.com> X-Mailer: git-send-email 2.13.3 In-Reply-To: <20170724145728.7662-1-thierry.reding@gmail.com> References: <20170724145728.7662-1-thierry.reding@gmail.com> Sender: linux-gpio-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-gpio@vger.kernel.org From: Thierry Reding Add descriptions for missing fields and fix up some parameter references to match the code. Signed-off-by: Thierry Reding --- drivers/gpio/gpiolib-of.c | 7 +++---- include/linux/gpio/driver.h | 19 +++++++++++++++++++ 2 files changed, 22 insertions(+), 4 deletions(-) diff --git a/drivers/gpio/gpiolib-of.c b/drivers/gpio/gpiolib-of.c index 54ce8dc58ad0..9c1b8a5d2f33 100644 --- a/drivers/gpio/gpiolib-of.c +++ b/drivers/gpio/gpiolib-of.c @@ -273,14 +273,13 @@ static int of_gpiochip_scan_gpios(struct gpio_chip *chip) } /** - * of_gpio_simple_xlate - translate gpio_spec to the GPIO number and flags + * of_gpio_simple_xlate - translate gpiospec to the GPIO number and flags * @gc: pointer to the gpio_chip structure - * @np: device node of the GPIO chip - * @gpio_spec: gpio specifier as found in the device tree + * @gpiospec: GPIO specifier as found in the device tree * @flags: a flags pointer to fill in * * This is simple translation function, suitable for the most 1:1 mapped - * gpio chips. This function performs only one sanity check: whether gpio + * GPIO chips. This function performs only one sanity check: whether GPIO * is less than ngpios (that is specified in the gpio_chip). */ int of_gpio_simple_xlate(struct gpio_chip *gc, diff --git a/include/linux/gpio/driver.h b/include/linux/gpio/driver.h index ad4150d075c3..fe66c9306caf 100644 --- a/include/linux/gpio/driver.h +++ b/include/linux/gpio/driver.h @@ -180,8 +180,27 @@ struct gpio_chip { * If CONFIG_OF is enabled, then all GPIO controllers described in the * device tree automatically may have an OF translation */ + + /** + * @of_node: + * + * Pointer to a device tree node representing this GPIO controller. + */ struct device_node *of_node; + + /** + * @of_gpio_n_cells: + * + * Number of cells used to form the GPIO specifier. + */ int of_gpio_n_cells; + + /** + * @of_xlate: + * + * Callback to translate a device tree GPIO specifier into a chip- + * relative GPIO number and flags. + */ int (*of_xlate)(struct gpio_chip *gc, const struct of_phandle_args *gpiospec, u32 *flags); #endif