Received: by 2002:a05:6358:3188:b0:123:57c1:9b43 with SMTP id q8csp26819716rwd; Mon, 3 Jul 2023 15:45:20 -0700 (PDT) X-Google-Smtp-Source: APBJJlHdkHci1ROGTocdJQ4hOmHS15rWYr9jc/0PeXBFHT19uwWEwa8EpzVyatOxrQAgDKnDQOx/ X-Received: by 2002:a17:90b:3849:b0:262:e564:3ecb with SMTP id nl9-20020a17090b384900b00262e5643ecbmr9914035pjb.36.1688424320195; Mon, 03 Jul 2023 15:45:20 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1688424320; cv=none; d=google.com; s=arc-20160816; b=hT0SYQvHKHOb5xjRlFf3JxaEXZ0yhnDImxawR/CdBObOSggi53+0UQO5xF5RNCInx5 GRKVV7Z3IRa08g5pJ55w4p4/WpvArWNxIcEuwOo0jGBJ0ePNitVb3KbAa8EitfVrolkU d7vzX167mloww85Fv0n5m3KTVU9EzCYbSNsjdtZKz2BNcJ1onfSfuq0zEVM0fq8YvmGf a9+z6UH8yFNsN5l6fOhVPDiv6u859OQJSLgQr3t9XtfH9Nd4hFHBfmafj/KkTBXevABe uNDerCsd0376vmoB+vDpmqovLVWEQOf1UAbNyYLeS6PjVDRE7z4TMA7VW9X3GB67v4av nshQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:cc:to:subject :message-id:date:from:in-reply-to:references:mime-version :dkim-signature; bh=zw6+ByigHBJdfmEG6EluGaqV/pvtu1cF1vk8X2CKt4w=; fh=6grCV85/wmablm1CFtmSMLMxhCE+HiB9qTZluGsbJqg=; b=MhIy8DaQScO00JnNIlzFz218YyD6xxL6TKZ+q2uIjGfs9hzBaCFZvoX82oBd+XuSpx 6gKpoVPK0jiUIwIg6J8hpkYdOJUwmbEauPADTupNTdnHuXEcqvGLaCEsnwJwEfCBD4Rh IkcRVGW3KQkD1ummZ02g1m7BNH6Hu0gLgHRqzBxoEN/GYGRgVV1jpHrN5cb3inZlvFxz 34FSAp95UtMxXN8y/0F7zQO2Mn8nULUtzL1GcxqrolfByB8tie2gUZaK99RYWKVErImh bUOkH2oYI6iSfstCmgiW6/5yQUnp4w3bZHi8pHKZEaJ8b52tluC9XN1NRhCtaUm2Vldn IM2g== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=h63KI61+; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id c5-20020a6566c5000000b0055afc8a301asi14606581pgw.177.2023.07.03.15.45.04; Mon, 03 Jul 2023 15:45:20 -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; dkim=pass header.i=@linaro.org header.s=google header.b=h63KI61+; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230028AbjGCW0L (ORCPT + 99 others); Mon, 3 Jul 2023 18:26:11 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:37814 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230232AbjGCW0K (ORCPT ); Mon, 3 Jul 2023 18:26:10 -0400 Received: from mail-yb1-xb30.google.com (mail-yb1-xb30.google.com [IPv6:2607:f8b0:4864:20::b30]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id DA02AE54 for ; Mon, 3 Jul 2023 15:26:09 -0700 (PDT) Received: by mail-yb1-xb30.google.com with SMTP id 3f1490d57ef6-bc379e4c1cbso5683180276.2 for ; Mon, 03 Jul 2023 15:26:09 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1688423169; x=1691015169; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:from:to:cc:subject:date :message-id:reply-to; bh=zw6+ByigHBJdfmEG6EluGaqV/pvtu1cF1vk8X2CKt4w=; b=h63KI61+UAK5TRnPN2pcivYePX6zulhB0EgH8bQvG7CknckBBxGc3UuOdud1w1guiw jryBqkaS0Z3p7IKK2k8rIxZrHrL2gechQvuV3+vbdceqxcXnJT4XvDezkBsHek8SDtYG keDMqZF49gHAGV5/fAlB/1tx5ozoyjUcAfk8AL1MjRv7jgOtkZkjSTPqWU21/2M1WDus cYgkQe2872RFWWOYsb9QiBcfxuEZU+j8FkHoKh1nwdEQsVCAj1rjVvXfsW22HfDFF5l1 GfFgn2RxBHA4hwek1xMChZtom54eHOorD5Qsb6BzASvXNExvqih6AQtkGv3aQMrdud8G XhkQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1688423169; x=1691015169; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=zw6+ByigHBJdfmEG6EluGaqV/pvtu1cF1vk8X2CKt4w=; b=CKJFcbUMRPixf46HIp4fCwYHGUFc5Wi7CWMrbn+PFBdvRbxrutnBl5Umhp1ihGu1b4 NGtb6+MYz7jrAyE0PXYFHjJTNHUDX7DjsHntp8euS/3lAXr5Ra7dgfcwwLzDQKaq6dK1 CmmurBmxjTFMM5sKsL20xRfNyHUwhho2QfdX0rnXBZ3U8KVqqSs1bSu1gbNSC65NKMz7 lmRvFnJExYOjHGjC5Wgm0yXdEY+bZtXT1Zvn5ojxfEZaW9HQeXotCya3WsCjsdpTCxvC WE0d1uJHGZcZT7TWGr+KQZ59zH5OzywGsijRjq09KoDITS/hNo0XAecYhH88pxkcoKpZ 8cJQ== X-Gm-Message-State: ABy/qLb9l9V7YILDHAGeh2Ymt4BhBolV71jTMMTYH0Q+lsYAnmHEd8RC +w+tU6kzXZbuVHQdS/7cd7KMrG1mdIo8gJHGQmKNKA== X-Received: by 2002:a25:2494:0:b0:c4d:c258:7ad with SMTP id k142-20020a252494000000b00c4dc25807admr6009354ybk.64.1688423169117; Mon, 03 Jul 2023 15:26:09 -0700 (PDT) MIME-Version: 1.0 References: <20230621174943.30302-1-andriy.shevchenko@linux.intel.com> <20230621174943.30302-5-andriy.shevchenko@linux.intel.com> In-Reply-To: From: Linus Walleij Date: Tue, 4 Jul 2023 00:25:58 +0200 Message-ID: Subject: Re: [PATCH v1 5/5] gpiolib: Replace open coded gpiochip_irqchip_add_allocated_domain() To: Andy Shevchenko Cc: Andy Shevchenko , Bartosz Golaszewski , linux-gpio@vger.kernel.org, linux-kernel@vger.kernel.org, Bartosz Golaszewski , Andy Shevchenko Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_NONE, SPF_HELO_NONE,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 On Fri, Jun 30, 2023 at 3:58=E2=80=AFPM Andy Shevchenko wrote: > While at it, I would like to ask on ->to_irq() callback. IIUC > assigning it with an IRQ chip makes a dead code in the driver. Am I > correct? It's fine to assign it with an IRQ chip but not with GPIOLIB_IRQCHIP, i.e. gc->irq better be NULL. > If not, can somebody shed some light on how the RT5677 > driver, for example, works with GPIO IRQ? That is theoretically fine (I don't know this HW in particular). It looks a bit fragile... It's just a helper to translate a GPIO line to the corresponding Linux IRQ number and when using GPIOLIB_IRQCHIP the GPIO core will do this using the irqdomain, else it is up to the driver. Yours, Linus Walleij