From patchwork Tue May 7 14:14:46 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Andr=C3=A9_Draszik?= X-Patchwork-Id: 13657203 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id D51F3C10F1A for ; Tue, 7 May 2024 14:15:34 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:Cc:To:In-Reply-To:References:Message-Id :MIME-Version:Subject:Date:From:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=DETkngwu8XBIlamqv6j35+wq6ykejmB+3YevLavSQb4=; b=CmeWjgAfNikUUN HYmVmBT6x3ZL61Bf2Ou9RRM7bYVrmv3OtlIR7apf8pA3Y4UhcnlyRjuHTR+273Dqh6Pkfyg1A/CXL Mt1xB5tFwx+3ZvR3USf3YzVO4VI//r/0nZomxUwRg9FJXgBj9u28UF99gCnhNP4btA4LL4CjIdX3g NIWbarrpbEHBg+df90qL72SFmouUlkwRJRvgcwdPesJxeGnsGd4fLJCdC1LMn9flEUdc1itsHxVmf 7wsrt+RzPrXq9v2L1j/ZF2g3S9GGBTs7515mFBodYutNliKOFlw8Np+y2wDUfqu19QkelPhLtqlz+ xzPSAB8hpIXAK/aDrMaQ==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.97.1 #2 (Red Hat Linux)) id 1s4Lb9-0000000BQjk-0oEM; Tue, 07 May 2024 14:15:15 +0000 Received: from mail-ej1-x62d.google.com ([2a00:1450:4864:20::62d]) by bombadil.infradead.org with esmtps (Exim 4.97.1 #2 (Red Hat Linux)) id 1s4Lav-0000000BQRw-2YQH for linux-arm-kernel@lists.infradead.org; Tue, 07 May 2024 14:15:03 +0000 Received: by mail-ej1-x62d.google.com with SMTP id a640c23a62f3a-a59ece5e18bso206305166b.2 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=lists.infradead.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=twv9w4DgTneJs443sPuVeaXRceadoO5SNOKUjb78AeRgtZv3qE1kE7nFAF8c46rBQf 4kCh8Qb7sb1vYvOGi7czrFaPvOjO5LrjGpL+Gl8rRoKSccHDUqDZeycwk2ZH8vKqH5z7 RozsCEC/8n99FyZ9HDAPkFcKYUzRdDiKUw8euQApoksrh0xN/lc9qftaf7EAtc96ObSg u4AOMIamSeVlBfAmxzThPpXVChVjGT5+StwAF/YAwVRJ8A/BNg4hQsTLAEdeBzcJ3gNv SEyYpOzYaDZZhqpAb+V5IKkygbbhbf6vY3YaObWE3Gl7aYXMybq+hQuDZnrswKB1AziH rgDw== 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=wbNh36aUfHv2UUz69U1cS0V2dPyUvzQOK8hg9x2Hzm7qZbQqWhQ4CRSTgdW5VFA/m3 tfA8qWumIPXcGidVs/dbOiYpawGVTYRHK/deSsAEnfwo828dmEKIHEwpTRlpXPrLr+aO EyJDkcFLoce5sbU4B1mT7vXTPba22gR1BQh8DeHTznbj76NQWc/QFgjWhfxIXo0DjaHD 3Gz3ViHOdwjdcyteDrhTH+5YdqS6lCAKS3nQRSMUOpQUxid1G9fFlNkfb0q/jtWVpUI1 QLrFSy17aBkmUh4ABaUd2ay43uVImIm+oT2vOQjCxqFncUOl5X0VKSELscViNsMJ4qix ociw== X-Forwarded-Encrypted: i=1; AJvYcCUVQETFjhHmwBMc9FXOZERyOaZwdrW9OKm0RdnuQ7U1MJFuIHxMYq/LzUROX4QmzJt/pBQZMIq4hQSklxqtzLKi5775adoj/XCQs0x4mjex7/iSK2w= X-Gm-Message-State: AOJu0YxvRzQqYljvqXuiDfMRDgA0XLvx+LczSDMD5U3HNUuhuc8Dd+G2 D9S0JoPiqw6AL6FpVR3Sx+jhkaVOAKrFfXMigtVN7mHIfNQdxBhQoqXxMZCERi8= X-Google-Smtp-Source: AGHT+IFLbaE7KL4bM9NZleowwf/9bWz6QW+2cO4ZQn/n47PzlsG520bpJ6V/v0rjjw6rNMHBVt1ovw== 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 MIME-Version: 1.0 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?= =?utf-8?q?_Draszik?= X-Mailer: b4 0.12.4 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20240507_071501_848156_A72B498B X-CRM114-Status: GOOD ( 13.24 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org 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 Reviewed-by: Peter Griffin --- 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)