Received: by 2002:a05:6a11:4021:0:0:0:0 with SMTP id ky33csp1167753pxb; Thu, 23 Sep 2021 20:51:27 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxmmsxOqxrehWvbS5vTy2aCDkfM20cH7zaKBtplJsD+kkaDRnI0fbjbl5klN/zpsaIVoz5X X-Received: by 2002:a92:a30e:: with SMTP id a14mr6395380ili.238.1632455487071; Thu, 23 Sep 2021 20:51:27 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1632455487; cv=none; d=google.com; s=arc-20160816; b=yksb5Yjmao1QSLQa+I2bHO774zeXer3Jy7VV+dTvFvZFO3M03q1P9NT0jtT/qW/WGH v0Oz3uErc9wJyGmdyZryH06jL9AI4On/gGV58TXNs9HrNyOFkSsYckcNT2FMogmRMU1i iH36CAhWBV06k3CbCOGXMEL8FaUkPQGoAIRUP+Phwz5kJ6RkHILcyrcrk+4vHJnh/st9 QvcBQ8TGvxUguUshtawW2VsI4c+/SUF6Axx7KoBm613cXOAVU+fKk+H57WGQd/qYDv6d JXdu60Ocd+xnmGSLhYucAvSJAPIBR19d3R8mRJdXMb03zpQUpr1dXalEYvsmOPykQfM/ zBjA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:cc:to:subject:message-id:date:from:in-reply-to :references:mime-version:dkim-signature; bh=aeqPl8lRAJi/jngCXcVyekAXBb4CJKVOEfw9KCRibJE=; b=McfENy/0LAOwB9m5+BN0Di8nyxeCpD7taxqn+90tjDgZ7H5+7IwSJY9LtCVTE8cClC J4gKqVpNLZv10wktbmNxeV6hwMX/I4AEiPwPZKTWzLyXXActsceaalo91S6GqA7B2BBI lejqk6E8oHEqdl+Tghg3Of8aqgMsnpjpXXghpBzG203pe2P+qrcPsoAFAPLRZaTVtgK0 8gBuuTAy9b+0U92PITgULWTPH+3yvd6ck3tj8Fol3FKdwJpgYf69PWwdBJuGtcTVaSy9 VHWnYnluWgsYPsNq62ZOYGOuWxHXsnKG8JLeUcSZ0wEoHlCuLaTLonY5fX6r1u2nc0/P xdQw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@jms.id.au header.s=google header.b=bL87uALh; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id s12si9184054iov.39.2021.09.23.20.51.14; Thu, 23 Sep 2021 20:51:27 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@jms.id.au header.s=google header.b=bL87uALh; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S244060AbhIXDur (ORCPT + 99 others); Thu, 23 Sep 2021 23:50:47 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:33266 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S244019AbhIXDuq (ORCPT ); Thu, 23 Sep 2021 23:50:46 -0400 Received: from mail-qt1-x834.google.com (mail-qt1-x834.google.com [IPv6:2607:f8b0:4864:20::834]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 3C689C061574; Thu, 23 Sep 2021 20:49:14 -0700 (PDT) Received: by mail-qt1-x834.google.com with SMTP id e16so5746717qts.4; Thu, 23 Sep 2021 20:49:14 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=jms.id.au; s=google; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=aeqPl8lRAJi/jngCXcVyekAXBb4CJKVOEfw9KCRibJE=; b=bL87uALhnZQ7xyPEXWDW+jMNYZp8S1nxJnEOCde4kDE2gW+iIKz1JpNCa8ITDhxB4+ vxSC6lBz8iFjEU1lWVimNSvB70bTO+uHyq/8juHZ2lM9KnsmHh+ntXKCa9cowFJ7mciB gKG7YAO2bN9c2+K1TtAvImHkI6wTRX8tVt7pM= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=aeqPl8lRAJi/jngCXcVyekAXBb4CJKVOEfw9KCRibJE=; b=kIpC0SBcacuOl+gwWKyYmMdt+I6ieYmCwNVv5gSDFBXAL1sIrf9xkpQr+Jo3huBKyw mPi8rwO2ZMWPTBvFjLy51CXF86XNI2sZgODUYqIN40nUyHWIr3aVlYJiOvfJ/9mvVxFE MmYIMQmnHUyo54LSv/Top9Q6OEYAlzrkIavYDIhEr/uCfWCOzXJCHRuoQ33dCfuxbiEF kEgtoP/ATekzUANQn3hNA4tnqJIyD/l53ogcqdUhH/1eoSQH954AUV53FcjhyM+FKxg9 YLFvxi5jyZtZ6Op+LuRuJe4I0GQPvsDso/K6MDcEs/EQMAoL495fKOVcqB2/kdAEdXH2 Il1g== X-Gm-Message-State: AOAM532ouypu7V3Yno0EfGpNegMtXJawkMJkOlUJmoN0wHFgS+QVAFZ5 mx2y7uDXHR657I7G2Al+L8k4p44IpAmWEmFVeVI= X-Received: by 2002:a05:622a:45:: with SMTP id y5mr2109484qtw.145.1632455352824; Thu, 23 Sep 2021 20:49:12 -0700 (PDT) MIME-Version: 1.0 References: <20210921043936.468001-1-andrew@aj.id.au> In-Reply-To: <20210921043936.468001-1-andrew@aj.id.au> From: Joel Stanley Date: Fri, 24 Sep 2021 03:49:01 +0000 Message-ID: Subject: Re: [PATCH 0/2] leds: pca955x: Expose GPIOs for all pins To: Andrew Jeffery Cc: linux-leds@vger.kernel.org, "open list:GPIO SUBSYSTEM" , =?UTF-8?Q?C=C3=A9dric_Le_Goater?= , Rob Herring , Pavel Machek , Linus Walleij , devicetree , Linux ARM , linux-aspeed , Linux Kernel Mailing List , Andy Shevchenko Content-Type: text/plain; charset="UTF-8" Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, 21 Sept 2021 at 04:39, Andrew Jeffery wrote: > > Hello, > > This is a rework of a Rube Goldberg-inspired RFC I posted previously: > > https://lore.kernel.org/lkml/20210723075858.376378-1-andrew@aj.id.au/ > > This time around there's a lot less Rube - the series: > > 1. Contains no (ab)use of pinctrl > 2. Always exposes all pins as GPIOs > 3. Internally tracks the active pins > > Without these patches the driver limits the number of pins exposed on > the gpiochip to the number of pins specified as GPIO in the devicetree, > but doesn't map between the GPIO and pin number spaces. The result is > that specifying offset or interleaved GPIOs in the devicetree gives > unexpected behaviour in userspace. > > By always exposing all pins as GPIOs the patches resolve the lack of > mapping between GPIO offsets and pins on the package in the driver by > ensuring we always have a 1-to-1 mapping. > > The issue is primarily addressed by patch 1/2. Patch 2/2 makes it > possible to not expose any pins as LEDs (and therefore make them all > accessible as GPIOs). This has a follow-on effect of allowing the driver > to bind to a device instantiated at runtime without requiring a > description in the devicetree. > > I've tested the series under qemu to inspect the various interactions > between LEDs vs GPIOs as well as conflicting GPIO requests. > > Please review! Reviewed-by: Joel Stanley Cheers, Joel