drivers/i2c/busses/i2c-qcom-geni.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-)
The driver currently logs pm_runtime_resume_and_get() failures with
dev_err() and returns the error code separately.
Replace this with dev_err_probe(), which combines the dev_err() log
message and the return value propagation into a single call, consistent
with how all other error paths in this driver already report failures.
No functional change intended.
Signed-off-by: Mukesh Kumar Savaliya <mukesh.savaliya@oss.qualcomm.com>
---
drivers/i2c/busses/i2c-qcom-geni.c | 6 ++----
1 file changed, 2 insertions(+), 4 deletions(-)
diff --git a/drivers/i2c/busses/i2c-qcom-geni.c b/drivers/i2c/busses/i2c-qcom-geni.c
index d5c977e34994..96015e077b69 100644
--- a/drivers/i2c/busses/i2c-qcom-geni.c
+++ b/drivers/i2c/busses/i2c-qcom-geni.c
@@ -994,10 +994,8 @@ static int geni_i2c_init(struct geni_i2c_dev *gi2c)
int ret;
ret = pm_runtime_resume_and_get(gi2c->se.dev);
- if (ret < 0) {
- dev_err(gi2c->se.dev, "error turning on device :%d\n", ret);
- return ret;
- }
+ if (ret < 0)
+ return dev_err_probe(gi2c->se.dev, ret, "error turning on device\n");
proto = geni_se_read_proto(&gi2c->se);
if (proto == GENI_SE_INVALID_PROTO) {
--
2.43.0
Hi Mukesh, On Wed, Aug 05, 2026 at 12:30:13PM +0530, Mukesh Kumar Savaliya wrote: > The driver currently logs pm_runtime_resume_and_get() failures with > dev_err() and returns the error code separately. > > Replace this with dev_err_probe(), which combines the dev_err() log > message and the return value propagation into a single call, consistent > with how all other error paths in this driver already report failures. > > No functional change intended. > > Signed-off-by: Mukesh Kumar Savaliya <mukesh.savaliya@oss.qualcomm.com> merged to i2c/i2c. Thanks, Andi
On 8/5/2026 12:30 PM, Mukesh Kumar Savaliya wrote:
> The driver currently logs pm_runtime_resume_and_get() failures with
> dev_err() and returns the error code separately.
>
> Replace this with dev_err_probe(), which combines the dev_err() log
> message and the return value propagation into a single call, consistent
> with how all other error paths in this driver already report failures.
>
> No functional change intended.
>
> Signed-off-by: Mukesh Kumar Savaliya <mukesh.savaliya@oss.qualcomm.com>
> ---
> drivers/i2c/busses/i2c-qcom-geni.c | 6 ++----
> 1 file changed, 2 insertions(+), 4 deletions(-)
>
> diff --git a/drivers/i2c/busses/i2c-qcom-geni.c b/drivers/i2c/busses/i2c-qcom-geni.c
> index d5c977e34994..96015e077b69 100644
> --- a/drivers/i2c/busses/i2c-qcom-geni.c
> +++ b/drivers/i2c/busses/i2c-qcom-geni.c
> @@ -994,10 +994,8 @@ static int geni_i2c_init(struct geni_i2c_dev *gi2c)
> int ret;
>
> ret = pm_runtime_resume_and_get(gi2c->se.dev);
> - if (ret < 0) {
> - dev_err(gi2c->se.dev, "error turning on device :%d\n", ret);
> - return ret;
> - }
> + if (ret < 0)
> + return dev_err_probe(gi2c->se.dev, ret, "error turning on device\n");
>
> proto = geni_se_read_proto(&gi2c->se);
> if (proto == GENI_SE_INVALID_PROTO) {
Reviewed-by: Viken Dadhaniya <viken.dadhaniya@oss.qualcomm.com>
On 05-08-2026 12:30, Mukesh Kumar Savaliya wrote:
> The driver currently logs pm_runtime_resume_and_get() failures with
> dev_err() and returns the error code separately.
>
> Replace this with dev_err_probe(), which combines the dev_err() log
> message and the return value propagation into a single call, consistent
> with how all other error paths in this driver already report failures.
>
> No functional change intended.
>
> Signed-off-by: Mukesh Kumar Savaliya <mukesh.savaliya@oss.qualcomm.com>
> ---
> drivers/i2c/busses/i2c-qcom-geni.c | 6 ++----
> 1 file changed, 2 insertions(+), 4 deletions(-)
>
> diff --git a/drivers/i2c/busses/i2c-qcom-geni.c b/drivers/i2c/busses/i2c-qcom-geni.c
> index d5c977e34994..96015e077b69 100644
> --- a/drivers/i2c/busses/i2c-qcom-geni.c
> +++ b/drivers/i2c/busses/i2c-qcom-geni.c
> @@ -994,10 +994,8 @@ static int geni_i2c_init(struct geni_i2c_dev *gi2c)
> int ret;
>
> ret = pm_runtime_resume_and_get(gi2c->se.dev);
> - if (ret < 0) {
> - dev_err(gi2c->se.dev, "error turning on device :%d\n", ret);
> - return ret;
> - }
> + if (ret < 0)
> + return dev_err_probe(gi2c->se.dev, ret, "error turning on device\n");
>
> proto = geni_se_read_proto(&gi2c->se);
> if (proto == GENI_SE_INVALID_PROTO) {
Acked-by: Praveen Talari <praveen.talari@oss.qualcomm.com>
Hi Mukesh
On 05-08-2026 12:30, Mukesh Kumar Savaliya wrote:
> The driver currently logs pm_runtime_resume_and_get() failures with
> dev_err() and returns the error code separately.
>
> Replace this with dev_err_probe(), which combines the dev_err() log
> message and the return value propagation into a single call, consistent
> with how all other error paths in this driver already report failures.
>
> No functional change intended.
>
> Signed-off-by: Mukesh Kumar Savaliya <mukesh.savaliya@oss.qualcomm.com>
> ---
> drivers/i2c/busses/i2c-qcom-geni.c | 6 ++----
> 1 file changed, 2 insertions(+), 4 deletions(-)
>
> diff --git a/drivers/i2c/busses/i2c-qcom-geni.c b/drivers/i2c/busses/i2c-qcom-geni.c
> index d5c977e34994..96015e077b69 100644
> --- a/drivers/i2c/busses/i2c-qcom-geni.c
> +++ b/drivers/i2c/busses/i2c-qcom-geni.c
> @@ -994,10 +994,8 @@ static int geni_i2c_init(struct geni_i2c_dev *gi2c)
> int ret;
>
> ret = pm_runtime_resume_and_get(gi2c->se.dev);
> - if (ret < 0) {
> - dev_err(gi2c->se.dev, "error turning on device :%d\n", ret);
> - return ret;
> - }
> + if (ret < 0)
> + return dev_err_probe(gi2c->se.dev, ret, "error turning on device\n");
This change is not required, as this API will be used in the deep sleep
use case to reinitialise the SE.
Thanks,
Praveen Talari
>
> proto = geni_se_read_proto(&gi2c->se);
> if (proto == GENI_SE_INVALID_PROTO) {
Thanks Praveen for the review !
On 8/5/2026 3:07 PM, Praveen Talari wrote:
> Hi Mukesh
>
> On 05-08-2026 12:30, Mukesh Kumar Savaliya wrote:
>> The driver currently logs pm_runtime_resume_and_get() failures with
>> dev_err() and returns the error code separately.
>>
>> Replace this with dev_err_probe(), which combines the dev_err() log
>> message and the return value propagation into a single call, consistent
>> with how all other error paths in this driver already report failures.
>>
>> No functional change intended.
>>
>> Signed-off-by: Mukesh Kumar Savaliya <mukesh.savaliya@oss.qualcomm.com>
>> ---
>> drivers/i2c/busses/i2c-qcom-geni.c | 6 ++----
>> 1 file changed, 2 insertions(+), 4 deletions(-)
>>
>> diff --git a/drivers/i2c/busses/i2c-qcom-geni.c b/drivers/i2c/busses/
>> i2c-qcom-geni.c
>> index d5c977e34994..96015e077b69 100644
>> --- a/drivers/i2c/busses/i2c-qcom-geni.c
>> +++ b/drivers/i2c/busses/i2c-qcom-geni.c
>> @@ -994,10 +994,8 @@ static int geni_i2c_init(struct geni_i2c_dev *gi2c)
>> int ret;
>> ret = pm_runtime_resume_and_get(gi2c->se.dev);
>> - if (ret < 0) {
>> - dev_err(gi2c->se.dev, "error turning on device :%d\n", ret);
>> - return ret;
>> - }
>> + if (ret < 0)
>> + return dev_err_probe(gi2c->se.dev, ret, "error turning on
>> device\n");
>
> This change is not required, as this API will be used in the deep sleep
> use case to reinitialise the SE.
>
I think this change is generic and does not appear to introduce any new
functionality. Its more like a cleanup or modernization that aligns the
PM handling with the pattern already used in the drivers probe path.
What exactly is getting broken during deep sleep with this change ?
Could you elaborate on the specific suspend/resume issue that is getting
disturbed ?
>
>> proto = geni_se_read_proto(&gi2c->se);
>> if (proto == GENI_SE_INVALID_PROTO) {
© 2016 - 2026 Red Hat, Inc.