From patchwork Thu Dec 14 14:21:36 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ludovic Desroches X-Patchwork-Id: 10112321 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 6B08A60352 for ; Thu, 14 Dec 2017 14:25:50 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 57B4629542 for ; Thu, 14 Dec 2017 14:25:50 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 4C92C29640; Thu, 14 Dec 2017 14:25:50 +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 B9C1529542 for ; Thu, 14 Dec 2017 14:25:49 +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:Cc:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To: 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: List-Owner; bh=euje5AcjAK65Q9MvBKTIEsnVrTb02qsYlLNmKDrUsoI=; b=TcuvfFvnmt73g0 aIwo+zCWXK+exwR1/eZInmNAfZFbe1SSdGka/hXGJaQRpswEjInZLx2WjXdZlZh8g0+4L4U+GPpPE G6bQFbL7JjbMMF7s6x6zuXS44MGeYGBZ+OHWJxiYFRP22SxcJ/r1BRH6tSWSJ/d7soz60mZ2oynk8 nQrAOMwfvmGzwoCpHoQC+mcDtQ0Pf7FCoDEe6+uvxgKvLS6gu8+6vLGzJnPcCp+3yG1YDCegjhuFJ TPYgzraN+rZ/ea+UyV8x+S8TNl40rkJ7ywTgdAkL5+E36YhdLLWwchbM7C69MrFyMUwHRcUOOEQRO ZP4SUWsGXTHvbrBeRGSA==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.87 #1 (Red Hat Linux)) id 1ePUSK-0003nj-Kc; Thu, 14 Dec 2017 14:25:48 +0000 Received: from esa1.microchip.iphmx.com ([68.232.147.91]) by bombadil.infradead.org with esmtps (Exim 4.87 #1 (Red Hat Linux)) id 1ePUQF-0000YR-6k for linux-arm-kernel@lists.infradead.org; Thu, 14 Dec 2017 14:23:47 +0000 X-IronPort-AV: E=Sophos;i="5.45,400,1508828400"; d="scan'208";a="10138026" Received: from exsmtp02.microchip.com (HELO email.microchip.com) ([198.175.253.38]) by esa1.microchip.iphmx.com with ESMTP/TLS/DHE-RSA-AES256-SHA; 14 Dec 2017 07:23:02 -0700 Received: from ibiza.corp.atmel.com (10.10.76.4) by chn-sv-exch02.mchp-main.com (10.10.76.38) with Microsoft SMTP Server id 14.3.352.0; Thu, 14 Dec 2017 07:23:01 -0700 From: Ludovic Desroches To: , Subject: [RFC PATCH 5/7] pinctrl: at91-pio4: allow the gpiolib to set pin configuration Date: Thu, 14 Dec 2017 15:21:36 +0100 Message-ID: <20171214142138.23008-6-ludovic.desroches@microchip.com> X-Mailer: git-send-email 2.12.2 In-Reply-To: <20171214142138.23008-1-ludovic.desroches@microchip.com> References: <20171214142138.23008-1-ludovic.desroches@microchip.com> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20171214_062339_736172_C14745D5 X-CRM114-Status: UNSURE ( 9.22 ) X-CRM114-Notice: Please train this message. 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: Ludovic Desroches 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 Use gpiochip_generic_config to allow the gpiolib to set pin configuration. Since it relies on .pin_config_set(), add it too. For this controller, one pin is on group so we can use atmel_conf_pin_config_group_set() function. Signed-off-by: Ludovic Desroches --- drivers/pinctrl/pinctrl-at91-pio4.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/drivers/pinctrl/pinctrl-at91-pio4.c b/drivers/pinctrl/pinctrl-at91-pio4.c index b1ca838dd80a..4b8dda770af8 100644 --- a/drivers/pinctrl/pinctrl-at91-pio4.c +++ b/drivers/pinctrl/pinctrl-at91-pio4.c @@ -364,6 +364,7 @@ static struct gpio_chip atmel_gpio_chip = { .set = atmel_gpio_set, .to_irq = atmel_gpio_to_irq, .base = 0, + .set_config = gpiochip_generic_config, }; /* --- PINCTRL --- */ @@ -817,6 +818,7 @@ static void atmel_conf_pin_config_dbg_show(struct pinctrl_dev *pctldev, } static const struct pinconf_ops atmel_confops = { + .pin_config_set = atmel_conf_pin_config_group_set, /* In our case, a pin = a group */ .pin_config_group_get = atmel_conf_pin_config_group_get, .pin_config_group_set = atmel_conf_pin_config_group_set, .pin_config_dbg_show = atmel_conf_pin_config_dbg_show,