From: Mukesh Savaliya <mukesh.savaliya@oss.qualcomm.com>
To: Viken Dadhaniya <viken.dadhaniya@oss.qualcomm.com>,
Andi Shyti <andi.shyti@kernel.org>,
Sagar Dharia <sdharia@codeaurora.org>,
Karthikeyan Ramasubramanian <kramasub@codeaurora.org>,
Stephen Boyd <swboyd@chromium.org>, Wolfram Sang <wsa@kernel.org>,
Douglas Anderson <dianders@chromium.org>
Cc: Girish Mahadevan <girishm@codeaurora.org>,
linux-i2c@vger.kernel.org, linux-arm-msm@vger.kernel.org,
linux-kernel@vger.kernel.org, stable@vger.kernel.org
Subject: Re: [PATCH v2] i2c: qcom-geni: Fix hardcoded clock index in SE_GENI_CLK_SEL
Date: Wed, 23 Sep 2026 11:01:11 +0530 [thread overview]
Message-ID: <2a50b64c-148a-4d44-a2a3-3275982eda60@oss.qualcomm.com> (raw)
In-Reply-To: <5fc58faf-dd51-4b7b-a2ce-5acb0ac6bbd6@oss.qualcomm.com>
On 9/21/2026 5:33 PM, Viken Dadhaniya wrote:
>
>
> On 9/21/2026 5:17 PM, Viken Dadhaniya wrote:
>> qcom_geni_i2c_conf() writes a hardcoded 0 to SE_GENI_CLK_SEL, which
>> selects an index from the hardware clock performance table. This always
>> picks the first table entry regardless of the actual source clock
>> configuration. On platforms where the matching entry is not at index 0,
>> the wrong source clock divider is active and the I2C bus runs at an
>> incorrect frequency.
>>
>> Use geni_se_clk_freq_match() in geni_i2c_clk_map_idx() to find the
>> performance table index for the source clock (32 MHz or 19.2 MHz). Store
>> the resolved index in a new clk_idx field in geni_i2c_dev and write it
>> to SE_GENI_CLK_SEL instead of the hardcoded 0.
>>
>> Fixes: 37692de5d523 ("i2c: i2c-qcom-geni: Add bus driver for the Qualcomm GENI I2C controller")
>> Cc: stable@vger.kernel.org
>> Signed-off-by: Viken Dadhaniya <viken.dadhaniya@oss.qualcomm.com>
>> ---
Reviewed-by: Mukesh Kumar Savaliya <mukesh.savaliya@oss.qualcomm.com>
>> Changes in v2:
>> - Update the comment describing the source-clock frequency requirement
>> and the rejection of higher-frequency multiples.
>> - Add a blank line before the final return statement, as suggested.
>> - Link to v1: https://patch.msgid.link/20260828-i2c-fix-se-clk-conf-v1-1-9adc72308f2d@oss.qualcomm.com
>>
>> --- b4-submit-tracking ---
>> {
>> "series": {
>> "revision": 2,
>> "change-id": "20260807-i2c-fix-se-clk-conf-89f6f92d373a",
>> "prefixes": [],
>> "presubject": "",
>> "history": {
>> "v1": [
>> "20260828-i2c-fix-se-clk-conf-v1-1-9adc72308f2d@oss.qualcomm.com"
>> ]
>> }
>> }
>> }
>
> Please ignore the --- b4-submit-tracking --- block; it is internal b4
> metadata accidentally included during the rebase.
>> ---
>> drivers/i2c/busses/i2c-qcom-geni.c | 38 +++++++++++++++++++++++++++++++++-----
>> 1 file changed, 33 insertions(+), 5 deletions(-)
> [...]
next prev parent reply other threads:[~2026-09-23 5:31 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-09-21 11:47 Viken Dadhaniya
2026-09-21 12:03 ` Viken Dadhaniya
2026-09-23 5:31 ` Mukesh Savaliya [this message]
2026-09-24 22:07 ` Andi Shyti
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=2a50b64c-148a-4d44-a2a3-3275982eda60@oss.qualcomm.com \
--to=mukesh.savaliya@oss.qualcomm.com \
--cc=andi.shyti@kernel.org \
--cc=dianders@chromium.org \
--cc=girishm@codeaurora.org \
--cc=kramasub@codeaurora.org \
--cc=linux-arm-msm@vger.kernel.org \
--cc=linux-i2c@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=sdharia@codeaurora.org \
--cc=stable@vger.kernel.org \
--cc=swboyd@chromium.org \
--cc=viken.dadhaniya@oss.qualcomm.com \
--cc=wsa@kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®