Received: by 2002:a05:6a10:6d10:0:0:0:0 with SMTP id gq16csp895029pxb; Fri, 22 Apr 2022 13:40:23 -0700 (PDT) X-Google-Smtp-Source: ABdhPJySDZx7JMS9D9V9ALP6fTSOrFS1ttbo/Wcvz0KAmQxLyR/MGDZW6xU1PvioKZjVHHBNeMSI X-Received: by 2002:a05:6a00:158d:b0:50c:df7b:ca25 with SMTP id u13-20020a056a00158d00b0050cdf7bca25mr6764592pfk.27.1650660023664; Fri, 22 Apr 2022 13:40:23 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1650660023; cv=none; d=google.com; s=arc-20160816; b=oWJ4I7FouCgZWRVjF5Gxqi+F1WB6ELmESq/HWupF91UMz00tzEzbApMQWlaZkHbr2p mzcNcBWOuoUlXrhc4nzPB1/eT9u1V1T9gQ7Yoyo8zpHb8elzJbdtxKIwYMTWSouRPp5K Odlf31WPve1nk1rNoed5IXqAHkFkyfACDCd2Ompm77Ur6Ms1PG3JY7Trh64pPizhSwuV MCylrYZZ9GBOvTuD+S6P0bgtkkts/06T29YdnPsw5a13ku6V+vcsDL1TbLsBLikRuxvI r15NO4AaMAqMVsP5Te+0QrbuC7KoMRjkbcV7f7hG+OfBn6As/SU3wOr/zap6LaCRVV87 W5oQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:robot-unsubscribe :robot-id:message-id:mime-version:references:in-reply-to:cc:subject :to:reply-to:sender:from:dkim-signature:dkim-signature:date; bh=aqFowRIIM2M8+g8oIQx/C8ZfaouXGGsmaEPU61npqYQ=; b=znn+3xjNwKB5JcSd/1Up2zM4w6v2wLR/HWQT4KIjeVprMwbZcEv1lpgnaLCnxS5bzU rBuXWSSLLB6PYaxIpgLtE2rDM58PJjZylOGK626F7FVuVbNtWPKW8A5uzt7MJKc1+R4e khqOgun3EkQICt2wl31DNouLY7GKdC48384IpcgQINN/bpupK3i2yZssRcIg+JyZQQDI UtqNfn7UQBaR16TJL5BQzWDJEW5XUvnVYzqFyd8iO4r2K5dgJ9qUDdrUykIseOIgZ18h k+f2p4W6Nufos78CFOFrpw1gTLlstnreCCSQhSDnxnnYQXpEaXbKZzhJe7XF2zv7tqAo Gx1g== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linutronix.de header.s=2020 header.b=MwSqJ6Sr; dkim=neutral (no key) header.i=@linutronix.de; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=linutronix.de Return-Path: Received: from lindbergh.monkeyblade.net (lindbergh.monkeyblade.net. [2620:137:e000::1:18]) by mx.google.com with ESMTPS id n17-20020a170902e55100b00158b024df25si726964plf.555.2022.04.22.13.40.22 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 22 Apr 2022 13:40:23 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:18 as permitted sender) client-ip=2620:137:e000::1:18; Authentication-Results: mx.google.com; dkim=pass header.i=@linutronix.de header.s=2020 header.b=MwSqJ6Sr; dkim=neutral (no key) header.i=@linutronix.de; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=linutronix.de Received: from out1.vger.email (out1.vger.email [IPv6:2620:137:e000::1:20]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id AE18B2ADE5C; Fri, 22 Apr 2022 12:26:04 -0700 (PDT) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1353341AbiDSOcR (ORCPT + 99 others); Tue, 19 Apr 2022 10:32:17 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:46522 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1353343AbiDSObu (ORCPT ); Tue, 19 Apr 2022 10:31:50 -0400 Received: from galois.linutronix.de (Galois.linutronix.de [IPv6:2a0a:51c0:0:12e:550::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id CAA2731342 for ; Tue, 19 Apr 2022 07:29:07 -0700 (PDT) Date: Tue, 19 Apr 2022 14:29:05 -0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020; t=1650378546; h=from:from:sender:sender:reply-to:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=aqFowRIIM2M8+g8oIQx/C8ZfaouXGGsmaEPU61npqYQ=; b=MwSqJ6Sr3KbcQQv7XbnP32CuiS8GiDq0AvPGPdFgJf0+WLrOImFk3VEBwtEdR+KmNcSzHN fN+6VeaYWghepRkKtrHpKy0PsJrEHViIoRPYzjvMpdr8Ju8ksNm93tBJhe+8F1BOD+9EAN 3EF5pBEWDlrDGb0sCYtFjAzFckz2gvjOJU8VvNm65zTPTN+1pSXhv/pNclultviI7p6cXx 1E70PPaHAGqiASDFxlTeDcuVQT3XKzsEdrr6F/0p9miBDDs2IGi1Mc27LiRoeKlTFPla3O 73QFij27Sr5tYDAwtD9x1S7yKtndC+c4Jsbzpvf6eaI38UeQy+/pBQK1y7IhVA== DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020e; t=1650378546; h=from:from:sender:sender:reply-to:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=aqFowRIIM2M8+g8oIQx/C8ZfaouXGGsmaEPU61npqYQ=; b=E6rgrIgV2PnWuEOCxeiREA8d1D+mEe51jd1PG0LulXs9E8Z3FSawT0NwQb7pLpBmN4WJec OEvGaoZoR1Z0q3Ag== From: "irqchip-bot for Marc Zyngier" Sender: tip-bot2@linutronix.de Reply-to: linux-kernel@vger.kernel.org To: linux-kernel@vger.kernel.org Subject: [irqchip: irq/irqchip-next] gpio: Expose the gpiochip_irq_re[ql]res helpers Cc: Andy Shevchenko , Bartosz Golaszewski , Marc Zyngier , tglx@linutronix.de In-Reply-To: <20220419141846.598305-3-maz@kernel.org> References: <20220419141846.598305-3-maz@kernel.org> MIME-Version: 1.0 Message-ID: <165037854540.4207.15429511817140847503.tip-bot2@tip-bot2> Robot-ID: Robot-Unsubscribe: Contact to get blacklisted from these emails Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=-2.0 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,RDNS_NONE,SPF_HELO_NONE autolearn=no autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org The following commit has been merged into the irq/irqchip-next branch of irqchip: Commit-ID: 704f08753b6dcd0e08c1953af0b2c7f3fac87111 Gitweb: https://git.kernel.org/pub/scm/linux/kernel/git/maz/arm-platforms/704f08753b6dcd0e08c1953af0b2c7f3fac87111 Author: Marc Zyngier AuthorDate: Tue, 19 Apr 2022 15:18:38 +01:00 Committer: Marc Zyngier CommitterDate: Tue, 19 Apr 2022 15:22:25 +01:00 gpio: Expose the gpiochip_irq_re[ql]res helpers The GPIO subsystem has a couple of internal helpers to manage resources on behalf of the irqchip. Expose them so that GPIO drivers can use them directly. Reviewed-by: Andy Shevchenko Reviewed-by: Bartosz Golaszewski Signed-off-by: Marc Zyngier Link: https://lore.kernel.org/r/20220419141846.598305-3-maz@kernel.org --- drivers/gpio/gpiolib.c | 6 ++++-- include/linux/gpio/driver.h | 4 ++++ 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/drivers/gpio/gpiolib.c b/drivers/gpio/gpiolib.c index 48191e6..36e436a 100644 --- a/drivers/gpio/gpiolib.c +++ b/drivers/gpio/gpiolib.c @@ -1423,19 +1423,21 @@ static int gpiochip_to_irq(struct gpio_chip *gc, unsigned int offset) return irq_create_mapping(domain, offset); } -static int gpiochip_irq_reqres(struct irq_data *d) +int gpiochip_irq_reqres(struct irq_data *d) { struct gpio_chip *gc = irq_data_get_irq_chip_data(d); return gpiochip_reqres_irq(gc, d->hwirq); } +EXPORT_SYMBOL(gpiochip_irq_reqres); -static void gpiochip_irq_relres(struct irq_data *d) +void gpiochip_irq_relres(struct irq_data *d) { struct gpio_chip *gc = irq_data_get_irq_chip_data(d); gpiochip_relres_irq(gc, d->hwirq); } +EXPORT_SYMBOL(gpiochip_irq_relres); static void gpiochip_irq_mask(struct irq_data *d) { diff --git a/include/linux/gpio/driver.h b/include/linux/gpio/driver.h index 98c9351..066bcfd 100644 --- a/include/linux/gpio/driver.h +++ b/include/linux/gpio/driver.h @@ -579,6 +579,10 @@ void gpiochip_relres_irq(struct gpio_chip *gc, unsigned int offset); void gpiochip_disable_irq(struct gpio_chip *gc, unsigned int offset); void gpiochip_enable_irq(struct gpio_chip *gc, unsigned int offset); +/* irq_data versions of the above */ +int gpiochip_irq_reqres(struct irq_data *data); +void gpiochip_irq_relres(struct irq_data *data); + /* Line status inquiry for drivers */ bool gpiochip_line_is_open_drain(struct gpio_chip *gc, unsigned int offset); bool gpiochip_line_is_open_source(struct gpio_chip *gc, unsigned int offset);