From patchwork Tue Jan 9 11:35:54 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Wolfram Sang X-Patchwork-Id: 857404 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=) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by ozlabs.org (Postfix) with ESMTP id 3zG97q4HGlz9sNV for ; Tue, 9 Jan 2018 22:36:07 +1100 (AEDT) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1750913AbeAILgF (ORCPT ); Tue, 9 Jan 2018 06:36:05 -0500 Received: from sauhun.de ([88.99.104.3]:41448 "EHLO pokefinder.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750911AbeAILgE (ORCPT ); Tue, 9 Jan 2018 06:36:04 -0500 Received: from localhost (p54B33354.dip0.t-ipconnect.de [84.179.51.84]) by pokefinder.org (Postfix) with ESMTPSA id 8FA962C6576; Tue, 9 Jan 2018 12:36:03 +0100 (CET) From: Wolfram Sang To: linux-gpio@vger.kernel.org Cc: linux-renesas-soc@vger.kernel.org, Linus Walleij , Wolfram Sang Subject: [PATCH 2/2] Documentation: gpio: correct return value of gpiod_get_direction Date: Tue, 9 Jan 2018 12:35:54 +0100 Message-Id: <20180109113554.4337-2-wsa@the-dreams.de> X-Mailer: git-send-email 2.11.0 In-Reply-To: <20180109113554.4337-1-wsa@the-dreams.de> References: <20180109113554.4337-1-wsa@the-dreams.de> Sender: linux-gpio-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-gpio@vger.kernel.org From: Wolfram Sang The use of the GPIOF_* flags is deprecated, so don't advertise them here. Document the plain numbers for now until we have a better solution. Signed-off-by: Wolfram Sang --- Documentation/gpio/consumer.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Documentation/gpio/consumer.txt b/Documentation/gpio/consumer.txt index 63e1bd1d88e324..7aac3308151016 100644 --- a/Documentation/gpio/consumer.txt +++ b/Documentation/gpio/consumer.txt @@ -184,7 +184,7 @@ A driver can also query the current direction of a GPIO: int gpiod_get_direction(const struct gpio_desc *desc) -This function will return either GPIOF_DIR_IN or GPIOF_DIR_OUT. +This function returns 0 for output, 1 for input, or an error code in case of error. Be aware that there is no default direction for GPIOs. Therefore, **using a GPIO without setting its direction first is illegal and will result in undefined