Received: by 2002:a05:6358:11c7:b0:104:8066:f915 with SMTP id i7csp4810210rwl; Mon, 3 Apr 2023 09:53:41 -0700 (PDT) X-Google-Smtp-Source: AKy350aFTEj+7wGsgXdgVGBHHcTqvlX22vWwKcJG8cQo8ualgOrI3IAg0a6g/THbLc1a7KLlruu8 X-Received: by 2002:a62:5543:0:b0:625:a012:a59c with SMTP id j64-20020a625543000000b00625a012a59cmr37510638pfb.9.1680540821383; Mon, 03 Apr 2023 09:53:41 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1680540821; cv=none; d=google.com; s=arc-20160816; b=bGLsHsKP76invxhLHx6R6Q87DvuXQlTOw/G95UhVC8+aa9BKSoSQAFmvAPJRNo/wsH s2qNNowCXF7w2yxZCr2TEsAu9ugIwJQsaLITchemJ/QQROpsPjgi4lx0owpLzNa09s48 ihlCDczSF00Kqgw9WKzz25x0KltsnA+5Nv8m6fhEN9d7OZBwhL5cJccni2ezBc/TDOep H6a4AuOPANLLlIMzF4DyQt79gp65lulFtC8/OJqZEMu3l/x/IBRyCwTAM3yVt6znSHhI FM2udZ+n5h1T2KVm+JyJxTyfDAtSkb+2204gxUv+sFqaK3pRKjZxwiOIL0dAob2aRSi9 fTJw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:cc:to:subject :message-id:date:from:in-reply-to:references:mime-version :dkim-signature; bh=EB93KWFVVHsYJcPW2q+9qcCyR1A0d86Bqvk6dO/EHSI=; b=Y4EL284zwzQrX6OEtQvOWOuKlvOYnbDM2ModhCoEVoAQsiekwBIiikraXG8jT5s3X3 EeshEvlOzVouFjlvOoSXNThCNXn9F30SVhw87Omi49HhicNNeOZo+PlkD/KR1Paf9MLt Zqothw3yR4FVrJvChvY+YAQng+xcjR6MZ+vODaf36JVEu8w3nLimre6FPGL/HGCqFc0/ ExDRqK+09I8143y+3T/n2KB7OQR/p5WIa5oqhkR+7wtYjzA/zqsEcL2ndcLmXP4K03eK jPIu6g8AQdmup3HCc+RXDqox5QKZ3K+0exGBcTp//8eRg7CxLaOHeLRcMj/Qk5diB/V4 CVgA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=ahWI5wtU; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id m11-20020a634c4b000000b00502efeb73e1si7953142pgl.717.2023.04.03.09.53.29; Mon, 03 Apr 2023 09:53:41 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=ahWI5wtU; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232654AbjDCQgt (ORCPT + 99 others); Mon, 3 Apr 2023 12:36:49 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:45492 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232636AbjDCQgr (ORCPT ); Mon, 3 Apr 2023 12:36:47 -0400 Received: from dfw.source.kernel.org (dfw.source.kernel.org [139.178.84.217]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 25404A8; Mon, 3 Apr 2023 09:36:47 -0700 (PDT) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by dfw.source.kernel.org (Postfix) with ESMTPS id B4537621B3; Mon, 3 Apr 2023 16:36:46 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 1C22EC433AA; Mon, 3 Apr 2023 16:36:46 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1680539806; bh=Kt9moSViwJx5yBWxvRA4G9k3CxuCk+dcQWzL3AwN3FE=; h=References:In-Reply-To:From:Date:Subject:To:Cc:From; b=ahWI5wtUMMDF/JK6RX094BK6NZ4T3EfR3FIlVMMZneVIfsnYjpL09ROA1rQ6N5jfQ sRX9euqVfFzODLoLQso+AiLu0FoMjhWvYGA5C7Cdd/+NzJiHkqmP5bCMRxQPmEli69 URsh71mUZUFo3QSt1BlR6mhlS4XBNMQXcRgbncFMGYq8HoteBav1rRoR3IrUzF67dp Vs/ZGSfMozsTso9jBogHMNAOICUDN1o7lp1uSHkGCUmL7mxK1k7BW5g/kCsM1bVBFr 8dtlBK8VMT8B6Om9g1PGZ+jeQxgi5TI2dbmkKnwTP3tQ7/cI3ydNFRXEp4NS7lXPPF Is0zZPWMKCb/w== Received: by mail-lj1-f178.google.com with SMTP id q14so30980687ljm.11; Mon, 03 Apr 2023 09:36:46 -0700 (PDT) X-Gm-Message-State: AAQBX9cZpC4XjtY615PUfQ1OpDslpy9yGhXJJ1jtiHjrAxbnaJ3DB+iX mvA2+9DTvPUxYJw2RgFzsIcedoRhpspXdEcKZQ== X-Received: by 2002:a2e:9dda:0:b0:2a6:199a:bd38 with SMTP id x26-20020a2e9dda000000b002a6199abd38mr30959ljj.10.1680539804050; Mon, 03 Apr 2023 09:36:44 -0700 (PDT) MIME-Version: 1.0 References: <20230403071929.360911-1-jstephan@baylibre.com> <20230403071929.360911-3-jstephan@baylibre.com> In-Reply-To: <20230403071929.360911-3-jstephan@baylibre.com> From: Chun-Kuang Hu Date: Tue, 4 Apr 2023 00:36:32 +0800 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: [PATCH 2/2] phy: mtk-mipi-csi: add driver for CSI phy To: Julien Stephan Cc: Phi-bang Nguyen , Louis Kuo , Chunfeng Yun , Andy Hsieh , Vinod Koul , Kishon Vijay Abraham I , Rob Herring , Krzysztof Kozlowski , Chun-Kuang Hu , Philipp Zabel , Matthias Brugger , AngeloGioacchino Del Regno , "moderated list:ARM/Mediatek USB3 PHY DRIVER" , "moderated list:ARM/Mediatek USB3 PHY DRIVER" , "open list:GENERIC PHY FRAMEWORK" , "open list:OPEN FIRMWARE AND FLATTENED DEVICE TREE BINDINGS" , open list , "open list:DRM DRIVERS FOR MEDIATEK" Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Spam-Status: No, score=-5.2 required=5.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_HI,SPF_HELO_NONE, SPF_PASS autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi, Julien: Julien Stephan =E6=96=BC 2023=E5=B9=B44=E6=9C=883= =E6=97=A5 =E9=80=B1=E4=B8=80 =E4=B8=8B=E5=8D=883:20=E5=AF=AB=E9=81=93=EF=BC= =9A > > From: Phi-bang Nguyen > > This is a new driver that supports the MIPI CSI CD-PHY for mediatek > mt8365 soc > > Signed-off-by: Louis Kuo > Signed-off-by: Phi-bang Nguyen > [Julien Stephan: use regmap] > [Julien Stephan: use GENMASK] > Co-developed-by: Julien Stephan > Signed-off-by: Julien Stephan > --- > .../bindings/phy/mediatek,csi-phy.yaml | 9 +- > MAINTAINERS | 1 + > drivers/phy/mediatek/Kconfig | 8 + > drivers/phy/mediatek/Makefile | 2 + > .../phy/mediatek/phy-mtk-mipi-csi-rx-reg.h | 435 ++++++++++++++++++ > drivers/phy/mediatek/phy-mtk-mipi-csi.c | 392 ++++++++++++++++ > 6 files changed, 845 insertions(+), 2 deletions(-) > create mode 100644 drivers/phy/mediatek/phy-mtk-mipi-csi-rx-reg.h > create mode 100644 drivers/phy/mediatek/phy-mtk-mipi-csi.c > [snip] > + > +#define REGMAP_BIT(map, reg, field, val) \ > + regmap_update_bits((map), reg, reg##_##field##_MASK, \ > + (val) << reg##_##field##_SHIFT) > + Use FIELD_PREP() macro so you can drop the definition of SHIFT symbol. Regards, Chun-Kuang.