linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] media: imx214: Fix the error handling in imx214_probe()
@ 2022-05-10 11:48 Zheyu Ma
  2022-05-11 12:18 ` Ricardo Ribalda Delgado
  0 siblings, 1 reply; 4+ messages in thread
From: Zheyu Ma @ 2022-05-10 11:48 UTC (permalink / raw)
  To: ribalda, mchehab; +Cc: linux-media, linux-kernel, Zheyu Ma

The driver should disable regulators when fails to probe.

Signed-off-by: Zheyu Ma <zheyuma97@gmail.com>
---
 drivers/media/i2c/imx214.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/drivers/media/i2c/imx214.c b/drivers/media/i2c/imx214.c
index 83c1737abeec..61eeaefd4298 100644
--- a/drivers/media/i2c/imx214.c
+++ b/drivers/media/i2c/imx214.c
@@ -1076,6 +1076,7 @@ static int imx214_probe(struct i2c_client *client)
 	mutex_destroy(&imx214->mutex);
 	v4l2_ctrl_handler_free(&imx214->ctrls);
 	pm_runtime_disable(imx214->dev);
+	regulator_bulk_disable(IMX214_NUM_SUPPLIES, imx214->supplies);
 
 	return ret;
 }
-- 
2.25.1


^ permalink raw reply related	[flat|nested] 4+ messages in thread

* Re: [PATCH] media: imx214: Fix the error handling in imx214_probe()
  2022-05-10 11:48 [PATCH] media: imx214: Fix the error handling in imx214_probe() Zheyu Ma
@ 2022-05-11 12:18 ` Ricardo Ribalda Delgado
  2022-05-11 14:04   ` Zheyu Ma
  0 siblings, 1 reply; 4+ messages in thread
From: Ricardo Ribalda Delgado @ 2022-05-11 12:18 UTC (permalink / raw)
  To: Zheyu Ma; +Cc: Mauro Carvalho Chehab, linux-media, LKML

Hi Zheyu

Do you have seen this issue in a real hardware?  The device enters
idle state unconditionally after power_on during probe.

https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/tree/drivers/media/i2c/imx214.c#n1008




On Tue, May 10, 2022 at 1:49 PM Zheyu Ma <zheyuma97@gmail.com> wrote:
>
> The driver should disable regulators when fails to probe.
>
> Signed-off-by: Zheyu Ma <zheyuma97@gmail.com>
> ---
>  drivers/media/i2c/imx214.c | 1 +
>  1 file changed, 1 insertion(+)
>
> diff --git a/drivers/media/i2c/imx214.c b/drivers/media/i2c/imx214.c
> index 83c1737abeec..61eeaefd4298 100644
> --- a/drivers/media/i2c/imx214.c
> +++ b/drivers/media/i2c/imx214.c
> @@ -1076,6 +1076,7 @@ static int imx214_probe(struct i2c_client *client)
>         mutex_destroy(&imx214->mutex);
>         v4l2_ctrl_handler_free(&imx214->ctrls);
>         pm_runtime_disable(imx214->dev);
> +       regulator_bulk_disable(IMX214_NUM_SUPPLIES, imx214->supplies);
>
>         return ret;
>  }
> --
> 2.25.1
>

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH] media: imx214: Fix the error handling in imx214_probe()
  2022-05-11 12:18 ` Ricardo Ribalda Delgado
@ 2022-05-11 14:04   ` Zheyu Ma
  2022-05-11 14:09     ` Ricardo Ribalda Delgado
  0 siblings, 1 reply; 4+ messages in thread
From: Zheyu Ma @ 2022-05-11 14:04 UTC (permalink / raw)
  To: Ricardo Ribalda Delgado; +Cc: Mauro Carvalho Chehab, linux-media, LKML

On Wed, May 11, 2022 at 8:19 PM Ricardo Ribalda Delgado
<ribalda@kernel.org> wrote:
>
> Hi Zheyu
>
> Do you have seen this issue in a real hardware?  The device enters
> idle state unconditionally after power_on during probe.
>
> https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/tree/drivers/media/i2c/imx214.c#n1008

Actually I didn't, I found the "bug" manually.
Thanks for your reminder and sorry for the false alarm.

Zheyu Ma

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH] media: imx214: Fix the error handling in imx214_probe()
  2022-05-11 14:04   ` Zheyu Ma
@ 2022-05-11 14:09     ` Ricardo Ribalda Delgado
  0 siblings, 0 replies; 4+ messages in thread
From: Ricardo Ribalda Delgado @ 2022-05-11 14:09 UTC (permalink / raw)
  To: Zheyu Ma; +Cc: Mauro Carvalho Chehab, linux-media, LKML

Hi

On Wed, May 11, 2022 at 4:04 PM Zheyu Ma <zheyuma97@gmail.com> wrote:
>
> On Wed, May 11, 2022 at 8:19 PM Ricardo Ribalda Delgado
> <ribalda@kernel.org> wrote:
> >
> > Hi Zheyu
> >
> > Do you have seen this issue in a real hardware?  The device enters
> > idle state unconditionally after power_on during probe.
> >
> > https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/tree/drivers/media/i2c/imx214.c#n1008
>
> Actually I didn't, I found the "bug" manually.
> Thanks for your reminder and sorry for the false alarm.

Thank you for looking at the code :)

>
> Zheyu Ma

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2022-05-11 14:09 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-05-10 11:48 [PATCH] media: imx214: Fix the error handling in imx214_probe() Zheyu Ma
2022-05-11 12:18 ` Ricardo Ribalda Delgado
2022-05-11 14:04   ` Zheyu Ma
2022-05-11 14:09     ` Ricardo Ribalda Delgado

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).