From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 56A5AECAAD1 for ; Wed, 31 Aug 2022 08:32:41 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender:Content-Type: Content-Transfer-Encoding:List-Subscribe:List-Help:List-Post:List-Archive: List-Unsubscribe:List-Id:In-Reply-To:From:References:Cc:To:Subject: MIME-Version:Date:Message-ID:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=fL2J7tEWOD83RrRKerkyyY4FaJaFhtTGbiXs8rRve3c=; b=2XjBV4pr2nraHc X+6m+7iLq38bBbbm1O2bFBLj14NaW9/t72jo7XW0rdNcL+hGnKN7ljG+GFlgmuvYqXV+32c6E2ywp 40m0hhXXFn2ZwIe7gBAhMyb7Eixd1U+Jaj0piWLdFigu02k2fGQ1a297ozz9GCRsFd+5eU59ys5T8 H3KsFDJgiy/Y88q8Nb7l/d5gnxxKkQgbl/bWRgguLu39VI/L/JoAVH77MBq8cQTYspCaERpjoFTJO xwkqDUHWAgazBp21I59kE+a8TFcisKBMr9gNqqM4wG+J+x3zooMIuDzy+NXRAA+yvzOlQ6KwN6c8O rypW1LTOfC5T7ptMV5QQ==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1oTJ8H-004yTS-KM; Wed, 31 Aug 2022 08:31:33 +0000 Received: from madras.collabora.co.uk ([2a00:1098:0:82:1000:25:2eeb:e5ab]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1oTJ8E-004yRS-GT; Wed, 31 Aug 2022 08:31:32 +0000 Received: from [192.168.1.100] (2-237-20-237.ip236.fastwebnet.it [2.237.20.237]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits)) (No client certificate requested) (Authenticated sender: kholk11) by madras.collabora.co.uk (Postfix) with ESMTPSA id 4BACD6601A13; Wed, 31 Aug 2022 09:31:28 +0100 (BST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=collabora.com; s=mail; t=1661934688; bh=7tmwsymc7qJDSQUSPLXblO4+6Q5hPnTwu9RWsnUwg6M=; h=Date:Subject:To:Cc:References:From:In-Reply-To:From; b=S249Wi/5YyEj1EMvxVnzWOqNZyVMGPy+TSmY8b4L4QP79qmM7PTodfEYCBOX16X32 xyVZ/2sSXTejvWtMlkBezKXPnE2ZmMLMaquISgk96/86g1j39uod9uGbLaexE+2uoh CJ+GVWHmaPDu6fP4OUpPnATB0PWIT0h54Z/5yKxAhzFLTH22GBsUmSROQjSXA4UtFb wtyqED6k7Jvaj+X25fEBY/hisXotCet+zqF0OvWIVcfBoKqUxLi0OXbttEEjBj3R3x HLYnAzzIs/2vxicvFuNjVM5s9jF2HRgSeiDTRDG+TqgX5nJ5B+3q3WwNBI6QVVW5DK 4pf1c7OYtmFyw== Message-ID: <9a7abae0-e31e-6beb-74ce-96462d847a88@collabora.com> Date: Wed, 31 Aug 2022 10:31:25 +0200 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.2.0 Subject: Re: [PATCH v2 7/7] phy: phy-mtk-tphy: fix the phy type setting issue Content-Language: en-US To: Chunfeng Yun , Vinod Koul , Rob Herring Cc: Kishon Vijay Abraham I , Krzysztof Kozlowski , Matthias Brugger , linux-arm-kernel@lists.infradead.org, linux-mediatek@lists.infradead.org, linux-phy@lists.infradead.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, Krzysztof Kozlowski , Eddie Hung References: <20220829080830.5378-1-chunfeng.yun@mediatek.com> <20220829080830.5378-7-chunfeng.yun@mediatek.com> From: AngeloGioacchino Del Regno In-Reply-To: <20220829080830.5378-7-chunfeng.yun@mediatek.com> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20220831_013130_757047_BD6DDDBE X-CRM114-Status: GOOD ( 17.03 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Transfer-Encoding: 7bit Content-Type: text/plain; charset="us-ascii"; Format="flowed" Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org Il 29/08/22 10:08, Chunfeng Yun ha scritto: > The PHY type is not set if the index is non zero, prepare type > value according to the index, like as mask value. > > Signed-off-by: Chunfeng Yun I agree with this change and I'd be happy to give you my R-b tag, but this commit clearly needs to be backported, so you need a Fixes tag, or a Cc to stable. Thanks, Angelo > --- > v2: no changes > --- > drivers/phy/mediatek/phy-mtk-tphy.c | 7 ++++--- > 1 file changed, 4 insertions(+), 3 deletions(-) > > diff --git a/drivers/phy/mediatek/phy-mtk-tphy.c b/drivers/phy/mediatek/phy-mtk-tphy.c > index e0f227a0d3cc..cc10298bc70d 100644 > --- a/drivers/phy/mediatek/phy-mtk-tphy.c > +++ b/drivers/phy/mediatek/phy-mtk-tphy.c > @@ -915,7 +915,7 @@ static int phy_type_syscon_get(struct mtk_phy_instance *instance, > static int phy_type_set(struct mtk_phy_instance *instance) > { > int type; > - u32 mask; > + u32 offset; > > if (!instance->type_sw) > return 0; > @@ -938,8 +938,9 @@ static int phy_type_set(struct mtk_phy_instance *instance) > return 0; > } > > - mask = RG_PHY_SW_TYPE << (instance->type_sw_index * BITS_PER_BYTE); > - regmap_update_bits(instance->type_sw, instance->type_sw_reg, mask, type); > + offset = instance->type_sw_index * BITS_PER_BYTE; > + regmap_update_bits(instance->type_sw, instance->type_sw_reg, > + RG_PHY_SW_TYPE << offset, type << offset); > > return 0; > } > _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel