Received: by 2002:a05:7412:d8a:b0:e2:908c:2ebd with SMTP id b10csp772660rdg; Wed, 11 Oct 2023 05:18:45 -0700 (PDT) X-Google-Smtp-Source: AGHT+IGo5OzJUbT2PGsY1tj5TYSJ5t6g1yEAxBA9ijMuSWPWRp1dbPU6XapImqu9GAg6OAP1l+rb X-Received: by 2002:a17:902:9a8e:b0:1c5:d063:b70e with SMTP id w14-20020a1709029a8e00b001c5d063b70emr16336063plp.53.1697026725565; Wed, 11 Oct 2023 05:18:45 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1697026725; cv=pass; d=google.com; s=arc-20160816; b=JSCnL7DbS02/z0JLtzH/+i0bYCKUT4DtY2NdhmQSzTJ563yk11GaujICnD3Uf9qHOK JmFPaeIUvKQV3pCFNie9+4mZ0OkdF7UNNwPytoLIODdXHYOjRiKSRi/ZqLsMhstJQpie 8sUCJc0gge/CBq3SIHxEx3+o3PQKHxxzlhQhOsUKg3oqDb84b6GlLEsZSYC8Qy9witKC a0AyFFUxzJtGdm1J1069sTDiiV1HSE53e3ihsHgrGkZIhoFG2rtkis9amGJEc2/Q0muL G1BpJewUMEv7xJ6LBsWQznrBixj0Lf/Awwg2TBAUjCiPReHKjYCpESq95UxI/VBofkem 0P0w== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:mime-version:content-transfer-encoding :message-id:in-reply-to:date:references:subject:cc:to:from :dkim-signature; bh=k23ZPvJIJDUa3Fu5ZSmhQ2aoRV+Bq1qKQUb/rvrEAJ0=; fh=8VSktzcjrreTLoaEgfSzLojtxn9RMVylAglw8kecQmQ=; b=Im1Zru5vpN1kTnXiHjmOEufdobBJddvkLZCQ9EEMKhaMJDXmQGa9sFbaInKkFyQEkw EOPdZrAWF2m6lquhV7jQd0kWj4xz1PqVIAnOKqUhUKC5KlbRPyu98ElrrMVKcX7tR96s v07/TiavDQju4MH3EwxZOXzftnqSFC3SeDsf5dFMFCOxNa0SSlBPYTv7eMOaJEqvM9FO Da2MAToipauULgz4vDqQ/CpsgU3SWA7pnk+NnDbTz4jsgXMgg+xggMdRgigkhIndqsoh fjR6ewEyMNVsNIl28F0/MheepjeFLbXdtU9mRHz/LqCdPQaITCK4qgXS307W2vJrt+sk YkOg== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@lukasiewiczgov.onmicrosoft.com header.s=selector1-lukasiewiczgov-onmicrosoft-com header.b=ZA97BUHq; arc=pass (i=1 spf=pass spfdomain=piap.lukasiewicz.gov.pl dkim=pass dkdomain=piap.pl dmarc=pass fromdomain=piap.pl); spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.33 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=piap.pl Return-Path: Received: from lipwig.vger.email (lipwig.vger.email. [23.128.96.33]) by mx.google.com with ESMTPS id i11-20020a17090332cb00b001c5fc13fb2dsi4785150plr.294.2023.10.11.05.18.45 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 11 Oct 2023 05:18:45 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.33 as permitted sender) client-ip=23.128.96.33; Authentication-Results: mx.google.com; dkim=pass header.i=@lukasiewiczgov.onmicrosoft.com header.s=selector1-lukasiewiczgov-onmicrosoft-com header.b=ZA97BUHq; arc=pass (i=1 spf=pass spfdomain=piap.lukasiewicz.gov.pl dkim=pass dkdomain=piap.pl dmarc=pass fromdomain=piap.pl); spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.33 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=piap.pl Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by lipwig.vger.email (Postfix) with ESMTP id 75C4F824C4D3; Wed, 11 Oct 2023 05:18:43 -0700 (PDT) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.10 at lipwig.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1346104AbjJKMS1 (ORCPT + 99 others); Wed, 11 Oct 2023 08:18:27 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:34820 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231889AbjJKMS0 (ORCPT ); Wed, 11 Oct 2023 08:18:26 -0400 Received: from EUR05-VI1-obe.outbound.protection.outlook.com (mail-vi1eur05on2085.outbound.protection.outlook.com [40.107.21.85]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 2A20EB9; Wed, 11 Oct 2023 05:18:24 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=VNBHmXX8cRMsuzbvkDXI9KQQzESMvQN+bSHyLX66ErA8HfKLF5u3uQ1pJ5HJYGNc3rYeStzn8L/4Umwnncp6Di1WmcdJhD1MHWc4+CrTLksFU7ldhBA7TlLEZPJOXfNo+cpbxWl1xjgKB50YENJxPPoOY45UmPjE9/WHN0x+frD5NqrQ86l73QCrBDvop/AUlEjcDoaq4lqZiSyJkrNGYYs5b3azmiPuPkgbKnWbMyKzqryleWLjsW79mUgJ3z68U6FrTcsLhbWVx0NQabEKw/CNYrNQ0YKamDl4YH1fbAmkxcgLi7wt6iMk7yTJmQHQNVQDT2TWIjUalbF+1MmBnw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; 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=k23ZPvJIJDUa3Fu5ZSmhQ2aoRV+Bq1qKQUb/rvrEAJ0=; b=jEZHzZ1ocN4+TK2xy8bfoIosUo2iSoPmTaOzbN7ZVk8DoTE/UR13d6FsFWNYHphp+vUTpHp/uVMJFlyGOPWu9afrtcxOj5sh5ySYBdjwuma5HbMG6JL5ACui1oEv+KKFfFNzGsIEX1hBEOBCh7DM58ETsJxTBf0jclGumOufQu0FZgNzVS4pAwgjiI17/c6pit3xRlaTRYbIvVspExnvKmSlaHyKLpi5g/gf+3qoHTi55RZq5SLbQY2qUdOkBBxvDVUqBAq7A6SAVhDZLM6mjucSRQ41NAN6O/ft4yHCghC1BZWbjC9z2Ikfh1mNMfXfkjYBQPIA3KZqXcc+6hrlBw== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=piap.lukasiewicz.gov.pl; dmarc=pass action=none header.from=piap.pl; dkim=pass header.d=piap.pl; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=lukasiewiczgov.onmicrosoft.com; s=selector1-lukasiewiczgov-onmicrosoft-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=k23ZPvJIJDUa3Fu5ZSmhQ2aoRV+Bq1qKQUb/rvrEAJ0=; b=ZA97BUHqVMXh9XjoAsVqmDveu/XT2mjeht2wC8jBmfI0cnDbtTW+4KV5hmhNQTWm0L8XDq333Qrm2Tgq0j4TXV9HfNv6d6b0V7JdBgqjoa77pEdBcwwpO6bNGpT//YfR5UAsLohw9FzW782UvWXp2FXKoHyQgCSjA0Z9ZehD8Dg= Authentication-Results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=piap.pl; Received: from VI1P193MB0685.EURP193.PROD.OUTLOOK.COM (2603:10a6:800:155::18) by PAXP193MB1648.EURP193.PROD.OUTLOOK.COM (2603:10a6:102:15d::18) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6863.37; Wed, 11 Oct 2023 12:18:21 +0000 Received: from VI1P193MB0685.EURP193.PROD.OUTLOOK.COM ([fe80::1bd8:1a5d:e69:d1a7]) by VI1P193MB0685.EURP193.PROD.OUTLOOK.COM ([fe80::1bd8:1a5d:e69:d1a7%3]) with mapi id 15.20.6863.041; Wed, 11 Oct 2023 12:18:21 +0000 From: =?utf-8?Q?Krzysztof_Ha=C5=82asa?= To: Alexander Stein Cc: Stefan Lengfeld , linux-media , lkml , Dave Stevenson , Oleksij Rempel , Pengutronix Kernel Team , Shawn Guo , Sascha Hauer , Fabio Estevam , NXP Linux Team , linux-i2c@vger.kernel.org Subject: Re: Sony IMX290/462 image sensors I2C xfer peculiarity References: <20231011101553.we3r73xejvqdql5j@porty> <2905840.e9J7NaK4W3@steina-w> Date: Wed, 11 Oct 2023 14:18:20 +0200 In-Reply-To: <2905840.e9J7NaK4W3@steina-w> (Alexander Stein's message of "Wed, 11 Oct 2023 13:59:50 +0200") Message-ID: Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-ClientProxiedBy: WA2P291CA0016.POLP291.PROD.OUTLOOK.COM (2603:10a6:1d0:1e::12) To VI1P193MB0685.EURP193.PROD.OUTLOOK.COM (2603:10a6:800:155::18) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: VI1P193MB0685:EE_|PAXP193MB1648:EE_ X-MS-Office365-Filtering-Correlation-Id: 587d428f-14ee-4175-e62f-08dbca5428c1 X-MS-Exchange-AtpMessageProperties: SA X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: nIANatbMok8KLzKN6yZQED253ddyhpVOaSBbPcKM/yA904eN/MCmRSDUtwS7yK3FlyxG2BE92b2GcbXMFxfAjnjaRhMjCmVAwprPbOrOYvcaHd7H0FiWorfny96Zf/UU/NZECCZ2E9/yFrwL1l1ZiuAFnt27xlcXdDlen1NTf9HEzdCm0ZEpX6l1XZ6lArv4WLb+Hlf1tOMW6bVUSZjRpoeYaOwjJTSpQr3a5vYw1zcut0s7jr0OR9rgH7TL+buPIR9II5Wb5w7RSP9czV9N6jmhmPV7wjBPHTbRNTvn9Mb/95ZXY1enf2ip5DgwQpNGSd/E+pzbmQMZq9mGc+pZORFnbmIOsulg9fdt2lz4X32zhbk9aClurNmZzvH9N2OZHAObVkZPNhg1aNkaA32HK2dh5kr3towGApX8PLqWeet+Ey9NF2oNqy9XCE+NTUxDsply0l8N31s6A247JFpW1/sxdE8msqP5JNXVg/8nxA6K6/Gpwv8SiEydZW90uS0nLl3CTQbKfOH/FCyeVxLpnRxkD1XWnsEeHOjPUDeo8XfAph7t3z2ZwE8/m/yn+FCgBKg3i8YpWD5CoygMsEInWUNw3TCUti4w2TrULynpK5eIlPKGK8TBSNdCnfrkKeR6 X-Forefront-Antispam-Report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:VI1P193MB0685.EURP193.PROD.OUTLOOK.COM;PTR:;CAT:NONE;SFS:(13230031)(396003)(346002)(366004)(39860400002)(136003)(376002)(186009)(64100799003)(1800799009)(451199024)(41300700001)(478600001)(6506007)(52116002)(6512007)(83170400001)(316002)(38350700002)(38100700002)(786003)(42882007)(66556008)(2906002)(66574015)(7416002)(6486002)(8936002)(66946007)(83380400001)(26005)(4326008)(66476007)(5660300002)(8676002)(6916009)(54906003);DIR:OUT;SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?utf-8?B?R0dsYVFBUmtuNytTc1Ziblg4ZzBNWTVtL1d2MjlPR0xkMmNaVmpkRG9oSm00?= =?utf-8?B?MWoyaU56T3ErT2VSSFZyd2VlVzVjOFBIMVlZNUhOTTFsempaWWVBZmthNWRr?= =?utf-8?B?WTJiUjhZd1p5dVBBbm0wNGxPb1BONXhyZGlFQm9sSXQyeU8rdVZmeUx0ZU14?= =?utf-8?B?Y3FsekpxZkNJQUYzc21RRVV0K0RUVDFIYkM2SmxxMEJVNDBtM1FTYjBPL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YrM1RMVWt5eW9zZ2JoY2RFM29FWDJoL2xmNnNNR3ExUWVuUkdp?= =?utf-8?B?QlAzaVJ4NmFaLzdNeHZqVWUwSE92QTVaYmdMM3ZLRDBuZlhGSHB1cDZWS2cy?= =?utf-8?B?NGQ2a0ttSWFOZmRSWi93UUYzNjdaS0JrQTREOGpGQUFuWE13QXJTWHZPdVY3?= =?utf-8?Q?PsQ2rOeNa8nA3tYnLyUdz5/unSfftOwt510ic/dXIYzn?= X-OriginatorOrg: piap.pl X-MS-Exchange-CrossTenant-Network-Message-Id: 587d428f-14ee-4175-e62f-08dbca5428c1 X-MS-Exchange-CrossTenant-AuthSource: VI1P193MB0685.EURP193.PROD.OUTLOOK.COM X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 11 Oct 2023 12:18:21.3991 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 3e05b101-c6fe-47e5-82e1-c6a410bb95c0 X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: ZGvPtTqv/dYReTPQfwkyI6kyuO03m3RteM+F39BbAMBcc4FBOEkfMrkE2VA+1fR2rMNVpIle9v+dZY/1xMYCb3JlVcRZbAXjL469XmAnFMU0DXaNg866vLbVQ90zcTEwE2VRJRuBK3bjZuf1IlKCew== X-MS-Exchange-Transport-CrossTenantHeadersStamped: PAXP193MB1648 X-Spam-Status: No, score=2.8 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,RCVD_IN_SBL_CSS, SPF_HELO_NONE,SPF_PASS autolearn=no autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lipwig.vger.email Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (lipwig.vger.email [0.0.0.0]); Wed, 11 Oct 2023 05:18:43 -0700 (PDT) X-Spam-Level: ** Hi Alexander, Alexander Stein writes: > I assume that the master clock is running independently to I2C from the S= oC=20 > the sensor is attached to. Your calculations indicate you are assuming ~4= 00kHz=20 > I2C clock frequency. This is correct. > But nothing is preventing that sensor from running on a 100kHz I2C bus. E= ven=20 > this "atomic" hack will not be sufficient in that case. It will be sufficient. Even if all times are 4x longer (they shouldn't since the CPU won't get slower), they wouldn't reach, say, 1200 us. There would still be quite a lot of a margin (the timeout is 7 ms). Even with the faster MCLK (these sensors can operate on 37.125 and on 74.250 MHz) and IF the timeout is still 2^18 in the latter case (meaning 3.5 ms), it would most probably work. Of course, the atomic hack is not meant for general consumption (at least for now in its current shape), only the udelay() reduction (100 -> 1) could probably go in. --=20 Krzysztof "Chris" Ha=C5=82asa Sie=C4=87 Badawcza =C5=81ukasiewicz Przemys=C5=82owy Instytut Automatyki i Pomiar=C3=B3w PIAP Al. Jerozolimskie 202, 02-486 Warszawa