Received: by 2002:a05:7412:da14:b0:e2:908c:2ebd with SMTP id fe20csp669258rdb; Fri, 6 Oct 2023 15:22:36 -0700 (PDT) X-Google-Smtp-Source: AGHT+IEHkqkLJvZJ9gbq4oeMv2ArXyGyGcESFe/0BSCx+e69JbH+RhGlNjnlTCfoPgN2GC3y5j3e X-Received: by 2002:a05:6a20:a121:b0:134:a4e2:4ac8 with SMTP id q33-20020a056a20a12100b00134a4e24ac8mr10564152pzk.39.1696630955685; Fri, 06 Oct 2023 15:22:35 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1696630955; cv=none; d=google.com; s=arc-20160816; b=tJ8utz8CE43UlkLOIUoWBCV6iezf13pVdkjqZjje/5K4myJ2900xZccf8ghp8MQ5V5 6nd+M355ElDaOKeTXhcXN80dqp0a4lWBpbLx6Re1Bv2Drjvz+/LDyOABk7gkFewll6Kn +1QP5wbzK78sKPnSp3614s6WT0VmxgjHevQhVYxqOXHsG4B9+5aZkMcadIkxwn633skG TOrWFQ4Wr2EC1+1tlMzakkPbmz28sS7vy2LHaaOYSbsdP6bVbzrfwvPIkv4G9cyUTABr 0TkOnBISbcCFNdZwP8IowphgNhqKluqMh5G/CLlda1Ck7ZrI/vXgB3iEejkGWO5mVvVi lq8g== 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=QIcxz4GiadHjd+WIPenFnmmxtkCaCE5uWGwu/Joc3Qw=; fh=B/AtLyYC43B5KT2/bsvg559ulmfxosHNdAWML96pIrk=; b=Jz0q0RqHx4DADO1Cnlzdrzijc4UhYWQDSjXNUxQADWK6bxkDsfA7SJliDDjjhZarjy j3b6iiiJPbnRYXM87KXXfSc20GXrx+oDloXtTIIZMmP5nm7r3s5taK5tsvAFMMaotzUg cBT54iiVoPI1r0Wra4Fp8s8QPVO+oAEcU7zeVC6gDr+pQnLZd6E8bUQt12ZOZj94SiD8 OhVAY/eVGpGFc1WZqpGCUt29xy6J2mL+e/vv9xOk+yJtJ8YO1eyRF9BTG1Ll2fp/S0Yu +jsJ8AHF1Kv3JLLjaz5gZNXTyCCKXJOvQTHAOV4vK2TjHrVAt1KC6b4/OEi1doCe2ihu GPcw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=OBqbycb1; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.34 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 howler.vger.email (howler.vger.email. [23.128.96.34]) by mx.google.com with ESMTPS id h20-20020a056a001a5400b00690cc6f7598si2429083pfv.247.2023.10.06.15.22.35 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 06 Oct 2023 15:22:35 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.34 as permitted sender) client-ip=23.128.96.34; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=OBqbycb1; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.34 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by howler.vger.email (Postfix) with ESMTP id D5A088965237; Fri, 6 Oct 2023 15:22:30 -0700 (PDT) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.10 at howler.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233722AbjJFWWP (ORCPT + 99 others); Fri, 6 Oct 2023 18:22:15 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:39774 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233690AbjJFWWO (ORCPT ); Fri, 6 Oct 2023 18:22:14 -0400 Received: from mail-yw1-x1136.google.com (mail-yw1-x1136.google.com [IPv6:2607:f8b0:4864:20::1136]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 7D301BD for ; Fri, 6 Oct 2023 15:22:13 -0700 (PDT) Received: by mail-yw1-x1136.google.com with SMTP id 00721157ae682-59f7cc71e2eso33140157b3.0 for ; Fri, 06 Oct 2023 15:22:13 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1696630932; x=1697235732; darn=vger.kernel.org; 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=QIcxz4GiadHjd+WIPenFnmmxtkCaCE5uWGwu/Joc3Qw=; b=OBqbycb1tYPYo3L+ymjrU120d13Jtzcdsuwjdp+qUN8fqNl4CifrFeH6ayynaZBYxD tjQbldw4yyZaEHqzA9+0NQnrc5tK2LEDQ9F4MtHIG65Qa7bnuTtQMWP0LMoGQqVeSOLA 1o1DtII9hrRlMJTO1j0WMgYnpABCrarXLa2p2p2mKLaqhDM5j3QWs/Lt9n6MkTj9zCoF Izzzw7pkKTNQ767HUx6gznKPvgPYTTfyidKTA9zqyQzWDY7BJLmtjoOIRBwQP6u9eaPn z4aaluvlDlKnlKcRblOtbRSSORR63lnpuJmHEhJemK4N/VOzdaGCQ1Q4AzwJmlJ0J9Zo /qxw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1696630932; x=1697235732; 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=QIcxz4GiadHjd+WIPenFnmmxtkCaCE5uWGwu/Joc3Qw=; b=SI0fJZqsxEmy+1tLx9BdRKBFUlvoW+j80/G1vfHvY5wtEIRj/eriCRg09CPlaQKIDJ IPWp3gPClmFA68sOjk3NKAgqu8RqOEFNKOvX90Y9zBFz7ovRH8rVU6B63vOiegL054v5 kswO9mEfOS/d8HfoSOJslyBeNYyzNQMicXZGfrd2RDDN30rX+1MQIoB0HQNn1i0nKzSB 7xA3GQ2AymY82VkIvb7PU8BomehlRTE1QHlu0BuARiCg6vFx7tz3sNxRwWd2Y80cu6oV 4emwff5ROtyM5cVraEf0+1TgXw/ZvGmmC8zB3coU4aC3yXd4oVZHcJ1SUDvklEbrvr3K l1sQ== X-Gm-Message-State: AOJu0YxtAz+e81xBNb7BBFuhk7sz1QSQFHsTdd8xQmYJkMezDxVdxzh0 ThuHJMW9WbJ03lwGlaLMYiRBH6lNUzfp8hn+dAB6BQ== X-Received: by 2002:a0d:e607:0:b0:5a1:c610:1154 with SMTP id p7-20020a0de607000000b005a1c6101154mr9794442ywe.10.1696630932606; Fri, 06 Oct 2023 15:22:12 -0700 (PDT) MIME-Version: 1.0 References: <20231006115147.18559-1-brgl@bgdev.pl> In-Reply-To: From: Linus Walleij Date: Sat, 7 Oct 2023 00:22:01 +0200 Message-ID: Subject: Re: [RFC/RFT PATCH] gpiolib: reverse-assign the fwnode to struct gpio_chip To: Bartosz Golaszewski Cc: Andy Shevchenko , linux-gpio@vger.kernel.org, linux-kernel@vger.kernel.org, Dipen Patel , Bartosz Golaszewski Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Spam-Status: No, score=2.7 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI, RCVD_IN_SBL_CSS,SPF_HELO_NONE,SPF_PASS autolearn=no autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on howler.vger.email Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (howler.vger.email [0.0.0.0]); Fri, 06 Oct 2023 15:22:31 -0700 (PDT) X-Spam-Level: ** On Fri, Oct 6, 2023 at 9:08=E2=80=AFPM Bartosz Golaszewski = wrote: > I don't see any good reason for it not having the fwnode assigned. > User calling gpio_device_find() will have to jump through hoops in > order to match the device by fwnode Yeah I would add struct fwnode_handle *gpiochip_get_fwnode(struct gpio_chip *gc) { return dev_fwnode(&gc->gpiodev->dev); } so it's easy for external users to get the fwnode if they really need it. This and a few more changes and we can drop gc->fwnode altogether can't we? Yours, Linus Walleij