From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail-wr1-f53.google.com (mail-wr1-f53.google.com [209.85.221.53]) (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 423B12C21C3 for ; Sat, 14 Mar 2026 09:12:01 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.221.53 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1773479522; cv=none; b=QbIxQftsq4QqaWUX/9nkFcPFsNHL2a55UycSfMe/+NUaLvj6fP+KqEbxwA3+1p4jvv0DjjFojKRkUps8ynFR3GUyfYmufJC8MRrj9DG1dwm920UNBHfYpaVQMwmQTETorda5qtxp/Zreiwb000g2GobuddLI0CV67ElDvdGJ0F0= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1773479522; c=relaxed/simple; bh=QiwL16bjOziT5hiJB9OYiaVlhavbbKb1oaWep8hSRjk=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version:Content-Type; b=pb37MWNA0CqZke1m6jIJ4ATAQUmrzZUmTVxdj5TFMBCO6k0XHj1gag0scc3UCccN3W0gpSxoHSP28uevX/nieRpZlnmxXGptG8+SeTRHDRpTl0lxRLaw467zyssvl+oeetIuIsoQmxaNoxQd5hCKkaAz+PFJZ6K0i329am5EgSk= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com; spf=pass smtp.mailfrom=gmail.com; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b=Z3sdjKh1; arc=none smtp.client-ip=209.85.221.53 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=gmail.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="Z3sdjKh1" Received: by mail-wr1-f53.google.com with SMTP id ffacd0b85a97d-439fe4985efso2637916f8f.3 for ; Sat, 14 Mar 2026 02:12:01 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1773479519; x=1774084319; darn=vger.kernel.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=QiwL16bjOziT5hiJB9OYiaVlhavbbKb1oaWep8hSRjk=; b=Z3sdjKh1lXZlXlkYIuWKIJzPFsNVMop0m1taZX7dDXiPSQgwzx+GRegVyDfOmL6csF Nvle81qwXF3H9b2D1+Ttom0tvwDYzA0GhUYncIxgRrOmSTnoXbW/bjFsWxIb4pqE3VBg NkZ/gNGcKTCYd0XSR4ywkjfIkfbh4HOYh/JHAa4LxslycvKtLHsv2VGKOPJEPuaMpLtN SP3zGE+BczIXs79aDPzrZ/HbGE9bhpz2GJMMcLA1KygVLrBuuw4JMstA6cIGyQ+EKj0K 13iWQyzE88sdmlOUPC/p9P9xUhxUkqJu0yc5RrQrIaWM7F8Dkkma/RY/UoPZWC6n9q5q oVSQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1773479519; x=1774084319; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-gg:x-gm-message-state:from :to:cc:subject:date:message-id:reply-to; bh=QiwL16bjOziT5hiJB9OYiaVlhavbbKb1oaWep8hSRjk=; b=JONww/fSSGbXigv4AllasnnR8J4DsgdAZwv0hJ3tfsM0S1y8bAyqbe4CxmricU0A4J vX1YlaY9xb1dBv8lJFlCJnnwG+Lk4ULJVoFYERhqOfbZ8HmzEQlsidAyyCSPd0kQFbJF SwqjJc/9HGzmkSGO0oi7UUtUSLRj2DOBBlJu29XxmZNpApHKy5SmYD4v6o1gz03sswh/ OKmU1p4FcVLLZGC21bOp3p45nvzZqCUmvHoi3XDLJpmOAmDtIlzlSoiZRZNMlq2VeOg0 cdcu5uWUkKBuQXXC5jtCO3uYQIHiOAJ1W5PXvxuxN8Nz3sVcThkqdCFbozMxKI3LX3c9 ekuA== X-Forwarded-Encrypted: i=1; AJvYcCV0BSLYUOAfsARbWKB4oP0158xoisR06HYxhyhlh4faROScG1y0bVZlcTc8ln6qo/FJ/Kx67OL5fGHErY0=@vger.kernel.org X-Gm-Message-State: AOJu0YybM/ydQs4rguELLcyn9Lga5y1BO+jVFMyJ7oehSMvr4HQNXaKX wuHzXzEhIlDy9OFFIc70s350G6RuP1/+bRPpXL2YUthdKt7e6wKYRqQe X-Gm-Gg: ATEYQzyMUdcCbkqdgfzqnDwEkHjdkJqt1TwQojLUh3jv1477R8dWC4KgY8afRMTAXhq vnt5evDys6nPVNWkxMu438KmtS3/vZ6Vdh2A3Nv5wjMRzlUe0B6bYsW5LHPUn9gKpmDUfZqZUJh VGRy00a2xZ1JWaL0YaIBtNpRkdvuG5YoceEeqSDT8AeodMG6sSVkZ2USke8peaXUQfVakSoXq99 xu4dU0PVsd1M74hVU2wkakJFZSI4nd3fcQcBTPisSoR4u+QxxgKUZnAxgxTT3sDk50K9bBKAEvZ quMg5gudG/BIXrMCrAYly13Fc7giwfFES0iN5AQghfvChIr1w+CWzfnOMQFtl6MQiHbg4maSQV6 57cRgppd9TvdDrr7fIsVsuXR8bKUZu1meuNOqezHtL2bpquwJ6TmqCwcDWJmTTgsGNSJKM/vMRP On8wOK+00et2KtVF4NYlSspSx1wOLLeljVCOpMA7nwg5ol1D+3LUappTmbBUEapt58XjlA4YVpe M5S+vS+S929+mI= X-Received: by 2002:a05:6000:2f83:b0:439:b940:8bfb with SMTP id ffacd0b85a97d-43a04d87714mr11537033f8f.15.1773479519281; Sat, 14 Mar 2026 02:11:59 -0700 (PDT) Received: from jernej-laptop.localnet (86-58-12-163.dynamic.telemach.net. [86.58.12.163]) by smtp.gmail.com with ESMTPSA id ffacd0b85a97d-439fe2273e8sm25569590f8f.33.2026.03.14.02.11.58 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 14 Mar 2026 02:11:58 -0700 (PDT) From: Jernej =?UTF-8?B?xaBrcmFiZWM=?= To: Icenowy Zheng , wens@kernel.org Cc: Andre Przywara , Linus Walleij , Samuel Holland , Bartosz Golaszewski , linux-gpio@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-sunxi@lists.linux.dev, linux-kernel@vger.kernel.org Subject: Re: [RFC PATCH] pinctrl: sunxi: convert to GPIO_GENERIC Date: Sat, 14 Mar 2026 10:11:57 +0100 Message-ID: <1948361.tdWV9SEqCh@jernej-laptop> In-Reply-To: References: <20260313000652.11470-1-andre.przywara@arm.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" Dne sobota, 14. marec 2026 ob 09:38:11 Srednjeevropski standardni =C4=8Das = je Chen-Yu Tsai napisal(a): > On Sat, Mar 14, 2026 at 1:14=E2=80=AFPM Icenowy Zheng wr= ote: > > > > =E5=9C=A8 2026-03-13=E4=BA=94=E7=9A=84 01:06 +0100=EF=BC=8CAndre Przywa= ra=E5=86=99=E9=81=93=EF=BC=9A > > > Allwinner SoCs combine pinmuxing and GPIO control in one device/MMIO > > > register frame. So far we were instantiating one GPIO chip per > > > pinctrl > > > device, which covers multiple banks of up to 32 GPIO pins per bank. > > > The > > > GPIO numbers were set to match the absolute pin numbers, even across > > > the > > > typically two instances of the pinctrl device. > > > > > > Convert the GPIO part of the sunxi pinctrl over to use the > > > gpio_generic > > > framework. This alone allows to remove some sunxi specific code, > > > which > > > is replaced with the existing generic code. This will become even > > > more > > > useful with the upcoming A733 support, which adds set and clear > > > registers for the output. > > > As a side effect this also changes the GPIO device and number > > > allocation: Each bank is now represented by its own gpio_chip, with > > > only > > > as many pins as there are actually implemented. The numbering is left > > > up > > > > Ah, is this a userspace API break? >=20 > Unfortunately, yes. This means the easily computable numbers that one can > use with the (deprecated) sysfs interface is gone, and also the pins are > now split amongst multiple gpiochip instances. I don't mind this at all for new SoCs, e.g. A733, but not really for already supported SoCs. >=20 > However if someone wanted the old "one gpiochip for one PIO instance with > evenly spaced banks" scheme, I suppose we could put together something > with the GPIO aggregator driver? It won't have same base pin number thoug= h. IIUC, this can be instantiated only via sysfs or configfs? Best regards, Jernej