aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/mfd/ab3100-otp.c
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2010-03-07 18:56:04 -0500
committerLinus Torvalds <torvalds@linux-foundation.org>2010-03-07 18:56:04 -0500
commit6dc3eb5c1f96641cda7056aa34393e317076d6cf (patch)
tree9a615b884d7ff5375382b5a3f020f518f618c589 /drivers/mfd/ab3100-otp.c
parent8fe900b8c7aa6a307e552ff776e0c04c28dcf9c8 (diff)
parent2c08583c6a6b4c5f5dea4cb0931eca82af7db6fe (diff)
Merge branch 'for-next' of git://git.kernel.org/pub/scm/linux/kernel/git/sameo/mfd-2.6
* 'for-next' of git://git.kernel.org/pub/scm/linux/kernel/git/sameo/mfd-2.6: (66 commits) mfd: Fix ucb1x00 build failure for collie_defconfig mfd: Fix lpc_sch related depends/selects, fix build error gpio: Fix sch_gpio warning gpio: add Intel SCH GPIO controller driver i2c: convert i2c-isch to platform_device mfd: Use completion interrupt for WM831x AUXADC mfd: Use completion interrupt for WM835x AUXADC mfd: Introduce remove_script function for twl4030 mfd/mmc: SDHI Kconfig update mfd: sh_mobile_sdhi MMC_CAP_MMC_HIGHSPEED support gpiolib: Force wm831x GPIOs into GPIO mode when requested mfd: Add WM831x revision B support gpiolib: Correct debugfs display of WM831x GPIO inversion gpiolib: Actually set output state in wm831x_gpio_direction_output() tmio_mmc: Balance cell enable()/disable() calls tmio_mmc: Remove const from platform data V3 tmio_mmc: Use 100ms mmc_detect_change() delay tmio_mmc: Add MMC_CAP_MMC_HIGHSPEED support V2 tmio_mmc: Keep card-detect interrupts enabled mfd: Add twl6030 base addr for ID0, ID1, ID2 ...
Diffstat (limited to 'drivers/mfd/ab3100-otp.c')
-rw-r--r--drivers/mfd/ab3100-otp.c13
1 files changed, 7 insertions, 6 deletions
diff --git a/drivers/mfd/ab3100-otp.c b/drivers/mfd/ab3100-otp.c
index 0499b2031a2c..b603469dff69 100644
--- a/drivers/mfd/ab3100-otp.c
+++ b/drivers/mfd/ab3100-otp.c
@@ -13,6 +13,7 @@
13#include <linux/platform_device.h> 13#include <linux/platform_device.h>
14#include <linux/mfd/ab3100.h> 14#include <linux/mfd/ab3100.h>
15#include <linux/debugfs.h> 15#include <linux/debugfs.h>
16#include <linux/seq_file.h>
16 17
17/* The OTP registers */ 18/* The OTP registers */
18#define AB3100_OTP0 0xb0 19#define AB3100_OTP0 0xb0
@@ -95,11 +96,10 @@ static int __init ab3100_otp_read(struct ab3100_otp *otp)
95 * This is a simple debugfs human-readable file that dumps out 96 * This is a simple debugfs human-readable file that dumps out
96 * the contents of the OTP. 97 * the contents of the OTP.
97 */ 98 */
98#ifdef CONFIG_DEBUGFS 99#ifdef CONFIG_DEBUG_FS
99static int show_otp(struct seq_file *s, void *v) 100static int ab3100_show_otp(struct seq_file *s, void *v)
100{ 101{
101 struct ab3100_otp *otp = s->private; 102 struct ab3100_otp *otp = s->private;
102 int err;
103 103
104 seq_printf(s, "OTP is %s\n", otp->locked ? "LOCKED" : "UNLOCKED"); 104 seq_printf(s, "OTP is %s\n", otp->locked ? "LOCKED" : "UNLOCKED");
105 seq_printf(s, "OTP clock switch startup is %uHz\n", otp->freq); 105 seq_printf(s, "OTP clock switch startup is %uHz\n", otp->freq);
@@ -113,7 +113,7 @@ static int show_otp(struct seq_file *s, void *v)
113 113
114static int ab3100_otp_open(struct inode *inode, struct file *file) 114static int ab3100_otp_open(struct inode *inode, struct file *file)
115{ 115{
116 return single_open(file, ab3100_otp_show, inode->i_private); 116 return single_open(file, ab3100_show_otp, inode->i_private);
117} 117}
118 118
119static const struct file_operations ab3100_otp_operations = { 119static const struct file_operations ab3100_otp_operations = {
@@ -131,13 +131,14 @@ static int __init ab3100_otp_init_debugfs(struct device *dev,
131 &ab3100_otp_operations); 131 &ab3100_otp_operations);
132 if (!otp->debugfs) { 132 if (!otp->debugfs) {
133 dev_err(dev, "AB3100 debugfs OTP file registration failed!\n"); 133 dev_err(dev, "AB3100 debugfs OTP file registration failed!\n");
134 return err; 134 return -ENOENT;
135 } 135 }
136 return 0;
136} 137}
137 138
138static void __exit ab3100_otp_exit_debugfs(struct ab3100_otp *otp) 139static void __exit ab3100_otp_exit_debugfs(struct ab3100_otp *otp)
139{ 140{
140 debugfs_remove_file(otp->debugfs); 141 debugfs_remove(otp->debugfs);
141} 142}
142#else 143#else
143/* Compile this out if debugfs not selected */ 144/* Compile this out if debugfs not selected */