[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <3f379877-284e-9013-0687-0a0250d85c10@gmail.com>
Date: Mon, 21 Jun 2021 23:40:04 +0100
From: Daniel Scally <djrscally@...il.com>
To: Andy Shevchenko <andriy.shevchenko@...ux.intel.com>,
Hans de Goede <hdegoede@...hat.com>,
Mario Limonciello <mario.limonciello@....com>,
Heikki Krogerus <heikki.krogerus@...ux.intel.com>,
linux-kernel@...r.kernel.org, platform-driver-x86@...r.kernel.org
Cc: Mark Gross <mgross@...ux.intel.com>
Subject: Re: [PATCH v2 5/8] platform/x86: intel_skl_int3472: Provide
skl_int3472_unregister_regulator()
Hi Andy
On 18/06/2021 13:55, Andy Shevchenko wrote:
> For the sake of APIs to be properly layered provide
> skl_int3472_unregister_regulator().
>
> Signed-off-by: Andy Shevchenko <andriy.shevchenko@...ux.intel.com>
Reviewed-by: Daniel Scally <djrscally@...il.com>
Tested-by: Daniel Scally <djrscally@...il.com>
And for 6/8 too.
> ---
> v2: new patch
> .../x86/intel-int3472/intel_skl_int3472_clk_and_regulator.c | 6 ++++++
> .../platform/x86/intel-int3472/intel_skl_int3472_common.h | 2 ++
> .../platform/x86/intel-int3472/intel_skl_int3472_discrete.c | 4 ++--
> 3 files changed, 10 insertions(+), 2 deletions(-)
>
> diff --git a/drivers/platform/x86/intel-int3472/intel_skl_int3472_clk_and_regulator.c b/drivers/platform/x86/intel-int3472/intel_skl_int3472_clk_and_regulator.c
> index 49ea1e86c193..60c7128f44ee 100644
> --- a/drivers/platform/x86/intel-int3472/intel_skl_int3472_clk_and_regulator.c
> +++ b/drivers/platform/x86/intel-int3472/intel_skl_int3472_clk_and_regulator.c
> @@ -193,3 +193,9 @@ int skl_int3472_register_regulator(struct int3472_discrete_device *int3472,
>
> return ret;
> }
> +
> +void skl_int3472_unregister_regulator(struct int3472_discrete_device *int3472)
> +{
> + regulator_unregister(int3472->regulator.rdev);
> + gpiod_put(int3472->regulator.gpio);
> +}
> diff --git a/drivers/platform/x86/intel-int3472/intel_skl_int3472_common.h b/drivers/platform/x86/intel-int3472/intel_skl_int3472_common.h
> index 765e01ec1604..50f73c6eab44 100644
> --- a/drivers/platform/x86/intel-int3472/intel_skl_int3472_common.h
> +++ b/drivers/platform/x86/intel-int3472/intel_skl_int3472_common.h
> @@ -112,7 +112,9 @@ union acpi_object *skl_int3472_get_acpi_buffer(struct acpi_device *adev,
> char *id);
> int skl_int3472_fill_cldb(struct acpi_device *adev, struct int3472_cldb *cldb);
> int skl_int3472_register_clock(struct int3472_discrete_device *int3472);
> +
> int skl_int3472_register_regulator(struct int3472_discrete_device *int3472,
> struct acpi_resource_gpio *agpio);
> +void skl_int3472_unregister_regulator(struct int3472_discrete_device *int3472);
>
> #endif
> diff --git a/drivers/platform/x86/intel-int3472/intel_skl_int3472_discrete.c b/drivers/platform/x86/intel-int3472/intel_skl_int3472_discrete.c
> index fd681d2a73fe..2638d375e226 100644
> --- a/drivers/platform/x86/intel-int3472/intel_skl_int3472_discrete.c
> +++ b/drivers/platform/x86/intel-int3472/intel_skl_int3472_discrete.c
> @@ -400,15 +400,15 @@ int skl_int3472_discrete_remove(struct platform_device *pdev)
> struct int3472_discrete_device *int3472 = platform_get_drvdata(pdev);
>
> gpiod_remove_lookup_table(&int3472->gpios);
> - regulator_unregister(int3472->regulator.rdev);
> clk_unregister(int3472->clock.clk);
>
> if (int3472->clock.cl)
> clkdev_drop(int3472->clock.cl);
>
> - gpiod_put(int3472->regulator.gpio);
> gpiod_put(int3472->clock.ena_gpio);
> gpiod_put(int3472->clock.led_gpio);
>
> + skl_int3472_unregister_regulator(int3472);
> +
> return 0;
> }
Powered by blists - more mailing lists