From patchwork Sun Jan 21 23:09:40 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: David Lechner X-Patchwork-Id: 864113 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=lechnology.com header.i=@lechnology.com header.b="H9xDuCNT"; dkim-atps=neutral Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by ozlabs.org (Postfix) with ESMTP id 3zPqzS2xnNz9sBd for ; Mon, 22 Jan 2018 10:10:28 +1100 (AEDT) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1750945AbeAUXKN (ORCPT ); Sun, 21 Jan 2018 18:10:13 -0500 Received: from vern.gendns.com ([206.190.152.46]:42288 "EHLO vern.gendns.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750939AbeAUXKM (ORCPT ); Sun, 21 Jan 2018 18:10:12 -0500 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lechnology.com; s=default; h=Message-Id:Date:Subject:Cc:To:From:Sender: Reply-To:MIME-Version:Content-Type:Content-Transfer-Encoding:Content-ID: Content-Description:Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc :Resent-Message-ID:In-Reply-To:References:List-Id:List-Help:List-Unsubscribe: List-Subscribe:List-Post:List-Owner:List-Archive; bh=OPa5dUvNN+vqUwmc5TEcO2Il+bLTFIQm56IP90o1ITw=; b=H9xDuCNTPgMcT4KKWc2T7deBsR CJ51K4cKMILocmQiuint+MfzYyPFkHg+qUXg85Oft0nWpG7Qg+FNuqhr9Zld6P20QH5u070jVgLuC roSXTpLqISA+TpkOL3pwSbkPXUO7xqZumsKWipc6PncglEMT7+wvpZNlkBneHJrufxwmdIAXGZm2T 338zktdNh2/136Z0oA+TwVZZJFUuuA+V3vYqgSlJenMbZlJce/GrJTZSWH+s7rzjpYQJM9dYEJWjQ XFWmhgTdJahtx5EXnT/uQvODyjm8x4b/iW5tnAJqh0/fXf2KJkIiLO5uSDzgC6r6aAYmLVLP4LQPW zSko2y7g==; Received: from 108-198-5-147.lightspeed.okcbok.sbcglobal.net ([108.198.5.147]:48668 helo=freyr.lechnology.com) by vern.gendns.com with esmtpsa (TLSv1.2:ECDHE-RSA-AES128-SHA256:128) (Exim 4.89_1) (envelope-from ) id 1edOk7-004Ii4-7T; Sun, 21 Jan 2018 18:09:39 -0500 From: David Lechner To: linux-gpio@vger.kernel.org Cc: David Lechner , linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, Keerthy , Linus Walleij Subject: [PATCH] gpio: davinci: add support for pinmux gpio ranges Date: Sun, 21 Jan 2018 17:09:40 -0600 Message-Id: <1516576180-1467-1-git-send-email-david@lechnology.com> X-Mailer: git-send-email 2.7.4 X-AntiAbuse: This header was added to track abuse, please include it with any abuse report X-AntiAbuse: Primary Hostname - vern.gendns.com X-AntiAbuse: Original Domain - vger.kernel.org X-AntiAbuse: Originator/Caller UID/GID - [47 12] / [47 12] X-AntiAbuse: Sender Address Domain - lechnology.com X-Get-Message-Sender-Via: vern.gendns.com: authenticated_id: davidmain+lechnology.com/only user confirmed/virtual account not confirmed X-Authenticated-Sender: vern.gendns.com: davidmain@lechnology.com X-Source: X-Source-Args: X-Source-Dir: Sender: linux-gpio-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-gpio@vger.kernel.org This adds support for the pinmux gpio ranges feature to the DaVinci gpio driver. Only device tree is supported since the non-DT boards don't use a generic pinmux controller. Cc: Keerthy Cc: Linus Walleij Signed-off-by: David Lechner --- drivers/gpio/gpio-davinci.c | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/drivers/gpio/gpio-davinci.c b/drivers/gpio/gpio-davinci.c index e4b3d7d..744d6c2 100644 --- a/drivers/gpio/gpio-davinci.c +++ b/drivers/gpio/gpio-davinci.c @@ -20,6 +20,7 @@ #include #include #include +#include #include #include #include @@ -225,6 +226,11 @@ static int davinci_gpio_probe(struct platform_device *pdev) chips->chip.of_gpio_n_cells = 2; chips->chip.parent = dev; chips->chip.of_node = dev->of_node; + + if (of_property_read_bool(dev->of_node, "gpio-ranges")) { + chips->chip.request = gpiochip_generic_request; + chips->chip.free = gpiochip_generic_free; + } #endif spin_lock_init(&chips->lock); bank_base += ngpio;