Received: by 2002:ab2:3c46:0:b0:1f5:f2ab:c469 with SMTP id x6csp105514lqf; Fri, 26 Apr 2024 00:32:51 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCUtRyJ7x1LdZ9Gcev7tsD1W01DmtgST8gfofY+Efp6ZHNypkSGn4Hiz5asAZgrGnDj6WNrBcd9ap8xO7ZloFzQkl0ExQ8vQ5yU2g/84+A== X-Google-Smtp-Source: AGHT+IFRH4EFCboThpMJuB1hNjFC1eGj4ahWWeIlLSWSFlms9aXVAplY5D+VLO7coqVj9VOP94tX X-Received: by 2002:a17:906:27c9:b0:a58:8227:a2a with SMTP id k9-20020a17090627c900b00a5882270a2amr1569524ejc.25.1714116771267; Fri, 26 Apr 2024 00:32:51 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1714116771; cv=pass; d=google.com; s=arc-20160816; b=RV2Zv47Pn8CTZ5+7IR9SIvBQlDkvuUdCaK3WMSxjZxlYAghXGWPJMP70GMzcMDt3yi jsxaCwliaQig6lEOGs3tG1NUaQLsQxBzKNvST4VXcXEsnWM2E58Xwq9JQaWPy4IxC48G hwptPosWZTT9G16NTXN0KmTARiaqHpUS1AVANIqdlC7qgsMN4XQezNJHdEF1ryIMUpTV 1oU0aSL2EBrhiKWOG2Kd/fmPIoxknGG0quK2hrtmjv2LR/+aaiaiWzyNtyJGG+E6BqUf luDnYZb3J23U0uPM0gUuTK5W6TEWEPzThqlLbSPH35g8BzQoYP2EY4bKhC491htnExs3 XLRA== 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=N+K4RoNFc+zB+X+QmQp6JiIrBFtjE+TzhQnlD2BBvMQ=; fh=cgxtzLdsxdzXuz71IcMmi/M55VNw2RKwCEyE6SYOkno=; b=AgoCR8JFgLZSm1fS9Fq0NLXvZffLev+Oq9wbJYXqwPr5T/wFJtUc3rw9/1jmT0twPL Mbi/TDLUSR9HN2m/lz0BLHBCKUb3+Q8hnsb3qH7zqwbVFtOqhWVLzgZyXropr+p72CBm tNcFR0YUZG0GeJyLK06RLHtP6eaFrn0yfoNclDFz/Ngxh38Ssyg+AohAALb35NR0Bmz8 C4Xm9FmgJto7P82/aJIqRS5JM9Sr3/ZBpJga0a5Ch/ZB5Fkd3ElnJumVPPppSmJjGAkq u109p5RyJVlJQweX9s6+YndWyCvTHRm1UsSPP4aVKoVf6Yph+lCmjbvRM3cqO1NjSexY yMHA==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@bgdev-pl.20230601.gappssmtp.com header.s=20230601 header.b=u9exqb7n; arc=pass (i=1 dkim=pass dkdomain=bgdev-pl.20230601.gappssmtp.com); spf=pass (google.com: domain of linux-kernel+bounces-159636-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) smtp.mailfrom="linux-kernel+bounces-159636-linux.lists.archive=gmail.com@vger.kernel.org" Return-Path: Received: from am.mirrors.kernel.org (am.mirrors.kernel.org. [2604:1380:4601:e00::3]) by mx.google.com with ESMTPS id u21-20020a1709060b1500b00a5874cb2e09si5009059ejg.835.2024.04.26.00.32.51 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 26 Apr 2024 00:32:51 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-159636-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) client-ip=2604:1380:4601:e00::3; Authentication-Results: mx.google.com; dkim=pass header.i=@bgdev-pl.20230601.gappssmtp.com header.s=20230601 header.b=u9exqb7n; arc=pass (i=1 dkim=pass dkdomain=bgdev-pl.20230601.gappssmtp.com); spf=pass (google.com: domain of linux-kernel+bounces-159636-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) smtp.mailfrom="linux-kernel+bounces-159636-linux.lists.archive=gmail.com@vger.kernel.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 am.mirrors.kernel.org (Postfix) with ESMTPS id D113B1F226C8 for ; Fri, 26 Apr 2024 07:32:50 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id BF84B13C3E7; Fri, 26 Apr 2024 07:32:35 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=bgdev-pl.20230601.gappssmtp.com header.i=@bgdev-pl.20230601.gappssmtp.com header.b="u9exqb7n" Received: from mail-lj1-f176.google.com (mail-lj1-f176.google.com [209.85.208.176]) (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 6154C13C3CB for ; Fri, 26 Apr 2024 07:32:33 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.208.176 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1714116755; cv=none; b=U139w+I6BnPpcjK6zWoQwP1rQw+PgNpPMfdQfVAAv1ZYPv3DSrkq4XRFI8QC5ynak0GfCv0bkxJhuzmflUbS8Znq/sOedA2c4SwJZ9UoYSPcO2CGBBgf5d6eb1Pl4DFdTAYrlDCsxaRZjSXJ0pIm1Nb/DqVCvqNDVepErW+9ewM= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1714116755; c=relaxed/simple; bh=N+K4RoNFc+zB+X+QmQp6JiIrBFtjE+TzhQnlD2BBvMQ=; h=MIME-Version:References:In-Reply-To:From:Date:Message-ID:Subject: To:Cc:Content-Type; b=AMdHQdoLJ9/+J58xvBU+opWj+qfi6nJHS9hgIMQ5yMpOZrEpTsbw9moGuBu1OcRU8o1t93u55GQbJUG4cr/8i3LdjbniDRWysjnAM6Kof2gQB9YqDyeti6h6qzGskpnLBuZyiOJfdv+MzRbprfziTa7GuGnW0/d9SVokazBEzIk= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=bgdev.pl; spf=none smtp.mailfrom=bgdev.pl; dkim=pass (2048-bit key) header.d=bgdev-pl.20230601.gappssmtp.com header.i=@bgdev-pl.20230601.gappssmtp.com header.b=u9exqb7n; arc=none smtp.client-ip=209.85.208.176 Authentication-Results: smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=bgdev.pl Authentication-Results: smtp.subspace.kernel.org; spf=none smtp.mailfrom=bgdev.pl Received: by mail-lj1-f176.google.com with SMTP id 38308e7fff4ca-2dae975d0dcso30190851fa.1 for ; Fri, 26 Apr 2024 00:32:33 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bgdev-pl.20230601.gappssmtp.com; s=20230601; t=1714116751; x=1714721551; 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=N+K4RoNFc+zB+X+QmQp6JiIrBFtjE+TzhQnlD2BBvMQ=; b=u9exqb7nBakiSvecNO+dmYaK7oBLCtP3JSYaZivMWqMQvmNL7RPRQXkOmTSB0fy9o8 uMvQ5cQjOuHqraXto91UAZC+rRNfnlTIb1ifCYN2OFNQAeFXN28UHd5lUYXlhSQIlNgk nKLgTua/wbVkLqzcfA+l3jnfvepyDmuHC4Gy+kYTVZm4h8mcNW2J9rCz763t35/uWK4C 9NqtOqazEfiO0UC2++H19zZWOi2kFmQK95ELl4tY3ianwjsq6DV8B//tjr+4XinIjCnb JIVs29Uh3htIpLt38/+BGtJfrphW1k+mCtDxXiUftRHuSNggwqrVGKJrLuftpvJEQeFS d/lg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1714116751; x=1714721551; 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=N+K4RoNFc+zB+X+QmQp6JiIrBFtjE+TzhQnlD2BBvMQ=; b=OBYP1sRcRBg5AtaaNkAtbqRjoMsatSphcWFca6un3T2swLp2oivsqqGEMgv0l3PaM2 b48p0qCS3/8Q4+bLkGddhDwre21T9Jaf0hj6KI03yOlg4d3SFlAooThkdKtkAZWrfSYa wGrbwbAjoFlN1E/twVc2Nx8VvPqzXUUFkmtTeq3TIS3ZfE3ZS9x/XpE8++1t8oplzWMv K0smx0v1nL0kJQoJhCsxDqgDB/7FjdL925nOSonXOPYavWuxqUjoVQG65pxK7c9F8UuK k5yfP2o5BunMqjsr2aLfa4vNDni5wiS07AXuTApXG1771TGsNnKwSbjOMkayhePWD5W9 R7HQ== X-Forwarded-Encrypted: i=1; AJvYcCWNkSSDgQXaYdFsMM3zhbyrRUydSRqWmd2FbBJAIJdVWonCYMoUyRE2fIthBcdHNLRwbKMuii6OAkDBxHn2aOK/Lg3vYgbOWOccQPAJ X-Gm-Message-State: AOJu0Yzf+s3aEp+6FVPm5N/Uwpy3X2V5KrvoyRLNbQdXePHDIvAUsl8+ PYMKak2GVgysi2KXw5Xp0DHkQcZ1GCY2Mrj8vDqMAZ4pujmccV0zeLrrVv0ZcSR1vCh4mIOdBMa 1/4KClaILqfZvC6WXUXqy0ARHH+pMDLzvAFfe0Q== X-Received: by 2002:a2e:b163:0:b0:2de:6f52:5c8d with SMTP id a3-20020a2eb163000000b002de6f525c8dmr645023ljm.21.1714116751252; Fri, 26 Apr 2024 00:32:31 -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> In-Reply-To: <20240424185039.1707812-3-opendmb@gmail.com> From: Bartosz Golaszewski Date: Fri, 26 Apr 2024 09:32:20 +0200 Message-ID: Subject: Re: [PATCH 2/3] gpio: of: support gpio-ranges for multiple gpiochip devices To: Doug Berger Cc: Linus Walleij , 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 Wed, Apr 24, 2024 at 8:51=E2=80=AFPM Doug Berger wro= te: > > Some drivers (e.g. gpio-mt7621 and gpio-brcmstb) have multiple > gpiochip banks within a single device. Unfortunately, the > gpio-ranges property of the device node was being applied to > every gpiochip of the device with device relative GPIO offset > values rather than gpiochip relative GPIO offset values. > > This commit makes use of the gpio_chip offset value which can be > non-zero for such devices to split the device node gpio-ranges > property into GPIO offset ranges that can be applied to each > of the relevant gpiochips of the device. > > Signed-off-by: Doug Berger > --- This is a good improvement, thanks! Bart