Received: by 2002:a89:413:0:b0:1fd:dba5:e537 with SMTP id m19csp648820lqs; Fri, 14 Jun 2024 01:03:02 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCWtIcVE6twbsYoociQc0gn0N9U93M181R154+wGlJX2GwDTMSaznN5ooHqd9QG5mEp2FvNPyAXB5v+aYuSoQwsGYiLXSje9iKxbAmW3EQ== X-Google-Smtp-Source: AGHT+IHODanngZXbbb3ORWbpmHGnQVINTh0QnZVfcitW3PcuB4FvPUMFRr3wwCfyWjqj4pnUpWUt X-Received: by 2002:a17:902:d482:b0:1f7:1b92:6e7c with SMTP id d9443c01a7336-1f862a0b0eamr20610425ad.67.1718352181789; Fri, 14 Jun 2024 01:03:01 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1718352181; cv=pass; d=google.com; s=arc-20160816; b=NNtJv+TtVzk10LJMHOXhIlAo0d6CJSNS35g+YxDB2r9wUNZ+TI3I7BHPYAjdrUfzR3 02JZNUnzVw1fn8HTov3LwlpvZTHOM5e/kxL/nL5RxCYUiYbtdQgKguynpavcJruduvz9 7EYId1u9cQdGvzdiml+ZB2dxoZFEr1kkzx0axCZjCJvulJvVtL1HqGE+G/cYwV0UapAB IkcoQp7jmyPD5qr9C5Kj224XUBkYp+NlCJHx9rfJdmORB3GRZ2q1xzFYNEv15LHWqR44 KQpnS9MljIaXt9DUPqGJrNyRXtCDFBSWdQRL6cwkdytnB6mOx4YPVsAd566lQhMrkQxL Nc7g== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:in-reply-to:from:content-language :references:cc:to:subject:user-agent:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:date:message-id:dkim-signature; bh=nRWFYP2PnBSqJKVpviuIt+bkDMabc8LZej0hybvhqgM=; fh=trJKeOIZBvtok+F6gPMsNiedHNh239jL7fzfZsgoJeo=; b=zKD3epxsO/OfhdiBLf1Bnco5357InlotxupgrOEfoPMCkUXix5izkNuJ5zM8IipzGV Y6NlYR05WNVDwnf7zqsKltH1Voc+E1v/J6NdwnOnWD0OSNXXiviWhPsmIsosPuuzRRiq lhWpQbYKLPUL2kpvNnFWFSY6kobVn5ZQ18OhmUiR5LVc8niLFjO75mAEa7N+3ASzOulP Rq5qIm/CMZAtQSIsdEDshoFyDub1WuWGJR/lyH/PXvClVkrgSTsnWAKWrUKb4YD2na3w Q4tVAgnELZLJTTBgPw5KQRg6wrJH3E4jUdQ9GAyFeI/Mhh3JssCLYnIE/1fYnxWsOhzm tMiw==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@gmail.com header.s=20230601 header.b=HCr1D3bl; arc=pass (i=1 spf=pass spfdomain=gmail.com dkim=pass dkdomain=gmail.com dmarc=pass fromdomain=gmail.com); spf=pass (google.com: domain of linux-kernel+bounces-214499-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-214499-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from sv.mirrors.kernel.org (sv.mirrors.kernel.org. [2604:1380:45e3:2400::1]) by mx.google.com with ESMTPS id d9443c01a7336-1f855f303f3si29463055ad.646.2024.06.14.01.03.01 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 14 Jun 2024 01:03:01 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-214499-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) client-ip=2604:1380:45e3:2400::1; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20230601 header.b=HCr1D3bl; arc=pass (i=1 spf=pass spfdomain=gmail.com dkim=pass dkdomain=gmail.com dmarc=pass fromdomain=gmail.com); spf=pass (google.com: domain of linux-kernel+bounces-214499-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-214499-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com 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 sv.mirrors.kernel.org (Postfix) with ESMTPS id 6140E288381 for ; Fri, 14 Jun 2024 08:02:26 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 6390C1836DF; Fri, 14 Jun 2024 08:02:00 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="HCr1D3bl" Received: from mail-lf1-f53.google.com (mail-lf1-f53.google.com [209.85.167.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 682A61836D3; Fri, 14 Jun 2024 08:01:57 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.167.53 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1718352119; cv=none; b=fqswiTahEcZBDY58/iJNYIMzh9nBeLh2dv7/gsoH7Fy5KuhFb+bhJLoYpHAwnYtU9b3Ksh9dxgTxl6je8/HJBrQddgAZVZhLw2cEoguBBAuy/IdVrUcWQY25iIui5iJXJFS7e2uuglCK2rCYsNzzn84ceufrZXNI/LfFt/NR5Fk= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1718352119; c=relaxed/simple; bh=DNloJkCpugxMgXOsQecfvd48tcZUcJDPFTN7cPrQP6c=; h=Message-ID:Date:MIME-Version:Subject:To:Cc:References:From: In-Reply-To:Content-Type; b=swywsZChJkRZch7muze5C9flZZLfgIwEcLH8grwJs2ktjlqnHh4y7n3tp6DEGi3Ke607izNgUyh/MUj0HN3hm8Jfe9Uqzns6Afht17SaBU7U/9/BVkDAE6hWBw1eI7eNdnJEddQuWdkJFKMHx2Z97ba00GlsVaAFffBFPeODDwc= 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=HCr1D3bl; arc=none smtp.client-ip=209.85.167.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 Received: by mail-lf1-f53.google.com with SMTP id 2adb3069b0e04-52c815e8e9eso2017293e87.0; Fri, 14 Jun 2024 01:01:57 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1718352115; x=1718956915; darn=vger.kernel.org; h=content-transfer-encoding:in-reply-to:from:content-language :references:cc:to:subject:user-agent:mime-version:date:message-id :from:to:cc:subject:date:message-id:reply-to; bh=nRWFYP2PnBSqJKVpviuIt+bkDMabc8LZej0hybvhqgM=; b=HCr1D3blzIZOzlhk/hSdEwNlX9awu1hh9OCk9cLfVpGMDqB+OnC8QjL1VnZSWz5S7G Cf40xXrHtyBCKSpsNXOZBCRzdIcX8pqgTgJ8G2BTsV2V67/znFFNibnFEf+3wtBTHUFX dOWf5or6sE4PwiXVWVtVBCuABoO+aNU690yZZLTy1mHBt73a3iJFxOTSrVdn0ESz+ji9 f81dweD1eHeqVBbCq8m3zVpE5JQuYFbcotaV5pAxTwRtJCSsTmyxQ2fdukcnbzMC/sbY aeldG+1b2Qhk0gnAS5rYrQ1OICPzBDh3RLihrMKOXowYpnsgf2AUCPa+PofyQ9J3OEl5 AwQw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1718352115; x=1718956915; h=content-transfer-encoding:in-reply-to:from:content-language :references:cc:to:subject:user-agent:mime-version:date:message-id :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=nRWFYP2PnBSqJKVpviuIt+bkDMabc8LZej0hybvhqgM=; b=xHKEKQ/FKDgmOPS3UDxvZ0/uKNepBJ78paw2ZGCYGEC2lfj9Mu/UofT8ThjPpQgUup 7nU22B1AVfYxGMn3JRekJnsqHVfxrEA4pok210irWiGYgKPOh/ImpnyO8oasXO11fZa+ TvHb9WzOvARJehJtn+vVQQbLKLa1E6KdU4tmMqIJSo5s3+mZ6rGmnAqoO1wxDxg4Zjxc QCFYjP3fQEJFpIbpi5hks8uap53TMUrncM5g4aWP2XtAHukYDjFthqXX1bSuXrLpbuEw PRAoaPX+t2Mwb0UCuXivTbdufXGmI1WD5ffDQid3p/oQWY0GcKHHgMa0AcR7e67WVArL FrGg== X-Forwarded-Encrypted: i=1; AJvYcCUH3kmfgPgfECDjOmYcwnKGQ0FeqNgiJh88oMizGkho6LsJwnN6vGKz47YFluQpPTzm3qdu5trdd90uGZ19yNwMDObOdpMsf6YDOIK1qouzp819r2RvYdedRaoKqTY8idD8DqppS02L2k1j/ZA63x4Iye+vHCzJSy7IEEptVU+Ib/Xl0t92jlHU X-Gm-Message-State: AOJu0YyTwoakUiUMQ5aPbZ40H1oUwUyyrnz2V5auMoWyx7foZhFVpfx6 JRXpdmHXtOBNAp9XM7/0HtmxiKrVlGQaHyuIy+b5/ubINK3YjT56 X-Received: by 2002:a05:6512:1319:b0:52c:845e:3194 with SMTP id 2adb3069b0e04-52ca6e6d4b3mr1398030e87.29.1718352114995; Fri, 14 Jun 2024 01:01:54 -0700 (PDT) Received: from [172.16.183.82] ([213.255.186.46]) by smtp.gmail.com with ESMTPSA id 2adb3069b0e04-52ca282ee91sm437317e87.105.2024.06.14.01.01.53 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Fri, 14 Jun 2024 01:01:54 -0700 (PDT) Message-ID: Date: Fri, 14 Jun 2024 11:01:52 +0300 Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: [PATCH v3 09/10] mfd: bd96801: Add ERRB IRQ To: Lee Jones Cc: Matti Vaittinen , Rob Herring , Krzysztof Kozlowski , Conor Dooley , Liam Girdwood , Mark Brown , Greg Kroah-Hartman , "Rafael J. Wysocki" , Wim Van Sebroeck , Guenter Roeck , Thomas Gleixner , devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, linux-watchdog@vger.kernel.org References: <332a2d2429e2ba3c96afd28c1ccc18efc38e1fd3.1717486682.git.mazziesaccount@gmail.com> <20240613163249.GN2561462@google.com> <21a468c2-7d8f-459a-a5a9-53d8694c3f38@gmail.com> <20240614075004.GB2561462@google.com> Content-Language: en-US, en-GB From: Matti Vaittinen In-Reply-To: <20240614075004.GB2561462@google.com> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit On 6/14/24 10:50, Lee Jones wrote: > On Fri, 14 Jun 2024, Matti Vaittinen wrote: > >> On 6/13/24 19:32, Lee Jones wrote: >>> On Tue, 04 Jun 2024, Matti Vaittinen wrote: >>> >>>> The ROHM BD96801 "scalable PMIC" provides two physical IRQs. The ERRB >>>> handling can in many cases be omitted because it is used to inform fatal >>>> IRQs, which usually kill the power from the SOC. >>>> >>>> There may however be use-cases where the SOC has a 'back-up' emergency >>>> power source which allows some very short time of operation to try to >>>> gracefully shut down sensitive hardware. Furthermore, it is possible the >>>> processor controlling the PMIC is not powered by the PMIC. In such cases >>>> handling the ERRB IRQs may be beneficial. >>>> >>>> Add support for ERRB IRQs. >>>> >>>> Signed-off-by: Matti Vaittinen >>>> --- >>>> Revision history: >>>> v2 =>: >>>> - No changes >>>> v1 => v2: >>>> - New patch >>>> --- >>>> drivers/mfd/rohm-bd96801.c | 291 ++++++++++++++++++++++++++++++++----- >>>> 1 file changed, 253 insertions(+), 38 deletions(-) >>>> >>>> diff --git a/drivers/mfd/rohm-bd96801.c b/drivers/mfd/rohm-bd96801.c >>>> index 1c2a9591be7b..b7f073318873 100644 >>>> --- a/drivers/mfd/rohm-bd96801.c >>>> +++ b/drivers/mfd/rohm-bd96801.c >>>> @@ -5,13 +5,9 @@ >>>> * ROHM BD96801 PMIC driver >>>> * >>>> * This version of the "BD86801 scalable PMIC"'s driver supports only very >>>> - * basic set of the PMIC features. Most notably, there is no support for >>>> - * the ERRB interrupt and the configurations which should be done when the >>>> - * PMIC is in STBY mode. >>>> - * >>>> - * Supporting the ERRB interrupt would require dropping the regmap-IRQ >>>> - * usage or working around (or accepting a presense of) a naming conflict >>>> - * in debugFS IRQs. >>> >>> Why bother adding all that blurb in the first place? >> >> Because, I assume there are users who would like to have the ERRB in use. >> The main purpose of this comment is that any such users could >> a) see this version does not support ERRB. >> b) can find the original RFC with ERRB supportn and a workaround. >> c) know why this version does not work with ERRB and thus fix this >> >> It seems this ERRB support may be missing from upstream for a while, hence I >> think having this note is worthy until (if) this ERRB patch lands in >> upstream. > > What I mean is - you're adding all of these extra lines in patch 3 and > removing them in patch 9. > True. This is because I had a feeling the irqdomain changes might not get merged that fast as it seemed like something that is not completely trivial. This comment is useful if patches 7-10 aren't merged together with 1-6 - which I now also hope is the case XD >>>> + * basic set of the PMIC features. >>>> + * Most notably, there is no support for the configurations which should >>>> + * be done when the PMIC is in STBY mode. >>>> * >>>> * Being able to reliably do the configurations like changing the >>>> * regulator safety limits (like limits for the over/under -voltages, over >>>> @@ -23,16 +19,14 @@ >>>> * be the need to configure these safety limits. Hence it's not simple to >>>> * come up with a generic solution. >>>> * >>>> - * Users who require the ERRB handling and STBY state configurations can >>>> - * have a look at the original RFC: >>>> + * Users who require the STBY state configurations can have a look at the >>>> + * original RFC: >>>> * https://lore.kernel.org/all/cover.1712920132.git.mazziesaccount@gmail.com/ >>>> - * which implements a workaround to debugFS naming conflict and some of >>>> - * the safety limit configurations - but leaves the state change handling >>>> - * and synchronization to be implemented. >>>> + * which implements some of the safety limit configurations - but leaves the >>>> + * state change handling and synchronization to be implemented. >>>> * >>>> * It would be great to hear (and receive a patch!) if you implement the >>>> - * STBY configuration support or a proper fix to the debugFS naming >>>> - * conflict in your downstream driver ;) >>>> + * STBY configuration support or a proper fix in your downstream driver ;) >>>> */ >> >> ... >> >> Thanks for comments Lee. Reworking this will have to wait for the irqdomain >> name suffix, which I will continue after Hervé has done his part of the >> irqdomain changes. I will omit this patch from the next re-spin of the >> series. > > I'm in no rush. :) Well, glad to hear ;) I still usually try to avoid delaying sending the follow-up patches. I am under impression it is easier to review the new revision if the previous revision was not reviewed too long ago... ;) I feel it is polite to tell the reviewers there will be some delay when I know it. Yours, -- Matti -- Matti Vaittinen Linux kernel developer at ROHM Semiconductors Oulu Finland ~~ When things go utterly wrong vim users can always type :help! ~~