clock_ops.c (c4e4d631feb3be4ddf885e647127fddebb450334) clock_ops.c (989561de9b5112999475b406557d9c7e9e59c041)
1/*
2 * drivers/base/power/clock_ops.c - Generic clock manipulation PM callbacks
3 *
4 * Copyright (c) 2011 Rafael J. Wysocki <rjw@sisk.pl>, Renesas Electronics Corp.
5 *
6 * This file is released under the GPLv2.
7 */
8
9#include <linux/kernel.h>
10#include <linux/device.h>
11#include <linux/io.h>
12#include <linux/pm.h>
13#include <linux/pm_clock.h>
14#include <linux/clk.h>
15#include <linux/clkdev.h>
16#include <linux/slab.h>
17#include <linux/err.h>
1/*
2 * drivers/base/power/clock_ops.c - Generic clock manipulation PM callbacks
3 *
4 * Copyright (c) 2011 Rafael J. Wysocki <rjw@sisk.pl>, Renesas Electronics Corp.
5 *
6 * This file is released under the GPLv2.
7 */
8
9#include <linux/kernel.h>
10#include <linux/device.h>
11#include <linux/io.h>
12#include <linux/pm.h>
13#include <linux/pm_clock.h>
14#include <linux/clk.h>
15#include <linux/clkdev.h>
16#include <linux/slab.h>
17#include <linux/err.h>
18#include <linux/pm_domain.h>
18#include <linux/pm_runtime.h>
19
20#ifdef CONFIG_PM_CLK
21
22enum pce_status {
23 PCE_STATUS_NONE = 0,
24 PCE_STATUS_ACQUIRED,
25 PCE_STATUS_ENABLED,

--- 317 unchanged lines hidden (view full) ---

343 case BUS_NOTIFY_ADD_DEVICE:
344 if (dev->pm_domain)
345 break;
346
347 error = pm_clk_create(dev);
348 if (error)
349 break;
350
19#include <linux/pm_runtime.h>
20
21#ifdef CONFIG_PM_CLK
22
23enum pce_status {
24 PCE_STATUS_NONE = 0,
25 PCE_STATUS_ACQUIRED,
26 PCE_STATUS_ENABLED,

--- 317 unchanged lines hidden (view full) ---

344 case BUS_NOTIFY_ADD_DEVICE:
345 if (dev->pm_domain)
346 break;
347
348 error = pm_clk_create(dev);
349 if (error)
350 break;
351
351 dev->pm_domain = clknb->pm_domain;
352 dev_pm_domain_set(dev, clknb->pm_domain);
352 if (clknb->con_ids[0]) {
353 for (con_id = clknb->con_ids; *con_id; con_id++)
354 pm_clk_add(dev, *con_id);
355 } else {
356 pm_clk_add(dev, NULL);
357 }
358
359 break;
360 case BUS_NOTIFY_DEL_DEVICE:
361 if (dev->pm_domain != clknb->pm_domain)
362 break;
363
353 if (clknb->con_ids[0]) {
354 for (con_id = clknb->con_ids; *con_id; con_id++)
355 pm_clk_add(dev, *con_id);
356 } else {
357 pm_clk_add(dev, NULL);
358 }
359
360 break;
361 case BUS_NOTIFY_DEL_DEVICE:
362 if (dev->pm_domain != clknb->pm_domain)
363 break;
364
364 dev->pm_domain = NULL;
365 dev_pm_domain_set(dev, NULL);
365 pm_clk_destroy(dev);
366 break;
367 }
368
369 return 0;
370}
371
372int pm_clk_runtime_suspend(struct device *dev)

--- 138 unchanged lines hidden ---
366 pm_clk_destroy(dev);
367 break;
368 }
369
370 return 0;
371}
372
373int pm_clk_runtime_suspend(struct device *dev)

--- 138 unchanged lines hidden ---