Message ID | 20231222150133.732662-1-krzysztof.kozlowski@linaro.org |
---|---|
Headers |
Return-Path: <linux-kernel+bounces-9800-ouuuleilei=gmail.com@vger.kernel.org> Delivered-To: ouuuleilei@gmail.com Received: by 2002:a05:7300:2483:b0:fb:cd0c:d3e with SMTP id q3csp1118775dyi; Fri, 22 Dec 2023 07:02:47 -0800 (PST) X-Google-Smtp-Source: AGHT+IEtb5LgJgKl+IG3QORts/A1Yrpv5JI4aCZMMMqKDL4diJvNNTRZWFOwA8sWVYi/XQwHkElx X-Received: by 2002:a5d:490c:0:b0:336:5dd7:af60 with SMTP id x12-20020a5d490c000000b003365dd7af60mr658940wrq.133.1703257367557; Fri, 22 Dec 2023 07:02:47 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1703257367; cv=none; d=google.com; s=arc-20160816; b=gsauNUPlkphVnajPy0ZWhKalODr1tR8WFV03+rRn9Me1QvAvjAWAcbvYTB6IiGitQP o3zdK1jKoO4oRVDChEuWojv0TJbA6IZVqeqgUy7sodmaa/mrw9FO5KT3U84EScMUUMZd n7QduzFWeNbzhDzjhgCrwFQzUoADWeecBrtr8+FFfFexduQhoZrs5mjnKcMbxf2ZZr25 U6OgA8dS8odHCT+uDBvl4xGO5hl6MIzpOdz6diWAeQhqrHUtnNk3Ny/H0GQG72V2RB1S Coz2lJqaR41IiRKHkfMesqzinUI5LfcoLKCaTONsF1GvFoWTekyktCEIxbVUi4votA+3 oq2w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:message-id:date:subject:cc:to :from:dkim-signature; bh=W4lx9wwE1i9du74XL1yxBGJ3vsI1REncsFrgYBE3k74=; fh=2QK95Bx1IG6JLZqcEXhu2xPhUZ98Jl+MkAqurDg/UyI=; b=HvA/fQUYVgUJ8aEWEDEquKbYMG0Q2ZXWNczMqVlypNi2LHRNLnoalmEqi62JAGrj5o TlIgEGSuIV8UBTXmDRYI/Zt31nOfi7ndPx3NCb2oFF0w26wkVa4yD8C+a9aV/OEr51dB odvGfXnLMAZyFROZ8hTQIFrJAcfmzeCCooUHGVZsO83K6IxSctxvRjnN6zJfhXNT7leA Z/cW+AbOe4bI3oVj3yMoVC8eUon3jrYf4L9/sERLCHyE7lOpbwa1OL4KFFykLb9ImX5J B6cZWcTWTTEB280gIKkrntgOb20A6rDyp3ZEkDuy3xNUf11Nh4VC8b4DdaAWiLZvdLXA r0xg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=Gw3kEdpN; spf=pass (google.com: domain of linux-kernel+bounces-9800-ouuuleilei=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) smtp.mailfrom="linux-kernel+bounces-9800-ouuuleilei=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: from ny.mirrors.kernel.org (ny.mirrors.kernel.org. [147.75.199.223]) by mx.google.com with ESMTPS id m17-20020a5d6251000000b00336619798f0si2077217wrv.52.2023.12.22.07.02.47 for <ouuuleilei@gmail.com> (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 22 Dec 2023 07:02:47 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-9800-ouuuleilei=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) client-ip=147.75.199.223; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=Gw3kEdpN; spf=pass (google.com: domain of linux-kernel+bounces-9800-ouuuleilei=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) smtp.mailfrom="linux-kernel+bounces-9800-ouuuleilei=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 ny.mirrors.kernel.org (Postfix) with ESMTPS id 083C91C220ED for <ouuuleilei@gmail.com>; Fri, 22 Dec 2023 15:02:47 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 9690A24B5B; Fri, 22 Dec 2023 15:01:53 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=linaro.org header.i=@linaro.org header.b="Gw3kEdpN" X-Original-To: linux-kernel@vger.kernel.org Received: from mail-ej1-f45.google.com (mail-ej1-f45.google.com [209.85.218.45]) (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 8B7F623759 for <linux-kernel@vger.kernel.org>; Fri, 22 Dec 2023 15:01:49 +0000 (UTC) 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-ej1-f45.google.com with SMTP id a640c23a62f3a-a235e394758so216940466b.1 for <linux-kernel@vger.kernel.org>; Fri, 22 Dec 2023 07:01:49 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1703257308; x=1703862108; darn=vger.kernel.org; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:from:to:cc:subject:date:message-id:reply-to; bh=W4lx9wwE1i9du74XL1yxBGJ3vsI1REncsFrgYBE3k74=; b=Gw3kEdpNp1G1yL+lawUmRB/eqxiZcOBjsVV/gEEJfF0Ns+7Hcw9Nd2DufEmNycf5wm zhqKTWaCj/YBdRKfNDzu6by41E4l8a8m8zAc0kGamB55T/k69ZFgJRv+e90gQovR8WJH re1fj7vJ0WxwAbZiABwtaObN0tlUZSHVM+8egMXFubAb4hLwKLCBVCFNBhFkCwfkqhCx 4HDtg8u38UWItA73Wfro+cw/Ep07Jx7kVcYiOXt9mMRwQC5sYWITEEvjVxLFegVZBV+v A0qHq6r7wRsD1BnREesO68a0/hI8xArPRgeMxJAb4eDxUt+ZXdYlzDzKsjNBGo/tV9z4 VjAg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1703257308; x=1703862108; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=W4lx9wwE1i9du74XL1yxBGJ3vsI1REncsFrgYBE3k74=; b=TXCD0kfrQlvB5DApFLKBF9NGcNNoXfX7Qf6Kn/NCGhbq9ERwQpdImMBquVGeNsDmNM FC7dQXuUKZGlQYmLA5ilJccsSnaDSLwMVSwWDlY40bPlaVyMgvhsCk5s8My/1PI+CVvb LNuO6UNJwHw1cD2BKyYsAKKnMdDI18OTjZg18hduwhLWcRwQP09tMvJywRACUtNWBSPg +CJgfqJ8GxpYjoKp1WK09Zg84WOBtckbjg0Y2f3A8s527GY8LT1Tq+/gyN6ZDBeZMbiM 1SVhPxM4B1tjLCVyWHsWQPTB1yAN/a/4pveCq73E30scr9oIfr5k7uFKpuSnS9DY01va hSBg== X-Gm-Message-State: AOJu0YwXKfkUxkTum3jqUuU5WVyJaFolLDePYJAtUSRg9cP/aZ7EJLop 0dttZnHRTBeUYIw+37UvEJiXhCvftLtvAA== X-Received: by 2002:a17:906:278e:b0:a23:577f:5fbc with SMTP id j14-20020a170906278e00b00a23577f5fbcmr849058ejc.79.1703257303016; Fri, 22 Dec 2023 07:01:43 -0800 (PST) Received: from krzk-bin.. ([78.10.206.178]) by smtp.gmail.com with ESMTPSA id h1-20020a17090791c100b00a26af35c171sm1275671ejz.0.2023.12.22.07.01.41 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 22 Dec 2023 07:01:42 -0800 (PST) From: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org> To: Bjorn Andersson <andersson@kernel.org>, Konrad Dybcio <konrad.dybcio@linaro.org>, Srinivas Kandagatla <srinivas.kandagatla@linaro.org>, Banajit Goswami <bgoswami@quicinc.com>, Liam Girdwood <lgirdwood@gmail.com>, Mark Brown <broonie@kernel.org>, Rob Herring <robh+dt@kernel.org>, Krzysztof Kozlowski <krzysztof.kozlowski+dt@linaro.org>, Conor Dooley <conor+dt@kernel.org>, Philipp Zabel <p.zabel@pengutronix.de>, Jaroslav Kysela <perex@perex.cz>, Takashi Iwai <tiwai@suse.com>, linux-arm-msm@vger.kernel.org, alsa-devel@alsa-project.org, linux-sound@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org Cc: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>, Chris Packham <chris.packham@alliedtelesis.co.nz>, Bartosz Golaszewski <brgl@bgdev.pl>, Sean Anderson <sean.anderson@seco.com> Subject: [PATCH 0/4] reset: gpio: ASoC: shared GPIO resets Date: Fri, 22 Dec 2023 16:01:29 +0100 Message-Id: <20231222150133.732662-1-krzysztof.kozlowski@linaro.org> X-Mailer: git-send-email 2.34.1 Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: <linux-kernel.vger.kernel.org> List-Subscribe: <mailto:linux-kernel+subscribe@vger.kernel.org> List-Unsubscribe: <mailto:linux-kernel+unsubscribe@vger.kernel.org> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1785994797080163968 X-GMAIL-MSGID: 1785994797080163968 |
Series | reset: gpio: ASoC: shared GPIO resets | |
Message
Krzysztof Kozlowski
Dec. 22, 2023, 3:01 p.m. UTC
Hi, We have at least few cases where hardware engineers decided to use one powerdown/shutdown/reset GPIO line for multiple devices: 1. WSA884x (this and previous patch): https://lore.kernel.org/all/b7aeda24-d638-45b7-8e30-80d287f498f8@sirena.org.uk/ 2. https://lore.kernel.org/all/20231027033104.1348921-1-chris.packham@alliedtelesis.co.nz/ 3. https://lore.kernel.org/lkml/20191030120440.3699-1-peter.ujfalusi@ti.com/ 4. https://lore.kernel.org/all/20211018234923.1769028-1-sean.anderson@seco.com/ 5. https://social.treehouse.systems/@marcan/111268780311634160 I try to solve my case, hopefuly Chris' (2), partially Sean's (4) and maybe Hectors (5), using Rob's suggestion: https://lore.kernel.org/all/YXi5CUCEi7YmNxXM@robh.at.kernel.org/ Best regards, Krzysztof Cc: Chris Packham <chris.packham@alliedtelesis.co.nz> Cc: Bartosz Golaszewski <brgl@bgdev.pl> Cc: Sean Anderson <sean.anderson@seco.com> Krzysztof Kozlowski (4): reset: instantiate reset GPIO controller for shared reset-gpios reset: add GPIO-based reset controller ASoC: dt-bindings: qcom,wsa8840: Add reset-gpios for shared line ASoC: codecs: wsa884x: Allow sharing reset GPIO .../bindings/sound/qcom,wsa8840.yaml | 9 +- MAINTAINERS | 5 + drivers/reset/Kconfig | 9 ++ drivers/reset/Makefile | 1 + drivers/reset/core.c | 70 ++++++++++-- drivers/reset/reset-gpio.c | 105 ++++++++++++++++++ include/linux/reset-controller.h | 2 + sound/soc/codecs/wsa884x.c | 52 +++++++-- 8 files changed, 231 insertions(+), 22 deletions(-) create mode 100644 drivers/reset/reset-gpio.c
Comments
On 22/12/2023 16:01, Krzysztof Kozlowski wrote: > Hi, > > We have at least few cases where hardware engineers decided to use one > powerdown/shutdown/reset GPIO line for multiple devices: > Bartosz, Please kindly provide feedback whether my way of using "struct gpio_desc" to compare cookies is acceptable. Best regards, Krzysztof
On Fri, Dec 22, 2023 at 04:01:29PM +0100, Krzysztof Kozlowski wrote: > I try to solve my case, hopefuly Chris' (2), partially Sean's (4) and maybe > Hectors (5), using Rob's suggestion: Hector's case wasn't an actual reset, it was a runtime power control, so I'm not sure it'll fit there but otherwise this looks OK from an ASoC point of view.