From nobody Tue Oct 7 09:55:05 2025 Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.129.124]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id C0D922F0C72 for ; Thu, 10 Jul 2025 17:29:28 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=170.10.129.124 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1752168570; cv=none; b=fX/yFohXn3izj7ApYi7cL72QdrSYBlSMCbU3FRi44RGSDMmGUuLSKna/SC3RQpkh6vLMGvmjYl/dk/Y/CPIrqv9MHN8S60fOn6Lt2asER5jrGPBJlHd8HLjHamObT57tWmDkH+dB+Q2F+L+VKKNXokZCxNzzT7HWsT6M1IuH6cc= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1752168570; c=relaxed/simple; bh=s/YLCQ1WUEbx5Thdmzoo2iTqS2C5GRU1mwSfI+X8dg4=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=gk6LywY+agrPYSiXqeb/r0NWReLes1uph4ZARLVusWw9YQl7+qSOnclHCAZr1ZHkW3r3FsvV1x8wutM0d07X1iQT+wc/IqQAFlRj/NAaEASuueU7UKkh5N9TacwhJbjWLh8HZT1EPnzmrgC4/lWhFQ9NAqmaot+J1Tu7ZyUejqI= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=redhat.com; spf=pass smtp.mailfrom=redhat.com; dkim=pass (1024-bit key) header.d=redhat.com header.i=@redhat.com header.b=fY5woHTw; arc=none smtp.client-ip=170.10.129.124 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=redhat.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=redhat.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=redhat.com header.i=@redhat.com header.b="fY5woHTw" DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1752168567; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=ZJJoL6RwVnNEdMkOi7cFEyIcZlkLWhCSUNH3ofBCzxM=; b=fY5woHTwn9xGWSf9soCK4nROdAuL49VTarKBXdyiVclFj/67qWGXgkM6UDedCMzdTcwfNJ tDhrn/gvuxFI3eJXnKM34yiS9PFPsJ3oN4n0aDNlZy+51mOnTxbXPaXR14HmIZOXs1+J/I WJlLdc8WJZOKIokFffCW+KiXl4AWmf4= Received: from mail-qk1-f198.google.com (mail-qk1-f198.google.com [209.85.222.198]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-563-CWL5V3zJNJWu_3FCZqYI6w-1; Thu, 10 Jul 2025 13:29:26 -0400 X-MC-Unique: CWL5V3zJNJWu_3FCZqYI6w-1 X-Mimecast-MFC-AGG-ID: CWL5V3zJNJWu_3FCZqYI6w_1752168566 Received: by mail-qk1-f198.google.com with SMTP id af79cd13be357-7d0981315c8so95159685a.0 for ; Thu, 10 Jul 2025 10:29:26 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1752168566; x=1752773366; 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=ZJJoL6RwVnNEdMkOi7cFEyIcZlkLWhCSUNH3ofBCzxM=; b=r07tt2cRdog3SHbGbDGz6dVJLTM6fIdkfyyxpu2RDWSUyPj2qWtY6c/ryGa+tSUBkB 62d+y+dNeGxWK4nehUZ+z5ZPfYqdx0lkuSQcwXuALy6sOGo8cW/cujm7prM5DDzzVyto NifHALEGivAUHWIYqg0wvdDfkWDZBuan0O2gpqCD8VInaskr7g1+E7u9aK5cRkTk2A+Q /l83Q+0/mXAp6rjmMD1jycq6ed5FwSZrYLaCX2uEDZGfJu/j3o0rIVTyJvA2qLWZkqbT 1FiItTEUlTzk85ifcaEh/x2rIxItqEaZPErPJy946h+vKa/5QqeX51+sNNKQMlF3yepI nlJQ== X-Forwarded-Encrypted: i=1; AJvYcCVTPubVN2W7KyjD7NtSVWc8Xf2Vj5QowTxJYp3MyHTtLydm6Hmqt30oGjxBcpj+18ST3vGeyDiQppeFje4=@vger.kernel.org X-Gm-Message-State: AOJu0YxRs55+6jdVqq/3szu4wGTcxxiAN7gA32/iiANC9sZQg3t3gZ5O DNmOpqQO2EUfosXj5Lg3F4iHlqxWFdIq2sqXQ+5S1PTwODPA5Whr3TvA1C7L595tgz7b1uBijOc DtE4npqXPgbQ65i5f2xNaSl4vUCNqGn3C93TU3nRWGrQ0osbbM7CrXmNrSPd++eJhzw== X-Gm-Gg: ASbGncun3JTsztb3k3pJk6CzAipgg7od+sVgqy6nkJwuV61l1zPvtVMMJhcQhuQAXvG 7FH4whklaObKUEYIl+KCDWn0zMbSfqr+HF86sryTPLY1frwVDzJp9MBoFxsFZcLfGwKgfeLTL6+ 9M34KvMKLx8z6vxwR0hdkfYGkhiFyi6AAwMh4o4QE26M6j3tVTduX0glvrGdgt4k10YalMTxiGW xCZpiC/ZRKArYq0N3TXatVho8WPCiNPGYepyQtYv1jy+X7yWH/tahXilcg1DhZVxPNSvVlQ8LBO mLd0N76cL4SyERKtqmnK2iXlI4lRI8wJMJMh1HFncE/4dJwJcnb3TVc8pJuQ X-Received: by 2002:a05:620a:4693:b0:7d3:e868:a684 with SMTP id af79cd13be357-7dded9b3872mr49279685a.51.1752168565705; Thu, 10 Jul 2025 10:29:25 -0700 (PDT) X-Google-Smtp-Source: AGHT+IEeLVBCJNiWv+TdOJcgy92F+69qivtBOqriK/xEcr1evzJvT9MG2tlvBsnp0sn9c6T6loa7hA== X-Received: by 2002:a05:620a:4693:b0:7d3:e868:a684 with SMTP id af79cd13be357-7dded9b3872mr49274985a.51.1752168565203; Thu, 10 Jul 2025 10:29:25 -0700 (PDT) Received: from [192.168.1.3] (c-73-183-52-120.hsd1.pa.comcast.net. [73.183.52.120]) by smtp.gmail.com with ESMTPSA id af79cd13be357-7dcde806297sm117728785a.82.2025.07.10.10.29.23 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 10 Jul 2025 10:29:23 -0700 (PDT) From: Brian Masney Date: Thu, 10 Jul 2025 13:29:06 -0400 Subject: [PATCH 1/4] media: i2c: ds90ub953: convert from round_rate() to determine_rate() 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: quoted-printable Message-Id: <20250710-media-clk-round-rate-v1-1-a9617b061741@redhat.com> References: <20250710-media-clk-round-rate-v1-0-a9617b061741@redhat.com> In-Reply-To: <20250710-media-clk-round-rate-v1-0-a9617b061741@redhat.com> To: Tomi Valkeinen , Mauro Carvalho Chehab , Julien Massot , Maxime Ripard , Stephen Boyd Cc: linux-clk@vger.kernel.org, linux-media@vger.kernel.org, linux-kernel@vger.kernel.org, Brian Masney X-Mailer: b4 0.14.2 X-Developer-Signature: v=1; a=ed25519-sha256; t=1752168561; l=1664; i=bmasney@redhat.com; s=20250528; h=from:subject:message-id; bh=s/YLCQ1WUEbx5Thdmzoo2iTqS2C5GRU1mwSfI+X8dg4=; b=fq4IRV0vtqM0WqOsbV0TTA76SiWVK2ZbdskNBvTGPcs4JTYKRTfd+aNbbcqYe33BjMWFMBARf GRslIK3PdOvBk08jvg6Eho4UKQnjOca2mXtgya5BY8d+NAD3UwB3u0s X-Developer-Key: i=bmasney@redhat.com; a=ed25519; pk=x20f2BQYftANnik+wvlm4HqLqAlNs/npfVcbhHPOK2U= The round_rate() clk ops is deprecated, so migrate this driver from round_rate() to determine_rate() using the Coccinelle semantic patch on the cover letter of this series. Signed-off-by: Brian Masney --- drivers/media/i2c/ds90ub953.c | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/drivers/media/i2c/ds90ub953.c b/drivers/media/i2c/ds90ub953.c index a865bfc895006464da0a0bedc90b1c26c4ec8d49..f57130bc6ba274ae8c7f6932079= 1a52a8aaf0404 100644 --- a/drivers/media/i2c/ds90ub953.c +++ b/drivers/media/i2c/ds90ub953.c @@ -1023,15 +1023,17 @@ static unsigned long ub953_clkout_recalc_rate(struc= t clk_hw *hw, return rate; } =20 -static long ub953_clkout_round_rate(struct clk_hw *hw, unsigned long rate, - unsigned long *parent_rate) +static int ub953_clkout_determine_rate(struct clk_hw *hw, + struct clk_rate_request *req) { struct ub953_data *priv =3D container_of(hw, struct ub953_data, clkout_cl= k_hw); struct ub953_clkout_data clkout_data; =20 - ub953_calc_clkout_params(priv, rate, &clkout_data); + ub953_calc_clkout_params(priv, req->rate, &clkout_data); + + req->rate =3D clkout_data.rate; =20 - return clkout_data.rate; + return 0; } =20 static int ub953_clkout_set_rate(struct clk_hw *hw, unsigned long rate, @@ -1050,7 +1052,7 @@ static int ub953_clkout_set_rate(struct clk_hw *hw, u= nsigned long rate, =20 static const struct clk_ops ub953_clkout_ops =3D { .recalc_rate =3D ub953_clkout_recalc_rate, - .round_rate =3D ub953_clkout_round_rate, + .determine_rate =3D ub953_clkout_determine_rate, .set_rate =3D ub953_clkout_set_rate, }; =20 --=20 2.50.0 From nobody Tue Oct 7 09:55:05 2025 Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.129.124]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 6E4FE2F0E49 for ; Thu, 10 Jul 2025 17:29:31 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=170.10.129.124 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1752168572; cv=none; b=DrekmN0DPoHflc+4TanGL68TXi39RUlQRuK3rqnYLtKvey74imftMBuElBBc9H3kKlhHgQ0+e73jdN2eHyt7YGUopp8l+a4GUCXlotd8WYk1mFtPB2fDCoJmmpQP+D3ZOcIAluFrCWt9drL+hbGkbLGI15ywE+6fJYhMg3kpAdM= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1752168572; c=relaxed/simple; bh=XlP4JTqNj7IvkmiHr9tqG1K/XSMbOVFkEEzDSArtTGE=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=UYyv2vLrI09skbOOa9vnFoUL9/E57wwvx+vx5Of1frgzizqKkIZ7uDhjJ+OZx1q1Hr2QIJpuJYvgUpKYdvAV3MdH/K+ULAKUFksSmIKOtirveJgRuIBWys1dCIwudEMlL49sRCOY4YptcW4WXmaTHZH+zy/4Vc+6E1kOdaMSiGQ= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=redhat.com; spf=pass smtp.mailfrom=redhat.com; dkim=pass (1024-bit key) header.d=redhat.com header.i=@redhat.com header.b=QlmLD109; arc=none smtp.client-ip=170.10.129.124 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=redhat.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=redhat.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=redhat.com header.i=@redhat.com header.b="QlmLD109" DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1752168570; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=sJ8oLNxWrU/sJ7CRad317hP+3603UtC2qk2fILpYrUQ=; b=QlmLD1092FCeMtumw5KlcRA+pTsfsCmB8rAZvaxl9DQMF6vIvHviKInR04UCDvUhxJeRg9 0E5y/FdQtJx8ParPGWmdAAf8bYdih67zZQWxW6lVQAvxS/AHS6nMWVTn2IkkB5/KJNvhEp ZS4NLi6ITcGUW3aPTH2fnBPhOY8xkvY= Received: from mail-qk1-f199.google.com (mail-qk1-f199.google.com [209.85.222.199]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-149-tOzsedOEMG6dQzCDJrNZ-Q-1; Thu, 10 Jul 2025 13:29:28 -0400 X-MC-Unique: tOzsedOEMG6dQzCDJrNZ-Q-1 X-Mimecast-MFC-AGG-ID: tOzsedOEMG6dQzCDJrNZ-Q_1752168568 Received: by mail-qk1-f199.google.com with SMTP id af79cd13be357-7d3f0958112so186343785a.0 for ; Thu, 10 Jul 2025 10:29:28 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1752168568; x=1752773368; 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=sJ8oLNxWrU/sJ7CRad317hP+3603UtC2qk2fILpYrUQ=; b=IxHg8nIf95IYCuVLU1uboZIve3wK+KKOiPwQbnjRK1CrlGvqg1CQREvMgVlhP2hO5p 7uucuP5RccUh+0KJAcCzAsva9n+5brtMqa7LtauNQ1FxEQqaTBwceIsv+OY5t7ODisdI ogtHq2q0LWbkzrT15f9xiizl1+tatq6gJYiXfoyNc4y4v7IjcfgSLUvJZ4jN/hQvCXZp kkcchQZDfYYaipOVygeg54kad6ybw0ePgeG97ZSDOdeXIeE4sxZc2VHDQMzuXHtV09wr DwlPGV4/7YrwqqpEv7DJppo9Q2nghnwmWdkD0mvsYXaZetkLl4SOrs3OA/S0s3pEWCDo qiZg== X-Forwarded-Encrypted: i=1; AJvYcCVnqaB21Bwy+mHkDtFyyRIR1w0CPqeg3uTn6p3gd5OKgJJnuf/Qo5RNugySMiw3ZxL67S8uOVAW6wy5XtQ=@vger.kernel.org X-Gm-Message-State: AOJu0Yz+N1zx7xLnMeGvBWGxzzD3Yg5cLrxpWGPf23+xqpQHYsD1Kptl 7ZSdRRv3FtevniAL16RmzKIVzDiyLhKdFJ45BcIXfEJH5ojQsVBgATEn8Hs+DZsGvmAqmnQGR9T RLb5H4xlXKxNGXLHJQzwjwuxcHIc9EziWJZUauabQmss4Kky4F5RR2HvHKCpiG+WCGg== X-Gm-Gg: ASbGnct2rUI8KBw3NtgyVtwx9cWBeMF/efbvInccjmz6jqml1o15qmTKLBmezVJuyDz vuwVjc3y51jVBF0xrKd5+sPX3+lxAAZz0EWfIAiwYvEcXwkSLJRmZp9lE3bkuDxw9MMsqo+ApAV W5RCAHUpJzYqIYWBTGJQLcOhNU5iHhCYUJ5YKl7FBh1XtuWths/T7EIwYYI78AFLB0rJIz8/aTu RswH6Pd2rs0QW5gD1prQLtlP+ucTTO1T1r1K2CTSGP55T/fLktmaFgJnnqTd0cRJrIbQy/ZriuO GxcSs2Yw9JEEFOgSJNL78OPXosFbcrlW4lMlMbj/IPRyZ414e1boIajTtTyt X-Received: by 2002:a05:620a:424f:b0:7c5:4b18:c4c3 with SMTP id af79cd13be357-7ddec176d88mr56986585a.30.1752168568018; Thu, 10 Jul 2025 10:29:28 -0700 (PDT) X-Google-Smtp-Source: AGHT+IEASrri2Ld/AclC/23zcGLdVmOlP5lvu7yYNmYy6RQLVdGij7562wfMkwtg24N0RU6BEOMwFw== X-Received: by 2002:a05:620a:424f:b0:7c5:4b18:c4c3 with SMTP id af79cd13be357-7ddec176d88mr56981985a.30.1752168567532; Thu, 10 Jul 2025 10:29:27 -0700 (PDT) Received: from [192.168.1.3] (c-73-183-52-120.hsd1.pa.comcast.net. [73.183.52.120]) by smtp.gmail.com with ESMTPSA id af79cd13be357-7dcde806297sm117728785a.82.2025.07.10.10.29.25 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 10 Jul 2025 10:29:26 -0700 (PDT) From: Brian Masney Date: Thu, 10 Jul 2025 13:29:07 -0400 Subject: [PATCH 2/4] media: i2c: max96717: convert from round_rate() to determine_rate() 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: quoted-printable Message-Id: <20250710-media-clk-round-rate-v1-2-a9617b061741@redhat.com> References: <20250710-media-clk-round-rate-v1-0-a9617b061741@redhat.com> In-Reply-To: <20250710-media-clk-round-rate-v1-0-a9617b061741@redhat.com> To: Tomi Valkeinen , Mauro Carvalho Chehab , Julien Massot , Maxime Ripard , Stephen Boyd Cc: linux-clk@vger.kernel.org, linux-media@vger.kernel.org, linux-kernel@vger.kernel.org, Brian Masney X-Mailer: b4 0.14.2 X-Developer-Signature: v=1; a=ed25519-sha256; t=1752168561; l=2000; i=bmasney@redhat.com; s=20250528; h=from:subject:message-id; bh=XlP4JTqNj7IvkmiHr9tqG1K/XSMbOVFkEEzDSArtTGE=; b=IZPrkyx5Mx/8rBmNEE2ncfwsaqrkNnJFwwc7DbA4LaSSjI43xyS4g6weDKPwkio7sUyOo7nCy eIITtwSJALwADRT1UZ4AYdPz7Y6HuPxE/mWTpvF7wnFYYBBRCfgrPZA X-Developer-Key: i=bmasney@redhat.com; a=ed25519; pk=x20f2BQYftANnik+wvlm4HqLqAlNs/npfVcbhHPOK2U= The round_rate() clk ops is deprecated, so migrate this driver from round_rate() to determine_rate() using the Coccinelle semantic patch on the cover letter of this series. Signed-off-by: Brian Masney --- drivers/media/i2c/max96717.c | 16 +++++++++------- 1 file changed, 9 insertions(+), 7 deletions(-) diff --git a/drivers/media/i2c/max96717.c b/drivers/media/i2c/max96717.c index 015e42fbe24629cc0268825ec640532a145e563b..17625fa72367bcce59b2178b8ca= 4fba795187d11 100644 --- a/drivers/media/i2c/max96717.c +++ b/drivers/media/i2c/max96717.c @@ -782,21 +782,23 @@ static unsigned int max96717_clk_find_best_index(stru= ct max96717_priv *priv, return idx; } =20 -static long max96717_clk_round_rate(struct clk_hw *hw, unsigned long rate, - unsigned long *parent_rate) +static int max96717_clk_determine_rate(struct clk_hw *hw, + struct clk_rate_request *req) { struct max96717_priv *priv =3D clk_hw_to_max96717(hw); struct device *dev =3D &priv->client->dev; unsigned int idx; =20 - idx =3D max96717_clk_find_best_index(priv, rate); + idx =3D max96717_clk_find_best_index(priv, req->rate); =20 - if (rate !=3D max96717_predef_freqs[idx].freq) { + if (req->rate !=3D max96717_predef_freqs[idx].freq) { dev_warn(dev, "Request CLK freq:%lu, found CLK freq:%lu\n", - rate, max96717_predef_freqs[idx].freq); + req->rate, max96717_predef_freqs[idx].freq); } =20 - return max96717_predef_freqs[idx].freq; + req->rate =3D max96717_predef_freqs[idx].freq; + + return 0; } =20 static int max96717_clk_set_rate(struct clk_hw *hw, unsigned long rate, @@ -847,7 +849,7 @@ static const struct clk_ops max96717_clk_ops =3D { .unprepare =3D max96717_clk_unprepare, .set_rate =3D max96717_clk_set_rate, .recalc_rate =3D max96717_clk_recalc_rate, - .round_rate =3D max96717_clk_round_rate, + .determine_rate =3D max96717_clk_determine_rate, }; =20 static int max96717_register_clkout(struct max96717_priv *priv) --=20 2.50.0 From nobody Tue Oct 7 09:55:05 2025 Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.129.124]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 2F12A2F199D for ; Thu, 10 Jul 2025 17:29:32 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=170.10.129.124 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1752168574; cv=none; b=kNL0G7UkpF7cjqulpsac2w8tS/Rz0H8wYYSyzHJEKmXIOHzOnmF95xITQJjrGa7Az4v8p+vWBShzK1ULrq0xXVfka8/Rtm5hz7minP/EIE1k3XF/As+m55J+OuF7y6fOShVaRoqkN9kV3jhgYtMTdHaUx2gFwaxAanbzct270m8= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1752168574; c=relaxed/simple; bh=WMrCazWchDLAQl5gpNER6db4hCnZ+Unq2+JqAICztBw=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=SGG3JmJzWtojWPXCWS7N//hgVOtx658bpaQDwo4IWBusnmrdxtO0GPHDo+LNGqRm2zqXk+t5Zdx16Cyzbg2GQXcGxh51/dWRedYb1ZqiGaN7wNkBUXDAM5Xv/jZt8LZuY30Xj90OiDqHhw3ZP8Git8/odohCKYBcM29NOnQ1jCc= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=redhat.com; spf=pass smtp.mailfrom=redhat.com; dkim=pass (1024-bit key) header.d=redhat.com header.i=@redhat.com header.b=RebL/muY; arc=none smtp.client-ip=170.10.129.124 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=redhat.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=redhat.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=redhat.com header.i=@redhat.com header.b="RebL/muY" DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1752168572; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=lsnr9i/G5KOz/D0uLE6KP6XoTOJ1u4OANp7MilYPv0g=; b=RebL/muYjg5mb3ZLh4Usq8J5sE5Jetlx7cL9sOCe2d8sZCDS+8odbeEeUJbf7NCUSMUw3+ LziHSbsc7fXIGgEzX0+bN3/4yHDmrK6609Ta2t1zaR/L6ZyK0mo/9VZ/ftQc/KvAckYLg1 TZ4nF7TGHwSSg7QoNko+4wcu1ImjgNc= Received: from mail-qk1-f199.google.com (mail-qk1-f199.google.com [209.85.222.199]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-317-c0SrmhUsMkKmLTWwOuyTfg-1; Thu, 10 Jul 2025 13:29:31 -0400 X-MC-Unique: c0SrmhUsMkKmLTWwOuyTfg-1 X-Mimecast-MFC-AGG-ID: c0SrmhUsMkKmLTWwOuyTfg_1752168570 Received: by mail-qk1-f199.google.com with SMTP id af79cd13be357-7d097fd7b32so266660285a.2 for ; Thu, 10 Jul 2025 10:29:31 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1752168570; x=1752773370; 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=lsnr9i/G5KOz/D0uLE6KP6XoTOJ1u4OANp7MilYPv0g=; b=SUtQnIz1nGw+ztXP5d1UMW1A1I88ZKBA5jl2x4MV7DaxUjqSK4GtBCQ2rYhkNE3Rwv Z7O2h1LSNcgYddTa918gDdgQToS1GK61hYcF3dHtHv1ftT9v2rYUAJ1aTR4hhYJmEjsf fZBsv01WeJf0u95MrNr8CuJenhEX3S64LQKi8o8C0jtc8AJ7R500Rzihu82HBnYr8I5P PLl2eIBhZ86GGWllXfKjuzr9vR5mhjs2anp/bqtK4IlneStbZGFMItF+grwADY5yTVeg JFPFhihdo7x9iU3Wi/pU8dYyjkA8CmcOHmK7LJEUNb53VIzII4+jTdkbcS3xhrF+tBm6 neBg== X-Forwarded-Encrypted: i=1; AJvYcCUjV+SbAL/gSUrCZjdtAxKfJKz0UisNJJGzx7VKZsYRl6eV8yrT2W+ez7rtNlqZuUIt1BAStP6X+ylXe/o=@vger.kernel.org X-Gm-Message-State: AOJu0YwKtLAdI80wr2p/E9/FqgDeGD45S2HfNl/TnxDMWXGFvBfQPFqM vkc6rVd6DQ0vf7+JD/pr2JiQDWE2Uq8bZ0OQSi1TMMY/ajmS0tLHuP0AC2qjXJOdHNuam545R+P rLFhoE2tvjcDdRK5bTXTjZvOrvjN/P7AMOw3xbgkyaWX0wsG+e8rSu4Uu/S8TTdPhEA== X-Gm-Gg: ASbGncukiQB3IMxJE7YcB7qBR5eAUiYTp+RCjrxUYnZm/xO6OpY+Qbubq/SnFOG9RWo Mf0fVfuD+beF84Klvn1/EMz6O/fkh8WFsBsRBaAV8utWGP1/N8h7CU0zZKnEf2cAfCNcIAGEE7n g1IE5l++S9AeIP0NFY8m44bsxEKYU196AqLPRupYCqZUMC/pg7m6kkQsTR/gOypS6/mI8pqDNyS cx8E0O/wCWZdiNHcIDwvSsG7zzjtL797vwSoIxEYjfgKK7DyhctTE4JR6X3hPtuDM0gvvDBCC+Y yBGBaO3sKSZYsF4zO/i23zp5z7NYAdtVv5aMba+POJIC96iAsMcsqNjJ41xF X-Received: by 2002:a05:620a:4549:b0:7d4:114:f81d with SMTP id af79cd13be357-7dde6f4340bmr52050085a.0.1752168570292; Thu, 10 Jul 2025 10:29:30 -0700 (PDT) X-Google-Smtp-Source: AGHT+IFWiAcWeA8eOcbhpjOcMfgYGQR5D4tEEyp87OcofWurB2Y1jQqxPwOPkFMLhYwntjM7d4D0ag== X-Received: by 2002:a05:620a:4549:b0:7d4:114:f81d with SMTP id af79cd13be357-7dde6f4340bmr52045285a.0.1752168569774; Thu, 10 Jul 2025 10:29:29 -0700 (PDT) Received: from [192.168.1.3] (c-73-183-52-120.hsd1.pa.comcast.net. [73.183.52.120]) by smtp.gmail.com with ESMTPSA id af79cd13be357-7dcde806297sm117728785a.82.2025.07.10.10.29.27 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 10 Jul 2025 10:29:28 -0700 (PDT) From: Brian Masney Date: Thu, 10 Jul 2025 13:29:08 -0400 Subject: [PATCH 3/4] media: i2c: tc358746: convert from round_rate() to determine_rate() 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: quoted-printable Message-Id: <20250710-media-clk-round-rate-v1-3-a9617b061741@redhat.com> References: <20250710-media-clk-round-rate-v1-0-a9617b061741@redhat.com> In-Reply-To: <20250710-media-clk-round-rate-v1-0-a9617b061741@redhat.com> To: Tomi Valkeinen , Mauro Carvalho Chehab , Julien Massot , Maxime Ripard , Stephen Boyd Cc: linux-clk@vger.kernel.org, linux-media@vger.kernel.org, linux-kernel@vger.kernel.org, Brian Masney X-Mailer: b4 0.14.2 X-Developer-Signature: v=1; a=ed25519-sha256; t=1752168561; l=1651; i=bmasney@redhat.com; s=20250528; h=from:subject:message-id; bh=WMrCazWchDLAQl5gpNER6db4hCnZ+Unq2+JqAICztBw=; b=fYpewLIZ/V2pkgHqVX+lhdLXTPhtuLwGx/sgfiX0IaFbSuK6Kc43DNtKiLRcvVGj8/2B7/KMy Dk8bkPxiRHJDs+PiaoRWIq/LCqTUeS9OYYzMAemsjhzn9k4XGWbnRJI X-Developer-Key: i=bmasney@redhat.com; a=ed25519; pk=x20f2BQYftANnik+wvlm4HqLqAlNs/npfVcbhHPOK2U= The round_rate() clk ops is deprecated, so migrate this driver from round_rate() to determine_rate() using the Coccinelle semantic patch on the cover letter of this series. Signed-off-by: Brian Masney --- drivers/media/i2c/tc358746.c | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/drivers/media/i2c/tc358746.c b/drivers/media/i2c/tc358746.c index 143aa1359aba51c2a36e8800e7c1149698268ca1..952470767b1e4b4c6e919fc5fec= 1ab5338c52409 100644 --- a/drivers/media/i2c/tc358746.c +++ b/drivers/media/i2c/tc358746.c @@ -1226,14 +1226,16 @@ tc358746_recalc_rate(struct clk_hw *hw, unsigned lo= ng parent_rate) return tc358746->pll_rate / (prediv * postdiv); } =20 -static long tc358746_mclk_round_rate(struct clk_hw *hw, unsigned long rate, - unsigned long *parent_rate) +static int tc358746_mclk_determine_rate(struct clk_hw *hw, + struct clk_rate_request *req) { struct tc358746 *tc358746 =3D clk_hw_to_tc358746(hw); =20 - *parent_rate =3D tc358746->pll_rate; + req->best_parent_rate =3D tc358746->pll_rate; =20 - return tc358746_find_mclk_settings(tc358746, rate); + req->rate =3D tc358746_find_mclk_settings(tc358746, req->rate); + + return 0; } =20 static int tc358746_mclk_set_rate(struct clk_hw *hw, unsigned long rate, @@ -1250,7 +1252,7 @@ static const struct clk_ops tc358746_mclk_ops =3D { .enable =3D tc358746_mclk_enable, .disable =3D tc358746_mclk_disable, .recalc_rate =3D tc358746_recalc_rate, - .round_rate =3D tc358746_mclk_round_rate, + .determine_rate =3D tc358746_mclk_determine_rate, .set_rate =3D tc358746_mclk_set_rate, }; =20 --=20 2.50.0 From nobody Tue Oct 7 09:55:05 2025 Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.133.124]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 9FA3E2F19A2 for ; Thu, 10 Jul 2025 17:29:36 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=170.10.133.124 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1752168578; cv=none; b=uW+TQdEmamKwzBiGQVcoKMpQjdfMS+F8xMVPLxpSZpe0IV6hWDwIpPzNX2rEpiq6k7+ZWl9p8qM01dC2tOwcGA7Oxs4vl8OPJ+5an9rk9Alr8G4hx+wmSSTlwgUK3aEdtc+4pacIVdRa231ILlWwBYJ1o317/YoZXLFWUxwwG3g= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1752168578; c=relaxed/simple; bh=JZJ1+WJ/h3efuGneP0YgJygZeG2phhVYgmqVgPTnIt8=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=dmmYVEts+KVtICpckpGJfiUZ5QTP0CeYlKb9LS2vPcLoJtWCgpM6X4koTVYYU4Qr80c+iLU2K2g+V8Eqsk+ts+bj/S5JMqIj2j5zWLRE0+hgb1FsyFtaXDtBlM+bgnIlgrg0Rp/+5OWRBRunnXPtr6k0UUAIf5K+t70NH2hTf2Y= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=redhat.com; spf=pass smtp.mailfrom=redhat.com; dkim=pass (1024-bit key) header.d=redhat.com header.i=@redhat.com header.b=WC6WmB+/; arc=none smtp.client-ip=170.10.133.124 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=redhat.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=redhat.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=redhat.com header.i=@redhat.com header.b="WC6WmB+/" DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1752168575; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=Qe7AYsdrV/kF5/kI8EQ2lMYSEAkXKU5aMhqdhL269CA=; b=WC6WmB+/FAAl8EnkOUuRYih+5ltE4eid3FSfvcF21R1UB1DbFEIL2n/sUqQ1rTsEvRfZP4 28ppQD7/AzpSN7fZFTpmwIbLi/wMXI23Ftm+dXE09kmkA8zGU1AZl/B0xNa/nZwGz0P8st WpftOP5Oj7UXCtdxTYEaz37/6CmJHvY= Received: from mail-qk1-f198.google.com (mail-qk1-f198.google.com [209.85.222.198]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-564-cnZu7R0JN1GHUxfXMB4PGQ-1; Thu, 10 Jul 2025 13:29:33 -0400 X-MC-Unique: cnZu7R0JN1GHUxfXMB4PGQ-1 X-Mimecast-MFC-AGG-ID: cnZu7R0JN1GHUxfXMB4PGQ_1752168573 Received: by mail-qk1-f198.google.com with SMTP id af79cd13be357-7c790dc38b4so236813885a.0 for ; Thu, 10 Jul 2025 10:29:33 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1752168573; x=1752773373; 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=Qe7AYsdrV/kF5/kI8EQ2lMYSEAkXKU5aMhqdhL269CA=; b=DexVLCNqH/QMldUn2uwas7Ec73oN9szgJkBssZLV6n++4MnJacpWrac2xGNLbh13M4 who/GzeGj9YAWAyMVg/kodDsNvPOgaa9QDrLCu5ktTlvVPwd9pS4RJd7EQs7smmf4NA8 zB6xfasUVn0G13LyKOs2ehCc06WIlMH+3PU1tQE+rtcYxx/Y9ZJAmcDO43AjlU7fTRuB +ik/rrLnRxvyGClfLwRAn/rMT26sWiSB++oW65ApyCJhzeHxdAQFxW1zhdEmZq0KLvuM TW8xLnkmtIBTflHBdBD0Z46IS2hDg4scDlUhqCzaGm3D5D/aHGKmP9f/8yZSqx+e1LkW 0dHQ== X-Forwarded-Encrypted: i=1; AJvYcCX/F2srWRuZQQWS4dHW+VY+RRvsskVt3rV3UQ2w+MBQVC2g0A6FQHDjZRpoHHBmFaAlieUkiZsZvFhqzjE=@vger.kernel.org X-Gm-Message-State: AOJu0Yx+kE7A07yK54Tp3C1Jg0QcPpwrkPoPqK3oTE2wKopFaeDuKjnE gMbkqEZVm+fW9nlPkcbKObO1j+Llgre/I0CYcTWMj2g5rIHeCK2fraC+GAvJ5+lRnN0kOqh1yv6 FAp7LgJH6JFJv/qvrZssL39dfabSN6bKd8hy6y5X6Q48+udHCO20cWS3KQu95Lro//g== X-Gm-Gg: ASbGncuoAiGWXOYaunOgeLlnx114rTgUZUq07ZA5Vb//l0dVQVnTCExoRjd+F/Fkv+7 YsvEmGC2uz99kvPt2SOOXiUZdWyJCcMaqFxjqxZrC/R+SX4osKsjic3gUzqPLKTsHUfE0OtWAFs A6QU8cuou5rfCwQb86BYTSNluq/kFH0T/wlPPdNl11ruS/VAwzi6OU70y8lu+96v7NWBeqfI5D0 38ORZQSLtlyVBF8+O/CK1rtJfXCT/z+oqZ6zVSZPvObnihz5+smYQdsxMDivbA7ORZ6zcvmff7v 0TihM/CGXDG+zOWAIvIzTV08ZibeGqST6PN55k6DxciUu1aVyeBhoQNXrHyX X-Received: by 2002:a05:620a:d86:b0:7d3:a7d9:1120 with SMTP id af79cd13be357-7dc99b9fb23mr599761185a.24.1752168572944; Thu, 10 Jul 2025 10:29:32 -0700 (PDT) X-Google-Smtp-Source: AGHT+IEhRh9pfM/NitNwmW4n5qnDy+EKx3DFE0OvpWeLo2yStURg5EFVw7RwMJth9qEJz3UaelbN5g== X-Received: by 2002:a05:620a:d86:b0:7d3:a7d9:1120 with SMTP id af79cd13be357-7dc99b9fb23mr599756485a.24.1752168572453; Thu, 10 Jul 2025 10:29:32 -0700 (PDT) Received: from [192.168.1.3] (c-73-183-52-120.hsd1.pa.comcast.net. [73.183.52.120]) by smtp.gmail.com with ESMTPSA id af79cd13be357-7dcde806297sm117728785a.82.2025.07.10.10.29.29 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 10 Jul 2025 10:29:30 -0700 (PDT) From: Brian Masney Date: Thu, 10 Jul 2025 13:29:09 -0400 Subject: [PATCH 4/4] media: platform: ti: omap3isp: isp: convert from round_rate() to determine_rate() 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: quoted-printable Message-Id: <20250710-media-clk-round-rate-v1-4-a9617b061741@redhat.com> References: <20250710-media-clk-round-rate-v1-0-a9617b061741@redhat.com> In-Reply-To: <20250710-media-clk-round-rate-v1-0-a9617b061741@redhat.com> To: Tomi Valkeinen , Mauro Carvalho Chehab , Julien Massot , Maxime Ripard , Stephen Boyd Cc: linux-clk@vger.kernel.org, linux-media@vger.kernel.org, linux-kernel@vger.kernel.org, Brian Masney X-Mailer: b4 0.14.2 X-Developer-Signature: v=1; a=ed25519-sha256; t=1752168561; l=1494; i=bmasney@redhat.com; s=20250528; h=from:subject:message-id; bh=JZJ1+WJ/h3efuGneP0YgJygZeG2phhVYgmqVgPTnIt8=; b=IyVbdUFtcuct3Se/7hbBiD4hUtLpQsL7G6BJmAUM3J6DE+u8YyGb5VRphLQ8BCsaYSemq5qGd lLPMEca2SwAD8r0Y8bX6CpLtJ7cKtgGRRz1mRHT2x9a4Z7brFi7V1+5 X-Developer-Key: i=bmasney@redhat.com; a=ed25519; pk=x20f2BQYftANnik+wvlm4HqLqAlNs/npfVcbhHPOK2U= The round_rate() clk ops is deprecated, so migrate this driver from round_rate() to determine_rate() using the Coccinelle semantic patch on the cover letter of this series. Signed-off-by: Brian Masney --- drivers/media/platform/ti/omap3isp/isp.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/drivers/media/platform/ti/omap3isp/isp.c b/drivers/media/platf= orm/ti/omap3isp/isp.c index f51cf6119e978a3a33939bd83c2e676a43ca2c6d..8ac2bdcdf87b1fa0ad1b064cbeb= 7f1e7519973fd 100644 --- a/drivers/media/platform/ti/omap3isp/isp.c +++ b/drivers/media/platform/ti/omap3isp/isp.c @@ -240,11 +240,11 @@ static u32 isp_xclk_calc_divider(unsigned long *rate,= unsigned long parent_rate) return divider; } =20 -static long isp_xclk_round_rate(struct clk_hw *hw, unsigned long rate, - unsigned long *parent_rate) +static int isp_xclk_determine_rate(struct clk_hw *hw, + struct clk_rate_request *req) { - isp_xclk_calc_divider(&rate, *parent_rate); - return rate; + isp_xclk_calc_divider(&req->rate, req->best_parent_rate); + return 0; } =20 static int isp_xclk_set_rate(struct clk_hw *hw, unsigned long rate, @@ -275,7 +275,7 @@ static const struct clk_ops isp_xclk_ops =3D { .enable =3D isp_xclk_enable, .disable =3D isp_xclk_disable, .recalc_rate =3D isp_xclk_recalc_rate, - .round_rate =3D isp_xclk_round_rate, + .determine_rate =3D isp_xclk_determine_rate, .set_rate =3D isp_xclk_set_rate, }; =20 --=20 2.50.0