All of lore.kernel.org
 help / color / mirror / Atom feed
From: Krzysztof Kozlowski <krzk@kernel.org>
To: Marek Szyprowski <m.szyprowski@samsung.com>
Cc: linux-clk@vger.kernel.org,
	"linux-samsung-soc@vger.kernel.org"
	<linux-samsung-soc@vger.kernel.org>,
	"Sylwester Nawrocki" <snawrocki@kernel.org>,
	"Chanwoo Choi" <cw00.choi@samsung.com>,
	"Bartłomiej Żołnierkiewicz" <b.zolnierkie@samsung.com>
Subject: Re: [PATCH 03/10] clk: samsung: s3c2412: Use generic helper for handling suspend/resume
Date: Thu, 30 Aug 2018 08:42:08 +0200	[thread overview]
Message-ID: <CAJKOXPfP5zshtEsk81-0bM97jLYrDiW2BNg58Uf9pBz55bHZXQ@mail.gmail.com> (raw)
In-Reply-To: <20180829155046.29359-4-m.szyprowski@samsung.com>

On Wed, 29 Aug 2018 at 17:51, Marek Szyprowski <m.szyprowski@samsung.com> wrote:
>
> Replace common suspend/resume handling code by generic helper.
> No functional change.
>
> Signed-off-by: Marek Szyprowski <m.szyprowski@samsung.com>
> ---
>  drivers/clk/samsung/clk-s3c2412.c | 43 ++-----------------------------
>  1 file changed, 2 insertions(+), 41 deletions(-)
>
> diff --git a/drivers/clk/samsung/clk-s3c2412.c b/drivers/clk/samsung/clk-s3c2412.c
> index 6bc94d3aff78..dd1159050a5a 100644
> --- a/drivers/clk/samsung/clk-s3c2412.c
> +++ b/drivers/clk/samsung/clk-s3c2412.c
> @@ -11,7 +11,6 @@
>  #include <linux/clk-provider.h>
>  #include <linux/of.h>
>  #include <linux/of_address.h>
> -#include <linux/syscore_ops.h>
>  #include <linux/reboot.h>
>
>  #include <dt-bindings/clock/s3c2412.h>
> @@ -29,9 +28,6 @@
>
>  static void __iomem *reg_base;
>
> -#ifdef CONFIG_PM_SLEEP
> -static struct samsung_clk_reg_dump *s3c2412_save;
> -
>  /*
>   * list of controller registers to be saved and restored during a
>   * suspend/resume cycle.
> @@ -45,42 +41,6 @@ static unsigned long s3c2412_clk_regs[] __initdata = {
>         CLKSRC,

Did you try building without PM_SLEEP? Now this will be included
always so you might have to mark it __maybe_unused.

Best regards,
Krzysztof

>  };
>
> -static int s3c2412_clk_suspend(void)
> -{
> -       samsung_clk_save(reg_base, s3c2412_save,
> -                               ARRAY_SIZE(s3c2412_clk_regs));
> -
> -       return 0;
> -}
> -
> -static void s3c2412_clk_resume(void)
> -{
> -       samsung_clk_restore(reg_base, s3c2412_save,
> -                               ARRAY_SIZE(s3c2412_clk_regs));
> -}
> -
> -static struct syscore_ops s3c2412_clk_syscore_ops = {
> -       .suspend = s3c2412_clk_suspend,
> -       .resume = s3c2412_clk_resume,
> -};
> -
> -static void __init s3c2412_clk_sleep_init(void)
> -{
> -       s3c2412_save = samsung_clk_alloc_reg_dump(s3c2412_clk_regs,
> -                                               ARRAY_SIZE(s3c2412_clk_regs));
> -       if (!s3c2412_save) {
> -               pr_warn("%s: failed to allocate sleep save data, no sleep support!\n",
> -                       __func__);
> -               return;
> -       }
> -
> -       register_syscore_ops(&s3c2412_clk_syscore_ops);
> -       return;
> -}
> -#else
> -static void __init s3c2412_clk_sleep_init(void) {}
> -#endif
> -
>  static struct clk_div_table divxti_d[] = {
>         { .val = 0, .div = 1 },
>         { .val = 1, .div = 2 },
> @@ -278,7 +238,8 @@ void __init s3c2412_common_clk_init(struct device_node *np, unsigned long xti_f,
>         samsung_clk_register_alias(ctx, s3c2412_aliases,
>                                    ARRAY_SIZE(s3c2412_aliases));
>
> -       s3c2412_clk_sleep_init();
> +       samsung_clk_sleep_init(reg_base, s3c2412_clk_regs,
> +                              ARRAY_SIZE(s3c2412_clk_regs));
>
>         samsung_clk_of_add_provider(np, ctx);
>
> --
> 2.17.1
>

  parent reply	other threads:[~2018-08-30 10:42 UTC|newest]

Thread overview: 35+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <CGME20180829155058eucas1p1db74951957e2d911ba91ddcc07df52ac@eucas1p1.samsung.com>
2018-08-29 15:50 ` [PATCH 00/10] Cleanup suspend/resume code in Samsung clock drivers Marek Szyprowski
     [not found]   ` <CGME20180829155059eucas1p28a20924521edaa4c9bd3d9683d0f2d0d@eucas1p2.samsung.com>
2018-08-29 15:50     ` [PATCH 01/10] clk: samsung: Remove excessive include Marek Szyprowski
2018-08-30  0:00       ` Chanwoo Choi
2018-08-30  6:34       ` Krzysztof Kozlowski
     [not found]   ` <CGME20180829155059eucas1p26a0ea66a0fc96c73cdd60648b82bd23e@eucas1p2.samsung.com>
2018-08-29 15:50     ` [PATCH 02/10] clk: samsung: s3c2410: Use generic helper for handling suspend/resume Marek Szyprowski
2018-08-30  1:10       ` Chanwoo Choi
2018-08-30  6:39       ` Krzysztof Kozlowski
2018-08-30 11:26         ` Marek Szyprowski
2018-08-31  6:34           ` Krzysztof Kozlowski
     [not found]   ` <CGME20180829155059eucas1p16fecde00348e0a2e6707aaf2a76320be@eucas1p1.samsung.com>
2018-08-29 15:50     ` [PATCH 03/10] clk: samsung: s3c2412: " Marek Szyprowski
2018-08-30  1:17       ` Chanwoo Choi
2018-08-30  6:42       ` Krzysztof Kozlowski [this message]
2018-08-30 12:50         ` Marek Szyprowski
2018-08-30 13:10           ` Krzysztof Kozlowski
     [not found]   ` <CGME20180829155100eucas1p1ba8149066e026fc15f82091968b78a08@eucas1p1.samsung.com>
2018-08-29 15:50     ` [PATCH 04/10] clk: samsung: s3c2443: " Marek Szyprowski
2018-08-30  1:18       ` Chanwoo Choi
2018-08-31  6:33       ` Krzysztof Kozlowski
     [not found]   ` <CGME20180829155100eucas1p16cded24187167d4af4d43f64c7abd88b@eucas1p1.samsung.com>
2018-08-29 15:50     ` [PATCH 05/10] clk: samsung: s3c64xx: " Marek Szyprowski
2018-08-30  1:18       ` Chanwoo Choi
2018-08-31  6:35       ` Krzysztof Kozlowski
     [not found]   ` <CGME20180829155101eucas1p2f6ecb6ad0eb37fa725ac950cad73c423@eucas1p2.samsung.com>
2018-08-29 15:50     ` [PATCH 06/10] clk: samsung: s5pv210: " Marek Szyprowski
2018-08-30  1:18       ` Chanwoo Choi
2018-08-31  6:36       ` Krzysztof Kozlowski
     [not found]   ` <CGME20180829155101eucas1p22b694bf6395d8efcb33ba3802e287c88@eucas1p2.samsung.com>
2018-08-29 15:50     ` [PATCH 07/10] clk: samsung: exynos5250: " Marek Szyprowski
2018-08-30  1:19       ` Chanwoo Choi
2018-08-31  6:36       ` Krzysztof Kozlowski
     [not found]   ` <CGME20180829155102eucas1p1ca7a26c10847dcb585f01b54657e29cb@eucas1p1.samsung.com>
2018-08-29 15:50     ` [PATCH 08/10] clk: samsung: Add support for setting registers state before suspend Marek Szyprowski
2018-08-30  1:36       ` Chanwoo Choi
2018-08-31 14:59       ` Krzysztof Kozlowski
2018-09-06 13:25         ` Marek Szyprowski
2018-09-06 16:15           ` Krzysztof Kozlowski
     [not found]   ` <CGME20180829155102eucas1p2a4b1c554623ff97a23f85f26a6b537e2@eucas1p2.samsung.com>
2018-08-29 15:50     ` [PATCH 09/10] clk: samsung: exynos4: Use generic helper for handling suspend/resume Marek Szyprowski
2018-09-06 19:49       ` Sylwester Nawrocki
2018-09-07  6:27         ` Marek Szyprowski
     [not found]   ` <CGME20180829155103eucas1p16b6cddb4babcfb60a3257e017bea347e@eucas1p1.samsung.com>
2018-08-29 15:50     ` [PATCH 10/10] clk: samsung: exynos5420: " Marek Szyprowski

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=CAJKOXPfP5zshtEsk81-0bM97jLYrDiW2BNg58Uf9pBz55bHZXQ@mail.gmail.com \
    --to=krzk@kernel.org \
    --cc=b.zolnierkie@samsung.com \
    --cc=cw00.choi@samsung.com \
    --cc=linux-clk@vger.kernel.org \
    --cc=linux-samsung-soc@vger.kernel.org \
    --cc=m.szyprowski@samsung.com \
    --cc=snawrocki@kernel.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: link
Be 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.