From patchwork Wed Mar 18 01:04:43 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Linus Walleij X-Patchwork-Id: 45914 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-wi0-f198.google.com (mail-wi0-f198.google.com [209.85.212.198]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id 88A1921547 for ; Wed, 18 Mar 2015 01:04:55 +0000 (UTC) Received: by wivr20 with SMTP id r20sf5103912wiv.0 for ; Tue, 17 Mar 2015 18:04:54 -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=Vrpy8XXNFCswq3qhhxFzaESrseqpVtG3gxqOGJSznyI=; b=lLSQi/duAFt/t1iKuW1f3bvvZ0Rprzn4lFWbObZFGYLoTUPbg4WTmo8h+/HUdgzzYw 5u2latbDhtqaCMMUb9UfOTUkNI6hihpsJ2ovWKzK5l/Yq2sStsS1DIXW+6eRGtA0IMan Hs4zt8IbT3FRSkzErlC76cO0km7fPIqeq10/1UaeivZAXSSbuaXRMe8Ze55flLSBl96e ditZYtLD2PKficSPllVO/Zbn1rlfYsFyqgypBoBogeQ7fZBVBfjB5ODKxL9W145/zKZH cUIY9cDiQxTZ0QmWrzM9+bVI85qP6AgmJtQtfBoPH1J2KAhv3xWQ7n4XWWzQOIUd4xb9 5KkA== X-Gm-Message-State: ALoCoQml6sS5/0frjTYr3EvlMQqowG6Ovsc6cQ6G6m5WIFn0kus+1XocY5eH1/vqj6at64DOSsWP X-Received: by 10.112.224.12 with SMTP id qy12mr10398953lbc.10.1426640694834; Tue, 17 Mar 2015 18:04:54 -0700 (PDT) MIME-Version: 1.0 X-BeenThere: patchwork-forward@linaro.org Received: by 10.180.109.228 with SMTP id hv4ls213770wib.23.gmail; Tue, 17 Mar 2015 18:04:54 -0700 (PDT) X-Received: by 10.152.23.233 with SMTP id p9mr17767387laf.123.1426640694700; Tue, 17 Mar 2015 18:04:54 -0700 (PDT) Received: from mail-la0-f51.google.com (mail-la0-f51.google.com. [209.85.215.51]) by mx.google.com with ESMTPS id g4si11738304lbs.114.2015.03.17.18.04.54 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 17 Mar 2015 18:04:54 -0700 (PDT) Received-SPF: pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 209.85.215.51 as permitted sender) client-ip=209.85.215.51; Received: by labjg1 with SMTP id jg1so23526317lab.2 for ; Tue, 17 Mar 2015 18:04:54 -0700 (PDT) X-Received: by 10.112.8.101 with SMTP id q5mr56623192lba.19.1426640694566; Tue, 17 Mar 2015 18:04:54 -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.35.133 with SMTP id h5csp849845lbj; Tue, 17 Mar 2015 18:04:53 -0700 (PDT) X-Received: by 10.70.132.36 with SMTP id or4mr86929809pdb.59.1426640692857; Tue, 17 Mar 2015 18:04:52 -0700 (PDT) Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id r1si32519370pdh.239.2015.03.17.18.04.52; Tue, 17 Mar 2015 18:04:52 -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 S932495AbbCRBEv (ORCPT + 1 other); Tue, 17 Mar 2015 21:04:51 -0400 Received: from mail-la0-f45.google.com ([209.85.215.45]:36496 "EHLO mail-la0-f45.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S932090AbbCRBEv (ORCPT ); Tue, 17 Mar 2015 21:04:51 -0400 Received: by lamx15 with SMTP id x15so23582792lam.3 for ; Tue, 17 Mar 2015 18:04:49 -0700 (PDT) X-Received: by 10.112.9.236 with SMTP id d12mr112196lbb.102.1426640689067; Tue, 17 Mar 2015 18:04:49 -0700 (PDT) Received: from localhost.localdomain (c-d37f71d5.01-192-6c756e10.cust.bredbandsbolaget.se. [213.113.127.211]) by mx.google.com with ESMTPSA id ps2sm3085241lbb.20.2015.03.17.18.04.46 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 17 Mar 2015 18:04:47 -0700 (PDT) From: Linus Walleij To: linux-gpio@vger.kernel.org Cc: Alexandre Courbot , Linus Walleij Subject: [PATCH] gpio: move pincontrol calls to Date: Wed, 18 Mar 2015 02:04:43 +0100 Message-Id: <1426640683-22185-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.215.51 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: , These functions do not belong in since the split into separate GPIO headers under . Move them to as is apropriate. Signed-off-by: Linus Walleij --- include/asm-generic/gpio.h | 48 --------------------------------------------- include/linux/gpio/driver.h | 48 +++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 48 insertions(+), 48 deletions(-) diff --git a/include/asm-generic/gpio.h b/include/asm-generic/gpio.h index 383ade1a211b..9bb0d11729c9 100644 --- a/include/asm-generic/gpio.h +++ b/include/asm-generic/gpio.h @@ -5,7 +5,6 @@ #include #include #include -#include #ifdef CONFIG_GPIOLIB @@ -139,53 +138,6 @@ static inline void gpio_unexport(unsigned gpio) gpiod_unexport(gpio_to_desc(gpio)); } -#ifdef CONFIG_PINCTRL - -/** - * struct gpio_pin_range - pin range controlled by a gpio chip - * @head: list for maintaining set of pin ranges, used internally - * @pctldev: pinctrl device which handles corresponding pins - * @range: actual range of pins controlled by a gpio controller - */ - -struct gpio_pin_range { - struct list_head node; - struct pinctrl_dev *pctldev; - struct pinctrl_gpio_range range; -}; - -int gpiochip_add_pin_range(struct gpio_chip *chip, const char *pinctl_name, - unsigned int gpio_offset, unsigned int pin_offset, - unsigned int npins); -int gpiochip_add_pingroup_range(struct gpio_chip *chip, - struct pinctrl_dev *pctldev, - unsigned int gpio_offset, const char *pin_group); -void gpiochip_remove_pin_ranges(struct gpio_chip *chip); - -#else - -static inline int -gpiochip_add_pin_range(struct gpio_chip *chip, const char *pinctl_name, - unsigned int gpio_offset, unsigned int pin_offset, - unsigned int npins) -{ - return 0; -} -static inline int -gpiochip_add_pingroup_range(struct gpio_chip *chip, - struct pinctrl_dev *pctldev, - unsigned int gpio_offset, const char *pin_group) -{ - return 0; -} - -static inline void -gpiochip_remove_pin_ranges(struct gpio_chip *chip) -{ -} - -#endif /* CONFIG_PINCTRL */ - #else /* !CONFIG_GPIOLIB */ static inline bool gpio_is_valid(int number) diff --git a/include/linux/gpio/driver.h b/include/linux/gpio/driver.h index c497c62889d1..f1b36593ec9f 100644 --- a/include/linux/gpio/driver.h +++ b/include/linux/gpio/driver.h @@ -6,6 +6,7 @@ #include #include #include +#include struct device; struct gpio_desc; @@ -173,6 +174,53 @@ int gpiochip_irqchip_add(struct gpio_chip *gpiochip, #endif /* CONFIG_GPIOLIB_IRQCHIP */ +#ifdef CONFIG_PINCTRL + +/** + * struct gpio_pin_range - pin range controlled by a gpio chip + * @head: list for maintaining set of pin ranges, used internally + * @pctldev: pinctrl device which handles corresponding pins + * @range: actual range of pins controlled by a gpio controller + */ + +struct gpio_pin_range { + struct list_head node; + struct pinctrl_dev *pctldev; + struct pinctrl_gpio_range range; +}; + +int gpiochip_add_pin_range(struct gpio_chip *chip, const char *pinctl_name, + unsigned int gpio_offset, unsigned int pin_offset, + unsigned int npins); +int gpiochip_add_pingroup_range(struct gpio_chip *chip, + struct pinctrl_dev *pctldev, + unsigned int gpio_offset, const char *pin_group); +void gpiochip_remove_pin_ranges(struct gpio_chip *chip); + +#else + +static inline int +gpiochip_add_pin_range(struct gpio_chip *chip, const char *pinctl_name, + unsigned int gpio_offset, unsigned int pin_offset, + unsigned int npins) +{ + return 0; +} +static inline int +gpiochip_add_pingroup_range(struct gpio_chip *chip, + struct pinctrl_dev *pctldev, + unsigned int gpio_offset, const char *pin_group) +{ + return 0; +} + +static inline void +gpiochip_remove_pin_ranges(struct gpio_chip *chip) +{ +} + +#endif /* CONFIG_PINCTRL */ + struct gpio_desc *gpiochip_request_own_desc(struct gpio_chip *chip, u16 hwnum, const char *label); void gpiochip_free_own_desc(struct gpio_desc *desc);