Received: by 2002:a05:6358:c692:b0:131:369:b2a3 with SMTP id fe18csp1144855rwb; Wed, 26 Jul 2023 08:12:21 -0700 (PDT) X-Google-Smtp-Source: APBJJlEdgEOxDPbKSiNjoKd0jx/KDrRESkRoyHimAuBpb+rXbpxg5eZcRpwi/LbgL1byWu5uM/8m X-Received: by 2002:a05:6512:200d:b0:4f8:66e1:14e8 with SMTP id a13-20020a056512200d00b004f866e114e8mr1799863lfb.69.1690384340800; Wed, 26 Jul 2023 08:12:20 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1690384340; cv=none; d=google.com; s=arc-20160816; b=GKfWqUQ1z0j32ged1EmDCE0bJNhi4WHQH87sT9uRrTjgqduNSb8vhNRZG2UeI1aEZB 8oMrgzQm3CLgJBISoiteQgY6smGy63M89+C6rr7cUhVW16pQtduS1WbmLVKTPQHzGghH c2ffbFFZRLdQG7s3Y5gTWIanoSiZ1U1cbybsFi/dxZB0HFA7MNmwPJ5tQeaz86k7XoLQ 9j4n1kJ/ika8MjI2J8zaHqFV2kAgBCcCDK+G+M6EfiLC3j2OwesHKrxg4yJVtlilVDbK 01liIffbJSGlOE+yxXneLoVySskMf9vPLfMlsRJiAwfPuZfS4x+Sb9yZwXW8Fy9SIBa0 md6A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature; bh=i9R4fjiHxoINa2hmd7lZWjGuOCHQrJeX5dd8DQ2gd5E=; fh=oHDq6HeANobeUeJVnZCPcL/u54La4fz1gb6fm126Zn0=; b=tBLHKWFDHj7FnV9BT9iuFWLhVgN78ARK18vZNABGADIgc+PvUlrR006lY2fOrgld0r smKAdWH37rD4yfpHdlI/eugbJ5A/hQ1GWx6C2fm8f/Vyq4ReEBFUGYATVt3KPzgxIE/X MHVxe5XGhdDfHCs4Se2PCh1MHmJ59MkpACORDMHuHIwOrqfkU11jOvPwYZNa13g9BDOR 5tXbgBCQ1gBOra0kiyejN5LoiWpgTrDd377CNxzlmii/i887zUQc6aURoNi39liVlrfD ZkxYZihN9+m76qFjrDWC21xAoezSIne19lKVTZjXt8k+75H58h6WxpPg2qUFICfBZzkd TjHQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=B8eTAymE; 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 g12-20020a056402180c00b0051dea5c92b6si10180999edy.357.2023.07.26.08.11.55; Wed, 26 Jul 2023 08:12:20 -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=B8eTAymE; 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 S233996AbjGZO6e (ORCPT + 99 others); Wed, 26 Jul 2023 10:58:34 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:42862 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234255AbjGZO6c (ORCPT ); Wed, 26 Jul 2023 10:58:32 -0400 Received: from dfw.source.kernel.org (dfw.source.kernel.org [139.178.84.217]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id B029D213A; Wed, 26 Jul 2023 07:58:27 -0700 (PDT) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits)) (No client certificate requested) by dfw.source.kernel.org (Postfix) with ESMTPS id 4CED961B0A; Wed, 26 Jul 2023 14:58:27 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 1C8F4C433C8; Wed, 26 Jul 2023 14:58:25 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1690383506; bh=4wMA1U2sdxtxKn5ja+QnGHFus2ehfX1ZdTdGr8xna5w=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=B8eTAymE5naWz+UXKsHwpimf+fkMywUqd5m5Rh3GM5KXDmvJffZChnvljLzkaS1uG dUx5CBAhuB8i6XXMpAY+yDOw2Hz3MZVvqe5N4t0xDSgTQOGaZgIKO10IQ7dVsZXYUS gRyxHgDjdFs6yPGLen+wSNI8jcCOXRsiyajBW3mSnFiwKw5fJcljgvfpqDRVwGy3YW CAEBGG4ts+mVR5+Ua+9Z6j+Euu7tOLzPAVFjnq6yl3jEayfgw72Jj4SmczvPSWMNZk f7Q8iLn0LStCkC5aphMylprtHnocRGrXUn4QLkUYZxfabCW1lLDbEd7Wu1rTrStqug m8lNAoQA9prhA== Date: Wed, 26 Jul 2023 16:58:23 +0200 From: Andi Shyti To: carlos.song@nxp.com Cc: aisheng.dong@nxp.com, shawnguo@kernel.org, s.hauer@pengutronix.de, kernel@pengutronix.de, festevam@gmail.com, xiaoning.wang@nxp.com, haibo.chen@nxp.com, linux-imx@nxp.com, linux-i2c@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH v5] i2c: imx-lpi2c: return -EINVAL when i2c peripheral clk doesn't work Message-ID: <20230726145823.y67dylomsgblaaww@intel.intel> References: <20230726092238.3424116-1-carlos.song@nxp.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20230726092238.3424116-1-carlos.song@nxp.com> X-Spam-Status: No, score=-7.1 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_HI, SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=ham 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 Carlos, On Wed, Jul 26, 2023 at 05:22:38PM +0800, carlos.song@nxp.com wrote: > From: Carlos Song > > On MX8X platforms, the default clock rate is 0 if without explicit > clock setting in dts nodes. I2c can't work when i2c peripheral clk > rate is 0. > > Add a i2c peripheral clk rate check before configuring the clock > register. When i2c peripheral clk rate is 0 and directly return > -EINVAL. > > Signed-off-by: Carlos Song you are missing here: Acked-by: Dong Aisheng You can also add: Reviewed-by: Andi Shyti (no need to resend) Thanks! Andi