Received: by 2002:a05:6a10:8c0a:0:0:0:0 with SMTP id go10csp2331275pxb; Mon, 18 Jan 2021 15:08:35 -0800 (PST) X-Google-Smtp-Source: ABdhPJxUbAdmYoTETJRQMLyEXnYSqKyO0D+0fTHVMIJaEQeJmha3uMHbx8/Z35WzvW7L2/nNTKGb X-Received: by 2002:a17:906:f0d7:: with SMTP id dk23mr1189060ejb.131.1611011315183; Mon, 18 Jan 2021 15:08:35 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1611011315; cv=none; d=google.com; s=arc-20160816; b=V4TiOhgBXpkuhog2OsscBOrSbKkiMRM65BrCfAqcD+K9A//jEFGwvNVmuO6B2fnFw6 6/EiF4yVCTM7IEKAP/flYyD3ljMsQXzY8qY9G2tBVEhi+WscvE7C/BOA7/XFht5L5x/b oYjSv1dpdlV2QhFmZnDPv0cqVrZIqpWUGwcRdFs1DQni5+WUTSTNDXD8OUoa1K6UOr/Z zH3QdId/68f4FfzbEkZjKpTsWGKzzMHuqPD4cRoalSWrWPoYzYK7hxG3KeatwwjxU4+W gE2CiyievTO8cZSfg0X8ZMdN0sPEVbyd7St1cec3tpEFvnBxfHrcrKoLcqbyCFoPpG3A snUQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature; bh=C2QP5lmIUF4SjJwYDg+pG2+rp1yNXdbx4q0QwvfHWgY=; b=Me/fBBZYpbwFLJdA5PFK9b+sFlQqiROQ+p+e1LdfyHhNp+ZLDHa/LJNnYywkCducvT u2/kl5yWqLImAFH+0xRGnZqh/hDbjdXOG+++allCUwMij/hlMoTEuGuKKX9bIxmN+1wy tvoUAw6tSCoPajqCS/I8m7IR14y4Jx6q84M6JleHWIB4R0CAQoiLtMeE38U+2dMI/yvy cgB/QB4EKv2umtxS7a2OFff7Y70mFz6QkleOEDKbhSUB3zlqejhaOliWCYQzOSr6CyTW R3aAZRvCbiTROgPw7MEchzZNdknxphDheCri3COFJ0u/gB6JdHtHESvdWUDc4abX+UTB 17Fw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass (test mode) header.i=@ideasonboard.com header.s=mail header.b=acCJ589t; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id d22si3578428edy.227.2021.01.18.15.08.09; Mon, 18 Jan 2021 15:08:35 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass (test mode) header.i=@ideasonboard.com header.s=mail header.b=acCJ589t; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1732916AbhARHin (ORCPT + 99 others); Mon, 18 Jan 2021 02:38:43 -0500 Received: from perceval.ideasonboard.com ([213.167.242.64]:54932 "EHLO perceval.ideasonboard.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726139AbhARHii (ORCPT ); Mon, 18 Jan 2021 02:38:38 -0500 Received: from pendragon.ideasonboard.com (62-78-145-57.bb.dnainternet.fi [62.78.145.57]) by perceval.ideasonboard.com (Postfix) with ESMTPSA id 4A3AB2BB; Mon, 18 Jan 2021 08:37:56 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com; s=mail; t=1610955476; bh=zgto1uNnvZ2GpO37f5o+w/xXmKyI+iSAGEN7OiEiaTg=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=acCJ589txn50jkAr3fEASXMMzRmaZIz1oP5tPfDocMDArWr5uuIvsW/mM2T7l0oBK bE37I4w3alC0Zl5oS60W/sy6ImOYwbazQDV3bKTlUeeu9eOX1xKO5RjZAdsCiffrdf LJBngh/Psk0bcPTc+ezuVxjTaHg8YsYhnKVdhE3c= Date: Mon, 18 Jan 2021 09:37:40 +0200 From: Laurent Pinchart To: Daniel Scally Cc: linux-kernel@vger.kernel.org, linux-acpi@vger.kernel.org, linux-gpio@vger.kernel.org, linux-i2c@vger.kernel.org, platform-driver-x86@vger.kernel.org, devel@acpica.org, rjw@rjwysocki.net, lenb@kernel.org, andy@kernel.org, mika.westerberg@linux.intel.com, linus.walleij@linaro.org, bgolaszewski@baylibre.com, wsa@kernel.org, lee.jones@linaro.org, hdegoede@redhat.com, mgross@linux.intel.com, robert.moore@intel.com, erik.kaneda@intel.com, sakari.ailus@linux.intel.com, andriy.shevchenko@linux.intel.com, kieran.bingham@ideasonboard.com Subject: Re: [PATCH v2 5/7] gpio: gpiolib-acpi: Export acpi_get_gpiod() Message-ID: References: <20210118003428.568892-1-djrscally@gmail.com> <20210118003428.568892-6-djrscally@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: <20210118003428.568892-6-djrscally@gmail.com> Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi Daniel, Thank you for the patch. On Mon, Jan 18, 2021 at 12:34:26AM +0000, Daniel Scally wrote: > I need to be able to translate GPIO resources in an acpi_device's _CRS > into gpio_descs. Those are represented in _CRS as a pathname to a GPIO > device plus the pin's index number: this function is perfect for that > purpose. > > Signed-off-by: Daniel Scally Reviewed-by: Laurent Pinchart > --- > Changes in v2: > > -None > > drivers/gpio/gpiolib-acpi.c | 3 ++- > include/linux/acpi.h | 5 +++++ > 2 files changed, 7 insertions(+), 1 deletion(-) > > diff --git a/drivers/gpio/gpiolib-acpi.c b/drivers/gpio/gpiolib-acpi.c > index e37a57d0a2f0..83f9f85cd0ab 100644 > --- a/drivers/gpio/gpiolib-acpi.c > +++ b/drivers/gpio/gpiolib-acpi.c > @@ -111,7 +111,7 @@ static int acpi_gpiochip_find(struct gpio_chip *gc, void *data) > * controller does not have GPIO chip registered at the moment. This is to > * support probe deferral. > */ > -static struct gpio_desc *acpi_get_gpiod(char *path, int pin) > +struct gpio_desc *acpi_get_gpiod(char *path, int pin) > { > struct gpio_chip *chip; > acpi_handle handle; > @@ -127,6 +127,7 @@ static struct gpio_desc *acpi_get_gpiod(char *path, int pin) > > return gpiochip_get_desc(chip, pin); > } > +EXPORT_SYMBOL_GPL(acpi_get_gpiod); > > static irqreturn_t acpi_gpio_irq_handler(int irq, void *data) > { > diff --git a/include/linux/acpi.h b/include/linux/acpi.h > index 2630c2e953f7..5cd272326eb7 100644 > --- a/include/linux/acpi.h > +++ b/include/linux/acpi.h > @@ -1066,6 +1066,7 @@ void __acpi_handle_debug(struct _ddebug *descriptor, acpi_handle handle, const c > bool acpi_gpio_get_irq_resource(struct acpi_resource *ares, > struct acpi_resource_gpio **agpio); > int acpi_dev_gpio_irq_get(struct acpi_device *adev, int index); > +struct gpio_desc *acpi_get_gpiod(char *path, int pin); > #else > static inline bool acpi_gpio_get_irq_resource(struct acpi_resource *ares, > struct acpi_resource_gpio **agpio) > @@ -1076,6 +1077,10 @@ static inline int acpi_dev_gpio_irq_get(struct acpi_device *adev, int index) > { > return -ENXIO; > } > +struct gpio_desc *acpi_get_gpiod(char *path, int pin) > +{ > + return NULL; > +} > #endif > > /* Device properties */ -- Regards, Laurent Pinchart