From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail-yb1-f169.google.com (mail-yb1-f169.google.com [209.85.219.169]) (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 9C8C57BAFD for ; Wed, 31 Jan 2024 13:42:29 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.219.169 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1706708551; cv=none; b=S2ZelnPDRGzwsfbEzEvKGywVV4MbMVgK/YkJWVAYWfu0y2Ts1LeRU0DYKrFOJsaZ49eh1MjbJdTZwaw0NUlk6ht7fMEwCa5ZIekknBa7kN7P9M4SFavJ2IbCXo1ZS77T0dsLAx3s5SpxkI2iQclSzXfEVDjFtbM2tXSjkQ5C6FU= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1706708551; c=relaxed/simple; bh=rNDiQg/0u3pLXkbL7csdAnsOg1ou8bFEsbWHOOg35m8=; h=MIME-Version:References:In-Reply-To:From:Date:Message-ID:Subject: To:Cc:Content-Type; b=ivs1OSypomgmEhfTS1Df0578xdDL+aMO8g4TKziytGHCg70vIFRAqJ4GgLPOrBjeLN+A1JTHUka6qHhbFB70v5IalVQDg9PTww6fyi++BxPPXutA+K8H0DsOosGf0buX9rpT7CAnbm/Mzd1gCNwErEzu6IV815DAZUg1+wcstec= 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=VLxpQJZw; arc=none smtp.client-ip=209.85.219.169 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 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=linaro.org header.i=@linaro.org header.b="VLxpQJZw" Received: by mail-yb1-f169.google.com with SMTP id 3f1490d57ef6-dc6a631a90dso1447202276.2 for ; Wed, 31 Jan 2024 05:42:29 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1706708548; x=1707313348; 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=rNDiQg/0u3pLXkbL7csdAnsOg1ou8bFEsbWHOOg35m8=; b=VLxpQJZwt2QgB4fUsdFMmcyrasV38nhgYI8aUT01QepFbyHkcZagqLXnaZ63m2/XKd 5cHaRZC+zwaUpdCKRA77u78jsIL5VKeVeCefaftXoFUhZFqlgLggk/KYN3Yy1/7bnGWs oO/zSvgTJ+I7BoT7SofS6Japxkpm2mBhhoYgOVzud1rE+V84tZvf/1ZPx+syxSi0J661 YxQf+VOAhOyWbRbpdKoAnMN1fOoCyPJRdOooFj3fAf+x0oRW3WhU/dG+Z/DLHYRa1FCe Bb+aav80iceyvf3LE8LiBcz4Q4t1auCn4BWQsPEOv04YVTHRZyQ4TB+c85oWzhdIdM9z lxJw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1706708548; x=1707313348; 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=rNDiQg/0u3pLXkbL7csdAnsOg1ou8bFEsbWHOOg35m8=; b=iMAr3woiIeiXXxK0iYYKwiJ5WQMXgIyx7LvAUl2+xcSzqPboC7nkLtDC06EO31opRH bOSkEm62Iwps44WiHfcQ9FR/DnET3NFDLsCQbDI/fpuA0mLEPmuXKkraMtqCdv9o4Nvh MYwFTGKm+S5FzAIbDZFVoMX/c6m7GUD8XP2MFIPdoN9wT6w4FerKdue0mUuMduLChcx7 faBd+gPrw///P8p2Jql9oXfDHH5KNZGLBW8f2AYMcNsq1VJbsG3T/v79vpmsQ7+PlpUO bBl2uxCsTE2iysv1hUQSBQbdh5SibrU8Sm1F+2BgmKSitxGttnIf4YV2SQJKpN3nhjmL egLQ== X-Gm-Message-State: AOJu0YzmPKLk3YMd19s/it7VuZ8OLL1c/2U1E7tym2fryd0V0N6Jlzm9 v0VhMUunDgKtAS8b+G67sFoRjCR8C+hfCc5HlgsRyetd+fsFEJgUNEaZQUl6kklVicqdCMhSHBM 21cXPYchhgj2WI8E5hKm8NnvotvAL/0KHIlH1wQ== X-Google-Smtp-Source: AGHT+IHskTXYXxhxPI1CgyG/kvHZeTnVrHblP91LDRSUCVYbyamup48H0wM9rtBK+kf6LdjtM5XNyL3x8PSddYdkrYk= X-Received: by 2002:a25:6f83:0:b0:dc6:4b7e:d7e with SMTP id k125-20020a256f83000000b00dc64b7e0d7emr1623063ybc.24.1706708548654; Wed, 31 Jan 2024 05:42:28 -0800 (PST) Precedence: bulk X-Mailing-List: devicetree@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 References: <20240129115216.96479-1-krzysztof.kozlowski@linaro.org> <20240129115216.96479-5-krzysztof.kozlowski@linaro.org> <5ef64082-0b44-4bb2-bd4c-654c96f4a9bb@linaro.org> In-Reply-To: <5ef64082-0b44-4bb2-bd4c-654c96f4a9bb@linaro.org> From: Linus Walleij Date: Wed, 31 Jan 2024 14:42:17 +0100 Message-ID: Subject: Re: [PATCH v6 4/6] reset: Instantiate reset GPIO controller for shared reset-gpios To: Krzysztof Kozlowski Cc: Bartosz Golaszewski , Geert Uytterhoeven , Srinivas Kandagatla , Banajit Goswami , Bjorn Andersson , Konrad Dybcio , Liam Girdwood , Mark Brown , Rob Herring , Krzysztof Kozlowski , Conor Dooley , Philipp Zabel , "Rafael J. Wysocki" , Viresh Kumar , Frank Rowand , Jaroslav Kysela , Takashi Iwai , alsa-devel@alsa-project.org, linux-arm-msm@vger.kernel.org, linux-sound@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, linux-pm@vger.kernel.org, Chris Packham , Sean Anderson Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable On Wed, Jan 31, 2024 at 2:32=E2=80=AFPM Krzysztof Kozlowski wrote: > The non-exclusive GPIO was made explicitly for regulators, so it is > working fine there, but it is broken everywhere else, where the drivers > do not handle it in sane way as regulator core does. I looked at it, it's 8 users in the entire kernel that aren't regulators, so let's put it on the TODO to get rid of those. > To make it working, either GPIO should be enable-count-aware, to which > Bartosz was opposing with talks with me, or the subsystem should mimic > regulators approach. In some way, my patchset is the second way here - > reset framework subsystem being aware of shared GPIO and handles the > enable-count, even though it is not using non-exclusive flag. That's nice, I was thinking if it could be abstracted so the regulator core can move away from this too? I guess it may be an issue that regulators are not using Device Tree exclusively, but also has to deal with a slew of platform_devices:s :/ IIRC that was one of the reasons why it looks as it does. Maybe reset can only solve this in an elegant way if the solution is tightly coupled with DT and you have the advantage that you can require it from day one? (It looks a bit like that to me.) Yours, Linus Walleij