Received: by 2002:ab2:6857:0:b0:1ef:ffd0:ce49 with SMTP id l23csp3134224lqp; Mon, 25 Mar 2024 23:33:06 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCVh1cO1VW+6SrdDtvDcipK0TxyB33DJQIlaMbesy/W4r7CtaQ3eZm9Of8eh1+Acip54LD38BW02R1Z2I82A9Rh4BOpjlPfKzm+0LFyoUQ== X-Google-Smtp-Source: AGHT+IGGZVmJEFTz/k/Bb+ru85uV3P2PoVhDoOW4W9ld2cT9kSRs90Wkezr0jYf7QMIWyer1xwWJ X-Received: by 2002:a17:902:d503:b0:1e0:b871:53f1 with SMTP id b3-20020a170902d50300b001e0b87153f1mr5820354plg.31.1711434785762; Mon, 25 Mar 2024 23:33:05 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1711434785; cv=pass; d=google.com; s=arc-20160816; b=vhwc4jFhOF8SLdh6JUnHdzwmCDm3wy2YLVJ9o/UIKxMJEANEbG55tMb4Y0svfBhT9I nbuqiIj/++Ln7l/gIwBDu5mjvZw/yVY6v2RxSsrCh14PfJaDeNXce4BBlglCPSZj+a2D 3coZBjVU26PF15uj7KF00dAdFch/f4yG4omg7WtcdljeZnzD6PAS8xmwmdFqCqiz63RF Nf4kor27op6aaPHHSPOLqvnUKbGXJBt8enT+6U7fFyXnE8S7PWcAj7YKh+bBGblOVOfy BHw1sA8hsEJa5b5t/jYt2YwaO/YVaTrt3CWZAH2UxIuNZWrmM+610XQZf7C98nYOULWB jb8A== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:in-reply-to:autocrypt:from :content-language:references:cc:to:subject:user-agent:mime-version :list-unsubscribe:list-subscribe:list-id:precedence:date:message-id :dkim-signature; bh=NveLiMrbFvePfALmt6XX47/2qw2u9YrpgAMC6RHpHGg=; fh=AV4smBQhEHlebaMhC9o17hbZlUa1jXtKOucny2dDTT4=; b=moX4oTVj9SYW6MsrhjAwulAx7NVYpu5AfX1NhDIIBIWimBNjKQ70x7QTXnw4NVbzEL LZISiBmxhHF4rkcvCqVGdQNRE/UBe6cp6YmquaoIP3ITJuh36cA7n6VgcN6zJH8CH7TF W/npdB84TrxhVddPV2yJhXA0hs757aB0aztK+yjaIOkgimSAL5W88jPLYCQb3oWvpvZ8 HfbQEj8AxpIQcB0ceN66S+UaTIwM38g+muaD4VVjRHDKd8KZVZ/cPgn1JViZAsjYXRL1 PtamApxmIeGTr28qik/56VYtMNhEUblAsbg//vPBJ712NxgSBdkARJZ6SoK1dZi2Ni+d 0BzQ==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=oFZS9aUG; arc=pass (i=1 spf=pass spfdomain=linaro.org dkim=pass dkdomain=linaro.org dmarc=pass fromdomain=linaro.org); spf=pass (google.com: domain of linux-kernel+bounces-118418-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.48.161 as permitted sender) smtp.mailfrom="linux-kernel+bounces-118418-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from sy.mirrors.kernel.org (sy.mirrors.kernel.org. [147.75.48.161]) by mx.google.com with ESMTPS id v9-20020a170902b7c900b001dd5f78c986si6379877plz.194.2024.03.25.23.33.05 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 25 Mar 2024 23:33:05 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-118418-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.48.161 as permitted sender) client-ip=147.75.48.161; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=oFZS9aUG; arc=pass (i=1 spf=pass spfdomain=linaro.org dkim=pass dkdomain=linaro.org dmarc=pass fromdomain=linaro.org); spf=pass (google.com: domain of linux-kernel+bounces-118418-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.48.161 as permitted sender) smtp.mailfrom="linux-kernel+bounces-118418-linux.lists.archive=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 sy.mirrors.kernel.org (Postfix) with ESMTPS id E45CCB23D2D for ; Tue, 26 Mar 2024 06:32:18 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id EA61171B4B; Tue, 26 Mar 2024 06:32:11 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=linaro.org header.i=@linaro.org header.b="oFZS9aUG" Received: from mail-lf1-f52.google.com (mail-lf1-f52.google.com [209.85.167.52]) (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 304AA54BFF for ; Tue, 26 Mar 2024 06:32:09 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.167.52 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1711434730; cv=none; b=kEgw3sHPdWYX/224ltiVzkf/UjbIu/cJVP3q14liRHq991U4iosH7VGBybXeDQ6WN/R2i7XlItaRXbsxuAEFTztTbraFT/r3kBSziQNzUr1yIEe8JhLW55chqfwHkm2GKbTAvAcJWlCOSm0KFW0kYbBN0sszIFKbho50KLNiD6w= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1711434730; c=relaxed/simple; bh=lUIAgy0rufA9zfI1/pKMKqKPwZ8Uq7LasK6dd1NQxbE=; h=Message-ID:Date:MIME-Version:Subject:To:Cc:References:From: In-Reply-To:Content-Type; b=j8C5TkP10a1+JmnDaFitVHXmObWKAELAOIhiX824v/8DslwJlGW3salCwdtyai7JGsjLUTLHumXPhOY1ht9Ogxu8EmmE1zEnefDoVUxop82cR7IcQF0Y1/G4HWhkL+MKWsjnkAMnsQ1JnGO84yWleU+5E+7N3mtpXhc6LmLF6Bg= 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=oFZS9aUG; arc=none smtp.client-ip=209.85.167.52 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-lf1-f52.google.com with SMTP id 2adb3069b0e04-513ccc70a6dso8834348e87.1 for ; Mon, 25 Mar 2024 23:32:08 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1711434727; x=1712039527; darn=vger.kernel.org; h=content-transfer-encoding:in-reply-to:autocrypt:from :content-language:references:cc:to:subject:user-agent:mime-version :date:message-id:from:to:cc:subject:date:message-id:reply-to; bh=NveLiMrbFvePfALmt6XX47/2qw2u9YrpgAMC6RHpHGg=; b=oFZS9aUGz0JKixkHwKGFKXSnrb8CJ8zRelhjfUqVM+7j45e2KzYlm5DjMT9Pkf9ydU QgZdYFv8VQjSX4P+aiBWoQxFv3AhxGoG55nELsvzzAlHMsiIQCoMQxvwx4+LyqxA9O20 Vi1muP9rWjFTBWuYwi4zJENK0x1o9NvzBtrOKCkAtGr8TdWmMfxi1pVClgAvIqwDa0yu 4M51+DW0Log97NfdwpwpJtzWP5s+W7srspq0SU1pfSYwGDgTJz0KrJpG/m4C3Dv1ZF72 8Qg5BALUXcMJySVvQh6ub18/TirXemGInXyGRx8JsrPWrAZy0aieGAbbPEfTLB43VTe3 PolA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1711434727; x=1712039527; h=content-transfer-encoding:in-reply-to:autocrypt: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=NveLiMrbFvePfALmt6XX47/2qw2u9YrpgAMC6RHpHGg=; b=JI4gq2QSyvRFjPDLuDtaCs13VY7azviZ1K6VRw35M2yTj/1edgbG3hYgMz3bY6a6BF oet8cnca9LIvUr1fGG1J0PB9U+lkxy+lfvk93rIZ2XYVQxvE3CBFqG7k+id91pY3MtIv vYlozllYIGyt2hPpXqIZQCBYCAOtpNmGTD3l32LlQZIKoOohqtvg5glL6RSbyzhC9GAZ LSmv0SpTQ7hO7polbmh+tMZU3LTbhoiyHcnLypq90Yh67tqtvle4yOzA2aDXZOzR2eMy VroY8A+WGn5KPS9DmWQFUZV14k+7X3vR3eyC9+UbnB8Y1XX853mNMbKNruD/BX+9a6l1 X3+Q== X-Forwarded-Encrypted: i=1; AJvYcCWCM2ZZ/+Qmz7qe5CPtHjObmxEzh+Gig+Zp1jQ9ikmh4aFC5owY7fRGULY9SWgx+RVrrGnJjnQzo/8uk/zg9iOTljuromRN/Dy3fdH7 X-Gm-Message-State: AOJu0Yzgy+qhrfoUWyVP0x+twtl3ctLu6nPu4poN2IdOGZYMo7rDw4v3 jeoVIeDE5U9RVCXW0vVHZ+woMlJqicejgQvdJEQHkTCukfEiRI0sWWIjMvKvog4= X-Received: by 2002:ac2:4d07:0:b0:513:db29:8905 with SMTP id r7-20020ac24d07000000b00513db298905mr6318463lfi.69.1711434727252; Mon, 25 Mar 2024 23:32:07 -0700 (PDT) Received: from [192.168.1.20] ([178.197.222.44]) by smtp.gmail.com with ESMTPSA id la2-20020a170907780200b00a4503a78dd5sm3879491ejc.17.2024.03.25.23.32.05 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Mon, 25 Mar 2024 23:32:06 -0700 (PDT) Message-ID: <5e310358-44b5-413a-a6c0-47dea4944362@linaro.org> Date: Tue, 26 Mar 2024 07:32:05 +0100 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: [RFC PATCH 2/2] mfd: rohm-bd71828: Add power off functionality To: Andreas Kemnade Cc: lee@kernel.org, robh+dt@kernel.org, krzysztof.kozlowski+dt@linaro.org, conor+dt@kernel.org, mazziesaccount@gmail.com, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, imx@lists.linux.dev References: <20240324201210.232301-1-andreas@kemnade.info> <20240324201210.232301-3-andreas@kemnade.info> <20240325212127.7583c845@aktux> Content-Language: en-US From: Krzysztof Kozlowski Autocrypt: addr=krzysztof.kozlowski@linaro.org; keydata= xsFNBFVDQq4BEAC6KeLOfFsAvFMBsrCrJ2bCalhPv5+KQF2PS2+iwZI8BpRZoV+Bd5kWvN79 cFgcqTTuNHjAvxtUG8pQgGTHAObYs6xeYJtjUH0ZX6ndJ33FJYf5V3yXqqjcZ30FgHzJCFUu JMp7PSyMPzpUXfU12yfcRYVEMQrmplNZssmYhiTeVicuOOypWugZKVLGNm0IweVCaZ/DJDIH gNbpvVwjcKYrx85m9cBVEBUGaQP6AT7qlVCkrf50v8bofSIyVa2xmubbAwwFA1oxoOusjPIE J3iadrwpFvsZjF5uHAKS+7wHLoW9hVzOnLbX6ajk5Hf8Pb1m+VH/E8bPBNNYKkfTtypTDUCj NYcd27tjnXfG+SDs/EXNUAIRefCyvaRG7oRYF3Ec+2RgQDRnmmjCjoQNbFrJvJkFHlPeHaeS BosGY+XWKydnmsfY7SSnjAzLUGAFhLd/XDVpb1Een2XucPpKvt9ORF+48gy12FA5GduRLhQU vK4tU7ojoem/G23PcowM1CwPurC8sAVsQb9KmwTGh7rVz3ks3w/zfGBy3+WmLg++C2Wct6nM Pd8/6CBVjEWqD06/RjI2AnjIq5fSEH/BIfXXfC68nMp9BZoy3So4ZsbOlBmtAPvMYX6U8VwD TNeBxJu5Ex0Izf1NV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BQt2CopXtHtYfPAO5nAkIvKSNp3jmGxZw4aTc5xoAZBLo0OV+Ezo71pg3AYvq0a3/oGRG KQ06ztUMRrj8eVtpImjsWCd0bDWRaaR4vqhCHvAG9iWXZu4qh3ipie2Y0oSJygcZT7H3UZxq fyYKiqEmRuqsvv6dcbblD8ZLkz1EVZL6djImH5zc5x8qpVxlA0A0i23v5QvN00m6G9NFF0Le D2GYIS41Kv4Isx2dEFh+/Q== In-Reply-To: <20240325212127.7583c845@aktux> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit On 25/03/2024 21:21, Andreas Kemnade wrote: > On Mon, 25 Mar 2024 13:13:13 +0100 > Krzysztof Kozlowski wrote: > >> On 24/03/2024 21:12, Andreas Kemnade wrote: >>> struct regmap_irq_chip_data *irq_data; >>> @@ -542,7 +560,18 @@ static int bd71828_i2c_probe(struct i2c_client *i2c) >>> ret = devm_mfd_add_devices(&i2c->dev, PLATFORM_DEVID_AUTO, mfd, cells, >>> NULL, 0, regmap_irq_get_domain(irq_data)); >>> if (ret) >>> - dev_err_probe(&i2c->dev, ret, "Failed to create subdevices\n"); >>> + return dev_err_probe(&i2c->dev, ret, "Failed to create subdevices\n"); >>> + >>> + if (of_device_is_system_power_controller(i2c->dev.of_node)) { >>> + if (!pm_power_off) { >>> + bd71828_dev = i2c; >>> + pm_power_off = bd71828_power_off; >>> + ret = devm_add_action_or_reset(&i2c->dev, >>> + bd71828_remove_poweroff, >>> + NULL); >>> + } else >>> + dev_warn(&i2c->dev, "Poweroff callback already assigned\n"); >> >> Missing {} >> >> Please run scripts/checkpatch.pl and fix reported warnings. Some >> warnings can be ignored, but the code here looks like it needs a fix. >> Feel free to get in touch if the warning is not clear. >> > No, it does not complain about the {}. I was a bit unsure whether it is > required or not, but I was sure that checkpatch.pl does catch such things. > Yes, documentation clearly says that braces are required in those cases. "CHECK: braces {} should be used on all arms of this statement" I will update my template-response to use --strict. Best regards, Krzysztof