Received: by 2002:a05:6358:3188:b0:123:57c1:9b43 with SMTP id q8csp2818685rwd; Mon, 29 May 2023 01:02:40 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ6uKm64sZ6znAyYw1KINl97GtZUnELAkHtmiEr0r1LCNSpqPCLQC65XG99pxQEnqcqT016b X-Received: by 2002:a17:903:2448:b0:1a1:bf22:2b6e with SMTP id l8-20020a170903244800b001a1bf222b6emr11386823pls.43.1685347360524; Mon, 29 May 2023 01:02:40 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1685347360; cv=none; d=google.com; s=arc-20160816; b=oQt5qe2a7HjknJZqrKojKaeUSBzARTgnmYJXyUIMVLbCS7gWcvcNL6h697EmWDazNU VFNaC7jV2q00kagm4SQP2DMjesH72GbVHk+F0GZBmhWAXnEmlByzbEYX8mxCqrv3mAcA oz9zJWxZ4r9OE8SOlKVakPKL6E+SCKZfC3JDmkxzhZLcejgp9YuMTy/e6BL0jqwj1k7b 573pJ8BCfTYkHBofKrQGhKEMPgWsOhee40sTyH8TIN233SXGFmm9gbgqiC5IMJwMAaa+ N5Nm0xLrgouh7h5J5QrBgQhdnKXPM0NGwoSW4VaHaG5BYyRYjyFtN5wS97Z4L8MysWSt r6Qw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:feedback-id:content-transfer-encoding :mime-version:message-id:date:subject:cc:to:from; bh=3gWFtRzVUEa4feScSnYuFAHI3m+T/1Nkip6eE6hm1Tc=; b=x4mLxPy9uUtbtQ9blfPqjNV8pWfbtPzd5lj7Js2mdr8+xeKFchjjFHStEE8q+UchY0 kFZBxJkpa3GRrA1L6PThTrQ2xy8haf5IqgUl0cUuDvdrWZGFgNRNNKxS5uMWxzGK/Rgc /cwSXydOM9xt7Hn0aKgyvpT3ANnFNs/Luit8v+lfSknCeorp6+BljleBey4FsLYzMDTN AnEt+XXzBasuSn65UIV1QUOxZaaB8PrFf/DTLruHQrkgcoSt6YBw0rPOx1TXACdBSrwG UhiP4RnzYKgzO5rMBxE8KDTm5r+/dkZQUM/eNfc3OTL3Jukpu4VylbOw6SfcPlgtNDa6 OwWQ== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id s3-20020a170902a50300b001aae905065csi8620175plq.284.2023.05.29.01.02.25; Mon, 29 May 2023 01:02:40 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231551AbjE2HpH (ORCPT + 99 others); Mon, 29 May 2023 03:45:07 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:56210 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231550AbjE2HpB (ORCPT ); Mon, 29 May 2023 03:45:01 -0400 Received: from smtpbgjp3.qq.com (smtpbgjp3.qq.com [54.92.39.34]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 07F62AC; Mon, 29 May 2023 00:44:54 -0700 (PDT) X-QQ-mid: bizesmtp75t1685346271t2dsh6fi Received: from wxdbg.localdomain.com ( [183.159.96.128]) by bizesmtp.qq.com (ESMTP) with id ; Mon, 29 May 2023 15:44:22 +0800 (CST) X-QQ-SSF: 01400000000000J0Z000000A0000000 X-QQ-FEAT: eSZ1CZgv+JDnClWgMPbLdL6Yn+9Meybq4WT4eTj7rXbJ1L6TQWpUnAm2mROMV ofkFElQi08BdjMr3eXJJvzEyZrfjFKXQKDeDc+xIjLLOe+89hbMXvZLj85XvjjHkQCwHVeI QOsqlNZg3wFTsPTgJaSN1+tNg9K6HIWXe9ZhPcSvCvDJCLbXMv3b6upAPUc0c4Zc9PdjDl3 M0C57woFwk39p2d3WLFdVHSYL1TwEsCegCK1Ojglw2g8QGG+/XhaydOaBuxFANp/hLp3b6W cOTuiLInlp3THu6N0GA2tFCej5jx72TcKz7pPtp+X7carWLjqzSi+n8d6CjnYQ9KbSw/2VN mXhXQcPJMn96a2YqLBPugtpj9d9fuF/z3Mf4FAyGYmI3AwezwUD9M84vd1i4w== X-QQ-GoodBg: 2 X-BIZMAIL-ID: 9551324987145372188 From: Jiawen Wu To: linus.walleij@linaro.org, brgl@bgdev.pl, andy.shevchenko@gmail.com, shreeya.patel@collabora.com, linux-gpio@vger.kernel.org, linux-kernel@vger.kernel.org Cc: Jiawen Wu Subject: [PATCH] gpiolib: Fix GPIO chip IRQ initialization restriction Date: Mon, 29 May 2023 15:42:27 +0800 Message-Id: <20230529074227.636933-1-jiawenwu@trustnetic.com> X-Mailer: git-send-email 2.27.0 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-QQ-SENDSIZE: 520 Feedback-ID: bizesmtp:trustnetic.com:qybglogicsvrgz:qybglogicsvrgz5a-1 X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,RCVD_IN_DNSWL_NONE, RCVD_IN_MSPIKE_H4,RCVD_IN_MSPIKE_WL,SPF_HELO_PASS,SPF_PASS, T_SCC_BODY_TEXT_LINE autolearn=ham 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 In case of gpio-regmap, IRQ chip is added by regmap-irq and associated with GPIO chip by gpiochip_irqchip_add_domain(). The initialization flag was not added in gpiochip_irqchip_add_domain(), causing gpiochip_to_irq() to return -EPROBE_DEFER. Fixes: 5467801f1fcb ("gpio: Restrict usage of GPIO chip irq members before initialization") Signed-off-by: Jiawen Wu Cc: shreeya.patel@collabora.com --- drivers/gpio/gpiolib.c | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/gpio/gpiolib.c b/drivers/gpio/gpiolib.c index 04fb05df805b..1b6cd4ffb761 100644 --- a/drivers/gpio/gpiolib.c +++ b/drivers/gpio/gpiolib.c @@ -1789,6 +1789,7 @@ int gpiochip_irqchip_add_domain(struct gpio_chip *gc, gc->to_irq = gpiochip_to_irq; gc->irq.domain = domain; + gc->irq.initialized = true; return 0; } -- 2.27.0