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: 10177173 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id D551B604D4 for ; Sun, 21 Jan 2018 23:10:27 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id C533426212 for ; Sun, 21 Jan 2018 23:10:27 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id B894626E56; Sun, 21 Jan 2018 23:10:27 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-4.2 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,RCVD_IN_DNSWL_MED autolearn=ham version=3.3.1 Received: from bombadil.infradead.org (bombadil.infradead.org [65.50.211.133]) (using TLSv1.2 with cipher AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id 2144626212 for ; Sun, 21 Jan 2018 23:10:27 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20170209; h=Sender: Content-Transfer-Encoding:Content-Type:MIME-Version:Cc:List-Subscribe: List-Help:List-Post:List-Archive:List-Unsubscribe:List-Id:Message-Id:Date: Subject:To:From:Reply-To:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:In-Reply-To: References:List-Owner; bh=3NkVjQCku/AN2LOqm1vxoLjp9R8j0ODR4JBnC0Pcxx8=; b=Xzs b8PDazFnyYtSsL3CcX0zOiOfYyMDuT5OMHL1nUYkGohL82jizzn+8YBUT0+XwofQuw61UrisgrOuv UkVjKZFcX43hkCsb4OeJKx9P+YtNT20Qdzk1W0NRRcFDOIOL+gJ/8eLTm+YQSoHUcSkE+qnbA5sxM y0zzhCaxpEqVawOesY5If/bSZEChxlchVCmZ+1albcyZx5oKhfeTsliHXFYpsD9m8RpZmfNw5ADP5 +H9tMLROJqUf0idvIaW+cfTyruQZyBXIwrKxom3ZFBIiI7b77Wz0OBKrSFYbc4RXlktVAwPsb69og 2J5umT5suZyu0fGM2uK/MrjMDmFipQQ==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.89 #1 (Red Hat Linux)) id 1edOkr-00032p-A9; Sun, 21 Jan 2018 23:10:25 +0000 Received: from vern.gendns.com ([206.190.152.46]) by bombadil.infradead.org with esmtps (Exim 4.89 #1 (Red Hat Linux)) id 1edOko-00031S-Jl for linux-arm-kernel@lists.infradead.org; Sun, 21 Jan 2018 23:10:24 +0000 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 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 - lists.infradead.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: X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Keerthy , Linus Walleij , David Lechner , linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org MIME-Version: 1.0 Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org X-Virus-Scanned: ClamAV using ClamSMTP 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;