From: Ricardo Ribalda Delgado <ribalda@kernel.org>
To: git@apitzsch.eu
Cc: Sakari Ailus <sakari.ailus@linux.intel.com>,
Mauro Carvalho Chehab <mchehab@kernel.org>,
~postmarketos/upstreaming@lists.sr.ht,
phone-devel@vger.kernel.org, linux-media@vger.kernel.org,
linux-kernel@vger.kernel.org,
Dave Stevenson <dave.stevenson@raspberrypi.com>,
Vincent Knecht <vincent.knecht@mailoo.org>
Subject: Re: [PATCH v5 12/13] media: i2c: imx214: Fix clock handling on probe error or remove
Date: Thu, 19 Dec 2024 13:24:55 +0100 [thread overview]
Message-ID: <CAPybu_3JgPF-p9jB3F+V5e0w6VHoCFsbWfPRiCEJw3kxCWCn_A@mail.gmail.com> (raw)
In-Reply-To: <20241217-imx214-v5-12-387f52adef4d@apitzsch.eu>
On Tue, Dec 17, 2024 at 10:40 PM André Apitzsch via B4 Relay
<devnull+git.apitzsch.eu@kernel.org> wrote:
>
> From: André Apitzsch <git@apitzsch.eu>
>
> The driver should disable or unprepare the clock on probe error and on
> removing the module.
>
> Remove regulator_bulk_disable(), because it is called by
> imx214_power_off().
>
> Signed-off-by: André Apitzsch <git@apitzsch.eu>
Acked-by: Ricardo Ribalda <ribalda@chromium.org>
> ---
> drivers/media/i2c/imx214.c | 4 +++-
> 1 file changed, 3 insertions(+), 1 deletion(-)
>
> diff --git a/drivers/media/i2c/imx214.c b/drivers/media/i2c/imx214.c
> index 96d05acfeb66480770bb6291027dd023fdccb649..e8d35f8b0f8b57d64f03ff6f5ed9eac51a671e8e 100644
> --- a/drivers/media/i2c/imx214.c
> +++ b/drivers/media/i2c/imx214.c
> @@ -1340,7 +1340,7 @@ static int imx214_probe(struct i2c_client *client)
> v4l2_ctrl_handler_free(&imx214->ctrls);
> error_power_off:
> pm_runtime_disable(imx214->dev);
> - regulator_bulk_disable(IMX214_NUM_SUPPLIES, imx214->supplies);
> + imx214_power_off(dev);
>
> return ret;
> }
> @@ -1356,6 +1356,8 @@ static void imx214_remove(struct i2c_client *client)
> v4l2_ctrl_handler_free(&imx214->ctrls);
>
> pm_runtime_disable(&client->dev);
> + if (!pm_runtime_status_suspended(&client->dev))
> + imx214_power_off(&client->dev);
> pm_runtime_set_suspended(&client->dev);
> }
>
>
> --
> 2.47.1
>
>
>
next prev parent reply other threads:[~2024-12-19 12:25 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-12-17 21:39 [PATCH v5 00/13] media: i2c: imx214: Miscellaneous cleanups and improvements André Apitzsch via B4 Relay
2024-12-17 21:39 ` [PATCH v5 01/13] media: i2c: imx214: Use subdev active state André Apitzsch via B4 Relay
2024-12-17 21:39 ` [PATCH v5 02/13] media: i2c: imx214: Simplify with dev_err_probe() André Apitzsch via B4 Relay
2024-12-17 21:39 ` [PATCH v5 03/13] media: i2c: imx214: Convert to CCI register access helpers André Apitzsch via B4 Relay
2024-12-17 21:39 ` [PATCH v5 04/13] media: i2c: imx214: Replace register addresses with macros André Apitzsch via B4 Relay
2024-12-17 21:39 ` [PATCH v5 05/13] media: i2c: imx214: Drop IMX214_REG_EXPOSURE from mode reg arrays André Apitzsch via B4 Relay
2024-12-17 21:39 ` [PATCH v5 06/13] media: i2c: imx214: Check number of lanes from device tree André Apitzsch via B4 Relay
2024-12-17 21:39 ` [PATCH v5 07/13] media: i2c: imx214: Add vblank and hblank controls André Apitzsch via B4 Relay
2024-12-19 20:15 ` Ricardo Ribalda Delgado
2024-12-17 21:39 ` [PATCH v5 08/13] media: i2c: imx214: Implement vflip/hflip controls André Apitzsch via B4 Relay
2024-12-17 21:39 ` [PATCH v5 09/13] media: i2c: imx214: Add analogue/digital gain control André Apitzsch via B4 Relay
2024-12-17 21:39 ` [PATCH v5 10/13] media: i2c: imx214: Verify chip ID André Apitzsch via B4 Relay
2024-12-17 21:39 ` [PATCH v5 11/13] media: i2c: imx214: Add test pattern control André Apitzsch via B4 Relay
2024-12-17 21:39 ` [PATCH v5 12/13] media: i2c: imx214: Fix clock handling on probe error or remove André Apitzsch via B4 Relay
2024-12-19 12:24 ` Ricardo Ribalda Delgado [this message]
2024-12-17 21:39 ` [PATCH v5 13/13] media: i2c: imx214: Fix link frequency validation André Apitzsch via B4 Relay
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=CAPybu_3JgPF-p9jB3F+V5e0w6VHoCFsbWfPRiCEJw3kxCWCn_A@mail.gmail.com \
--to=ribalda@kernel.org \
--cc=dave.stevenson@raspberrypi.com \
--cc=git@apitzsch.eu \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-media@vger.kernel.org \
--cc=mchehab@kernel.org \
--cc=phone-devel@vger.kernel.org \
--cc=sakari.ailus@linux.intel.com \
--cc=vincent.knecht@mailoo.org \
--cc=~postmarketos/upstreaming@lists.sr.ht \
/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®