From patchwork Fri Sep 22 09:22:41 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Linus Walleij X-Patchwork-Id: 113996 Delivered-To: patch@linaro.org Received: by 10.140.106.117 with SMTP id d108csp3058546qgf; Fri, 22 Sep 2017 02:22:54 -0700 (PDT) X-Received: by 10.99.121.141 with SMTP id u135mr8451344pgc.86.1506072174650; Fri, 22 Sep 2017 02:22:54 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1506072174; cv=none; d=google.com; s=arc-20160816; b=pRL3LsjJIdFkl+GJHNEXPAlwRzqpROrEs4jMp33UgStBh2+5z4EGVHOfRt15SESXGu JPDcZvek/E/PjK1FVWfC4hLu6zT+v4u4k5qLUtKtdn+URWAjl+BuwloS4eq/QAzRkUBt OT0usvdpeOE7MK6FNDtc/vr1UgLYq4RiPj71G+c+7w8Qs7X1cYSZpQM9RpYZcszR3wA4 /nhPDQ/7d2qZ4PDtsbNRb66oWlVijNOPP9/CxmKj6L+zSAEhDlVvugYRcv8ONg8m07IT wAyDC9weMxyCixMcAlT+pO+XDEieGDciF2jyWM46BcdHljPwqU8aqC8mUgJn3mCEFpcN E8ew== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:references:in-reply-to:message-id:date :subject:cc:to:from:dkim-signature:arc-authentication-results; bh=UqkRY2xjAFipkpe1RB8x0aQguvGaR6Xhk3vqqZQuZIE=; b=Xlua/0lnCNfprQUYtIV0CPGde5+Mc3ZEcGfYDXr3kAiWrHiHVnZIVzr3B/S0cbWjad AOsQa8Cs203q432gtZIFdd22khK4Hi3QxF3NfFuvWOjfZsVW168LHx64p1INi3uyBYvu qMAjjEa+2SbfyJyelr9f2AEXeA3jlOZVAGOxaXpAKS9WCNul/2VRL3Su4HX1EHdxLthw tgJij+6X1PA8zYG4CEb35WfGY8Azd0RNWbpTPy6hn3C/JWCOiYLpqVRZedkGfjWy73Py N9GFRZFkKHVSEkDvGucfaRznWylDwJO6p+u+Um5yWi8Q3WmKmrAL6ZMg2Icbn1uwWxur xyFw== ARC-Authentication-Results: i=1; mx.google.com; dkim=neutral (body hash did not verify) header.i=@linaro.org header.s=google header.b=W6GvtLKq; 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id v26si2502469pfg.111.2017.09.22.02.22.54; Fri, 22 Sep 2017 02:22:54 -0700 (PDT) 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 header.s=google header.b=W6GvtLKq; 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 S1751833AbdIVJWx (ORCPT + 5 others); Fri, 22 Sep 2017 05:22:53 -0400 Received: from mail-lf0-f46.google.com ([209.85.215.46]:56539 "EHLO mail-lf0-f46.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751809AbdIVJWx (ORCPT ); Fri, 22 Sep 2017 05:22:53 -0400 Received: by mail-lf0-f46.google.com with SMTP id a18so544361lfl.13 for ; Fri, 22 Sep 2017 02:22:52 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=ekn8M/8XpvoK+7YqnsOgM+UgrSB371YDZKBeWJdZhoc=; b=W6GvtLKqFQic2fkLNPMXb8cFn75Q3y46qW9azeX7x4ChubTLXm4kHd4t5DBUz7mk9a /r0vpFJ8PRhxwWN7xqvTm73zPk1fZy4iyH7/XL8UF+m1pVPZG1MWjIs7TTnu6C9s5Cjo 1/dV9C8mnEticMIvRQO1vwKUYUTHdB9Gkvxi8= 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:in-reply-to :references; bh=ekn8M/8XpvoK+7YqnsOgM+UgrSB371YDZKBeWJdZhoc=; b=YAqCcSIJt4BNnXk6YFjtbQHagkResgozKb4lkVDKh2rbBzI6Sje2DsEg4aqavS7er5 xzRw4A2bo9Hd0oACcZb1KgJI7ebXgoOQcbmOIySGP75IdgnQ7+4qmoJK/iHLTJR8rb21 W6OCd0dfH+d9oW76M//fnmeLuruplh1MyL2WSm/O3CDXGnennxw3fcNxUxNT0sjYtMhw ENYK/iymgwrmfbLVnqqE+gWxf7TRlGDat+qncxnZ62u2I6afca2UKmpz9NZuta/mPwPO I9bl+kJHquB8xOqfah6KymPdHJleoHhQjlsubHS7JE56gh6z04wqfp5yd82FSkanbK5E PWmQ== X-Gm-Message-State: AHPjjUgqR3Q60icFC2UCAhKzaFLH4FdzYzdMJwWF5WeAjq79b5MFt4jP QIIpyHPiWa36lXSVvxujn3OHSh7qLyI= X-Google-Smtp-Source: AOwi7QAp5v51iyokF8dNhHnbn0ciGQ3APShEiVmGvoTHhUi/Czq1QwpwjrR1KLBbP2VI55EZm9VUgg== X-Received: by 10.25.210.131 with SMTP id j125mr1863886lfg.135.1506072171481; Fri, 22 Sep 2017 02:22:51 -0700 (PDT) Received: from genomnajs.ideon.se ([85.235.10.227]) by smtp.gmail.com with ESMTPSA id o193sm542914lfo.11.2017.09.22.02.22.50 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Fri, 22 Sep 2017 02:22:50 -0700 (PDT) From: Linus Walleij To: linux-gpio@vger.kernel.org Cc: Linus Walleij , Scott Branden Subject: [PATCH 2/4] pinctrl: bcm: nsp: Use library functions Date: Fri, 22 Sep 2017 11:22:41 +0200 Message-Id: <20170922092243.7546-2-linus.walleij@linaro.org> X-Mailer: git-send-email 2.13.5 In-Reply-To: <20170922092243.7546-1-linus.walleij@linaro.org> References: <20170922092243.7546-1-linus.walleij@linaro.org> Sender: linux-gpio-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-gpio@vger.kernel.org These request/free functions are just reimplementations of the standard helpers in gpiolib. Delete them and replace with the helpers. Cc: Scott Branden Signed-off-by: Linus Walleij --- drivers/pinctrl/bcm/pinctrl-nsp-gpio.c | 21 ++------------------- 1 file changed, 2 insertions(+), 19 deletions(-) -- 2.13.5 -- 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/drivers/pinctrl/bcm/pinctrl-nsp-gpio.c b/drivers/pinctrl/bcm/pinctrl-nsp-gpio.c index c1887072936e..e67ae52023ad 100644 --- a/drivers/pinctrl/bcm/pinctrl-nsp-gpio.c +++ b/drivers/pinctrl/bcm/pinctrl-nsp-gpio.c @@ -275,23 +275,6 @@ static struct irq_chip nsp_gpio_irq_chip = { .irq_set_type = nsp_gpio_irq_set_type, }; -/* - * Request the nsp IOMUX pinmux controller to mux individual pins to GPIO - */ -static int nsp_gpio_request(struct gpio_chip *gc, unsigned offset) -{ - unsigned gpio = gc->base + offset; - - return pinctrl_gpio_request(gpio); -} - -static void nsp_gpio_free(struct gpio_chip *gc, unsigned offset) -{ - unsigned gpio = gc->base + offset; - - pinctrl_gpio_free(gpio); -} - static int nsp_gpio_direction_input(struct gpio_chip *gc, unsigned gpio) { struct nsp_gpio *chip = gpiochip_get_data(gc); @@ -670,8 +653,8 @@ static int nsp_gpio_probe(struct platform_device *pdev) gc->label = dev_name(dev); gc->parent = dev; gc->of_node = dev->of_node; - gc->request = nsp_gpio_request; - gc->free = nsp_gpio_free; + gc->request = gpiochip_generic_request; + gc->free = gpiochip_generic_free; gc->direction_input = nsp_gpio_direction_input; gc->direction_output = nsp_gpio_direction_output; gc->set = nsp_gpio_set;