From patchwork Thu Mar 7 13:30:13 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Jan_Kundr=C3=A1t?= X-Patchwork-Id: 1052924 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; dmarc=fail (p=none dis=none) header.from=cesnet.cz Authentication-Results: ozlabs.org; dkim=fail reason="signature verification failed" (1024-bit key; secure) header.d=cesnet.cz header.i=@cesnet.cz header.b="Ipfo1g5z"; dkim-atps=neutral Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by ozlabs.org (Postfix) with ESMTP id 44FXJD6zq5z9sDn for ; Fri, 8 Mar 2019 00:57:32 +1100 (AEDT) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726283AbfCGN5c (ORCPT ); Thu, 7 Mar 2019 08:57:32 -0500 Received: from office2.cesnet.cz ([195.113.144.244]:33896 "EHLO office2.cesnet.cz" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726180AbfCGN5c (ORCPT ); Thu, 7 Mar 2019 08:57:32 -0500 Received: from localhost (unknown [IPv6:2001:718:1:2c:9077:1a3:d51f:f1d6]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by office2.cesnet.cz (Postfix) with ESMTPSA id 7657840005D; Thu, 7 Mar 2019 14:57:30 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=cesnet.cz; s=office2; t=1551967050; bh=B460HWMZNAjwYSAso4TPmfC8/cp4Ez9SykJZrp0en54=; h=Resent-Date:Resent-From:Resent-To:Resent-Cc:In-Reply-To: References:From:Date:Subject:To:Cc; b=Ipfo1g5zEJavccceD0zma30krL/M+ZX6uUunDLarVG5TwLJIKsBrQUW3KIwNWiiwy WMmcYyjCL1/kI/F16BT8L0AtnMKPXq6Eb/e8jt/tFPeGkMnY632pfOaWMlQjw+DBVw XR8YnIybGVCFzkaRxjq1YQy1VtfNEe4JGsE3ADsE= Message-Id: <32d5f815885b93d8b806471bf1e214924a1d2372.1551966077.git.jan.kundrat@cesnet.cz> In-Reply-To: References: From: =?utf-8?q?Jan_Kundr=C3=A1t?= Date: Thu, 7 Mar 2019 14:30:13 +0100 Subject: [PATCH 2/4] gpiolib: export devprop_gpiochip_set_names() MIME-Version: 1.0 To: linux-gpio@vger.kernel.org, Linus Walleij , Phil Reid Cc: Sebastian Reichel , Mika Westerberg Sender: linux-gpio-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-gpio@vger.kernel.org This function is needed in mcp23s08. That driver is a special snowflake because it supports several hardware chips as a single "GPIO chip" under Linux. Signed-off-by: Jan Kundrát Cc: Linus Walleij Cc: Mika Westerberg Cc: Phil Reid Acked-by: Mika Westerberg --- drivers/gpio/gpiolib-devprop.c | 2 ++ drivers/gpio/gpiolib.h | 3 --- include/linux/gpio/driver.h | 3 +++ 3 files changed, 5 insertions(+), 3 deletions(-) diff --git a/drivers/gpio/gpiolib-devprop.c b/drivers/gpio/gpiolib-devprop.c index dd517098ab95..0c6f97c09bd9 100644 --- a/drivers/gpio/gpiolib-devprop.c +++ b/drivers/gpio/gpiolib-devprop.c @@ -56,3 +56,5 @@ void devprop_gpiochip_set_names(struct gpio_chip *chip, kfree(names); } + +EXPORT_SYMBOL_GPL(devprop_gpiochip_set_names) diff --git a/drivers/gpio/gpiolib.h b/drivers/gpio/gpiolib.h index bc57f0dc5953..0c512900752d 100644 --- a/drivers/gpio/gpiolib.h +++ b/drivers/gpio/gpiolib.h @@ -241,9 +241,6 @@ static inline int gpio_chip_hwgpio(const struct gpio_desc *desc) return desc - &desc->gdev->descs[0]; } -void devprop_gpiochip_set_names(struct gpio_chip *chip, - const struct fwnode_handle *fwnode); - /* With descriptor prefix */ #define gpiod_emerg(desc, fmt, ...) \ diff --git a/include/linux/gpio/driver.h b/include/linux/gpio/driver.h index 07cddbf45186..92a222646447 100644 --- a/include/linux/gpio/driver.h +++ b/include/linux/gpio/driver.h @@ -609,6 +609,9 @@ struct gpio_desc *gpiochip_request_own_desc(struct gpio_chip *chip, u16 hwnum, enum gpiod_flags flags); void gpiochip_free_own_desc(struct gpio_desc *desc); +void devprop_gpiochip_set_names(struct gpio_chip *chip, + const struct fwnode_handle *fwnode); + #else /* CONFIG_GPIOLIB */ static inline struct gpio_chip *gpiod_to_chip(const struct gpio_desc *desc)