From patchwork Fri Dec 20 10:49:36 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Laurentiu Palcu X-Patchwork-Id: 13916539 Received: from EUR05-AM6-obe.outbound.protection.outlook.com (mail-am6eur05on2065.outbound.protection.outlook.com [40.107.22.65]) (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 143791BD9C1; Fri, 20 Dec 2024 10:49:54 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=fail smtp.client-ip=40.107.22.65 ARC-Seal: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1734691797; cv=fail; b=ieJOmPdEb3o71FnmWqo3lUazhyU7HSSF2bJV5KnnNVmwhn6h3Is1lEEm2E8xJf1rLWtKHxK8qlx8KEFxUJ1tZOsJHgH3tuYtFcHlCLfcU5+kQ+zpPOoPoGSwoTqlSmkuRqHe+v+oyr/XUMVy19Gl05/jO2Xm6PfFamVeVZmT8eA= ARC-Message-Signature: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1734691797; c=relaxed/simple; bh=VlwGoiZRi/nYzrOA6EkTEUjSpkDOHYZgaTA33UUeVXA=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: Content-Type:MIME-Version; b=Uum+QsRYnBQJa/uk/1qw//vKrbIKkoO8i985niyu5ZKWUh4puHrSM4hpHnilr+ZAWShly8pptP6D0uDys+iJ3vToWv543ahXEIiThFhOQwqggH2JNXBKJ1M/Oj1itWmXEk3Nr9rQdGiTCV0plLk6UHffJ1eY1c+zr2CBYUlf7yw= ARC-Authentication-Results: i=2; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=oss.nxp.com; spf=pass smtp.mailfrom=oss.nxp.com; dkim=pass (2048-bit key) header.d=NXP1.onmicrosoft.com header.i=@NXP1.onmicrosoft.com header.b=A/L8MMCs; arc=fail smtp.client-ip=40.107.22.65 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=oss.nxp.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=oss.nxp.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=NXP1.onmicrosoft.com header.i=@NXP1.onmicrosoft.com header.b="A/L8MMCs" ARC-Seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=QSVkT/Uehfb2oesNcWeYwN/ua8QmLZZUqvvlDpONphF87gPCWqwVPll2jXLYpD2o67fV8zpvHbHY5nJnaMvSvwClTC4GVcQpGSEzv6YVZIoRZ3Up0b9CWnaqRBOVG1avG4tOw2tNfZAvJQDE/iEYk64zP0w5DsrxtZahYtBiVynhpqvodEgYxRYMEcKyZwFagdl3rCRhcDILzhdRpq/ySkpUJqTzEb8AN5P0CLiaWyb4xsUnkDmz5YDRZ64icyt+y14EgIDY/6gX/A/vJz7IojXOq7Hu2C7ZRN4n6sMV5uAQ8W+lUMKcs8q5k8UCPniBgYgNjx36y9iT0IVXD0yifA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector10001; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=UF2+mNsNZcNBmhUr8D/YvQKmNT8y3bT6PDQUhwTE+7c=; b=XskY+1Lo8WoUZz/qkHm0+7tXyL7a3T4EP8wplNp+8bBtus28mtKNT2Hljrxw7fB4GmO7hnqcBmT6PBW1pb8yBK9TtVz3SQblBwvXXFV7Td+ZGptlH+bmuOi/HjomZlTD54mTfoTznWcUomL3p5GkzGMzSr7n6bykIMDlKF5pcXU2CCqqQ8Gpyqoov1Kw9OcJNn4ERU4ktuPN4ao0g6T2gWd2t1s5liHDF6DBOErd/+TxCWa/oridKpaswebhGd2QldthnhIepXGYbk2bDwExljJvj5+BV4cR8uDACyWEcqODNY1Ds8wS0mBsJj4FJt5drMa/O9a6Wd4O697UGFSf/Q== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=oss.nxp.com; dmarc=pass action=none header.from=oss.nxp.com; dkim=pass header.d=oss.nxp.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=NXP1.onmicrosoft.com; s=selector1-NXP1-onmicrosoft-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=UF2+mNsNZcNBmhUr8D/YvQKmNT8y3bT6PDQUhwTE+7c=; b=A/L8MMCshnLKqQ9IKREUCuil4gisNIULK2mFGcEX2VV/Z+f1lF0kB7JxumTmMLUhXXH0OAu6s50Qa6x3+apKyclOvvW5h9+Wr/ddgUXcow7tRTB/wZrWMq+GpsmWX3Z7ZGwdUhTKG9VOR9NUZHPri/h2CGmObXhwY8gKbORW1PncTwX2Wxj2VNruZyaYz9LmSYL9nY2cPZoWN9KJnddWHxJVvKTpXHZG7+MbS1BIrE1Af7jDppix5OhFZ0sQbc0lfnSpl9PZJsJEytKi/HcJzUaMwWbCXueaU/ReQGju7jv4lQGOZjMlVs35GTfWnXnd+0uiw7WPUVAnclEMo2zs/A== Authentication-Results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=oss.nxp.com; Received: from AS4PR04MB9576.eurprd04.prod.outlook.com (2603:10a6:20b:4fe::12) by DB9PR04MB8300.eurprd04.prod.outlook.com (2603:10a6:10:243::22) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.8272.15; Fri, 20 Dec 2024 10:49:52 +0000 Received: from AS4PR04MB9576.eurprd04.prod.outlook.com ([fe80::9cf2:8eae:c3d1:2f30]) by AS4PR04MB9576.eurprd04.prod.outlook.com ([fe80::9cf2:8eae:c3d1:2f30%4]) with mapi id 15.20.8272.005; Fri, 20 Dec 2024 10:49:52 +0000 From: Laurentiu Palcu To: =?utf-8?q?Niklas_S=C3=B6derlund?= , Mauro Carvalho Chehab , Greg Kroah-Hartman Cc: Laurentiu Palcu , linux-kernel@vger.kernel.org, linux-media@vger.kernel.org, linux-staging@lists.linux.dev Subject: [PATCH v2 1/3] staging: media: max96712: fix typo Date: Fri, 20 Dec 2024 12:49:36 +0200 Message-Id: <20241220104939.503547-2-laurentiu.palcu@oss.nxp.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20241220104939.503547-1-laurentiu.palcu@oss.nxp.com> References: <20241220104939.503547-1-laurentiu.palcu@oss.nxp.com> X-ClientProxiedBy: AS4P190CA0055.EURP190.PROD.OUTLOOK.COM (2603:10a6:20b:656::19) To AS4PR04MB9576.eurprd04.prod.outlook.com (2603:10a6:20b:4fe::12) Precedence: bulk X-Mailing-List: linux-media@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-MS-Exchange-MessageSentRepresentingType: 1 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: AS4PR04MB9576:EE_|DB9PR04MB8300:EE_ X-MS-Office365-Filtering-Correlation-Id: 62782ec7-24ca-4deb-192e-08dd20e40868 X-MS-Exchange-SharedMailbox-RoutingAgent-Processed: True X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0;ARA:13230040|1800799024|376014|366016; X-Microsoft-Antispam-Message-Info: fOFyls31MF6/3ZIl29XA7DGO3M1NGQZYTKTrl1GiRqYuJVYTja5Hgq8ZkYMinu7wHEkcjaKIP5Akkw/kyVXmfXYALDnp04l+O0/6AjXY2UEEe/BJQIsDiYLpWeoYKg77HoDySd/sQC6wMpDz2JOosxGjbP6kBkXJrgsRd1hUy8mqqTedVP5dPIHgoNjxRZPUQhi8iO83IMNdAqa8ggWyJUB9ZX2or8xJPx+Rcq8nRk04QznQbbfFGTt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IIN2lAZu+VJqu/yBikNaHCWXr5rpXxM8V2nnwhDTEw9B1j9kgg5aYWeCM28QCidWSd5hFVbLdwobUc5G31 X-Forefront-Antispam-Report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:AS4PR04MB9576.eurprd04.prod.outlook.com;PTR:;CAT:NONE;SFS:(13230040)(1800799024)(376014)(366016);DIR:OUT;SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: 90gcCI5u/UxHavdWTRkobOb5fiUiyByEC4bXltXAWgenk7Da0PmKywuq3lP9RKZcgfstrP5vwmm3hn7uynL/IiWd29FAqj6aJ+hLXz+waQU5iU7cpJyudKs/lIbDAuECkkw+4pHSrdBpcjk5ksb6KKmmEoBLowr5C2SXsMPdOj1pUngKJGo8u4OX6kb0HHbmUmM5Zf+p1R1gTpB5KqgFqH4gSXFXDGPoe5yMSWfBE+hZWzIfszN2Pu8HRRClCQFqRoKZwnqgv/G13wkyUEU3s/bgiVpzTtMcKia1KNngCRm4kZoS/nIoVJnd2fwt5Zf06B5NNFtpPw7FKz0UHRx6USsRXKlhH9k8td0ENrgod8+6SI+W8TuX6m9kEHNxKLku//MUmsfjC16x2fM8bGJfpI0QVmg8N8DBfTkM2wYLEhoxXTAtepawn6jTAJMzOCWuw//xe3U2CCpH8Ea0O7lFO6BpkFXEfL97j0CfT8sgVw4NY7UNz0zmBtH3JBIJ+WquHLTh/nlz8WYHfrqAwZTm0VnZCRimr3707bWCYgOIYJqvgQMLwjpexGif2fkcY26RVQI3/fPWIQyUOjc4MSOS6HxmPwnKd8Y0VQKqHJgIpa7wyBznGE+vQ/O9SyBnuxAm49WN87js9JkQ2UG5iqZpcigHkLXJ7iq2b5c6zkIl1OOHO591eP65/vkwUmo62gc6FdEz7vvgySd7b88RHHxb7+5bKL2UEY87mM/5J9k3IWQEZjrP0iDqBBIanUcSBMBqkdgIrjYKvfH3MQ4jMgazqvCLrt7jlVx7JEzExbEW77X2Cjt5aEnXyJzrZXQXVmQpfNwxoOpUmz4SFgUE2/zdkIoDcvEiZAfgQYtgQC25jbXkXN7vZrnGg1d5TXUN1BrOCZyBSXm8b4JNyjSxAQz+qVlsY7k+pnRYw4CwlcCGVG0R00ZBIY8ZVBwUDLoVrRnhNHvhZdWUkFx4iv6CjllQjLgUYzy/6UtaAhQ292kdRC4OI5tAVin2jvf83TT69YtdCXy0pTUXYavx6BzmUYKnU0JFKaZWYbWlpGHMvy6CcTwSsXy8yA7UHisQ0AtS7AGHA7AhjaXoxS3LKYYTibfugYUl9j9IWT/N0VfPSJ41R6KVE1bOAN+quZHvcvKzFFR1pfh6Ug31ry4C1C2PL7qLp3SkL2Cx0pAtxTq0MJvmMzQM7zGGNp5UBoFKPv/wHxa2U6wEjSde6UXZPIUImXtKEkMHy7nQ8dQ8QUuy6mINR/u3u3uA/szitL5runpjm3PMuSg+gdMECy9pJCRc+eDk7BMZJa9QUBrSOX2aaMzVAIPJd4X/DpECrGHrVFsBF6B11WNeY160KkLLJtTIpp6goal9HfFTVgygMx3Mk51T2T4Q3O+Pz4rydoqNxkXxTvnRZKLTrvKSs68nA/6ZxcKOCB9PtKtHQASVhBNUltmAga6QfNmG0VLHyuJEmgx9s2jlQa4ILB6+uMd8LVbdyAvN9sxUEH1WPgYFiiSNBNc5CoyZSjzvpf1lqWRb6oWY+hcxhd+25dc7mmWGUuqLDhIeHtOlcsqF8rEHqdypjYnYRklL5O3uniVJQq9ryn3ynwHXTFWugi5mGBE0lEsiYSiEaQ== X-OriginatorOrg: oss.nxp.com X-MS-Exchange-CrossTenant-Network-Message-Id: 62782ec7-24ca-4deb-192e-08dd20e40868 X-MS-Exchange-CrossTenant-AuthSource: AS4PR04MB9576.eurprd04.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 20 Dec 2024 10:49:52.3091 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 686ea1d3-bc2b-4c6f-a92c-d99c5c301635 X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: c01at+oW/BMefLOp4O1nI45dUAFGyWh7olSi37cfj3QvyVW6P02gmrSYxdHUMOe+vU2C7+BxmIk52OFjGCZLEQ== X-MS-Exchange-Transport-CrossTenantHeadersStamped: DB9PR04MB8300 Fix a typo in VS_LOW expression. Signed-off-by: Laurentiu Palcu Reviewed-by: Niklas S??derlund --- drivers/staging/media/max96712/max96712.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/staging/media/max96712/max96712.c b/drivers/staging/media/max96712/max96712.c index 0751b2e048958..5228f9ec60859 100644 --- a/drivers/staging/media/max96712/max96712.c +++ b/drivers/staging/media/max96712/max96712.c @@ -182,7 +182,7 @@ static void max96712_pattern_enable(struct max96712_priv *priv, bool enable) max96712_write_bulk_value(priv, 0x1052, 0, 3); max96712_write_bulk_value(priv, 0x1055, v_sw * h_tot, 3); max96712_write_bulk_value(priv, 0x1058, - (v_active + v_fp + + v_bp) * h_tot, 3); + (v_active + v_fp + v_bp) * h_tot, 3); max96712_write_bulk_value(priv, 0x105b, 0, 3); max96712_write_bulk_value(priv, 0x105e, h_sw, 2); max96712_write_bulk_value(priv, 0x1060, h_active + h_fp + h_bp, 2); From patchwork Fri Dec 20 10:49:37 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Laurentiu Palcu X-Patchwork-Id: 13916540 Received: from EUR05-AM6-obe.outbound.protection.outlook.com (mail-am6eur05on2065.outbound.protection.outlook.com [40.107.22.65]) (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 2630C1C54AF; Fri, 20 Dec 2024 10:49:58 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=fail smtp.client-ip=40.107.22.65 ARC-Seal: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1734691800; cv=fail; b=S5OwInSga0B4XHWqQqnNS1+a/tNsNdtm0ykBUrBI59FoQsPsgTR7eih+VwFWl7gd36vkHkUsCvzg2zBAjXT2vjbU/7CTiRv24Rmn38an4r/9SHfAjOrm2NF5B+YBr+AscbTbjBgPl+G50aY7vuevyAWPvnt+uiv9Wfuhms4XNzc= ARC-Message-Signature: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1734691800; c=relaxed/simple; bh=npSYWQh6aeYrlen/MjsmisPRK8JLzBn6Fl4/ss5f3Uo=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: Content-Type:MIME-Version; b=p9retGdFD0qazseCmMU/XTUx6J/0glNzegL7QJG5i4qnlo0kXG1XwYoDiTGE/zcp5buuJOc0/Fyg2Sxif7kzMbsHH5EphqVopCbn/ZKl20sVAnFpnkDQK4iFWrAEN4VJfDpO11SMPa97W129+PiAQ8z0VREDOvjuSTBnywI+Tcw= ARC-Authentication-Results: i=2; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=oss.nxp.com; spf=pass smtp.mailfrom=oss.nxp.com; dkim=pass (2048-bit key) header.d=NXP1.onmicrosoft.com header.i=@NXP1.onmicrosoft.com header.b=oyQDA2F0; arc=fail smtp.client-ip=40.107.22.65 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=oss.nxp.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=oss.nxp.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=NXP1.onmicrosoft.com header.i=@NXP1.onmicrosoft.com header.b="oyQDA2F0" ARC-Seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=JuTMhYvSJda/+o/FUIDTEW5Qql6+/unMQaauvidmnVMy+07hKsbyWQuM/oYHhQOhQShMyzkCsF5/glGfFYH3YMzupWHHocQ5zmJQGPEEY9Rnkj7L5rXjAQny5WGGpkrpRRqHb4KT5gnRdlpFegN6nVMiyA+KIvRXyPV07g/VFhCECVeQtMwk9t1BAvZ8V/2J/v6IW42S3MV3OoLCPJ3Wgc1XWpd75/rrL/zrTTzPWv/QaN4PQnQ15c1S/1ceejTvcEcsrFdlb04Axx3Sl209BCBs2puRA0fassAa9R+jr120SdeE1HV5Zvq4zqSgFOW7BHWyqczPB34kXV7z/EIcVQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector10001; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=GwR5AL0DYCIopmlq2/DLRV2nhNwApjwls7xQBB1Wms0=; b=WJ8jt3jMeFfSwe3oELZGTa3hAEKzd6DgGA3oEvvegedVr0foVoptN0VVthLHvWq+f6RnEUa6H+DfSK4LeniuCoS0erhyvORLq60HScWkZsfSQq1LaS77o2Kllt2QUesM3FWl+SFrUHFt2nfs9ydo3NGEF07OLqBqCA5YChnDC1HbXEDAxb/JusMGfzVpagBzHeG4z4zL4E+dA93JhCMQ+dJz9P7oc0sR+eDDVQwrQjdv043xGl7IBGzwaVZnq9XTVQldPXrJ32fBvgVjwf01CXovGp+SG27S7nhnlEY3N1CdisZtDoCsmpRDeir/dRHOXtPHtEZCV9YsoZAXIRccgA== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=oss.nxp.com; dmarc=pass action=none header.from=oss.nxp.com; dkim=pass header.d=oss.nxp.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=NXP1.onmicrosoft.com; s=selector1-NXP1-onmicrosoft-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=GwR5AL0DYCIopmlq2/DLRV2nhNwApjwls7xQBB1Wms0=; b=oyQDA2F0IQ2a6kb5/vfKJKIL5HVcRppMmw+87R9FGvVcM/+ByLpE8BX+QXEt1IS4O/n7pShbuFjOukBWuxdhpb+Qy6LkK82a0v5ew6ZT4OnJY2RnJqMNhzXgNLz6m2bSbLNRgatvJenL5SNnVfgLzVK6qxS6aBEvk5tJe2jjBW9MFkF6ukXBxT0DYezkTLsHKPtUJppNIaO+/JIXan5obz1BcUzRWnZiWF/fLQlsA4SqzDMwfbWskvC5yWqzqyqo+6eJKjgtoEnWA5eraoEQhox+rtQ+BnDK90U3VvlzkQkNcXTTLJUuuMzfzIAsTgnqh2ZsS5K8mX/H3Z90fKO2OA== Authentication-Results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=oss.nxp.com; Received: from AS4PR04MB9576.eurprd04.prod.outlook.com (2603:10a6:20b:4fe::12) by DB9PR04MB8300.eurprd04.prod.outlook.com (2603:10a6:10:243::22) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.8272.15; Fri, 20 Dec 2024 10:49:56 +0000 Received: from AS4PR04MB9576.eurprd04.prod.outlook.com ([fe80::9cf2:8eae:c3d1:2f30]) by AS4PR04MB9576.eurprd04.prod.outlook.com ([fe80::9cf2:8eae:c3d1:2f30%4]) with mapi id 15.20.8272.005; Fri, 20 Dec 2024 10:49:56 +0000 From: Laurentiu Palcu To: =?utf-8?q?Niklas_S=C3=B6derlund?= , Mauro Carvalho Chehab , Greg Kroah-Hartman Cc: Laurentiu Palcu , linux-kernel@vger.kernel.org, linux-media@vger.kernel.org, linux-staging@lists.linux.dev Subject: [PATCH v2 2/3] staging: media: max96712: remove extra debug register flag Date: Fri, 20 Dec 2024 12:49:37 +0200 Message-Id: <20241220104939.503547-3-laurentiu.palcu@oss.nxp.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20241220104939.503547-1-laurentiu.palcu@oss.nxp.com> References: <20241220104939.503547-1-laurentiu.palcu@oss.nxp.com> X-ClientProxiedBy: AS4P189CA0022.EURP189.PROD.OUTLOOK.COM (2603:10a6:20b:5db::6) To AS4PR04MB9576.eurprd04.prod.outlook.com (2603:10a6:20b:4fe::12) Precedence: bulk X-Mailing-List: linux-media@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-MS-Exchange-MessageSentRepresentingType: 1 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: AS4PR04MB9576:EE_|DB9PR04MB8300:EE_ X-MS-Office365-Filtering-Correlation-Id: 912d5390-b74b-486e-d10a-08dd20e40a9e X-MS-Exchange-SharedMailbox-RoutingAgent-Processed: True X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0;ARA:13230040|1800799024|376014|366016; X-Microsoft-Antispam-Message-Info: hFCyaCPwoDBTNaj1kQqWSAVXXtenrK0OLLAGoA5Tmk5nE27zC5NVHxUD2f+Q81bKJh3deNZ8sT605AqAz7kaxSqAoy2/xvvBEt2o5a6MJmZf7wq4AeI74bc5BGOWACoim/9G7jleoIaGwdW7mOI2fG1oSdHvVded8FVDV0wDoEJI0a/o8YQbhQqW+WxitxJLjv6gTZ9PmB9o2fZsNA1Dk68GXdz2z4LYgJZSKZ9V5+huN5lILFvQwQ0N95+165Qa+Ryjysv4XxqmP3WrZWiEF9aXyhu/mLs2sX1XzusGIN8LLteislWCZzCNQbbmCpqD6oV+ZR6d1g8R2Ynu5SWLCyAlAVrk6Mir18jl+pL3FncIiW1GgUS5UrN3MMR4FxFJiK/O+hpE8jx8TdKqWtyQytf1ryR7KCpoUgTi2SyqH2u64ehFjDCU3BGCLwXlxWoF2yEQA2t2Cn+99jV2znMwnahw+x9uJeKrE5KVysLMXXK2TRpY86OQY2IFxmmrID1P9VpjstQRvoAmCr+2U9ROmowhVwXAjWHsQM9GgHvlvMThHWRT/xZiIRXCa5y83eF8TKqh3fjToPFGAoIrxPtyRtXEHF3Iv/TVGw0QckQtkbnEy5XGOh8YotGUO/lk9o0X/DBby86G0GzH67FrGW3mGa+25NDlvVsektNhbSSZ6pBqhYCwfG1yoi0mcp639Fgx12GQxirXqZgPRpSPE+dHgAHiGhIOUqOxdbavtzBjFzu1QhXlmJELSxbj/kj2a7DjZjXD2uq0XuSSFEvmu39dCG1M1yXJX93ngEiLE2meGKXifYjsHcgD2PeLprXdwQZ+7MDHpT4SkiaO9cUZppc8r13xBr7iWZmkjxH4TpmtEYbg99puciVAQn9bqAGOxUifP9OkiAf4CGIyj88f9d/Bv78Nvh5MumzsPQ36xpnCPsn0LYft2D7BcGDC2AsY0EH8nzYhAgn+r/AfA2LHafWpWOqbsLJed2DRXPBQPmmEUZaHOrJc/z1U494CHv9T7/Dtutk2iIcQbKeHZM4UUZfT5EIqPw6HE89gLpygIyp21vzdMhO5dWSrsNuNUYOHjxgltpkZJW7SvwUEETv0f5J1LJysQxSGR/1K/Gg0MQ5IpnSV5AT6nnEKARG6RgazG3ZLbNf62Lygcjo6Ok1vQ1GuWh3PuotD1nOaymG+QpArKXo26XsJw6kDV1PsPgrLJKtfH4ao0lFqJt/WWz2SyM3EZGmfTpkuxpQrUvuUNgMblacv6kj7f0aMUVY9x4kaXn8/e6hUE0OYLoIV3LVvByAxH20huEUyTfgd4usWOP03rbn1ZLPPVaonCUFgvw8rO4vjSd6WpCWd28vclfFNORrOwt+LZ+lJJxFd1L5i2GKhqQ6j/Gw7+Lmqnuo7KDINrdZc X-Forefront-Antispam-Report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:AS4PR04MB9576.eurprd04.prod.outlook.com;PTR:;CAT:NONE;SFS:(13230040)(1800799024)(376014)(366016);DIR:OUT;SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: V0/7GCE9rl27YCqjecDYMTym31qSvxXQEMzz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7VSqLeX5GxBPEE9FHa9NQ6xaR0LaGwRQkwEhlo81FwFa4LTiCbCTNfIcIVwkxZy8mDHrkKzJf6w+H6SRYewW06mRQpjh3pVr/CXz/9wj0pO7x3v2R3A53vSWqV5KmpMThi91jBTMzr5GZy5RH/2E2Sp1XtouY9O6sUFK8d24/SqeTEN2AfEwSN2gKEuHY6wH1tnEgRdnuka2JitD7daHwLeSUi5TqVKRuRV/DRlonPvX+9MsyIXuSmK1O4lsOsA62wiBgQujt2mOdtC+N1Y/y0BjxVOfhyAVIkEKXC8bilVqa01sb1ontIWJLp1At/aT4PI83VqQ/42UIo+lqsPqyCbbX4s6qWBEIRvEpMmGTBlurJ7PIYiyERCLqMqx5Q/llGP3dJciDf5sl69vjbBvT/H2ZDKSYxNN5WKKwnU2uSxiUo/StSwOFebGNjj0hBfJ3ENEMTgut9KSuBun5js1wFG/KzzV6eWvTisSww5D7P6KbV6EyJige6z2CoeXg== X-OriginatorOrg: oss.nxp.com X-MS-Exchange-CrossTenant-Network-Message-Id: 912d5390-b74b-486e-d10a-08dd20e40a9e X-MS-Exchange-CrossTenant-AuthSource: AS4PR04MB9576.eurprd04.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 20 Dec 2024 10:49:56.0348 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 686ea1d3-bc2b-4c6f-a92c-d99c5c301635 X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: oDvC3dM8iIZuGy8VZYYjSth6vUFAs0DhBIYSFJUWWJ7UAdsYGkqusCbewb3yCYCr8DW38qnX1Ns7kJMSVpoWbA== X-MS-Exchange-Transport-CrossTenantHeadersStamped: DB9PR04MB8300 The current implementation has the register disabled since it is not documented in the MAX96724 RM. However, in the chip's user's guide [1], in the Video Pattern Generator section, the register is documented and it appears to work just fine. Before the change I was experiencing approx 10fps when streaming, after: 30.3fps. Hence, since both max96712 and max96724 have the register, we can remove the flag. [1] https://www.analog.com/media/en/technical-documentation/user-guides/max96724fr-user-guide.pdf Signed-off-by: Laurentiu Palcu Reviewed-by: Niklas Söderlund --- v2: * addressed Niklas' comments and removed the extra debug register flag; drivers/staging/media/max96712/max96712.c | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/drivers/staging/media/max96712/max96712.c b/drivers/staging/media/max96712/max96712.c index 5228f9ec60859..ed4d5db1ff8d1 100644 --- a/drivers/staging/media/max96712/max96712.c +++ b/drivers/staging/media/max96712/max96712.c @@ -27,7 +27,6 @@ enum max96712_pattern { struct max96712_info { unsigned int dpllfreq; - bool have_debug_extra; }; struct max96712_priv { @@ -174,9 +173,7 @@ static void max96712_pattern_enable(struct max96712_priv *priv, bool enable) return; } - /* Set PCLK to 75MHz if device have DEBUG_EXTRA register. */ - if (priv->info->have_debug_extra) - max96712_write(priv, DEBUG_EXTRA_REG, DEBUG_EXTRA_PCLK_75MHZ); + max96712_write(priv, DEBUG_EXTRA_REG, DEBUG_EXTRA_PCLK_75MHZ); /* Configure Video Timing Generator for 1920x1080 @ 30 fps. */ max96712_write_bulk_value(priv, 0x1052, 0, 3); @@ -457,7 +454,6 @@ static void max96712_remove(struct i2c_client *client) static const struct max96712_info max96712_info_max96712 = { .dpllfreq = 1000, - .have_debug_extra = true, }; static const struct max96712_info max96712_info_max96724 = { From patchwork Fri Dec 20 10:49:38 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Laurentiu Palcu X-Patchwork-Id: 13916541 Received: from EUR05-DB8-obe.outbound.protection.outlook.com (mail-db8eur05on2078.outbound.protection.outlook.com [40.107.20.78]) (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 5CC351C5F2E; Fri, 20 Dec 2024 10:50:02 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=fail smtp.client-ip=40.107.20.78 ARC-Seal: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1734691804; cv=fail; b=iMoCz1kIQp6/5tXS6fIdZPCX43xGxEj/ixD+pvuxSzGxyvlwqmV/mfK8C4xPU6i8NBLaheZ1WHHjNFWkYYY+FwERaFQ1KIoM10S4+YX+rXcte9TKRrB5pCbEcb8OV5cPC1Wrf8kbBmEcZofArJHNXBPPf6LwT11ZZ1EXhVgnXdY= ARC-Message-Signature: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1734691804; c=relaxed/simple; bh=gJNRxr34lj/nGDemgtj9GVzzAux6+Chsuz9X8RyqqV0=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: Content-Type:MIME-Version; b=MCM46nkexOpyWyHlYXl9eFrDgmIYu6g+jdUZCMS3Qbg3KhDsHJ4JREyLT730Q37JYTFkXo6ab7HrVB2tINr1VYgMpVHIN6amU71MhWljs0xrXHCuQkUpSk+mLUO5S4VyPWQXQ3IP+z1300zK6xGutLNFO3KcvCZYS3Db2cvYE5E= ARC-Authentication-Results: i=2; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=oss.nxp.com; spf=pass smtp.mailfrom=oss.nxp.com; dkim=pass (2048-bit key) header.d=NXP1.onmicrosoft.com header.i=@NXP1.onmicrosoft.com header.b=CUNyso0i; arc=fail smtp.client-ip=40.107.20.78 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=oss.nxp.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=oss.nxp.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=NXP1.onmicrosoft.com header.i=@NXP1.onmicrosoft.com header.b="CUNyso0i" ARC-Seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=smSn745K0UlR1vUTAuGUe3B9mVhsn62DuEJAZQTa8B5xJwlLt8ByD2Qxofft6gcVT0bXL/vJeleYnRWcr+56YL/TEyvWZ7Q0xTc+RL+VApA1y4J9fR2vMQfUZAPVWyyPzJHh/HLzZxXZvKQbClIx9QG306stmQDLXwsxweFNgbrvN7nBt5Kz5ilE03cwfnPt42Mhig9XfNeTHSAU4WmW3LxIgbjZvcm45hFUjfHMuor/Gn4gbxgRQEesQCNYPfsmzzZLfObG+ZJgcZjwmVj4pEx/W+/c8xXvx1DEnNJxCURkOLnhdorWX5WwU6qQrLDZmlzOucpHrWgAhODVF+kiqw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector10001; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=WeKM5paNlS3AtZhJRzM2Xm0BisfbHKW+OQibQAjyDHw=; b=cYKq1Bdly564hpo+eCMG3/j71IXuIFUezNPIBFfuV1Expjpf+PgNPLEmCeOQWXFDTZziFc01B7IJNGhhq8NGnU9uLLHH+SmSVQLybLTUlpAKJGhc9EzuHktYb+baVShm2W5pJeb4XyjytRBlQE4RLHyBridlWV3iKqHM5h7l12Y3xhhDKfKqdJnaQASH9zhQb7FwlAnUJQ/78ERhLMnXYWBSxzftEkXDh+xibMl2KLuXdBn0uEiCiGJMnBpLHCrGgh8EPd4kQwyKGEN2vkfXr8ehWJikaYS/fCJ4mm/USzfX4YtFXY0J7nQdqyPKNX82Cf9ENTxpoOFq8Mv85vqWDw== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=oss.nxp.com; dmarc=pass action=none header.from=oss.nxp.com; dkim=pass header.d=oss.nxp.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=NXP1.onmicrosoft.com; s=selector1-NXP1-onmicrosoft-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=WeKM5paNlS3AtZhJRzM2Xm0BisfbHKW+OQibQAjyDHw=; b=CUNyso0iRbCwiv6fIeusIqjBteD1GondVmQmwB9Mc9utV/iMj6E/Z6Rhwa6/9GM1dnitB/XG/0gBxCnBGMM9B16F+rSuiiOmYi0t2n1SOzcS7HEP4e3T7AnHmg3haMjMxjMKBsP7QvlEA5wwKJqoo4asZ54XjCVKySltFIXQwkfMGET4I25YMu095zlqztwMCLWNBkRB5k2nRJt9ZMJImHoGdWTVGU5SY+6Kk1+uCKc6dcmbqPQyJG4tEF89z4Br+GW0q8yw488PT09leooUGJMc6czlin5URJIzTHJSmV8GQFAfZ5nhefdioxSYj7vQhKe+20jNI8W9Pp+YhC14lA== Authentication-Results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=oss.nxp.com; Received: from AS4PR04MB9576.eurprd04.prod.outlook.com (2603:10a6:20b:4fe::12) by DB9PR04MB8300.eurprd04.prod.outlook.com (2603:10a6:10:243::22) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.8272.15; Fri, 20 Dec 2024 10:49:59 +0000 Received: from AS4PR04MB9576.eurprd04.prod.outlook.com ([fe80::9cf2:8eae:c3d1:2f30]) by AS4PR04MB9576.eurprd04.prod.outlook.com ([fe80::9cf2:8eae:c3d1:2f30%4]) with mapi id 15.20.8272.005; Fri, 20 Dec 2024 10:49:59 +0000 From: Laurentiu Palcu To: =?utf-8?q?Niklas_S=C3=B6derlund?= , Mauro Carvalho Chehab , Greg Kroah-Hartman Cc: Laurentiu Palcu , linux-kernel@vger.kernel.org, linux-media@vger.kernel.org, linux-staging@lists.linux.dev Subject: [PATCH v2 3/3] staging: media: max96712: add some register and field definitions Date: Fri, 20 Dec 2024 12:49:38 +0200 Message-Id: <20241220104939.503547-4-laurentiu.palcu@oss.nxp.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20241220104939.503547-1-laurentiu.palcu@oss.nxp.com> References: <20241220104939.503547-1-laurentiu.palcu@oss.nxp.com> X-ClientProxiedBy: AM0PR06CA0144.eurprd06.prod.outlook.com (2603:10a6:208:ab::49) To AS4PR04MB9576.eurprd04.prod.outlook.com (2603:10a6:20b:4fe::12) Precedence: bulk X-Mailing-List: linux-media@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-MS-Exchange-MessageSentRepresentingType: 1 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: AS4PR04MB9576:EE_|DB9PR04MB8300:EE_ X-MS-Office365-Filtering-Correlation-Id: 733aa9be-8404-489a-1095-08dd20e40cc3 X-MS-Exchange-SharedMailbox-RoutingAgent-Processed: True X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0;ARA:13230040|1800799024|376014|366016; X-Microsoft-Antispam-Message-Info: JzptdtfB2//XH3KFjhPt3ZlkCCfLcGUN48o6OSqQUPl1YPVkUFb1BCnLqEewBrNLSrKlApO96kFvcefdX1epaXhk/bvrMzsEzGDAwhSr560oT1yFU+8Fxv1dPFdcv63uuOL+Z92o+dsPxTpULVWZ/j+q4hUkgGufckp734ZiUt9VPcTp6S0EFGSX3zIX7rl3bHaaw4xC7Zuef9KrNrFBAobz7XMzCB0h8S55V3HJyqiwJjOl9v5uSHH9OKvnjDCrgNcvkb4tj0I3nun5pAiCgUxyDXYleGTuEMW1tKKhDC/g65vz0vE8N9co/cO4s5kImMVKpRFL2zyy4KfWUeYC2rlqU/LxRxRz0sHx32mrHvbHQ2rHkVsF8rqZjQ5pHt2pVOjWFUfL/1qpW6vlpBkqEaIML18tqodSAoFWEie/6awMjxYvxEKHhch6KVt7AoH5iNNZkXT9z2vl0ECGzODJcKJU9sPbEPSjBWy3faGoEHSeud2ZZJktGtfZxFNO33KFk4oo1QiGTEcpOTaWbilOidDRGSpGkh2y4CewhGzfqwpt5zqEWKDvv3kG0i7RerslDI7JcLDsZq2ijbabbCIQP3o461Nxcbt7iyb4hnwPsFz7n7dgBAG8wBwz5tqJe45bfx0pehKkoG5KCSsj0oOixoYfHaSgpCZLBrLJ4+5VVEtdayPIy9qkPvWhI6Z/o7LedKr2JGvDvlYgIJlzy5zBUmSOrpVFUFIe1JOypInd4Mxc7l19uGM3HUsMzCSgMl+pgXawFVSRHUTBK0KxB+ZvHBhmnB5lX1JgSR+aTtXB9fMI4EeiA5iEVaO7Qt1TReXXxKj/vbT6+sNCqdyI1qTFKhF8OAd5mZStyjDCEDw9D3R6dx8mZ+93fpsNlFSIM9xKoKU1KKjbdXp5S1MHm8An4dXuwVk6+Xg2TPpnAeBD3c0wi4w9npXMGgUgEckX9injaOoOBbJnZH/PnTx6WWO71mxZy11oOrhij03UjrkpO7ESfecR8LP0iubuKNtNjsJ73kNVvPn9F13NOAz0TLNnqUgGv4L5F0L0DioCGzdXhnobzK7DmegV9mXcF6C1oBcoFlaYHgJyXlyoRBgNDmnQpiTQsrkuV8ypYY/UzIFoaUfIIMdz64JoM4u/4ufXDcK/pSVZcM2kzczbOeXhUij8taoDlNj20wxKFomzQ9g3PpQr834cePk9CKkfWhYhK4ezW7ELTzoWc+uW6hsYw6FwLS2qNRPOdkpp1Z0aWsqAPWdBG5paxWJJdlfln9AFvCw6kyl5M7+3in3zgMTdR5fqzv3qTDRKF9/tcDy7+nnpol/Q0B0tgG3JVYVb9XpHnR+pFKDhsZodFJowRoApiV8cHnJQhyCZr2SB3XwSH/bEralEQ2SvL+GpHmvEzIcQf+mB X-Forefront-Antispam-Report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:AS4PR04MB9576.eurprd04.prod.outlook.com;PTR:;CAT:NONE;SFS:(13230040)(1800799024)(376014)(366016);DIR:OUT;SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: SPH5BSKyiE8hBR8E9bqJH4f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Q8YcC282rDtwFNFyMZO8/Pl19wBI2U5rbFTqcZG3OvMd9WCfEmW9huRiy8i8pg+jKTqOSFUMKbXW/Qmfj7F/hn+ME7LOVrwfNhykQo12Pc+iCrfl0iWe+6xt6s27nIt7KbDvoupDfQhVpoFTiCOoj3L2ETosUnkgnt+SYVtmW8SYSmTFoCa2r63ts3Ee7VSUddLoyFnSdeu9r7VhvO3S3ZW8UjdmJvrWF5cP4k39c7NHnqMr4LoVTnzKZ1re0Z1hTorOqEeJ0HmloRMd478xTLsfJBS9xq8rkdUOiVwnYgWrvJVah6W2FiM0JH4mQMW0YQ0BIGkbzuat3tQLRRwxMejZ/EvSjYFT359zrTMmNQKEoAgU8d9oSllhpAo1W6hIntMEwM/K+c2ANZSoAMo1/a6gm/wxMwiKxqU+JnBI/T+lJpUuKsv9ivWN6twFfMlWnnxJd5qGfgT7kbXfKshhn5iFrZWb3cyrNWvr3uIuZvpJKAxyHzf0/otIqzRC2s+hr3bmM+1ZaX3gA== X-OriginatorOrg: oss.nxp.com X-MS-Exchange-CrossTenant-Network-Message-Id: 733aa9be-8404-489a-1095-08dd20e40cc3 X-MS-Exchange-CrossTenant-AuthSource: AS4PR04MB9576.eurprd04.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 20 Dec 2024 10:49:59.7030 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 686ea1d3-bc2b-4c6f-a92c-d99c5c301635 X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: KuDQYSSMc+Ou8Ky0SjXi0McOtIhJarr0X0cltOKzAmWaJ7G7BtktEyGpmpPLRpNma2iK5RMeh01tD+6wqWWljw== X-MS-Exchange-Transport-CrossTenantHeadersStamped: DB9PR04MB8300 Most of the registers in the driver, and their values, are hard-coded which makes the code rather difficult to read and maintain. Add register and field definitions and use them to replace the hard-coded values where possible. This patch does not change the driver functionality or its structure. Signed-off-by: Laurentiu Palcu Reviewed-by: Niklas S??derlund --- drivers/staging/media/max96712/max96712.c | 207 +++++++++++++++++----- 1 file changed, 163 insertions(+), 44 deletions(-) diff --git a/drivers/staging/media/max96712/max96712.c b/drivers/staging/media/max96712/max96712.c index ed4d5db1ff8d1..47842facec125 100644 --- a/drivers/staging/media/max96712/max96712.c +++ b/drivers/staging/media/max96712/max96712.c @@ -16,9 +16,118 @@ #include #include -#define DEBUG_EXTRA_REG 0x09 -#define DEBUG_EXTRA_PCLK_25MHZ 0x00 -#define DEBUG_EXTRA_PCLK_75MHZ 0x01 +/* TOP_CTRL */ +#define MAX96712_DEBUG_EXTRA_REG 0x0009 +#define DEBUG_EXTRA_PCLK_25MHZ 0x00 +#define DEBUG_EXTRA_PCLK_75MHZ 0x01 +#define MAX96724_TOP_CTRL_PWR1 0x0013 +#define RESET_ALL BIT(6) + +/* BACKTOP0 */ +#define MAX96712_BACKTOP0_12 0x040b +#define CSI_OUT_EN BIT(1) +#define SOFT_BPP_0_MASK GENMASK(7, 3) +#define SOFT_BPP_0_SHIFT 3 +#define MAX96712_BACKTOP0_22 0x0415 +#define MAX96712_BACKTOP0_25 0x0418 +#define PHY_CSI_TX_DPLL_PREDEF_FREQ_MASK GENMASK(4, 0) +#define PHY_CSI_TX_DPLL_PREDEF_FREQ_SHIFT 0 +#define PHY_CSI_TX_DPLL_FB_FRACTION_PREDEF_EN BIT(5) +#define OVERRIDE_BPP_VC_DT_0_2 BIT(6) +#define OVERRIDE_BPP_VC_DT_1_3 BIT(7) + +/* MIPI_PHY */ +#define MAX96712_MIPI_PHY_0 0x08a0 +#define PHY_4X2 BIT(0) +#define PHY_2X4 BIT(2) +#define PHY_1X4A_22 BIT(3) +#define PHY_1X4B_22 BIT(4) +#define FORCE_CLK0_EN BIT(5) +#define FORCE_CLK3_EN BIT(6) +#define FORCE_CSI_OUT_EN BIT(7) +#define MAX96712_MIPI_PHY_2 0x08a2 +#define T_HS_TRAIL_MASK GENMASK(1, 0) +#define T_HS_TRAIL_SHIFT 0 +#define T_LPX_MASK GENMASK(3, 2) +#define T_LPX_SHIFT 2 +#define PHY_STDBY_N_MASK GENMASK(7, 4) +#define PHY_STDBY_N_SHIFT 4 +#define PHY0_EN BIT(4) +#define PHY1_EN BIT(5) +#define PHY2_EN BIT(6) +#define PHY3_EN BIT(7) +#define MAX96712_MIPI_PHY_3 0x08a3 +#define PHY0_LANE_MAP_MASK GENMASK(3, 0) +#define PHY0_LANE_MAP_SHIFT 0 +#define PHY1_LANE_MAP_MASK GENMASK(7, 4) +#define PHY1_LANE_MAP_SHIFT 4 +#define MAX96712_MIPI_PHY_5 0x08a5 +#define PHY0_POL_MAP_MASK GENMASK(2, 0) +#define PHY0_POL_MAP_SHIFT 0 +#define PHY1_POL_MAP_MASK GENMASK(5, 3) +#define PHY1_POL_MAP_SHIFT 3 +#define T_CLK_PREP_MASK GENMASK(7, 6) +#define T_CLK_PREP_SHIFT 6 +#define MAX96712_MIPI_PHY_13 0x08ad +#define T_T3_PREBEGIN_MASK GENMASK(5, 0) +#define T_T3_PREBEGIN_SHIFT 0 +#define MAX96712_MIPI_PHY_14 0x08ae +#define T_T3_PREP_MASK GENMASK(1, 0) +#define T_T3_PREP_SHIFT 0 +#define T_T3_PREP_40NS 0 +#define T_T3_PREP_55NS 1 +#define T_T3_PREP_66_7NS 2 +#define T_T3_PREP_86_7NS 3 +#define T_T3_POST_MASK GENMASK(6, 2) +#define T_T3_POST_SHIFT 2 + +/* MIPI_TX: 0 <= phy < 4 */ +#define MAX96712_MIPI_TX_10(phy) (0x090a + (phy) * 0x40) +#define CSI2_TWAKEUP_H_MASK GENMASK(2, 0) +#define CSI2_TWAKEUP_H_SHIFT 0 +#define CSI2_VCX_EN BIT(4) +#define CSI2_CPHY_EN BIT(5) +#define CSI2_LANE_CNT_MASK GENMASK(7, 6) +#define CSI2_LANE_CNT_SHIFT 6 + +/* VRX_PATGEN */ +#define MAX96712_VRX_PATGEN_0 0x1050 +#define VTG_MODE_MASK GENMASK(1, 0) +#define VTG_MODE_SHIFT 0 +#define VTG_MODE_VS_TRACKING 0 +#define VTG_MODE_VS_TRIGGER 1 +#define VTG_MODE_AUTO_REPEAT 2 +#define VTG_MODE_FREE_RUNNING 3 +#define DE_INV BIT(2) +#define HS_INV BIT(3) +#define VS_INV BIT(4) +#define GEN_DE BIT(5) +#define GEN_HS BIT(6) +#define GEN_VS BIT(7) +#define MAX96712_VRX_PATGEN_1 0x1051 +#define VS_TRIG BIT(0) +#define PATGEN_MODE_MASK GENMASK(5, 4) +#define PATGEN_MODE_SHIFT 4 +#define PATGEN_MODE_CHECKERBOARD (1 << PATGEN_MODE_SHIFT) +#define PATGEN_MODE_GRADIENT (2 << PATGEN_MODE_SHIFT) +#define GRAD_MODE BIT(7) +#define MAX96712_VRX_PATGEN_VS_DLY 0x1052 +#define MAX96712_VRX_PATGEN_VS_HIGH 0x1055 +#define MAX96712_VRX_PATGEN_VS_LOW 0x1058 +#define MAX96712_VRX_PATGEN_V2H 0x105b +#define MAX96712_VRX_PATGEN_HS_HIGH 0x105e +#define MAX96712_VRX_PATGEN_HS_LOW 0x1060 +#define MAX96712_VRX_PATGEN_HS_CNT 0x1062 +#define MAX96712_VRX_PATGEN_V2D 0x1064 +#define MAX96712_VRX_PATGEN_DE_HIGH 0x1067 +#define MAX96712_VRX_PATGEN_DE_LOW 0x1069 +#define MAX96712_VRX_PATGEN_DE_CNT 0x106b +#define MAX96712_VRX_PATGEN_GRAD_INCR 0x106d +#define MAX96712_VRX_PATGEN_CHKR_COLOR_A 0x106e +#define MAX96712_VRX_PATGEN_CHKR_COLOR_B 0x1071 +#define MAX96712_VRX_PATGEN_CHKR_RPT_A 0x1074 +#define MAX96712_VRX_PATGEN_CHKR_RPT_B 0x1075 +#define MAX96712_VRX_PATGEN_CHKR_ALT 0x1076 enum max96712_pattern { MAX96712_PATTERN_CHECKERBOARD = 0, @@ -96,18 +205,18 @@ static int max96712_write_bulk_value(struct max96712_priv *priv, static void max96712_reset(struct max96712_priv *priv) { - max96712_update_bits(priv, 0x13, 0x40, 0x40); + max96712_update_bits(priv, MAX96724_TOP_CTRL_PWR1, RESET_ALL, RESET_ALL); msleep(20); } static void max96712_mipi_enable(struct max96712_priv *priv, bool enable) { if (enable) { - max96712_update_bits(priv, 0x40b, 0x02, 0x02); - max96712_update_bits(priv, 0x8a0, 0x80, 0x80); + max96712_update_bits(priv, MAX96712_BACKTOP0_12, CSI_OUT_EN, CSI_OUT_EN); + max96712_update_bits(priv, MAX96712_MIPI_PHY_0, FORCE_CSI_OUT_EN, FORCE_CSI_OUT_EN); } else { - max96712_update_bits(priv, 0x8a0, 0x80, 0x00); - max96712_update_bits(priv, 0x40b, 0x02, 0x00); + max96712_update_bits(priv, MAX96712_MIPI_PHY_0, FORCE_CSI_OUT_EN, 0x00); + max96712_update_bits(priv, MAX96712_BACKTOP0_12, CSI_OUT_EN, 0x00); } } @@ -119,39 +228,47 @@ static void max96712_mipi_configure(struct max96712_priv *priv) max96712_mipi_enable(priv, false); /* Select 2x4 mode. */ - max96712_write(priv, 0x8a0, 0x04); + max96712_write(priv, MAX96712_MIPI_PHY_0, PHY_2X4); /* TODO: Add support for 2-lane and 1-lane configurations. */ if (priv->cphy) { - /* Configure a 3-lane C-PHY using PHY0 and PHY1. */ - max96712_write(priv, 0x94a, 0xa0); + /* Configure a 3-lane C-PHY using PHY1. */ + max96712_write(priv, MAX96712_MIPI_TX_10(1), + (2 << CSI2_LANE_CNT_SHIFT) | CSI2_CPHY_EN); /* Configure C-PHY timings. */ - max96712_write(priv, 0x8ad, 0x3f); - max96712_write(priv, 0x8ae, 0x7d); + max96712_write(priv, MAX96712_MIPI_PHY_13, 0x3f); + max96712_write(priv, MAX96712_MIPI_PHY_14, + (0x1f << T_T3_POST_SHIFT) | T_T3_PREP_55NS); } else { - /* Configure a 4-lane D-PHY using PHY0 and PHY1. */ - max96712_write(priv, 0x94a, 0xc0); + /* Configure a 4-lane D-PHY using PHY1. */ + max96712_write(priv, MAX96712_MIPI_TX_10(1), 3 << CSI2_LANE_CNT_SHIFT); } /* Configure lane mapping for PHY0 and PHY1. */ /* TODO: Add support for lane swapping. */ - max96712_write(priv, 0x8a3, 0xe4); + max96712_write(priv, MAX96712_MIPI_PHY_3, 0xe4); /* Configure lane polarity for PHY0 and PHY1. */ for (i = 0; i < priv->mipi.num_data_lanes + 1; i++) if (priv->mipi.lane_polarities[i]) phy5 |= BIT(i == 0 ? 5 : i < 3 ? i - 1 : i); - max96712_write(priv, 0x8a5, phy5); + max96712_write(priv, MAX96712_MIPI_PHY_5, phy5); /* Set link frequency for PHY0 and PHY1. */ - max96712_update_bits(priv, 0x415, 0x3f, - ((priv->info->dpllfreq / 100) & 0x1f) | BIT(5)); - max96712_update_bits(priv, 0x418, 0x3f, - ((priv->info->dpllfreq / 100) & 0x1f) | BIT(5)); + max96712_update_bits(priv, MAX96712_BACKTOP0_22, + PHY_CSI_TX_DPLL_FB_FRACTION_PREDEF_EN | + PHY_CSI_TX_DPLL_PREDEF_FREQ_MASK, + PHY_CSI_TX_DPLL_FB_FRACTION_PREDEF_EN | + ((priv->info->dpllfreq / 100) & 0x1f)); + max96712_update_bits(priv, MAX96712_BACKTOP0_25, + PHY_CSI_TX_DPLL_FB_FRACTION_PREDEF_EN | + PHY_CSI_TX_DPLL_PREDEF_FREQ_MASK, + PHY_CSI_TX_DPLL_FB_FRACTION_PREDEF_EN | + ((priv->info->dpllfreq / 100) & 0x1f)); /* Enable PHY0 and PHY1 */ - max96712_update_bits(priv, 0x8a2, 0xf0, 0x30); + max96712_update_bits(priv, MAX96712_MIPI_PHY_2, PHY_STDBY_N_MASK, PHY0_EN | PHY1_EN); } static void max96712_pattern_enable(struct max96712_priv *priv, bool enable) @@ -169,49 +286,51 @@ static void max96712_pattern_enable(struct max96712_priv *priv, bool enable) const u32 v_tot = v_active + v_fp + v_sw + v_bp; if (!enable) { - max96712_write(priv, 0x1051, 0x00); + max96712_write(priv, MAX96712_VRX_PATGEN_1, 0x00); return; } - max96712_write(priv, DEBUG_EXTRA_REG, DEBUG_EXTRA_PCLK_75MHZ); + max96712_write(priv, MAX96712_DEBUG_EXTRA_REG, DEBUG_EXTRA_PCLK_75MHZ); /* Configure Video Timing Generator for 1920x1080 @ 30 fps. */ - max96712_write_bulk_value(priv, 0x1052, 0, 3); - max96712_write_bulk_value(priv, 0x1055, v_sw * h_tot, 3); - max96712_write_bulk_value(priv, 0x1058, + max96712_write_bulk_value(priv, MAX96712_VRX_PATGEN_VS_DLY, 0, 3); + max96712_write_bulk_value(priv, MAX96712_VRX_PATGEN_VS_HIGH, v_sw * h_tot, 3); + max96712_write_bulk_value(priv, MAX96712_VRX_PATGEN_VS_LOW, (v_active + v_fp + v_bp) * h_tot, 3); - max96712_write_bulk_value(priv, 0x105b, 0, 3); - max96712_write_bulk_value(priv, 0x105e, h_sw, 2); - max96712_write_bulk_value(priv, 0x1060, h_active + h_fp + h_bp, 2); - max96712_write_bulk_value(priv, 0x1062, v_tot, 2); - max96712_write_bulk_value(priv, 0x1064, + max96712_write_bulk_value(priv, MAX96712_VRX_PATGEN_V2H, 0, 3); + max96712_write_bulk_value(priv, MAX96712_VRX_PATGEN_HS_HIGH, h_sw, 2); + max96712_write_bulk_value(priv, MAX96712_VRX_PATGEN_HS_LOW, h_active + h_fp + h_bp, 2); + max96712_write_bulk_value(priv, MAX96712_VRX_PATGEN_HS_CNT, v_tot, 2); + max96712_write_bulk_value(priv, MAX96712_VRX_PATGEN_V2D, h_tot * (v_sw + v_bp) + (h_sw + h_bp), 3); - max96712_write_bulk_value(priv, 0x1067, h_active, 2); - max96712_write_bulk_value(priv, 0x1069, h_fp + h_sw + h_bp, 2); - max96712_write_bulk_value(priv, 0x106b, v_active, 2); + max96712_write_bulk_value(priv, MAX96712_VRX_PATGEN_DE_HIGH, h_active, 2); + max96712_write_bulk_value(priv, MAX96712_VRX_PATGEN_DE_LOW, h_fp + h_sw + h_bp, 2); + max96712_write_bulk_value(priv, MAX96712_VRX_PATGEN_DE_CNT, v_active, 2); /* Generate VS, HS and DE in free-running mode. */ - max96712_write(priv, 0x1050, 0xfb); + max96712_write(priv, MAX96712_VRX_PATGEN_0, + GEN_VS | GEN_HS | GEN_DE | VS_INV | HS_INV | + (VTG_MODE_FREE_RUNNING << VTG_MODE_SHIFT)); /* Configure Video Pattern Generator. */ if (priv->pattern == MAX96712_PATTERN_CHECKERBOARD) { /* Set checkerboard pattern size. */ - max96712_write(priv, 0x1074, 0x3c); - max96712_write(priv, 0x1075, 0x3c); - max96712_write(priv, 0x1076, 0x3c); + max96712_write(priv, MAX96712_VRX_PATGEN_CHKR_RPT_A, 0x3c); + max96712_write(priv, MAX96712_VRX_PATGEN_CHKR_RPT_B, 0x3c); + max96712_write(priv, MAX96712_VRX_PATGEN_CHKR_ALT, 0x3c); /* Set checkerboard pattern colors. */ - max96712_write_bulk_value(priv, 0x106e, 0xfecc00, 3); - max96712_write_bulk_value(priv, 0x1071, 0x006aa7, 3); + max96712_write_bulk_value(priv, MAX96712_VRX_PATGEN_CHKR_COLOR_A, 0xfecc00, 3); + max96712_write_bulk_value(priv, MAX96712_VRX_PATGEN_CHKR_COLOR_B, 0x006aa7, 3); /* Generate checkerboard pattern. */ - max96712_write(priv, 0x1051, 0x10); + max96712_write(priv, MAX96712_VRX_PATGEN_1, PATGEN_MODE_CHECKERBOARD); } else { /* Set gradient increment. */ - max96712_write(priv, 0x106d, 0x10); + max96712_write(priv, MAX96712_VRX_PATGEN_GRAD_INCR, 0x10); /* Generate gradient pattern. */ - max96712_write(priv, 0x1051, 0x20); + max96712_write(priv, MAX96712_VRX_PATGEN_1, PATGEN_MODE_GRADIENT); } }