diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2011-11-01 23:22:01 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2011-11-01 23:22:01 -0400 |
commit | cd9a0b6bd67ec372b0ef3cb2abe26974f888b956 (patch) | |
tree | ffec66aa48f95b2b764f9e84fbafc519cce5000e /arch/arm/mach-omap2/smartreflex.c | |
parent | ac5761a650d22dd7dfad4d417463a0981d2da0a4 (diff) | |
parent | 090ad104c5c59c7952d4b8d4cfb60559b38eb3e0 (diff) |
Merge branch 'next/pm' of git://git.linaro.org/people/arnd/arm-soc
* 'next/pm' of git://git.linaro.org/people/arnd/arm-soc: (66 commits)
ARM: CSR: PM: use outer_resume to resume L2 cache
ARM: CSR: call l2x0_of_init to init L2 cache of SiRFprimaII
ARM: OMAP: voltage: voltage layer present, even when CONFIG_PM=n
ARM: CSR: PM: add sleep entry for SiRFprimaII
ARM: CSR: PM: save/restore irq status in suspend cycle
ARM: CSR: PM: save/restore timer status in suspend cycle
OMAP4: PM: TWL6030: add cmd register
OMAP4: PM: TWL6030: fix ON/RET/OFF voltages
OMAP4: PM: TWL6030: address 0V conversions
OMAP4: PM: TWL6030: fix uv to voltage for >0x39
OMAP4: PM: TWL6030: fix voltage conversion formula
omap: voltage: add a stub header file for external/regulator use
OMAP2+: VC: more registers are per-channel starting with OMAP5
OMAP3+: voltage: update nominal voltage in voltdm_scale() not VC post-scale
OMAP3+: voltage: rename omap_voltage_get_nom_volt -> voltdm_get_voltage
OMAP3+: voltdm: final removal of omap_vdd_info
OMAP3+: voltage: move/rename curr_volt from vdd_info into struct voltagedomain
OMAP3+: voltage: rename scale and reset functions using voltdm_ prefix
OMAP3+: VP: combine setting init voltage into common function
OMAP3+: VP: remove unused omap_vp_get_curr_volt()
...
Fix up trivial conflict in arch/arm/mach-prima2/l2x0.c (code removal vs
edit)
Diffstat (limited to 'arch/arm/mach-omap2/smartreflex.c')
-rw-r--r-- | arch/arm/mach-omap2/smartreflex.c | 29 |
1 files changed, 19 insertions, 10 deletions
diff --git a/arch/arm/mach-omap2/smartreflex.c b/arch/arm/mach-omap2/smartreflex.c index f49804f181d4..0347b93211e6 100644 --- a/arch/arm/mach-omap2/smartreflex.c +++ b/arch/arm/mach-omap2/smartreflex.c | |||
@@ -62,6 +62,7 @@ static LIST_HEAD(sr_list); | |||
62 | 62 | ||
63 | static struct omap_sr_class_data *sr_class; | 63 | static struct omap_sr_class_data *sr_class; |
64 | static struct omap_sr_pmic_data *sr_pmic_data; | 64 | static struct omap_sr_pmic_data *sr_pmic_data; |
65 | static struct dentry *sr_dbg_dir; | ||
65 | 66 | ||
66 | static inline void sr_write_reg(struct omap_sr *sr, unsigned offset, u32 value) | 67 | static inline void sr_write_reg(struct omap_sr *sr, unsigned offset, u32 value) |
67 | { | 68 | { |
@@ -826,9 +827,10 @@ static int __init omap_sr_probe(struct platform_device *pdev) | |||
826 | struct omap_sr *sr_info = kzalloc(sizeof(struct omap_sr), GFP_KERNEL); | 827 | struct omap_sr *sr_info = kzalloc(sizeof(struct omap_sr), GFP_KERNEL); |
827 | struct omap_sr_data *pdata = pdev->dev.platform_data; | 828 | struct omap_sr_data *pdata = pdev->dev.platform_data; |
828 | struct resource *mem, *irq; | 829 | struct resource *mem, *irq; |
829 | struct dentry *vdd_dbg_dir, *nvalue_dir; | 830 | struct dentry *nvalue_dir; |
830 | struct omap_volt_data *volt_data; | 831 | struct omap_volt_data *volt_data; |
831 | int i, ret = 0; | 832 | int i, ret = 0; |
833 | char *name; | ||
832 | 834 | ||
833 | if (!sr_info) { | 835 | if (!sr_info) { |
834 | dev_err(&pdev->dev, "%s: unable to allocate sr_info\n", | 836 | dev_err(&pdev->dev, "%s: unable to allocate sr_info\n", |
@@ -899,18 +901,25 @@ static int __init omap_sr_probe(struct platform_device *pdev) | |||
899 | } | 901 | } |
900 | 902 | ||
901 | dev_info(&pdev->dev, "%s: SmartReflex driver initialized\n", __func__); | 903 | dev_info(&pdev->dev, "%s: SmartReflex driver initialized\n", __func__); |
904 | if (!sr_dbg_dir) { | ||
905 | sr_dbg_dir = debugfs_create_dir("smartreflex", NULL); | ||
906 | if (!sr_dbg_dir) { | ||
907 | ret = PTR_ERR(sr_dbg_dir); | ||
908 | pr_err("%s:sr debugfs dir creation failed(%d)\n", | ||
909 | __func__, ret); | ||
910 | goto err_iounmap; | ||
911 | } | ||
912 | } | ||
902 | 913 | ||
903 | /* | 914 | name = kasprintf(GFP_KERNEL, "sr_%s", sr_info->voltdm->name); |
904 | * If the voltage domain debugfs directory is not created, do | 915 | if (!name) { |
905 | * not try to create rest of the debugfs entries. | 916 | dev_err(&pdev->dev, "%s: Unable to alloc debugfs name\n", |
906 | */ | 917 | __func__); |
907 | vdd_dbg_dir = omap_voltage_get_dbgdir(sr_info->voltdm); | 918 | ret = -ENOMEM; |
908 | if (!vdd_dbg_dir) { | ||
909 | ret = -EINVAL; | ||
910 | goto err_iounmap; | 919 | goto err_iounmap; |
911 | } | 920 | } |
912 | 921 | sr_info->dbg_dir = debugfs_create_dir(name, sr_dbg_dir); | |
913 | sr_info->dbg_dir = debugfs_create_dir("smartreflex", vdd_dbg_dir); | 922 | kfree(name); |
914 | if (IS_ERR(sr_info->dbg_dir)) { | 923 | if (IS_ERR(sr_info->dbg_dir)) { |
915 | dev_err(&pdev->dev, "%s: Unable to create debugfs directory\n", | 924 | dev_err(&pdev->dev, "%s: Unable to create debugfs directory\n", |
916 | __func__); | 925 | __func__); |