Received: by 2002:ab2:1347:0:b0:1f4:ac9d:b246 with SMTP id g7csp154645lqg; Wed, 10 Apr 2024 20:19:16 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCUoNeBxtEvgp8e8pGFaJpaaze8J6AKZEBmXhZTsEUEbmICEbfgfin9QB7q+iiay21Mdm+lLUm74uNP7I2D+bPjRjIsKhFxDuxQimy2FOg== X-Google-Smtp-Source: AGHT+IFlTN8jGszEVQoIH/aCg1DebD+QWKMr79SJJnzvvLd+sqc8PgZ7tRQ8wNlJk5s8pHa8wQlY X-Received: by 2002:a17:902:e541:b0:1e2:a5b3:e4 with SMTP id n1-20020a170902e54100b001e2a5b300e4mr5653764plf.0.1712805555737; Wed, 10 Apr 2024 20:19:15 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1712805555; cv=pass; d=google.com; s=arc-20160816; b=g7ctcZ5N2mqc0h90vBfhKrkPSNskGJ1wHbcnRtX7jqZcji9PvWu8Roedi+rPEPd8cb 8WmE5q9Cgvf+tcMuPp5Q4So1ffZHFs3yJrWN4hvB3izeggKcAhvqi3dzkvHTVedydBbg j+5Egc7On+lUjg+UuCHdc6h2SEM9KpFyVUMStGA4W47bb2Cg6VqgEx1eUpJ1UqYhNdas EC6xgvcpTsoNOvO0YhSE2YNh5Zz8pWoP7YmoFPiqqXy8GIgk7rpu9QCPIiTWT+ftiaxl /QBG3b4x3N0Q8vUqzart2od3oyvrYQ9ghVoNU5UbxzwGgwI/MilPk53jSs4U+iv1Zmj+ s6Qw== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=user-agent:date:to:cc:from:subject:references:in-reply-to :content-transfer-encoding:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:message-id:dkim-signature; bh=AyVO3EOQvFkzGIg2LWQlOFiK7xgsOLqgWrJi2AqWIeI=; fh=FcYdgPlGMsavFgdT67V1fHzZv5TT10N2fj9lSaveZWU=; b=lgQqO5GKSYaOnIQQMiCXFP5181WGDgN/YW2EXdSJoH86bGbZhYRCF7IVasrMnoq7jC jvOGIZdg66OMvrmVg4yDzs+fGZ/bexxP4vbM5YXPs8K7lpB7xfgz0eQFcm+i26f+stcn F3KcrC+G28W+MBpXMuwb7x0xcFinJioBQZ1tsWNdj+W3N/MBzfmx2hGx1zHG1wq8tcr5 2F8ZbQtN4lqKVy6Zj5veoZaNuLqIwgLgiZ8OvL78CV+oY9tVqeIF8GaN26yYqSu7ikLu HugS+olapHBC7MMgEFz6Rm2PuMvAN5Mo1o9/tVQ2p+AZTVY8CcO4DXM+uP9Tr7dY1bKT md1Q==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b="L/eZxjtf"; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-139684-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:40f1:3f00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-139684-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from sy.mirrors.kernel.org (sy.mirrors.kernel.org. [2604:1380:40f1:3f00::1]) by mx.google.com with ESMTPS id s17-20020a170902a51100b001e27f807a8esi432596plq.343.2024.04.10.20.19.15 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 10 Apr 2024 20:19:15 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-139684-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:40f1:3f00::1 as permitted sender) client-ip=2604:1380:40f1:3f00::1; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b="L/eZxjtf"; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-139684-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:40f1:3f00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-139684-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by sy.mirrors.kernel.org (Postfix) with ESMTPS id 9D599B222E6 for ; Thu, 11 Apr 2024 03:06:45 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 7877C13B789; Thu, 11 Apr 2024 03:06:38 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="L/eZxjtf" Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 8CA341F5FA; Thu, 11 Apr 2024 03:06:37 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1712804797; cv=none; b=lvwAOXhStOgPP2Mid1rPuXFguYrPGapBED/a2CpLBpeqB6zrQtUCzy8ayT2k1QJFp4NDdCvu7nVU8f8w3n1vR3FvBJvf6X7UxFIuhIyWaJ5GqC0zuMWPkdHc1kDcmwnUNtfpKg0PjNDikjOlthHCPo/gI+MI35J+JV6c21ENnt4= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1712804797; c=relaxed/simple; bh=tdJ0lgF+UwsqfOZfw3fpBD95sXmyAoj2othwTClSfJE=; h=Message-ID:Content-Type:MIME-Version:In-Reply-To:References: Subject:From:Cc:To:Date; b=u1m63Adcz1fRbuWzGRpTYmgWKkboMVQdqR0AI0PpmNifJKo7TD4CGqMixr6mN926d9xtLGOx60vCa2SXiQT6x+XIN2EVqZCBxPgW9Cmu78pvgSskCC+wKbZgylqufePcO7xFAE3Olwk+SBZ62qSDbCiklyFyHHV0P6gxudu4HdY= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=L/eZxjtf; arc=none smtp.client-ip=10.30.226.201 Received: by smtp.kernel.org (Postfix) with ESMTPSA id D10B5C433C7; Thu, 11 Apr 2024 03:06:36 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1712804797; bh=tdJ0lgF+UwsqfOZfw3fpBD95sXmyAoj2othwTClSfJE=; h=In-Reply-To:References:Subject:From:Cc:To:Date:From; b=L/eZxjtfp55i5cWvAWE5b6ObdnG+fiTqKBQ4sVFR4SMAruzZ/dVCFou+5hvn+fYEv 7tBLQ5GlKEOKb0NdUGRqaP1mWZLhSaq8D/DgDA6rNQnHKCdHgZo4gkOizsOq4hVPUR uWmnFXbUuqCnuScJ/OBuSR7Y8INxeIJHrTSiz85C+jTPNQTCL2xju6dClMupdmEp6i Pp9oLsCdF0YqC27sUINL8FUUiMuYx1XhI2MoKBP0auAWXXa3lBlHS2PAczDCfR/RlH FVktnQaSK7TtAx6sFNZUWsfWIVytlMfUKtE0IitP6FiG0bDHT90q2bmy+ODECEjyqk WChS70Bal3K+A== Message-ID: <4ce9f3cea1ecd3777cf3e291cc865210.sboyd@kernel.org> Content-Type: text/plain; charset="utf-8" Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable In-Reply-To: <20240410-mbly-olb-v1-4-335e496d7be3@bootlin.com> References: <20240410-mbly-olb-v1-0-335e496d7be3@bootlin.com> <20240410-mbly-olb-v1-4-335e496d7be3@bootlin.com> Subject: Re: [PATCH 04/11] clk: divider: Introduce CLK_DIVIDER_EVEN_INTEGERS flag From: Stephen Boyd Cc: linux-mips@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, linux-clk@vger.kernel.org, linux-gpio@vger.kernel.org, Vladimir Kondratiev , Gregory CLEMENT , Thomas Petazzoni , Tawfik Bayouk , =?utf-8?q?Th=C3=A9o?= Lebrun To: Conor Dooley , Krzysztof Kozlowski , Linus Walleij , Michael Turquette , Philipp Zabel , Rob Herring , =?utf-8?q?Th=C3=A9o?= Lebrun Date: Wed, 10 Apr 2024 20:06:34 -0700 User-Agent: alot/0.10 Quoting Th=C3=A9o Lebrun (2024-04-10 10:12:33) > index 4a537260f655..cb348e502e41 100644 > --- a/include/linux/clk-provider.h > +++ b/include/linux/clk-provider.h > @@ -675,13 +675,15 @@ struct clk_div_table { > * CLK_DIVIDER_BIG_ENDIAN - By default little endian register accesses a= re used > * for the divider register. Setting this flag makes the register a= ccesses > * big endian. > + * CLK_DIVIDER_EVEN_INTEGERS - clock divisor is 2, 4, 6, 8, 10, etc. > + * Formula is 2 * (value read from hardware + 1). > */ > struct clk_divider { > struct clk_hw hw; > void __iomem *reg; > u8 shift; > u8 width; > - u8 flags; > + u16 flags; This can stay u8 > const struct clk_div_table *table; > spinlock_t *lock; > }; We should add a kunit test.