22 #include <linux/slab.h>
49 const char __user *ubuf,
size_t count, loff_t *ppos)
55 memset(buf, 0,
sizeof(buf));
74 static ssize_t btmrvl_hscfgcmd_read(
struct file *
file,
char __user *userbuf,
75 size_t count, loff_t *ppos)
81 ret =
snprintf(buf,
sizeof(buf) - 1,
"%d\n",
88 .read = btmrvl_hscfgcmd_read,
89 .write = btmrvl_hscfgcmd_write,
94 static ssize_t btmrvl_psmode_write(
struct file *file,
const char __user *ubuf,
95 size_t count, loff_t *ppos)
101 memset(buf, 0,
sizeof(buf));
115 static ssize_t btmrvl_psmode_read(
struct file *file,
char __user *userbuf,
116 size_t count, loff_t *ppos)
122 ret =
snprintf(buf,
sizeof(buf) - 1,
"%d\n",
129 .read = btmrvl_psmode_read,
130 .write = btmrvl_psmode_write,
135 static ssize_t btmrvl_pscmd_write(
struct file *file,
const char __user *ubuf,
136 size_t count, loff_t *ppos)
142 memset(buf, 0,
sizeof(buf));
162 static ssize_t btmrvl_pscmd_read(
struct file *file,
char __user *userbuf,
163 size_t count, loff_t *ppos)
175 .read = btmrvl_pscmd_read,
176 .write = btmrvl_pscmd_write,
181 static ssize_t btmrvl_gpiogap_write(
struct file *file,
const char __user *ubuf,
182 size_t count, loff_t *ppos)
188 memset(buf, 0,
sizeof(buf));
202 static ssize_t btmrvl_gpiogap_read(
struct file *file,
char __user *userbuf,
203 size_t count, loff_t *ppos)
209 ret =
snprintf(buf,
sizeof(buf) - 1,
"0x%x\n",
216 .read = btmrvl_gpiogap_read,
217 .write = btmrvl_gpiogap_write,
222 static ssize_t btmrvl_hscmd_write(
struct file *file,
const char __user *ubuf,
223 size_t count, loff_t *ppos)
229 memset(buf, 0,
sizeof(buf));
247 static ssize_t btmrvl_hscmd_read(
struct file *file,
char __user *userbuf,
248 size_t count, loff_t *ppos)
260 .read = btmrvl_hscmd_read,
261 .write = btmrvl_hscmd_write,
266 static ssize_t btmrvl_hsmode_write(
struct file *file,
const char __user *ubuf,
267 size_t count, loff_t *ppos)
273 memset(buf, 0,
sizeof(buf));
287 static ssize_t btmrvl_hsmode_read(
struct file *file,
char __user * userbuf,
288 size_t count, loff_t *ppos)
300 .read = btmrvl_hsmode_read,
301 .write = btmrvl_hsmode_write,
306 static ssize_t btmrvl_curpsmode_read(
struct file *file,
char __user *userbuf,
307 size_t count, loff_t *ppos)
319 .read = btmrvl_curpsmode_read,
324 static ssize_t btmrvl_psstate_read(
struct file *file,
char __user * userbuf,
325 size_t count, loff_t *ppos)
337 .read = btmrvl_psstate_read,
342 static ssize_t btmrvl_hsstate_read(
struct file *file,
char __user *userbuf,
343 size_t count, loff_t *ppos)
355 .read = btmrvl_hsstate_read,
360 static ssize_t btmrvl_txdnldready_read(
struct file *file,
char __user *userbuf,
361 size_t count, loff_t *ppos)
367 ret =
snprintf(buf,
sizeof(buf) - 1,
"%d\n",
374 .read = btmrvl_txdnldready_read,
388 priv->debugfs_data =
dbg;
391 BT_ERR(
"Can not allocate memory for btmrvl_debugfs_data.");
398 priv, &btmrvl_psmode_fops);
400 priv, &btmrvl_pscmd_fops);
402 priv, &btmrvl_gpiogap_fops);
404 priv, &btmrvl_hsmode_fops);
406 priv, &btmrvl_hscmd_fops);
408 priv, &btmrvl_hscfgcmd_fops);
413 &btmrvl_curpsmode_fops);
415 priv, &btmrvl_psstate_fops);
417 priv, &btmrvl_hsstate_fops);
420 &btmrvl_txdnldready_fops);