Received: by 2002:a05:7412:8d10:b0:f3:1519:9f41 with SMTP id bj16csp3892637rdb; Mon, 11 Dec 2023 03:15:01 -0800 (PST) X-Google-Smtp-Source: AGHT+IEwzFIsfcwEnkiWDCWRgKuodQ1uLtCfD7XJ44rD+4qXR3/975otmfpilzuaWzuf9aLkXGJ/ X-Received: by 2002:a05:6870:b8a:b0:1fb:75b:2fde with SMTP id lg10-20020a0568700b8a00b001fb075b2fdemr5376702oab.117.1702293301199; Mon, 11 Dec 2023 03:15:01 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1702293301; cv=none; d=google.com; s=arc-20160816; b=NjfxRnLhUiYWPx06al4d+UBV5xZ4hovAt5YTUVryNHwp9TuP3mwrn65QBALkpheWdk 4W4QJsVE5uV9Kc/Gk6k43lQPT572u0CsZW3XTbdZW0lqI3UHxbvVbV5aicX0po913ETC D/tvFLrH63XRDAJnClHOO0ckjdQo9oN0k+uCHsK70olrq0mpm6ZtQSVJfjsb2Qsvgnar /JYWx+9cZqDe171Cx8SJQ0moF4068e5DO8mmL18O1/8H2a+dWJyQS/W6x1B/5voZv1Nr tqg+rvhys1NbLjbzhaFKbwC/C4E6Cj8IVkKBSAaq3YdHidtKyo3kJWvpLnt/jYyDOo95 JPHQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :message-id:date:subject:cc:to:from:dkim-signature; bh=Bq8mLpv41UgMR+UAdYZyeIFLIfMoqNR0nv3+aXB/hw4=; fh=fZQysClHm6iaxz5ruB5zgxcdW0EKzgo1z2MbxDg9Na4=; b=cjPI2rBVx9MRIekYatyVWwgjmdGeoctbtn4Nr9WR02TG1bGQjaF0twLwjt9Bhnupza CU5+TCe0sZndPl7HIyibiriFnoSvcG1gpVaravx3D//bcrpn6uYZjjYrQuO1cQgMxDoi EmE+q/+VTiVLG/4aNC453z38pODp4aGQF+p2Fx3CzB7h4I+ntNSVIZ6TUM35rgPWhRQH Z89g2TnMI+foRTXTtmECBkcb4IICtTWoZYjdFAQon0vLmyskD6mIaxWepCpaa3y4SPIh r9RSy2GR9U30Yx5WkyTgw/YuG74Qjc9Nabelzml5om4hQ/Wn8XZf5F5r13YSLH6ttWov bkcg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b=kaGP9cs4; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:4 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=intel.com Return-Path: Received: from howler.vger.email (howler.vger.email. [2620:137:e000::3:4]) by mx.google.com with ESMTPS id c30-20020a634e1e000000b005c62615924fsi5776223pgb.102.2023.12.11.03.15.00 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 11 Dec 2023 03:15:01 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:4 as permitted sender) client-ip=2620:137:e000::3:4; Authentication-Results: mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b=kaGP9cs4; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:4 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=intel.com Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by howler.vger.email (Postfix) with ESMTP id BC12680A3086; Mon, 11 Dec 2023 03:14:58 -0800 (PST) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.11 at howler.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S234701AbjLKLOo (ORCPT + 99 others); Mon, 11 Dec 2023 06:14:44 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:48742 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234684AbjLKLOm (ORCPT ); Mon, 11 Dec 2023 06:14:42 -0500 Received: from mgamail.intel.com (mgamail.intel.com [192.198.163.7]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id EB4C9C5 for ; Mon, 11 Dec 2023 03:14:48 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1702293289; x=1733829289; h=from:to:cc:subject:date:message-id:mime-version: content-transfer-encoding; bh=eR1sOFajwOwvIeX/GA/4ZbcY1VT8jr6eTmCY9IFcwD0=; b=kaGP9cs4yCUoY5shqJvKgQoFYlw4jwTK/bzSQPXQXQbn77adThBFMn3D NA5Lbqsd6rPdrPDCvIT5bXZUcStETJWQoIIcjdFFoDW3opyVUcWuwWXUr KIxuzfaIROaNuUMl6vHyoAxvwwX1J8U8TDs3Y9L9BAW4MpF1x44cDQXUT Yr1ML4UIFGwk01+pQGuQDEgro1QX5BxhjrL+gqYi/Lqn+P/4lWc4pgVhc 3apXTfSJnGyPkWDFRqEJGMG7AynmeEjTvCjWobEQ+VzNEkXjSU50e1IyW K1n2uIp1G8QdP5Cc8KRm1ev5Oy5DaW4/13GLx1l+1xVyAPp3QESXkZ4gq A==; X-IronPort-AV: E=McAfee;i="6600,9927,10920"; a="16184494" X-IronPort-AV: E=Sophos;i="6.04,267,1695711600"; d="scan'208";a="16184494" Received: from fmsmga003.fm.intel.com ([10.253.24.29]) by fmvoesa101.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 11 Dec 2023 03:14:49 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=McAfee;i="6600,9927,10920"; a="863731670" X-IronPort-AV: E=Sophos;i="6.04,267,1695711600"; d="scan'208";a="863731670" Received: from black.fi.intel.com ([10.237.72.28]) by FMSMGA003.fm.intel.com with ESMTP; 11 Dec 2023 03:14:47 -0800 Received: by black.fi.intel.com (Postfix, from userid 1003) id 627E530D; Mon, 11 Dec 2023 13:14:46 +0200 (EET) From: Andy Shevchenko To: Lee Jones , Andy Shevchenko , linux-kernel@vger.kernel.org Cc: Alex Vinarskis Subject: [PATCH v1 1/1] mfd: intel-lpss: Fix the fractional clock divider flags Date: Mon, 11 Dec 2023 13:14:41 +0200 Message-ID: <20231211111441.3910083-1-andriy.shevchenko@linux.intel.com> X-Mailer: git-send-email 2.43.0.rc1.1.gbec44491f096 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-0.8 required=5.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED, DKIM_VALID,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 howler.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 (howler.vger.email [0.0.0.0]); Mon, 11 Dec 2023 03:14:59 -0800 (PST) The conversion to CLK_FRAC_DIVIDER_POWER_OF_TWO_PS uses wrong flags in the parameters and hence miscalculates the values in the clock divider. Fix this by applying the flag to the proper parameter. Fixes: 82f53f9ee577 ("clk: fractional-divider: Introduce POWER_OF_TWO_PS flag") Reported-by: Alex Vinarskis Signed-off-by: Andy Shevchenko --- drivers/mfd/intel-lpss.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/mfd/intel-lpss.c b/drivers/mfd/intel-lpss.c index 177915845ba2..eff423f7dd28 100644 --- a/drivers/mfd/intel-lpss.c +++ b/drivers/mfd/intel-lpss.c @@ -309,8 +309,8 @@ static int intel_lpss_register_clock_divider(struct intel_lpss *lpss, snprintf(name, sizeof(name), "%s-div", devname); tmp = clk_register_fractional_divider(NULL, name, __clk_get_name(tmp), + 0, lpss->priv, 1, 15, 16, 15, CLK_FRAC_DIVIDER_POWER_OF_TWO_PS, - lpss->priv, 1, 15, 16, 15, 0, NULL); if (IS_ERR(tmp)) return PTR_ERR(tmp); -- 2.43.0.rc1.1.gbec44491f096