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 vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 431A3C54EBC for ; Tue, 10 Jan 2023 12:08:55 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232808AbjAJMIX (ORCPT ); Tue, 10 Jan 2023 07:08:23 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:49960 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S238341AbjAJMHm (ORCPT ); Tue, 10 Jan 2023 07:07:42 -0500 Received: from phobos.denx.de (phobos.denx.de [85.214.62.61]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id B357C8461F; Tue, 10 Jan 2023 04:05:19 -0800 (PST) Received: from [127.0.0.1] (p578adb1c.dip0.t-ipconnect.de [87.138.219.28]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits)) (No client certificate requested) (Authenticated sender: marex@denx.de) by phobos.denx.de (Postfix) with ESMTPSA id 09119852A1; Tue, 10 Jan 2023 13:04:51 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=denx.de; s=phobos-20191101; t=1673352292; bh=OmQu4t+nnptTG8yDn6d8Y1ycRLKO4lJQCVlmZo011fw=; h=Date:Subject:To:Cc:References:From:In-Reply-To:From; b=vxhNGvU9dDYD1dQbIW4qCCFH5qd7pBBUvXLXX4iEQSYk+fp+wKGhyIEZFg7bdtS2q LvdiylMhUHx8C9D9i/8stekIWl91rCojUSwnCvqCSEJWd1Ww2GL06gLyyZU3DOn/ZI RhZY4jGiJYS61eqZxupPcNVe60wStyzeYDNaRklrWCcU2vHgugb56/+9swxdTvtKuV sXBfa+3ZzxIAL6H6+LAwF1b3PC2R8pTathqLx67Sq+Mo7fPg3pyDI7hEKvqWpHwMDe KvousQ5FZVeQ1V9oUPmncvjuDuzXKCJToBDgYs4UYygrM9Oz0LGmn/Y3pmCSLQs1xn XTrXPvHSsEV8A== Message-ID: <54e39604-088d-da4e-2779-4a635995db17@denx.de> Date: Tue, 10 Jan 2023 11:31:49 +0100 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.6.0 Subject: Re: [PATCH v2 3/4] clk: rs9: Support device specific dif bit calculation Content-Language: en-US To: Alexander Stein , Geert Uytterhoeven , Michael Turquette , Stephen Boyd , Rob Herring , Krzysztof Kozlowski Cc: linux-renesas-soc@vger.kernel.org, linux-clk@vger.kernel.org, devicetree@vger.kernel.org References: <20230110100003.370917-1-alexander.stein@ew.tq-group.com> <20230110100003.370917-3-alexander.stein@ew.tq-group.com> From: Marek Vasut In-Reply-To: <20230110100003.370917-3-alexander.stein@ew.tq-group.com> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-Virus-Scanned: clamav-milter 0.103.6 at phobos.denx.de X-Virus-Status: Clean Precedence: bulk List-ID: X-Mailing-List: linux-clk@vger.kernel.org On 1/10/23 11:00, Alexander Stein wrote: [...] > static int rs9_get_output_config(struct rs9_driver_data *rs9, int idx) > { > struct i2c_client *client = rs9->client; > + u8 dif = rs9_calc_dif(rs9, idx); > unsigned char name[5] = "DIF0"; > struct device_node *np; > int ret; > u32 sr; > > /* Set defaults */ > - rs9->clk_dif_sr &= ~RS9_REG_SR_DIF_MASK(idx); Are you sure this line ^ should be dropped ? Shouldn't the bitfield be cleared first and modified second? > - rs9->clk_dif_sr |= RS9_REG_SR_3V0_DIF(idx); > + rs9->clk_dif_sr |= dif; > > snprintf(name, 5, "DIF%d", idx); > np = of_get_child_by_name(client->dev.of_node, name); [...]