Received: by 2002:a05:7412:b130:b0:e2:908c:2ebd with SMTP id az48csp2321912rdb; Mon, 20 Nov 2023 08:01:56 -0800 (PST) X-Google-Smtp-Source: AGHT+IGheBU7U2ULtDbPaZbb08XifUHHK/CtoHtxtpxpmP4lPCgZR5wlrDZuGDVHnU1hTKPbHeon X-Received: by 2002:a05:6e02:1caa:b0:35b:4b6:f861 with SMTP id x10-20020a056e021caa00b0035b04b6f861mr3769723ill.11.1700496116154; Mon, 20 Nov 2023 08:01:56 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1700496116; cv=pass; d=google.com; s=arc-20160816; b=nfhl1yDknSoKwtlM39i59SRJmWp3BDyqCQGQus/7/UYgOaEfrSG1OwWoM+EzGp1jZ4 cQQu4yV9M1kRY4tmP9LUag8l2oDhnxYe69MMrUkxezb6JKywwS9tixX8I9t90lkrhR66 fHrr5MEMK7Z3pjayv+Z2P4T5HVTmCqdF2XULdemTyfNa3kdVLMbUs48Lo41iSG8xWT3T Q0ZaR4FXNW5xOgRzHhQK9//njuPV39io7kgHmB07L3ogARtQrAcNMF5wYEtN+/zkTPF8 7yzA1KOpq1fvhla5KJc0kgt1h4RDIuuZZWd5V5jNvrcozBBI6wF3gaRALBls8dqjQg0a Scgg== 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 :content-language:accept-language:in-reply-to:references:message-id :date:thread-index:thread-topic:subject:cc:to:from:dkim-signature; bh=lLqqxy9kesD3F1c7lla8Cp0PWdGIrT7wSeq2XrVLGbs=; fh=0MHOKGli9V9jEczTGpuRhf2ss7/fi226Sl3W7TNKyJk=; b=kCKZu1ITIex+sAEbR//moX1CHDVGI9Cvu5CgZwh3mgFf24CUV8fNqEOs/KxMToXGVv QwU7bBNV+DG3EsmuGz3QJlEGHBfkbBD8eAIR/hPJautFqfUHhy9gvOBbL1oa2vGEX0Sv zTzuWgV2Ilk3HbxKFk9OU56+O47qoJQ3IxL/kjp2jBTb7FocK2+lgS5y3T6ax3IWlUMm 2XhBfD7/p/fyrEsTO88j+5ELcpnu59eFkfT0Zks3/IWVvHSUOUl9UhBTmk2Qu1UCYGpU vK7wX+n2zAyl9HHkkMgRDmsC6kiOMWlDKCtWOCZrczVUOpNcRjVvqP/YZhiCXObRvns2 WQqg== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@renesas.com header.s=selector1 header.b=UedSDped; arc=pass (i=1 spf=pass spfdomain=renesas.com dkim=pass dkdomain=renesas.com dmarc=pass fromdomain=renesas.com); 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=pass (p=NONE sp=NONE dis=NONE) header.from=renesas.com Return-Path: Received: from lipwig.vger.email (lipwig.vger.email. [23.128.96.33]) by mx.google.com with ESMTPS id bm6-20020a056e02330600b003574e29ec19si3915403ilb.8.2023.11.20.08.01.47 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 20 Nov 2023 08:01:56 -0800 (PST) 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=@renesas.com header.s=selector1 header.b=UedSDped; arc=pass (i=1 spf=pass spfdomain=renesas.com dkim=pass dkdomain=renesas.com dmarc=pass fromdomain=renesas.com); 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=pass (p=NONE sp=NONE dis=NONE) header.from=renesas.com Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by lipwig.vger.email (Postfix) with ESMTP id AC89F807753C; Mon, 20 Nov 2023 08:00:40 -0800 (PST) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.11 at lipwig.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233751AbjKTQAc (ORCPT + 99 others); Mon, 20 Nov 2023 11:00:32 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:53134 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233390AbjKTQAa (ORCPT ); Mon, 20 Nov 2023 11:00:30 -0500 Received: from JPN01-TYC-obe.outbound.protection.outlook.com (mail-tycjpn01on2108.outbound.protection.outlook.com [40.107.114.108]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id E3B56F5; Mon, 20 Nov 2023 08:00:22 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=akeU8Xgp2kDrbWScHI6RXuc2N6kbWWkg4YQX8B3pNyVi53c+b23/G4mB/P8NrQZMt8KYlAVBousSVZ3pWuJvBD+CLmdvUqnEtYZQQWzWFq572YQeLwVL44fl2zrt+gjy8KreIBu1oqZRdQrJbQsUmWgI6cbGqTd5j/Ph2GFd3SQMYXpu+ou/aIWrUMD3Tv6r14BNrOj/uVWS4UAWnRDyebqe3jB/R5FH24Lh0tTPSSw8qdFFMYYwBA5d27eT8SVQWmJrQzwwWJX6i2TVN8V47auwb4he9Kd4nqx6kLaUhui1zYj3XkFD2JR8Y3jGGBloHrmZCnJN9R7ZDnQTJ81Ngw== 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=lLqqxy9kesD3F1c7lla8Cp0PWdGIrT7wSeq2XrVLGbs=; b=iPZvbJXJ88HQLApELTK1CnGvLp5J23FxX5Zzvc88TEokIAlVsP72iQfn723Brul1zGFE4ulSr+vjJnHFTafzCef4bcHaq9eF6dm1JD1oYfjAyEYEw69r30OBbsr2/h4UI0GVijuQnvEmnrzlZ/q22SifMDz22vXU4AlXJgSQqYnOu36OtvCbh23ZhhJW4QuDqVLnrx8R3qSrqJ6Xang+t0TH/LOY+7OlKZbrk52+JgJrrhoODf6ujIpkoPZHo0vWgyvDuQ/G8h3gmTOdTLjHyBPIawggqNA8K5vzsxww2/8sLvk0VXoO35xoATcWVnfl6bbTRhtEi+/Kc1eZY/zPWQ== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=renesas.com; dmarc=pass action=none header.from=renesas.com; dkim=pass header.d=renesas.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=renesas.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=lLqqxy9kesD3F1c7lla8Cp0PWdGIrT7wSeq2XrVLGbs=; b=UedSDpedqVhzwgyBPOdTYX5obXzdf5yhn5ZSwgfMYUuph3eEmkDWDTtDu6z1C2fj7RgEFpM8d9qFQC1atKKZN9p9rFajpnuHKSugeOdLZrh4MBksW3KpL/ikzhCMO9E26CFOT/9TcUXfXWXx6Yal5CK5VLdvpER7T/4F+CI5tKo= Received: from OS3PR01MB6593.jpnprd01.prod.outlook.com (2603:1096:604:101::7) by OSZPR01MB7940.jpnprd01.prod.outlook.com (2603:1096:604:1bc::12) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7002.27; Mon, 20 Nov 2023 16:00:19 +0000 Received: from OS3PR01MB6593.jpnprd01.prod.outlook.com ([fe80::3f89:e42b:ed6a:489b]) by OS3PR01MB6593.jpnprd01.prod.outlook.com ([fe80::3f89:e42b:ed6a:489b%3]) with mapi id 15.20.7002.027; Mon, 20 Nov 2023 16:00:19 +0000 From: Min Li To: Simon Horman , Min Li CC: "richardcochran@gmail.com" , "lee@kernel.org" , "linux-kernel@vger.kernel.org" , "netdev@vger.kernel.org" Subject: RE: [PATCH net-next v4 1/1] ptp: clockmatrix: support 32-bit address space Thread-Topic: [PATCH net-next v4 1/1] ptp: clockmatrix: support 32-bit address space Thread-Index: AQHaF9X+rfqWHxkaSE65IZplIdGS4rB+vb2AgASiGZA= Date: Mon, 20 Nov 2023 16:00:18 +0000 Message-ID: References: <20231117165419.GO164483@vergenet.net> In-Reply-To: <20231117165419.GO164483@vergenet.net> Accept-Language: en-CA, en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: authentication-results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=renesas.com; x-ms-publictraffictype: Email x-ms-traffictypediagnostic: OS3PR01MB6593:EE_|OSZPR01MB7940:EE_ x-ms-office365-filtering-correlation-id: 790e0add-1f95-42cc-8480-08dbe9e1cb40 x-ms-exchange-senderadcheck: 1 x-ms-exchange-antispam-relay: 0 x-microsoft-antispam: BCL:0; x-microsoft-antispam-message-info: PmfJFeelwtKCTOKvPcY+kjn4Mk4eiUwyxiX38NuhoHlfJZlWS0W/I1vw5zI7oYU0RTZdJHvnJP8OnFP1xQ6u0mYJ/9rmGO/juhsGNoc8jpthjtv/KhgC27kKp9+dGPTjXcpktA8knzXwsZeDjuQzGxoYEy4+EZciahd7h+tIuympASgHBN2P8Q2BJ6FOiwYIEUea9JCOYfMevvuYJsZzo8+VghAKfSHfMVfv+rTS83d5sZ+QFVU/33G5+v3nUju3CGToEJUzoT+OaBY/24JkwZMU5HHzXaLFsivCKqsVTn78z3DCqRWMnZmeQR8L4qAGOI7fMkPHIX1ZMBKj2LwhfjRUS5dJf4lmm5s0xKWZ1ddmRCC/PefolQnIZYL6A1CFBBgePh1TOc2PmjXiYrDfjdtSG4y9Tb1s9oCHTP2gAlOot6OOG3R8CkruGuQOF94LjTrZkx+Xgm5tixP/Djp3K0mYwyerFJYGrHR8Ulw02pohqJ70PxMBEdHMfRMiJHPuOur61xB0UheH8Si7ofKQYxyminDvlzvJ6fqqzqlol7dD/g4ABwks5bnFIrCcvqkefLKJiKHMIOEI2PoHv2REEb6/jDaizSJ4Bj2Z1/U8dFo= x-forefront-antispam-report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:OS3PR01MB6593.jpnprd01.prod.outlook.com;PTR:;CAT:NONE;SFS:(13230031)(39860400002)(136003)(346002)(376002)(366004)(396003)(230922051799003)(1800799012)(64100799003)(186009)(451199024)(316002)(45080400002)(66556008)(64756008)(66476007)(110136005)(26005)(41300700001)(66446008)(54906003)(66946007)(76116006)(122000001)(478600001)(71200400001)(6506007)(83380400001)(55236004)(966005)(52536014)(7696005)(9686003)(55016003)(8936002)(8676002)(4326008)(2906002)(5660300002)(33656002)(38100700002)(38070700009)(86362001);DIR:OUT;SFP:1102; x-ms-exchange-antispam-messagedata-chunkcount: 1 x-ms-exchange-antispam-messagedata-0: =?us-ascii?Q?T6s3S8FgleoCz1eybOpb32jXxmSs45ggYWFpChnOuDOiH196ntzRv/+dlKBw?= =?us-ascii?Q?glza3hXxya8lRewFN2g0+9OUwei98ZwwredDQfGFduL+FSVmkOtMlKY/LBlf?= =?us-ascii?Q?iTr+UgHKqQ2AIrivjX4MA1FheExddVgE9aFeoAl3cEkvnz2cDNGC2JHnEEU2?= =?us-ascii?Q?ESLsZAegXP3jBEWy5ZXaR91tcxLdfLQuEaN9nH+6KI4/x88+REa5s06WHwEf?= =?us-ascii?Q?6XZpKiff0DpoQRoEQOiSZN4LncrCE8xTbo9xejyboAgYSTMNIMxR8at7PSfJ?= =?us-ascii?Q?RQ0iZHu5m9huZF2qo34wAhdvx0A04Ls7TcRrRjmvhwyNnWU9gsHK3a3zYfLg?= =?us-ascii?Q?7odQYWSDoGB2xLObs2yPljPlrazHEJ33FV04m0VHkQU8Dz8aLAJA1Zs3b1+m?= =?us-ascii?Q?c95ez/hc6JVD/ktClGJ/Lns2EieEkyZwbwvOR+S5JzWsArFlvq3ak9BWuiBN?= =?us-ascii?Q?Zynu7YJkuZpk9yxpstL3cCe9iZeQP/DKu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Q?4cxZ59eKb60mRi03QD8KT2/LiCHnb3ulzbEnHifKm2NpnCXOjflFQwE0qYoL?= =?us-ascii?Q?u8y116UTMRj3ZiHBReCN0+zQbeTV8b2WOMOEpGLmLqqzvOkkDoZZppTVy8i1?= =?us-ascii?Q?yZ41+fKx9pQ4FiFQfqKzJVY6hvf5+QLCiVJHqV2e9yt/C0DER8QuFdlJiTcB?= =?us-ascii?Q?2Kj+DZnyoqCUCV4PTl9Z9LX8s2BUWKDBe5VcqYxQ?= Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-OriginatorOrg: renesas.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-AuthSource: OS3PR01MB6593.jpnprd01.prod.outlook.com X-MS-Exchange-CrossTenant-Network-Message-Id: 790e0add-1f95-42cc-8480-08dbe9e1cb40 X-MS-Exchange-CrossTenant-originalarrivaltime: 20 Nov 2023 16:00:18.9652 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: 53d82571-da19-47e4-9cb4-625a166a4a2a X-MS-Exchange-CrossTenant-mailboxtype: HOSTED X-MS-Exchange-CrossTenant-userprincipalname: It/qaDtcFRAWyuadXCzo2gP3JKdUfSbo+n4AUop1R+3RA+ZQG0Fpfczq1Nxy/vkjjBk2pIqWPpGpBi0DTh4ZSg== X-MS-Exchange-Transport-CrossTenantHeadersStamped: OSZPR01MB7940 X-Spam-Status: No, score=-0.9 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI, SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=unavailable 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]); Mon, 20 Nov 2023 08:00:40 -0800 (PST) >=20 > I feel that I am missing something obvious, but I have a question which I > would like to ask by way of an example. >=20 > Both before and after this patch idtcm_read() looks like this: >=20 > static inline int idtcm_read(struct idtcm *idtcm, > u16 module, > u16 regaddr, > u8 *buf, > u16 count) { > return regmap_bulk_read(idtcm->regmap, module + regaddr, buf, > count); } >=20 > And so before this patch the above call to idtcm_read() ends up as a call= to > regmap_bulk_read: >=20 > regmap_bulk_read(idtcm->regmap, 0 + 0xa7d4, buf, count); >=20 > In particular, the 2nd argument is 0 + 0xa7d4 =3D 0xa7d4. >=20 > But after this patch the call to idtcm_read() becomes: >=20 > regmap_bulk_read(idtcm->regmap, 0x2010a7d4 + 0, buf, count); >=20 > In particular, the 2nd argument is now 0x2010a7d4 + 0 =3D 0x2010a7d4. >=20 > My question is, how does this patch take into account the change in this > value from 0xa7d4 to 0x2010a7d4? >=20 > Or to the point, does the call to regmap_bulk_read() still work with the = new > value? Hi Simon: The regmap_bulk_read side of change is handled by the following patch. Basi= cally Clockmatrix has 4 bytes of offset registers and rsmu_i2c driver used to ass= ume=20 0x2010 as part of the offset and only take the lower 2 byte offset from reg= map_bulk_read. After the change, rsmu_i2c will take the full 4 byte offset from regmap_bul= k_read https://lore.kernel.org/lkml/MW5PR03MB693295AF31ABCAF6AE52EE74A08B9@MW5PR03= MB6932.namprd03.prod.outlook.com/T/