Received: by 2002:a25:8b91:0:0:0:0:0 with SMTP id j17csp391169ybl; Wed, 4 Dec 2019 04:36:07 -0800 (PST) X-Google-Smtp-Source: APXvYqz3A3CJWDYKUVurf+5pDm3t1IZwXdvyzbQ/1A7yKUuXgMqUahppkcv2VoM2EZcGLPZH5jel X-Received: by 2002:aca:1811:: with SMTP id h17mr2372120oih.159.1575462967738; Wed, 04 Dec 2019 04:36:07 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1575462967; cv=none; d=google.com; s=arc-20160816; b=IMdSAfNFEiFnQ3yQ0/EJoGbG8ub7FAb/Giw6AZA0admfbHmrQHoLYuhHsFhZruz/1P x4RPADhsslzVxCLLSWUuYhqbsEwlBTLuiMvwdq7Q6cjYT5UGCeemAUv54L0yP4nzDP4M VZuKozT2J/tmn80hPcDDpNFD73z2Ur0ZhngjDt+DY3A6Swmrzu8hZgWZ4x7hRTLGgpie knSSooa23/HTVg5CWckRLFRerJNEJisFUeNxwrLMVV3riC6uxGkaaMRpBWhQ57eu9AqL q/7eQyBtW1tLOqRm8LCp87So2vAVmyuy1CmXfRvAUpcAQQBwWGfWhvDx/vNDvwvbqXtO 1nPA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:dkim-signature; bh=YPZbrljyNjC5j7q28Y1yjStc3oy4UmLl5B93KBpnvIM=; b=xiXJkx+5RcHdkbQj+/3qPYKb2aLVpnKKeJpV8Iv9lJrVthFfaSaLOwZS1s2DW2FAoy ux8fYIF0gmhSvH5/IXezjk4UybhKeg5Hjg+dJZj/xxemQ8asab6NZ/zJHQzcTcdNXJ+c FNhotMRUC0CfT7QYsAe7tuotxyNOsQTK24wTiXXT4hwHXBntuA+/i1/me8IkXaYeB0z7 +xEzgiZLsF3EtLZbhXpPU8mbsh+B3j4sz4N5U3xTtU/eb8nDuCyCY1df7qbfQHS5IKFv DuGkV0QVDxfHmdEdLtrexHJBCeDyHfTpcMaJUI+x0yd9rRB/9F4yQ/ps/7VpJNGIrEVX p5kg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=GoheGBkS; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id n85si3190327oig.191.2019.12.04.04.35.55; Wed, 04 Dec 2019 04:36:07 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=GoheGBkS; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727766AbfLDMfW (ORCPT + 99 others); Wed, 4 Dec 2019 07:35:22 -0500 Received: from mail-pj1-f67.google.com ([209.85.216.67]:36870 "EHLO mail-pj1-f67.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726586AbfLDMfW (ORCPT ); Wed, 4 Dec 2019 07:35:22 -0500 Received: by mail-pj1-f67.google.com with SMTP id ep17so2965699pjb.4; Wed, 04 Dec 2019 04:35:21 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=YPZbrljyNjC5j7q28Y1yjStc3oy4UmLl5B93KBpnvIM=; b=GoheGBkSxxZ2NEshTyIX/Ttdx3CJSOLqcHa40SoFDIs3V8urBZ3Jy4URycaDCzXoDH 00kh0HualCF0KBfW8fYntwGYmPSUdZ22u/QR3EofTFJsWQ6TcMkwd1OXg9oLm6JxvxZm bh7DCHbBokIJvrielyZRpZafcDUqQQMh8vbMgvh7Vz8NUFQ46Mbq3qN5/tFiiO8xurk7 So4p+tUanA4K5Ik2NtvjKz0DpTV9Lm++Gg8/CTvcMNcdfwwlm5W/yCfEWCcWREG2oUqB EJCWUvFMoATg4rTmyvIG/RMEYfjHS/0rzo+WBkqTYlmAooznA+cJNPnOVluzw6k/lT75 3Z3w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=YPZbrljyNjC5j7q28Y1yjStc3oy4UmLl5B93KBpnvIM=; b=dwWAe1OmdkebWTKdRwfzKO4Ia2tCy5YeqLUy24J/ji6mVPuOSfUwKtPajBHMA89E/2 wHUog5PiukO+2R68v+uXLjOMsNoHKoUy6YqvXFJfej9xsV0NX36rda93BIlCSUCfp1ps 2jLD4Ue8R73z9K8dZeMKGfthtF/HfLiqZXpQ9d3LvUFN/6GvfULRgA6Y94Osq3/FdJ02 /K3uRtaeUatJgEcfe1ZsB6KQHhAjnlVoE9cUMPwheY38my3WsKiHALfTq7Iv7gFhanVJ sEhdMW8Seai2jqQpkzJBYB4xyw4N49xItlYa5fm08D3rUhDwYp8gvYdwnjZ6ExMfDk8w W96Q== X-Gm-Message-State: APjAAAUTxqDgLJYM7S4AtxaaPUA8Qmh23aH14LueSAWmy4lG5UJpDSNj FubeK5uUV6dJy+/Ch09585qRW4QvPZ+qF9PqvGQ= X-Received: by 2002:a17:90b:3109:: with SMTP id gc9mr3093142pjb.30.1575462921462; Wed, 04 Dec 2019 04:35:21 -0800 (PST) MIME-Version: 1.0 References: <20191204101042.4275-2-cleger@kalray.eu> In-Reply-To: <20191204101042.4275-2-cleger@kalray.eu> From: Andy Shevchenko Date: Wed, 4 Dec 2019 14:35:11 +0200 Message-ID: Subject: Re: [PATCH 1/5] gpio: export acpi_gpiochip_request_interrupts in gpio/driver.h To: Clement Leger Cc: Linux Kernel Mailing List , Linus Walleij , Bartosz Golaszewski , "open list:GPIO SUBSYSTEM" Content-Type: text/plain; charset="UTF-8" Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, Dec 4, 2019 at 12:13 PM Clement Leger wrote: > > dwapb-gpio driver which uses this function will be moved to pinctrl for > pinctrl support. Export this function in gpio/driver.h to allow using > it. > I don't think this is proper way to do it. The driver has to register IRQ chip and GPIO core will take care of ACPI related stuff. > Signed-off-by: Clement Leger > --- > drivers/gpio/gpiolib-acpi.h | 4 ---- > include/linux/gpio/driver.h | 12 ++++++++++++ > 2 files changed, 12 insertions(+), 4 deletions(-) > > diff --git a/drivers/gpio/gpiolib-acpi.h b/drivers/gpio/gpiolib-acpi.h > index 1c6d65cf0629..ba2f187babe3 100644 > --- a/drivers/gpio/gpiolib-acpi.h > +++ b/drivers/gpio/gpiolib-acpi.h > @@ -34,7 +34,6 @@ struct acpi_gpio_info { > void acpi_gpiochip_add(struct gpio_chip *chip); > void acpi_gpiochip_remove(struct gpio_chip *chip); > > -void acpi_gpiochip_request_interrupts(struct gpio_chip *chip); > void acpi_gpiochip_free_interrupts(struct gpio_chip *chip); > > int acpi_gpio_update_gpiod_flags(enum gpiod_flags *flags, > @@ -56,9 +55,6 @@ int acpi_gpio_count(struct device *dev, const char *con_id); > static inline void acpi_gpiochip_add(struct gpio_chip *chip) { } > static inline void acpi_gpiochip_remove(struct gpio_chip *chip) { } > > -static inline void > -acpi_gpiochip_request_interrupts(struct gpio_chip *chip) { } > - > static inline void > acpi_gpiochip_free_interrupts(struct gpio_chip *chip) { } > > diff --git a/include/linux/gpio/driver.h b/include/linux/gpio/driver.h > index e2480ef94c55..40b9f13d77e1 100644 > --- a/include/linux/gpio/driver.h > +++ b/include/linux/gpio/driver.h > @@ -733,6 +733,18 @@ void gpiochip_unlock_as_irq(struct gpio_chip *chip, unsigned int offset); > > struct gpio_chip *gpiod_to_chip(const struct gpio_desc *desc); > > + > +#ifdef CONFIG_GPIO_ACPI > + > +void acpi_gpiochip_request_interrupts(struct gpio_chip *chip); > + > +#else > + > +static inline void acpi_gpiochip_request_interrupts(struct gpio_chip *chip) > +{ > +} > + > +#endif /* CONFIG_GPIO_ACPI */ > #else /* CONFIG_GPIOLIB */ > > static inline struct gpio_chip *gpiod_to_chip(const struct gpio_desc *desc) > -- > 2.15.0.276.g89ea799 > -- With Best Regards, Andy Shevchenko