Received: by 2002:a89:288:0:b0:1f7:eeee:6653 with SMTP id j8csp561714lqh; Tue, 7 May 2024 07:31:19 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCVc05x2q1AMCPhVtns/GZGpqQ8eFWi9S1hjHY5oWjbMJlLXDAjZ1xayS0faHfx0XWtUTLYBCglQVhaj4Z3nD/Fyap/lg9UQ6Z3Kj2+RtA== X-Google-Smtp-Source: AGHT+IGQZx2UuwBp3xvHMzVP6vLzpce658uibS51cSstJcNxXxc0PbSwErON4O2an3cYbdgAORsE X-Received: by 2002:a05:6830:909:b0:6ee:32ab:8124 with SMTP id v9-20020a056830090900b006ee32ab8124mr17357108ott.25.1715092279068; Tue, 07 May 2024 07:31:19 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1715092279; cv=pass; d=google.com; s=arc-20160816; b=ZTaWbTA6ymNIp7Jbk8QrKSVq/ePGjmGwY0URtZRzPxx/bYqgt29kEnxPtSeEjWEduC kZzEJyYWHk6HwkbRqU92bun9md8HRCVEmNy6OWStSJlRuWgN0UXlpR81EsWxCqPKbGUe n0IRrZvNimnVdtzbCL6S2p3Dd9boqBCWANalmvU90n1lr/8/7zecn8hKILKcuWM89s2t W0tDGZrFwS7/WQBT80g3eARb0SDhT3nuv6Erf8VRz+iXOgCSY/hr+uBUzxuYcWPdZ+y5 eC7NwahyBmKm3cpTbU/RJwC/bNClVqMdszoQr1iQHT5KWlyXNzCxLzPmPOwoa/u7xWml 3XlQ== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=cc:to:in-reply-to:references:message-id:content-transfer-encoding :mime-version:list-unsubscribe:list-subscribe:list-id:precedence :subject:date:from:dkim-signature; bh=PzqUO+Y4mCEkRzT42mutSa2giiTX1rn5tTLc65YmNFs=; fh=Yl5hswU4LfD3rqn8nyqyAl+H7Iq+LYA9KkonqPgd998=; b=DZPQaQitRnzxU///H3HKGsUIEUhudrdstp6GPxlkaugffXhus42jfNXgcaLXoPpHQi BOUkPKJKlRm13VaBzR7v/XtEiElLuRqDBH7vJhkz2K1U39kAFpUqqkjXMrlteEIgTfsT eDz3h1e9VEyR4+HLGqH0b5HCtCgWtx3ty82YYkTMvXefY7Z2ozBLlES5gTQe3lCUk95+ a+DyfU9Fy8pqRqRjFulz5zZVtjQdhc7ni31M9SWFmefeebUccRhmaPKOdZgXoJp8Cjw3 I1ePdNlqn9FGi9flDsA4cawrEnw/SlZu1PWVbswkPZ33C+svBO3N3b1To9KAUWRDFKUb MuyQ==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=Su+zFz2l; 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-171551-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) smtp.mailfrom="linux-kernel+bounces-171551-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from sv.mirrors.kernel.org (sv.mirrors.kernel.org. [139.178.88.99]) by mx.google.com with ESMTPS id l26-20020a9d709a000000b006f06cfdad26si1300553otj.208.2024.05.07.07.31.18 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 07 May 2024 07:31:19 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-171551-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) client-ip=139.178.88.99; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=Su+zFz2l; 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-171551-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) smtp.mailfrom="linux-kernel+bounces-171551-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 sv.mirrors.kernel.org (Postfix) with ESMTPS id B9F0A2863B6 for ; Tue, 7 May 2024 14:20:43 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 6683816F27C; Tue, 7 May 2024 14:14:51 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=linaro.org header.i=@linaro.org header.b="Su+zFz2l" Received: from mail-ej1-f50.google.com (mail-ej1-f50.google.com [209.85.218.50]) (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 98EF316F0CE for ; Tue, 7 May 2024 14:14:48 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.218.50 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1715091290; cv=none; b=XGfrUWPprL0zBgPW5iOJYQ3pMOFpGcepDHyPatbHyayCXQ3cq7PXtifdqGfrJ5EliUGBUOPBGoSSWZjnbMGKTNarEkI5egzHIny6JriV/iAzTTtiVX1JN1t6jlNhLFREelNkH7k+rZvlazmVzK3AFYMnkFru6ze6dJX22uH1cMQ= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1715091290; c=relaxed/simple; bh=QcH+btRFNoWS4TjpLpt+GQ3sskfBxn9Nd4Jm3dRcxGs=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=C7o6Cm36lTmW0TX7FIe1HVmJDnYfS/Lg/NZDO6XkKvsNTZwcjVYTRKZn2QwLwvpsJTAFKx6hBaTfMSsv59eOVLLuZJrw8zx123Rl+8VpBbTp6m6G8aJVZ0i9ofybljtfjSiaA4yBOMpECfNZPI/ZacVNzVd9AEZExzempObkZtA= 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=Su+zFz2l; arc=none smtp.client-ip=209.85.218.50 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-f50.google.com with SMTP id a640c23a62f3a-a59b81d087aso682767766b.3 for ; Tue, 07 May 2024 07:14:48 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1715091287; x=1715696087; darn=vger.kernel.org; h=cc:to:in-reply-to:references:message-id:content-transfer-encoding :mime-version:subject:date:from:from:to:cc:subject:date:message-id :reply-to; bh=PzqUO+Y4mCEkRzT42mutSa2giiTX1rn5tTLc65YmNFs=; b=Su+zFz2l86wwrdbf0v7o+iWoFsQtWSKhymbdA37Ly2uXEBA5aN2mixB9NtWUCeSiVL Y6nvLQkqfpl10wrc/kXZXRXiROeCoQK8HT6vBxeQYHlurgekC2UuLv2sM8ZJDSvk6/85 EsjoV9Lv/bKl5b/LfGVgr0W0ocO2VjXfqviqjPD2P4U4Dy227ILEoduVobkPudvbMhOK snCTIT3da2qNIQqvR9gmVOHW8DkvTbI71WCD/8qg/vPSY8ng8r7mGjAB6bhBGUW+3ZVw TPWiRSsZfG85f6736ReoktKFHp9RCx+uvuy9l0rhqK9ENECmA+p0Wv/vJcxTgRDmU1WT Uasw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1715091287; x=1715696087; h=cc:to:in-reply-to:references:message-id:content-transfer-encoding :mime-version:subject:date:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=PzqUO+Y4mCEkRzT42mutSa2giiTX1rn5tTLc65YmNFs=; b=M6gPAQ6uyHWTwQvN9LWIIhNEa9XwTMyzzdcykw7OW62vC4RaxqJK7ZEboys8pNGlJS w1mZ/hf1GLGhhOBLY2XLjnhaja2cmylUuqN94TPW3t6wxinwUVPRrZJBV0HpDLySH99N +IVCjVlzS7Q1HmAi1NzSBi2cdT+ymK1BVezVKHwhf+m4d02nokfvz6V0/s7HWECTjcSx VQKWgPKoTYn+JxN0PK656y6o+N4xKoMCItgE9nf9E0Au5WRAkXvLNTYb0jt9Xdn6OXrw 9+2iWTbcCNkE56ProbuD+OZQetwe3NVBwCWl7oxiFsEj+epviqlXMLJr2YV0aPjSB0LB V3pg== X-Forwarded-Encrypted: i=1; AJvYcCXO2LzpRSjOac1rGYIsMQfHi7gH5p6tI/VExPys9Re0w1d6vd7lBp+3aPGOM4dtnJmSD+W9Bh+RekDZO62BN1OvLZdOzJaSvzcRmndE X-Gm-Message-State: AOJu0YwO8vMkaS4CoXHnFZdZhItWclmk56c3o2Uh1pgzlABWRD7b9UBA x/Zfpz2mZom+k69L6EdqlmUQ2+oF1kh9QoUNlBhQJlxusLr8LCx6Hwd4JesZoLE= X-Received: by 2002:a50:c319:0:b0:56f:e7b9:e67d with SMTP id a25-20020a50c319000000b0056fe7b9e67dmr13463276edb.12.1715091287117; Tue, 07 May 2024 07:14:47 -0700 (PDT) Received: from puffmais.c.googlers.com (8.239.204.35.bc.googleusercontent.com. [35.204.239.8]) by smtp.gmail.com with ESMTPSA id x2-20020a056402414200b00572cf08369asm5621928eda.23.2024.05.07.07.14.46 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 07 May 2024 07:14:46 -0700 (PDT) From: =?utf-8?q?Andr=C3=A9_Draszik?= Date: Tue, 07 May 2024 15:14:46 +0100 Subject: [PATCH 3/5] phy: exynos5-usbdrd: make phy_isol() take a bool for clarity Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 8bit Message-Id: <20240507-samsung-usb-phy-fixes-v1-3-4ccba5afa7cc@linaro.org> References: <20240507-samsung-usb-phy-fixes-v1-0-4ccba5afa7cc@linaro.org> In-Reply-To: <20240507-samsung-usb-phy-fixes-v1-0-4ccba5afa7cc@linaro.org> To: Vinod Koul , Kishon Vijay Abraham I , Krzysztof Kozlowski , Alim Akhtar , Sam Protsenko Cc: Peter Griffin , Tudor Ambarus , Will McVicker , kernel-team@android.com, linux-phy@lists.infradead.org, linux-arm-kernel@lists.infradead.org, linux-samsung-soc@vger.kernel.org, linux-kernel@vger.kernel.org, Krzysztof Kozlowski , =?utf-8?q?Andr=C3=A9_Draszik?= X-Mailer: b4 0.12.4 on / not on is just a boolean flag and is a bit misleading as currently on==1 means to turn off the power, and on==0 to turn power on. Rename the flag and make it a bool to avoid confusion of future readers of this code. No functional change. While at it, fix a whitespace issue in nearby comment. No functional change. Signed-off-by: André Draszik --- drivers/phy/samsung/phy-exynos5-usbdrd.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/drivers/phy/samsung/phy-exynos5-usbdrd.c b/drivers/phy/samsung/phy-exynos5-usbdrd.c index 1b209ab7a268..ed4898741c99 100644 --- a/drivers/phy/samsung/phy-exynos5-usbdrd.c +++ b/drivers/phy/samsung/phy-exynos5-usbdrd.c @@ -173,7 +173,7 @@ struct exynos5_usbdrd_phy; struct exynos5_usbdrd_phy_config { u32 id; - void (*phy_isol)(struct phy_usb_instance *inst, u32 on); + void (*phy_isol)(struct phy_usb_instance *inst, bool isolate); void (*phy_init)(struct exynos5_usbdrd_phy *phy_drd); unsigned int (*set_refclk)(struct phy_usb_instance *inst); }; @@ -273,14 +273,14 @@ static unsigned int exynos5_rate_to_clk(unsigned long rate, u32 *reg) } static void exynos5_usbdrd_phy_isol(struct phy_usb_instance *inst, - unsigned int on) + bool isolate) { unsigned int val; if (!inst->reg_pmu) return; - val = on ? 0 : EXYNOS4_PHY_ENABLE; + val = isolate ? 0 : EXYNOS4_PHY_ENABLE; regmap_update_bits(inst->reg_pmu, inst->pmu_offset, EXYNOS4_PHY_ENABLE, val); @@ -525,8 +525,8 @@ static int exynos5_usbdrd_phy_power_on(struct phy *phy) } } - /* Power-on PHY*/ - inst->phy_cfg->phy_isol(inst, 0); + /* Power-on PHY */ + inst->phy_cfg->phy_isol(inst, false); return 0; @@ -553,7 +553,7 @@ static int exynos5_usbdrd_phy_power_off(struct phy *phy) dev_dbg(phy_drd->dev, "Request to power_off usbdrd_phy phy\n"); /* Power-off the PHY */ - inst->phy_cfg->phy_isol(inst, 1); + inst->phy_cfg->phy_isol(inst, true); /* Disable VBUS supply */ if (phy_drd->vbus) -- 2.45.0.rc1.225.g2a3ae87e7f-goog