From patchwork Tue Oct 1 13:15:49 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Bryan O'Donoghue X-Patchwork-Id: 832159 Received: from mail-lj1-f171.google.com (mail-lj1-f171.google.com [209.85.208.171]) (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 D872919AD94 for ; Tue, 1 Oct 2024 13:15:56 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.208.171 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1727788558; cv=none; b=fREdoPTQ6SwwSxNR9NVvU27k/jFg5AKu5gVAyyDil2MhYBcjIA2RNNWEyVGphTh65NiG4ePKX9Uuju+/mMI4tgyEhgYBYjznxfZjm0l22DFKH57XGBGfVZGYBIBq14ISHprR1/OHQ4WH1cm6d1zeG3O+3p+v/kKcSPadvBLk2Ss= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1727788558; c=relaxed/simple; bh=vTwVvG8iZlHzHza+YS67mEwp2zyunt+kNzBDYWtFYWc=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=p8Xcnk/oJoMRD0iw3cmb/5H9VvZKvxe2Iz6WZiOhFCo3j4I/3uF8Lkd8DL1Bw2YAJznctmqfK2GmniTwsinyGwgi236fUbe6ARCzm7t3SKYzBVXJn30Pu7CJZ8QzanBwCTxCnhriLRQ9tZ7t1Xz9eYhxyDAEbpW+GM31HEnvdiA= 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=EzZJuVWq; arc=none smtp.client-ip=209.85.208.171 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 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=linaro.org header.i=@linaro.org header.b="EzZJuVWq" Received: by mail-lj1-f171.google.com with SMTP id 38308e7fff4ca-2fad100dd9fso27887781fa.3 for ; Tue, 01 Oct 2024 06:15:56 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1727788555; x=1728393355; 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=E7nKjwcfTxwC0PwN6GrPgJAgBaaTNk6QSx4URpDS/gc=; b=EzZJuVWqe4dq4DSLEYafF1RDbQ37B8sYfE6VIFtY0ohWA2rjHysQraV9dT6lhN8s2n /VnDr/bpZ1KrsfO3+zNTQ3c25wGgnoCLlOgMlzPEcIzz8SYZ16b9OPl8HZKghlq50opV rUezgJdvDF7rAlC1+qY4sIh9EuC7BW/OgM/jCasHcSbjQCvaD9OyOkZWPyoP9fIfIqxI y+s3pBOryA9Hqunvh5wt+8VuNVtPix+A5CMWCMSQrnuvKd8docvJIdJBR7x2SXH+FHWY PXruVoTERxOIINowsrmctxlMbHnxA3+nh/wCEdqyvdXu9sxgh2Biop1AnGJk4oi2+CAd k1eg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1727788555; x=1728393355; 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=E7nKjwcfTxwC0PwN6GrPgJAgBaaTNk6QSx4URpDS/gc=; b=m0Qyk9N2kMBE6NCJchs2NxYW9Nc0rvwYd35/9X8E2nHqQhDKdj8v7CxzNGOo+4W17d bq99nWRGLGtQwSwrmlGCvtqFIf4NqjDpoS+DlTF5527v/lrOCAbPqwcx59cZxTYszzjM /iiPHkkT1maBUoY4QKDHDWVkdYfbcsFbKU1UqJFDnULf1+RFlXAA06TpC41Z5RmzdgqV 7feK9E1iUnVJk71OXTfttwRBlWMpftWkV18MUrZPSFbNEG293++OrCSEvfbamjuGzv8k mlv0IMk42CcJGm8Xdi6FxsYsiga57Kt5BEu56Iymuwd78IkVZTlXDKF6klqZTm3VZnwL 0YfQ== X-Gm-Message-State: AOJu0YyRQhXm0WRxuNq3cjaQrJ+arvqxQ0Vr6qqGE2Wca/QV21V3kNWF MlQbO1ZmtNZs5nqS3zOls8YCZGzH9lje6F7+HMAp3Ixe8Sd9ZqelNDOcUKh1TNw= X-Google-Smtp-Source: AGHT+IGnYlidwKx74FpXp9lnAfLCOvamYKKTjUzv/lAopPuJt0yTpxQDXRhkk1HEkGvbsHnREX5bKg== X-Received: by 2002:a05:651c:54d:b0:2ef:2905:f36d with SMTP id 38308e7fff4ca-2f9d3e4966dmr118969421fa.16.1727788554878; Tue, 01 Oct 2024 06:15:54 -0700 (PDT) Received: from [127.0.0.1] ([176.61.106.227]) by smtp.gmail.com with ESMTPSA id 4fb4d7f45d1cf-5c88248abf5sm6170875a12.77.2024.10.01.06.15.53 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 01 Oct 2024 06:15:54 -0700 (PDT) From: Bryan O'Donoghue Date: Tue, 01 Oct 2024 14:15:49 +0100 Subject: [PATCH v2 1/4] media: ov08x40: Fix burst write sequence Precedence: bulk X-Mailing-List: linux-media@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Message-Id: <20241001-b4-master-24-11-25-ov08x40-v2-1-e478976b20c1@linaro.org> References: <20241001-b4-master-24-11-25-ov08x40-v2-0-e478976b20c1@linaro.org> In-Reply-To: <20241001-b4-master-24-11-25-ov08x40-v2-0-e478976b20c1@linaro.org> To: Sakari Ailus , Jason Chen , Mauro Carvalho Chehab , Sergey Senozhatsky , Hans Verkuil , Rob Herring , Krzysztof Kozlowski , Conor Dooley Cc: linux-media@vger.kernel.org, linux-kernel@vger.kernel.org, devicetree@vger.kernel.org, Bryan O'Donoghue , stable@vger.kernel.org X-Mailer: b4 0.15-dev-dedf8 X-Developer-Signature: v=1; a=openpgp-sha256; l=2802; i=bryan.odonoghue@linaro.org; h=from:subject:message-id; bh=vTwVvG8iZlHzHza+YS67mEwp2zyunt+kNzBDYWtFYWc=; b=owEBbQKS/ZANAwAIASJxO7Ohjcg6AcsmYgBm+/YH9ifjoLl/q8cwHxx2jKcu3VxWfPPCtvJZo /m1Al51PXiJAjMEAAEIAB0WIQTmk/sqq6Nt4Rerb7QicTuzoY3IOgUCZvv2BwAKCRAicTuzoY3I OgtSD/9f5tponllpWndL3ew/MCurWWz4cP041CVQGSjiHOQLs4LBamTk9/p9sKU4bS/o4gjHUHg agBB5f9rog4wQrb6BFR167obvnUf4XWKFTuRBVxpvi+oIBqDITmlhL0BciQPDFGH5Gy/o93WiWO hV4kdU7APdnnB1xyYwPgZWdMfUOHBcw3P3MzGzpfyck6qn0cMg8GTDTbCfBot5vuQVW80vBgtU4 FUWE5Y48bxjGayg9r8UDprRN3byOoZfT3JfCfXcv7ONWqwxJfh7dlXS9OQ2/lRBPMulFifZAU+t lzU1pBGeGFTfh6G4oN9LkI95RyvIv5Yq+uIYwKR6IzIoYJsmU0S1kDUQxf5hm4k1Tk91P4Us4f2 SbO43XBmBJm1Jq7PySQES2XrXUaokra+Y7z5X1NAzhdqpzDOCm49V8blv1s85WoOc4moMuvFJ8c x+m3JlIPyByA1RXvVKwETAlyZxqrD1Ive4nbO9EJytCFY1Onq1bfOxFcO+rLZwADw3en4SHphAO f0a5rQVhjPAN4/0Bj4cR8g+qthITvOQSmL/eySByJfbUapjMNv16pylo44ttjKndKV3Q6+7m02z 5B/cc+hfV/0kJglbUK55B5fy4e/biOlSWjfPlbHG4uyL4LtvX+FRZCIF0gnd0V5qadSIje0YsJX v8tM3xQHeUNLcXg== X-Developer-Key: i=bryan.odonoghue@linaro.org; a=openpgp; fpr=E693FB2AABA36DE117AB6FB422713BB3A18DC83A It is necessary to account for I2C quirks in the burst mode path of this driver. Not all I2C controllers can accept arbitrarily long writes and this is represented in the quirks field of the adapter structure. Prior to this patch the following error message is seen on a Qualcomm X1E80100 CRD. [ 38.773524] i2c i2c-2: adapter quirk: msg too long (addr 0x0036, size 290, write) [ 38.781454] ov08x40 2-0036: Failed regs transferred: -95 [ 38.787076] ov08x40 2-0036: ov08x40_start_streaming failed to set regs Fix the error by breaking up the write sequence into the advertised maximum write size of the quirks field if the quirks field is populated. Fixes: 8f667d202384 ("media: ov08x40: Reduce start streaming time") Cc: stable@vger.kernel.org # v6.9+ Tested-by: Bryan O'Donoghue # x1e80100-crd Signed-off-by: Bryan O'Donoghue --- drivers/media/i2c/ov08x40.c | 33 ++++++++++++++++++++++++++++----- 1 file changed, 28 insertions(+), 5 deletions(-) diff --git a/drivers/media/i2c/ov08x40.c b/drivers/media/i2c/ov08x40.c index 48df077522ad0bb2b5f64a6def8844c02af6a193..be25e45175b1322145dca428e845242d8fea2698 100644 --- a/drivers/media/i2c/ov08x40.c +++ b/drivers/media/i2c/ov08x40.c @@ -1339,15 +1339,13 @@ static int ov08x40_read_reg(struct ov08x40 *ov08x, return 0; } -static int ov08x40_burst_fill_regs(struct ov08x40 *ov08x, u16 first_reg, - u16 last_reg, u8 val) +static int __ov08x40_burst_fill_regs(struct i2c_client *client, u16 first_reg, + u16 last_reg, size_t num_regs, u8 val) { - struct i2c_client *client = v4l2_get_subdevdata(&ov08x->sd); struct i2c_msg msgs; - size_t i, num_regs; + size_t i; int ret; - num_regs = last_reg - first_reg + 1; msgs.addr = client->addr; msgs.flags = 0; msgs.len = 2 + num_regs; @@ -1373,6 +1371,31 @@ static int ov08x40_burst_fill_regs(struct ov08x40 *ov08x, u16 first_reg, return 0; } +static int ov08x40_burst_fill_regs(struct ov08x40 *ov08x, u16 first_reg, + u16 last_reg, u8 val) +{ + struct i2c_client *client = v4l2_get_subdevdata(&ov08x->sd); + size_t num_regs, num_write_regs; + int ret; + + num_regs = last_reg - first_reg + 1; + num_write_regs = num_regs; + + if (client->adapter->quirks && client->adapter->quirks->max_write_len) + num_write_regs = client->adapter->quirks->max_write_len - 2; + + while (first_reg < last_reg) { + ret = __ov08x40_burst_fill_regs(client, first_reg, last_reg, + num_write_regs, val); + if (ret) + return ret; + + first_reg += num_write_regs; + } + + return 0; +} + /* Write registers up to 4 at a time */ static int ov08x40_write_reg(struct ov08x40 *ov08x, u16 reg, u32 len, u32 __val) From patchwork Tue Oct 1 13:15:51 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Bryan O'Donoghue X-Patchwork-Id: 832158 Received: from mail-lj1-f179.google.com (mail-lj1-f179.google.com [209.85.208.179]) (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 D37371C5793 for ; Tue, 1 Oct 2024 13:16:02 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.208.179 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1727788564; cv=none; b=Mlib40Vtd3dB9psikJydJ/Lahrj3pLp2cZGbS89bOMRfp8Glkt0bGZUucezn48P58nzCAaB4kYqhqU8FPgCs6x8FkXuy/RHNfKI9MFmi/TM4xEYCt53u7QlMA/86xkWX12i6RF2kaFsOmHFjg2s41vG139Cc6g5rU+Ly+j3WYsY= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1727788564; c=relaxed/simple; bh=KuJYhS6BLwFHq2M3BsUApExs70W98G5/TG0tISRMP7Q=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=Y8M8OmMyd5leHR/dNoOwLIdRnrFelHuAG+39AZgGWsNs55fNobMyQOgbQILqxfbodoMUEgUU4Gb/UyhcmaHiCXyjDuyqWHgz+v5am7dL3+94vB1m+pb4GRCRh1DSYHUFfHNsywLJwYLY0XEedBdar+nV1GXJW4eKct8VbcIPpXI= 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=FEr/GEjE; arc=none smtp.client-ip=209.85.208.179 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 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=linaro.org header.i=@linaro.org header.b="FEr/GEjE" Received: by mail-lj1-f179.google.com with SMTP id 38308e7fff4ca-2facf48166bso22885371fa.0 for ; Tue, 01 Oct 2024 06:16:02 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1727788561; x=1728393361; 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=wDWnOefZjmiIEjMknhotah0eI13dQMdxoD4kz7zvhSU=; b=FEr/GEjEdMWP65mZYx+q4PRPbWv5eAueMd679Z3kBe4KS1MW5aPE4yOA0liMEjU3Iv /sWy5JFgXPST44bwG5hCSLq7kfdYwzeE/5hEL38l94Mx8tRMkBn3Oe5oEtfPLis8UeCh A34wf5u7IuKTMhG8KST9smHhe6A7F7WdZztENbpZjLD9Eamr7atRasIk1OZYF2hI6WCH bpyLgMo4CYU36VUWm1I+reXrJProONX17AfKPLxm0rmUcgCCptLe40CBbjV1OfWk8wZV GXuWR35pJfKGYlASAHKEJsQ9nOItLsehgld5gpiS0CoykjceGd0/eVxFJHWQ4iNXyabb lSXQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1727788561; x=1728393361; 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=wDWnOefZjmiIEjMknhotah0eI13dQMdxoD4kz7zvhSU=; b=JRCfma11RY4sYgy71tX2KojRW8pQZAmPwOeutRIg6SA7DTHNpuF+SO/wcIB4k3DZNj 3GyCVqNi1fbY0Ag+nxGPmcY0lBZYaoVieAwJelb7/11UDcwlu7A6OuzP6iu8AUSSMGYL 5fgZI3mszYfeHJ+6yMUGCyKNgS1FZy6muhVcNndqux60G4f3KsAA9qN27vqdIanBzAr2 xry7zUqU3jobGDto3O9YB2CdIJvSd1+fQTcz8vsNzYBuKQHaMu2pOuFiHJG8JcmP/pcI n3c8VNPIf24Th7zAKhcIleITQuqtlN0OxY9kSWwkyiC+XZZgVaRdWPsEYZLHNo9eu0wZ nXsQ== X-Gm-Message-State: AOJu0YwEZlCF604J2KluCoBiLsaTuLEzlYY4MH3XdPLtv28m2FrgiW92 7P7GIWOqD2mVj1YAq4Y+NMydKKl2W8oMy8i2n53gukLMSiF9i4paoPQv5otShDo= X-Google-Smtp-Source: AGHT+IG/fw6UTWNuX/m2S/JOjvVxWHJbYxhho/MAY4qRlXDPE1784ETsLkH4i6A5S/ZYtCGWLlilpQ== X-Received: by 2002:a05:6512:684:b0:539:986e:cd68 with SMTP id 2adb3069b0e04-539986ecf7amr2697367e87.60.1727788560923; Tue, 01 Oct 2024 06:16:00 -0700 (PDT) Received: from [127.0.0.1] ([176.61.106.227]) by smtp.gmail.com with ESMTPSA id 4fb4d7f45d1cf-5c88248abf5sm6170875a12.77.2024.10.01.06.15.56 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 01 Oct 2024 06:16:00 -0700 (PDT) From: Bryan O'Donoghue Date: Tue, 01 Oct 2024 14:15:51 +0100 Subject: [PATCH v2 3/4] media: ov08x40: Rename ext_clk to xvclk Precedence: bulk X-Mailing-List: linux-media@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Message-Id: <20241001-b4-master-24-11-25-ov08x40-v2-3-e478976b20c1@linaro.org> References: <20241001-b4-master-24-11-25-ov08x40-v2-0-e478976b20c1@linaro.org> In-Reply-To: <20241001-b4-master-24-11-25-ov08x40-v2-0-e478976b20c1@linaro.org> To: Sakari Ailus , Jason Chen , Mauro Carvalho Chehab , Sergey Senozhatsky , Hans Verkuil , Rob Herring , Krzysztof Kozlowski , Conor Dooley Cc: linux-media@vger.kernel.org, linux-kernel@vger.kernel.org, devicetree@vger.kernel.org, Bryan O'Donoghue X-Mailer: b4 0.15-dev-dedf8 X-Developer-Signature: v=1; a=openpgp-sha256; l=1588; i=bryan.odonoghue@linaro.org; h=from:subject:message-id; bh=KuJYhS6BLwFHq2M3BsUApExs70W98G5/TG0tISRMP7Q=; b=owEBbQKS/ZANAwAIASJxO7Ohjcg6AcsmYgBm+/YHmai8wAoApJZH2dpa4ZHi0kOROlr8nU3Oi /MdUv5CmV+JAjMEAAEIAB0WIQTmk/sqq6Nt4Rerb7QicTuzoY3IOgUCZvv2BwAKCRAicTuzoY3I OvjeD/9iyuEkpcja5ZKuhS1H0/8uvYdamUVhZAhK6XO9vrMG7B+G2bwVNB/keDeUGbLmimmvkso 1+rLtcLjherL0DBIlskWFIEs/kqZQ6lsUr2xbUyBhxqkqNWqIK2GMbcnarrOUoRXvA4KYlHDxJf HIrRoyfVPqKEi8Rcl4CnqBuwdqS8c8HdPBgidfDeM+QrNkpjrIgorQGYBESqW1PVeJeKox567dy xRo3zfT69SgeCkF3aSiyvnVuP2oQwEOBIvSgoYo+uJB6kWUA6VuJbOdiLwIlx1d1xOd5Aw4/TA1 /HXybETQ5lTzZRJI5TIl1o10or1BNC0+GnXPcKNoAulabegS01NqFAmELszNDJsvP/ALmswwnGf Z6rTmAtDqf+iaI0VAH/aZaC3EIBx95Vl1OyBG8kN6UGJ1tWI3rcIMczULQGj3MT2sp24+g7K1tf ep7Y3ASveW9+ooNwf5byqy6pDjtvMsfVzE4sFgIjmOm+94sN3w1H8k7UvCKiCGgSI/qfIGgMXAG dUUFWnM38lycNwDCHpKQ0S88xzwVT0GCQTilvxT1C0Ypqv+s9BKyCVzR8Q/am8ipiIkF/DmqNLw i1kSGlbawRqYqjtR6p99MIIuZiUr7oAVUGYnv0no9ZDB75LCUaabITz+im6luWJMpIpnRcOatde 6T3RGL8FxIpLd+g== X-Developer-Key: i=bryan.odonoghue@linaro.org; a=openpgp; fpr=E693FB2AABA36DE117AB6FB422713BB3A18DC83A The data-sheet and documentation for this part uses the name xvclk not ext_clk for the input reference clock. Rename the variables and defines in this driver to align with the data-sheet name. Signed-off-by: Bryan O'Donoghue --- drivers/media/i2c/ov08x40.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/drivers/media/i2c/ov08x40.c b/drivers/media/i2c/ov08x40.c index be25e45175b1322145dca428e845242d8fea2698..3ab8b51df157af78fcccc1aaef73aedb2ae759c9 100644 --- a/drivers/media/i2c/ov08x40.c +++ b/drivers/media/i2c/ov08x40.c @@ -1215,7 +1215,7 @@ static const char * const ov08x40_test_pattern_menu[] = { /* Configurations for supported link frequencies */ #define OV08X40_LINK_FREQ_400MHZ 400000000ULL #define OV08X40_SCLK_96MHZ 96000000ULL -#define OV08X40_EXT_CLK 19200000 +#define OV08X40_XVCLK 19200000 #define OV08X40_DATA_LANES 4 /* @@ -2081,21 +2081,21 @@ static int ov08x40_check_hwcfg(struct device *dev) struct fwnode_handle *fwnode = dev_fwnode(dev); unsigned int i, j; int ret; - u32 ext_clk; + u32 xvclk_rate; if (!fwnode) return -ENXIO; ret = fwnode_property_read_u32(dev_fwnode(dev), "clock-frequency", - &ext_clk); + &xvclk_rate); if (ret) { dev_err(dev, "can't get clock frequency"); return ret; } - if (ext_clk != OV08X40_EXT_CLK) { + if (xvclk_rate != OV08X40_XVCLK) { dev_err(dev, "external clock %d is not supported", - ext_clk); + xvclk_rate); return -EINVAL; }