Received: by 2002:ab2:7b86:0:b0:1f7:5705:b850 with SMTP id q6csp1218317lqh; Mon, 6 May 2024 00:03:06 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCXYOLCp6TkhnrypCL2fEywVkUAKu2MV46Q1/XB+a0pgNuif6D44NxC6uIhK29IQm2q9rFiZXOLb4JnKwJb3Wy6xcN+RSn2Oqm0zJ9J6RA== X-Google-Smtp-Source: AGHT+IGMzCW9fuL8NL0zdsl4gs6qyHJawYRG8nZNoHrJFv0AQvOBfHhH4oQdw9b8cQn0Yq9/4Ig/ X-Received: by 2002:a17:90a:a408:b0:2a0:3dc3:8a8b with SMTP id y8-20020a17090aa40800b002a03dc38a8bmr6826971pjp.47.1714978985896; Mon, 06 May 2024 00:03:05 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1714978985; cv=pass; d=google.com; s=arc-20160816; b=iKfkXOC9Y3GjcMTCHfzqk3E90Yvac3pKVmDZGjlxwfoI/wmAU1Mo/DSaZENis87XYU OYkIYVBVTFX3MiUfTvKVPRFizTHd6Gb/6w7C8LkP1v697YO6xycgvHg4c6nUmYdwwTd0 O/ECSBjtyQNbtS7ju93fcB0kA6OnjxO69r1ZX6+GvHGcS2XwN1NwWUPRKvsKQTZxyyS8 TIYiU1NsQVscHrbNJB0y3Om4gXlMaPOq3pVeKksdJOj9uDaFJq6rQaUUXet8pjgGkgWW VQFvkKnMRpevAgnmeYJ6ev/Eq9TLgx3YPH8eLc3pVpqIacHkh781hxmrCivFmy3dRtFs JJnw== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:list-unsubscribe:list-subscribe :list-id:precedence:dkim-signature; bh=ujmpE8nsBx9O5Y+yM4N0U/YJzFF1IJ6DtQyuSomEaaM=; fh=IcMwjKwSjVshtpWaYgflSBR8b1mxxSuWQ6GCKP1lmFk=; b=APwOaSlntOtPzy/uk53PKB9isg1FKq8hR9alKi5oSHywFDBVZnayvbjdhfvN1qc0EP 5BzRDsrzhaMEWPxB7PsipaeJ/UorkPIMETon6qbMSBKV4oq90mFZX0bqE4OLVsFRHgwB R0HrOskB3mwza/avAmzwm1i5uPDZ4QE0hm+dkmI1Z02asGPnBw/cx/oh9HGMaw4q/lel uxjCTyQGuS3WS9GrK5iiwq8G9y3DNIPk0zGuduU2YXhV92XPy/cc6yW1ThZ+4eSGRsYl s8XoNzPNxiScqc6Lz2mRINuCoBPwbZkF7/sfjgFKKHYyZR2jVaJcUk6Ub0g4fzxrRjYz C8UQ==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=EzHmiEEb; arc=pass (i=1 spf=pass spfdomain=linaro.org dkim=pass dkdomain=linaro.org dmarc=pass fromdomain=linaro.org); spf=pass (google.com: domain of linux-kernel+bounces-169389-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-169389-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from sv.mirrors.kernel.org (sv.mirrors.kernel.org. [2604:1380:45e3:2400::1]) by mx.google.com with ESMTPS id h9-20020a17090ac38900b002b4d121e424si3325600pjt.46.2024.05.06.00.03.05 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 06 May 2024 00:03:05 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-169389-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) client-ip=2604:1380:45e3:2400::1; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=EzHmiEEb; arc=pass (i=1 spf=pass spfdomain=linaro.org dkim=pass dkdomain=linaro.org dmarc=pass fromdomain=linaro.org); spf=pass (google.com: domain of linux-kernel+bounces-169389-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-169389-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by sv.mirrors.kernel.org (Postfix) with ESMTPS id 41CC92815D7 for ; Mon, 6 May 2024 07:03:05 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 027705338C; Mon, 6 May 2024 07:02:57 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=linaro.org header.i=@linaro.org header.b="EzHmiEEb" Received: from mail-yb1-f180.google.com (mail-yb1-f180.google.com [209.85.219.180]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id C58AC481B1 for ; Mon, 6 May 2024 07:02:54 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.219.180 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1714978976; cv=none; b=Eaalv593yfA/UZZT7dwiqKX58Htnfsrq2KAnVvxRfpsBun6OVdZt5/nF9FLBYSRy7xB7DNG4xvSdy4jDuJd8QONdCvmSXrFtfWdugZ+6XY+18qQYGvrUcvvn/SFPyu2/dqu6zTNFHYwkdxJkQO09zkTWw+hxcTVfP8QmznIJZoI= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1714978976; c=relaxed/simple; bh=NYKxmjhEK5HSpifkQRGiqKd4CK8jfRZY1uzdIZFdU88=; h=MIME-Version:References:In-Reply-To:From:Date:Message-ID:Subject: To:Cc:Content-Type; b=a+leiqTh2XKHZf3555UKlHqwryWGZpykfpZq4r6+w516mXMedH0TPLfvdnekGW1pF74RAd+cUHZ8piRR7PQAZ7AF43777repJDcKPjQ4GQ4Yzhw49ZlfYPV9qA9iGdjSL+IkxmLsTjfmgu1TRxVeDTzuKIeeBnP6JzSvk9L+qts= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linaro.org; spf=pass smtp.mailfrom=linaro.org; dkim=pass (2048-bit key) header.d=linaro.org header.i=@linaro.org header.b=EzHmiEEb; arc=none smtp.client-ip=209.85.219.180 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linaro.org Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=linaro.org Received: by mail-yb1-f180.google.com with SMTP id 3f1490d57ef6-de5acdb3838so1601765276.1 for ; Mon, 06 May 2024 00:02:54 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1714978974; x=1715583774; 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=ujmpE8nsBx9O5Y+yM4N0U/YJzFF1IJ6DtQyuSomEaaM=; b=EzHmiEEbcxpBXp4FqDG51xsIlgvuixGjYPj0XQQND//Treg9fdfi8MP5SNJHY1IiM1 XwPQrNw/uvlbP6Kp9+ir1d0S/KJbIJuWwZN3L7YiNZ6b4cPsjMSoZ3OV9YufQz0ev0Cb 5/LKoviVaBoHHeb7M5X4VlEcWiO4J/3P5veWm8hT11Ri7TbzD4rr5VSLn8pJI9N3iMz4 saq1NaVQ9PhG4EI+03keZTb5aQW3vCD/3SoKzybI7BO1979bU7ewoKPqgBvFx/YDIkc6 hnWkU5FtIYr0viA6jq48Khxf2d1kMW+RP5unA5hgNuwD+TnO2g/Id1l8Uex9GZK7SY6i EShw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1714978974; x=1715583774; 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=ujmpE8nsBx9O5Y+yM4N0U/YJzFF1IJ6DtQyuSomEaaM=; b=m5/tpWPD5mxd7hfKwNkFBbyOTCqVvK7MKF6cfmKmRRQKP2OOGfEOpsi+hqdG4Z30h4 iUmceqzxN/Cn7gOPFK0sA7gIbKi+DsiCol4nHN3LOveADQB0XntbKalcev97UTtCO7iW 4E00LES2Q8aFBurtMmME4TVsGrvk5lJKPJC765mQJZHCEB/Zvxvt9OMAFUVIUT9gTMsH sP7B2PznHuHyHmQ8GXGfKTaIcecThvJx7GEYVfXa+VNrMWmOm3zObwlX3lxGqrwL8Pkl 3qPU8WuyB/sOfWypCjo81CBoXJttP9Ar9zYLod+2FkuzIiYpusy/DnlZQwvlunUTlg97 hVKQ== X-Forwarded-Encrypted: i=1; AJvYcCU0HQMrfxEeHKccLw1QEaVTsjkkfBQEdY2j6qoeE7SczLSSAePUT3ZCf0dSvZ2ojcDBHvYcawRC+g5ELoWtwIvr8sqV3GRLxd7epCWO X-Gm-Message-State: AOJu0Yzi2VR8TTV3RpJlyZrImeYjI3r8qrzur0rZx67FWd1vKfOyQ0zh OtBF9i8RaQIpwyd1Xiisq7+fKGJ+U1qTzXtnE0w0pCirE/nO2oZHOe3kRcgftCBACnNBHM/zm/X PXwB6NhWNHhHRzE4J8Nbo7u3HKJUQ0mEt7/kgesLdWvqGoOWa X-Received: by 2002:a05:6902:1509:b0:dda:a608:54bf with SMTP id q9-20020a056902150900b00ddaa60854bfmr11521091ybu.56.1714978973691; Mon, 06 May 2024 00:02:53 -0700 (PDT) Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 References: <20240424185039.1707812-1-opendmb@gmail.com> <20240424185039.1707812-3-opendmb@gmail.com> <45b7742c-9cde-4238-9c2c-c75dfbe9d8f3@gmail.com> In-Reply-To: <45b7742c-9cde-4238-9c2c-c75dfbe9d8f3@gmail.com> From: Linus Walleij Date: Mon, 6 May 2024 09:02:42 +0200 Message-ID: Subject: Re: [PATCH 2/3] gpio: of: support gpio-ranges for multiple gpiochip devices To: Doug Berger Cc: Bartosz Golaszewski , Phil Elwell , Rob Herring , Krzysztof Kozlowski , Conor Dooley , Florian Fainelli , bcm-kernel-feedback-list@broadcom.com, linux-gpio@vger.kernel.org, devicetree@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable On Fri, May 3, 2024 at 10:21=E2=80=AFPM Doug Berger wro= te: > On 5/3/2024 1:25 AM, Linus Walleij wrote: > > It rather looks like you are trying to accomodate the Linux numberspace > > in the ranges, which it was explicitly designed to avoid. > The struct gpio_chip documentation in include/linux/gpio/driver.h says: > > > * @offset: when multiple gpio chips belong to the same device this > > * can be used as offset within the device so friendly names can > > * be properly assigned. > > It is my understanding that this value represents the offset of a > gpiochip relative to the GPIO controller device defined by the GPIO > controller node in device tree. This puts it in the same number space as > [GPIO controller offset]. I believe it was introduced for the specific > purpose of translating [GPIO controller offset] values into > Linux-specific offsets, which is why it is being reused for that purpose > in this patch. You're right, I had it confused with .base! It's because I missed it completely when this new property was added in 2021. Sorry for the fuzz. Yours, Linus Walleij