From patchwork Tue Feb 21 13:21:29 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Linus Walleij X-Patchwork-Id: 94276 Delivered-To: patch@linaro.org Received: by 10.140.20.99 with SMTP id 90csp438847qgi; Tue, 21 Feb 2017 05:21:41 -0800 (PST) X-Received: by 10.98.42.151 with SMTP id q145mr32757552pfq.175.1487683301541; Tue, 21 Feb 2017 05:21:41 -0800 (PST) Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id q2si21900431pge.319.2017.02.21.05.21.41; Tue, 21 Feb 2017 05:21:41 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-gpio-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=neutral (body hash did not verify) header.i=@linaro.org; spf=pass (google.com: best guess record for domain of linux-gpio-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-gpio-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752466AbdBUNVk (ORCPT + 4 others); Tue, 21 Feb 2017 08:21:40 -0500 Received: from mail-lf0-f42.google.com ([209.85.215.42]:36489 "EHLO mail-lf0-f42.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752388AbdBUNVk (ORCPT ); Tue, 21 Feb 2017 08:21:40 -0500 Received: by mail-lf0-f42.google.com with SMTP id b80so27383958lfe.3 for ; Tue, 21 Feb 2017 05:21:34 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id; bh=NGM1qMh5SHr34h/Sfy9DEXWtm9y5D4RFK01udjdizqA=; b=HKKqyT+edo1V+NvTiDQNekPZXOYIvBBo0dRF3D5ifIw103ODpUmwGCCZnQ+YSqOzjB t4zoteWDTlLLqG2C/tePH6LqBH8ijmS7n0UhZIFGRogx2xVr/H3jQ2AvdaGg7vtPF7/T cPUzzHwvYAJUlysfkGrWjFrPwNkdoH1LqgB7M= 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; bh=NGM1qMh5SHr34h/Sfy9DEXWtm9y5D4RFK01udjdizqA=; b=VYP+Pt8/RSvmjzRDQOP7NThtg5TdZYFJvmV/UMswwQbZQ9HPBuzmdZiGS1For9Uxul JcV/nihaO1Nh6ZcUUP4Gi+RsHOqvZOq6ciENFFpIb544EosHhJHM2XUJq5ycUn9Pece/ qCY4QtxjrEta/sB5cnl9lohWd5QJGDFqgxH2+pfKvppsodf4IW/qiB9E4DLlSu3FxLYH cTIvLYdgbstRE8xAKvHr0+XJZ9ioV6R23XXMeRP+g9HnK1cb8iPuosq9EjRomMR9Erd3 wzgc5l8h1kOGMcQY/UWt53yd7GGDIUnzFX1HMVg5jfXHS3k03Po6SvLZaMSPO4KX7Ezj u7dg== X-Gm-Message-State: AMke39mCyl6xpPv5pOLBJ33HgHzXV5MLRGxKbuRmUqdXEHAW1jyYaEvIqbPycO/XHNK47QKL X-Received: by 10.25.125.132 with SMTP id y126mr8084561lfc.102.1487683293178; Tue, 21 Feb 2017 05:21:33 -0800 (PST) Received: from gnarp.ideon.se ([85.235.10.227]) by smtp.gmail.com with ESMTPSA id c143sm6153248lfc.13.2017.02.21.05.21.31 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 21 Feb 2017 05:21:31 -0800 (PST) From: Linus Walleij To: linux-gpio@vger.kernel.org, Alexandre Courbot Cc: Linus Walleij , Lee Jones Subject: [PATCH] gpio: reintroduce devm_get_gpiod_from_child() Date: Tue, 21 Feb 2017 14:21:29 +0100 Message-Id: <20170221132129.25424-1-linus.walleij@linaro.org> X-Mailer: git-send-email 2.9.3 Sender: linux-gpio-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-gpio@vger.kernel.org We need to keep this API around for the merge window to avoid nasty build problems in the merges. Cc: Lee Jones Suggested-by: Greg Kroah-Hartman Signed-off-by: Linus Walleij --- include/linux/gpio/consumer.h | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) -- 2.9.3 -- To unsubscribe from this list: send the line "unsubscribe linux-gpio" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html diff --git a/include/linux/gpio/consumer.h b/include/linux/gpio/consumer.h index ea9b01d40017..2484b2fcc6eb 100644 --- a/include/linux/gpio/consumer.h +++ b/include/linux/gpio/consumer.h @@ -143,6 +143,16 @@ struct gpio_desc *devm_fwnode_get_index_gpiod_from_child(struct device *dev, struct fwnode_handle *child, enum gpiod_flags flags, const char *label); +/* FIXME: delete this helper when users are switched over */ +static inline struct gpio_desc *devm_get_gpiod_from_child(struct device *dev, + const char *con_id, struct fwnode_handle *child) +{ + return devm_fwnode_get_index_gpiod_from_child(dev, con_id, + 0, child, + GPIOD_ASIS, + "?"); +} + #else /* CONFIG_GPIOLIB */ static inline int gpiod_count(struct device *dev, const char *con_id) @@ -434,6 +444,13 @@ struct gpio_desc *devm_fwnode_get_index_gpiod_from_child(struct device *dev, return ERR_PTR(-ENOSYS); } +/* FIXME: delete this when all users are switched over */ +static inline struct gpio_desc *devm_get_gpiod_from_child(struct device *dev, + const char *con_id, struct fwnode_handle *child) +{ + return ERR_PTR(-ENOSYS); +} + #endif /* CONFIG_GPIOLIB */ static inline