From patchwork Wed Jan 31 16:09:44 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Biju Das X-Patchwork-Id: 13539588 Received: from relmlie5.idc.renesas.com (relmlor1.renesas.com [210.160.252.171]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 484E469D05; Wed, 31 Jan 2024 16:09:55 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=210.160.252.171 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1706717398; cv=none; b=Yh8Qw9S7PbTFd8ohvFwAj1ZlUJbS/vJbRLwvnHkBr2Aj+3DyahPTaWKHa+0H7hj8g8Rj6f4Nx912JnTX78pzURhFgNtVYLMKlkXFtEa3BKoOJFwnPjOF4Jc0mkYfpLOyXHSb0nRSfc5ENdM24/sA6nRACz85zkIePC84Ai2Vne4= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1706717398; c=relaxed/simple; bh=MwIxIYeYpTcB9h848/ZPazREWf6wyNf1jMcp3F1E58s=; h=From:To:Cc:Subject:Date:Message-Id:MIME-Version; b=YJmdn++CZqdWbdi5+4GhwRTcVRzl1bjY8mAeWgFNZy/t8JagfkVhedOXimrWcHgWv15pXt2NdoP4FzfE/OTkaYs4ZgxuJeDCMGFPWWk0uaw3A31Q9Tckx/2SRYq47wcwDmNXvoUp5YHYa/axU2HVF/V7V0zh2D3P0ZuO0bFoxSg= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=bp.renesas.com; spf=pass smtp.mailfrom=bp.renesas.com; arc=none smtp.client-ip=210.160.252.171 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=bp.renesas.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=bp.renesas.com X-IronPort-AV: E=Sophos;i="6.05,231,1701097200"; d="scan'208";a="192402235" Received: from unknown (HELO relmlir6.idc.renesas.com) ([10.200.68.152]) by relmlie5.idc.renesas.com with ESMTP; 01 Feb 2024 01:09:54 +0900 Received: from localhost.localdomain (unknown [10.226.92.227]) by relmlir6.idc.renesas.com (Postfix) with ESMTP id 926864007129; Thu, 1 Feb 2024 01:09:50 +0900 (JST) From: Biju Das To: Michael Turquette , Stephen Boyd , Sakari Ailus , Laurent Pinchart , Mauro Carvalho Chehab , Hans Verkuil , Russell King Cc: Biju Das , linux-clk@vger.kernel.org, Geert Uytterhoeven , Prabhakar Mahadev Lad , Biju Das , linux-media@vger.kernel.org, linux-renesas-soc@vger.kernel.org Subject: [PATCH RFC 0/3] Add clk_disable_unprepare_sync() Date: Wed, 31 Jan 2024 16:09:44 +0000 Message-Id: <20240131160947.96171-1-biju.das.jz@bp.renesas.com> X-Mailer: git-send-email 2.25.1 Precedence: bulk X-Mailing-List: linux-renesas-soc@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Currently clk_disable() is not synchronous. Consumers just gate the clock, but it doesn't check actually the clock is gated. On RZ/G2L SMARC EVK before starting link reception we need to make sure the video clock is off, then start reception and turn video clock back to on. Introduce clk_disable_unprepare_sync() to synchronize the clock gate operation. Note: patch#3 depend upon [1] [1] https://patchwork.kernel.org/project/linux-renesas-soc/patch/20240130164115.116613-5-biju.das.jz@bp.renesas.com/ Biju Das (3): clk: Add clk_disable_unprepare_sync() clk: renesas: rzg2l: Add disable_sync() callback media: platform: rzg2l-cru: rzg2l-video: Use clk_disable_unprepare_sync() drivers/clk/clk.c | 36 ++++++++++++++----- drivers/clk/renesas/rzg2l-cpg.c | 23 ++++++++++++ .../platform/renesas/rzg2l-cru/rzg2l-csi2.c | 2 +- include/linux/clk-provider.h | 4 +++ include/linux/clk.h | 25 +++++++++++++ 5 files changed, 80 insertions(+), 10 deletions(-)