From: Pavan Kondeti <quic_pkondeti@quicinc.com> To: Krishna Kurapati <quic_kriskura@quicinc.com> Cc: Krzysztof Kozlowski <krzysztof.kozlowski+dt@linaro.org>, Rob Herring <robh+dt@kernel.org>, Andy Gross <agross@kernel.org>, Bjorn Andersson <bjorn.andersson@linaro.org>, Greg Kroah-Hartman <gregkh@linuxfoundation.org>, Stephen Boyd <swboyd@chromium.org>, "Doug Anderson" <dianders@chromium.org>, Matthias Kaehlcke <mka@chromium.org>, Wesley Cheng <quic_wcheng@quicinc.com>, <devicetree@vger.kernel.org>, <linux-arm-msm@vger.kernel.org>, <linux-usb@vger.kernel.org>, <linux-kernel@vger.kernel.org>, <linux-phy@lists.infradead.org>, <quic_pkondeti@quicinc.com>, <quic_ppratap@quicinc.com>, <quic_vpulyala@quicinc.com> Subject: Re: [PATCH v7 2/3] phy: qcom-snps: Add support for overriding phy tuning parameters Date: Wed, 1 Jun 2022 07:38:56 +0530 [thread overview] Message-ID: <20220601020856.GA20979@hu-pkondeti-hyd.qualcomm.com> (raw) In-Reply-To: <1654013693-21484-3-git-send-email-quic_kriskura@quicinc.com> On Tue, May 31, 2022 at 09:44:52PM +0530, Krishna Kurapati wrote: > Add support for overriding electrical signal tuning parameters for > SNPS HS Phy. > > Signed-off-by: Krishna Kurapati <quic_kriskura@quicinc.com> > --- > drivers/phy/qualcomm/phy-qcom-snps-femto-v2.c | 268 +++++++++++++++++++++++++- > 1 file changed, 266 insertions(+), 2 deletions(-) > > diff --git a/drivers/phy/qualcomm/phy-qcom-snps-femto-v2.c b/drivers/phy/qualcomm/phy-qcom-snps-femto-v2.c > index 5d20378..3a17216 100644 > --- a/drivers/phy/qualcomm/phy-qcom-snps-femto-v2.c > +++ b/drivers/phy/qualcomm/phy-qcom-snps-femto-v2.c > @@ -52,6 +52,12 @@ > #define USB2_SUSPEND_N BIT(2) > #define USB2_SUSPEND_N_SEL BIT(3) > <snip> > +static void qcom_snps_hsphy_override_param_update_val( > + const struct override_param_map map, > + s32 dt_val, struct phy_override_seq *seq_entry) > +{ > + int i; > + > + /* > + * Param table for each param is in increasing order > + * of dt values. We need to iterate over the list to > + * select the entry that has equal or the next highest value. > + */ > + for (i = 0; i < map.table_size - 1; i++) { > + if (map.param_table[i].value >= dt_val) > + break; > + } > + > + seq_entry->need_update = true; > + seq_entry->offset = map.reg_offset; > + seq_entry->mask = map.param_mask; > + seq_entry->value = map.param_table[i].reg << __ffs(map.param_mask); > +} > + > +static void qcom_snps_hsphy_read_override_param_seq(struct device *dev) > +{ > + struct device_node *node = dev->of_node; > + s32 val; > + int ret, i; > + struct qcom_snps_hsphy *hsphy; > + const struct override_param_map *cfg = > + (struct override_param_map *) of_device_get_match_data(dev); As mentioned in the previous patch-set, the explicit typecast is not needed. overall, looks good to me. After fixing the above, feel free to use Reviewed-by: Pavankumar Kondeti <quic_pkondeti@quicinc.com> Thanks, Pavan
WARNING: multiple messages have this Message-ID (diff)
From: Pavan Kondeti <quic_pkondeti@quicinc.com> To: Krishna Kurapati <quic_kriskura@quicinc.com> Cc: Krzysztof Kozlowski <krzysztof.kozlowski+dt@linaro.org>, Rob Herring <robh+dt@kernel.org>, Andy Gross <agross@kernel.org>, Bjorn Andersson <bjorn.andersson@linaro.org>, Greg Kroah-Hartman <gregkh@linuxfoundation.org>, Stephen Boyd <swboyd@chromium.org>, "Doug Anderson" <dianders@chromium.org>, Matthias Kaehlcke <mka@chromium.org>, Wesley Cheng <quic_wcheng@quicinc.com>, <devicetree@vger.kernel.org>, <linux-arm-msm@vger.kernel.org>, <linux-usb@vger.kernel.org>, <linux-kernel@vger.kernel.org>, <linux-phy@lists.infradead.org>, <quic_pkondeti@quicinc.com>, <quic_ppratap@quicinc.com>, <quic_vpulyala@quicinc.com> Subject: Re: [PATCH v7 2/3] phy: qcom-snps: Add support for overriding phy tuning parameters Date: Wed, 1 Jun 2022 07:38:56 +0530 [thread overview] Message-ID: <20220601020856.GA20979@hu-pkondeti-hyd.qualcomm.com> (raw) In-Reply-To: <1654013693-21484-3-git-send-email-quic_kriskura@quicinc.com> On Tue, May 31, 2022 at 09:44:52PM +0530, Krishna Kurapati wrote: > Add support for overriding electrical signal tuning parameters for > SNPS HS Phy. > > Signed-off-by: Krishna Kurapati <quic_kriskura@quicinc.com> > --- > drivers/phy/qualcomm/phy-qcom-snps-femto-v2.c | 268 +++++++++++++++++++++++++- > 1 file changed, 266 insertions(+), 2 deletions(-) > > diff --git a/drivers/phy/qualcomm/phy-qcom-snps-femto-v2.c b/drivers/phy/qualcomm/phy-qcom-snps-femto-v2.c > index 5d20378..3a17216 100644 > --- a/drivers/phy/qualcomm/phy-qcom-snps-femto-v2.c > +++ b/drivers/phy/qualcomm/phy-qcom-snps-femto-v2.c > @@ -52,6 +52,12 @@ > #define USB2_SUSPEND_N BIT(2) > #define USB2_SUSPEND_N_SEL BIT(3) > <snip> > +static void qcom_snps_hsphy_override_param_update_val( > + const struct override_param_map map, > + s32 dt_val, struct phy_override_seq *seq_entry) > +{ > + int i; > + > + /* > + * Param table for each param is in increasing order > + * of dt values. We need to iterate over the list to > + * select the entry that has equal or the next highest value. > + */ > + for (i = 0; i < map.table_size - 1; i++) { > + if (map.param_table[i].value >= dt_val) > + break; > + } > + > + seq_entry->need_update = true; > + seq_entry->offset = map.reg_offset; > + seq_entry->mask = map.param_mask; > + seq_entry->value = map.param_table[i].reg << __ffs(map.param_mask); > +} > + > +static void qcom_snps_hsphy_read_override_param_seq(struct device *dev) > +{ > + struct device_node *node = dev->of_node; > + s32 val; > + int ret, i; > + struct qcom_snps_hsphy *hsphy; > + const struct override_param_map *cfg = > + (struct override_param_map *) of_device_get_match_data(dev); As mentioned in the previous patch-set, the explicit typecast is not needed. overall, looks good to me. After fixing the above, feel free to use Reviewed-by: Pavankumar Kondeti <quic_pkondeti@quicinc.com> Thanks, Pavan -- linux-phy mailing list linux-phy@lists.infradead.org https://lists.infradead.org/mailman/listinfo/linux-phy
next prev parent reply other threads:[~2022-06-01 2:09 UTC|newest] Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top 2022-05-31 16:14 [PATCH v7 0/3] Add QCOM SNPS PHY overriding params support Krishna Kurapati 2022-05-31 16:14 ` Krishna Kurapati 2022-05-31 16:14 ` [PATCH v7 1/3] dt-bindings: phy: qcom,usb-snps-femto-v2: Add phy override params bindings Krishna Kurapati 2022-05-31 16:14 ` Krishna Kurapati 2022-05-31 22:46 ` Rob Herring 2022-05-31 22:46 ` Rob Herring 2022-05-31 16:14 ` [PATCH v7 2/3] phy: qcom-snps: Add support for overriding phy tuning parameters Krishna Kurapati 2022-05-31 16:14 ` Krishna Kurapati 2022-06-01 2:08 ` Pavan Kondeti [this message] 2022-06-01 2:08 ` Pavan Kondeti 2022-06-01 6:31 ` Krishna Kurapati PSSNV 2022-06-01 6:31 ` Krishna Kurapati PSSNV 2022-05-31 16:14 ` [PATCH v7 3/3] arm64: dts: qcom: sc7280: Update SNPS Phy params for SC7280 IDP device Krishna Kurapati 2022-05-31 16:14 ` Krishna Kurapati
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=20220601020856.GA20979@hu-pkondeti-hyd.qualcomm.com \ --to=quic_pkondeti@quicinc.com \ --cc=agross@kernel.org \ --cc=bjorn.andersson@linaro.org \ --cc=devicetree@vger.kernel.org \ --cc=dianders@chromium.org \ --cc=gregkh@linuxfoundation.org \ --cc=krzysztof.kozlowski+dt@linaro.org \ --cc=linux-arm-msm@vger.kernel.org \ --cc=linux-kernel@vger.kernel.org \ --cc=linux-phy@lists.infradead.org \ --cc=linux-usb@vger.kernel.org \ --cc=mka@chromium.org \ --cc=quic_kriskura@quicinc.com \ --cc=quic_ppratap@quicinc.com \ --cc=quic_vpulyala@quicinc.com \ --cc=quic_wcheng@quicinc.com \ --cc=robh+dt@kernel.org \ --cc=swboyd@chromium.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: linkBe sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes, see mirroring instructions on how to clone and mirror all data and code used by this external index.