MFD: WL1273 FM Radio: MFD driver for the FM radio.
Quoted 27 lines · Pavan Savoy
From: Pavan Savoy <[email protected]>
Subject: Re: [PATCH v4 2/5] MFD: WL1273 FM Radio: MFD driver for the FM radio.
To: "Matti J. Aaltonen" <[email protected]>, "Mauro Carvalho Chehab" <[email protected]>
Cc: [email protected], [email protected], [email protected], "pavan savoy" <[email protected]>
Date: Wednesday, 7 July, 2010, 10:51 AM--- On Tue, 6/7/10, Mauro Carvalho Chehab <[email protected]>
Quoted 2 lines · wrote:
From: Mauro Carvalho Chehab <[email protected]>
Subject: Re: [PATCH v4 2/5] MFD: WL1273 FM Radio: MFDdriver for the FM radio.
Quoted 2 lines
To: "Matti J. Aaltonen" <[email protected]>
Cc: [email protected],[email protected],
[email protected]Quoted 4 lines
Date: Tuesday, 6 July, 2010, 8:04 AM
Em 04-06-2010 07:34, Matti J.
Aaltonen escreveu:Quoted 1 line
This is a parent driver for two child drivers:
the
Quoted 2 lines
V4L2 driver and
Quoted 1 line
the ALSA codec driver. The MFD part provides the
I2C
Quoted 3 lines
communication
Quoted 1 line
to the device and a couple of functions that are
called from both
Quoted 8 lines
Quoted 1 line
Quoted 1 line
children.
Where can I have a look at the whole code ? As in some local tree, where all codes are put up ? Basically, we have a V4L2 driver for WL128x (using TTY as transport) and plan to push them soon ...
This would be a nice input ...
Anywhere I can have a look at the whole code?
We are trying to push out V4L2 drivers for FM on 128x, and intend to use several V4L2 new ioctls which you have defined (_BAND_) being one of them.
Also we plan to push FM Tx of it too.. TX_CLASS from V4L2 has most of the ioctls and plan to introduce the rest.
Quoted 1,591 lines
Quoted 59 lines
Quoted 4 lines
Signed-off-by Matti J. Aaltonen <[email protected]>---
drivers/mfd/Kconfig| 6 +
Quoted 1 line
drivers/mfd/Makefile| 2 +
Quoted 1 line
drivers/mfd/wl1273-core.c| 616
+++++++++++++++++++++++++++++++++++++++Quoted 1 line
include/linux/mfd/wl1273-core.h| 326+++++++++++++++++++++
Quoted 1 line
4 files changed, 950 insertions(+), 0deletions(-)
Quoted 2 lines
create mode 100644
drivers/mfd/wl1273-core.c
create mode 100644
include/linux/mfd/wl1273-core.hReview
Quoted 2 lines
(quoted diff) +0
-0b/drivers/mfd/Kconfig
Quoted 16 lines
index 413576a..5998a94 100644
drivers/mfd/Kconfig +0
-0@@ -135,6 +135,12 @@ config TWL4030_CODECselect
MFD_CORE
default ndrivers/mfd/Kconfig +6
-0+config WL1273_CORE + bool + depends on I2C + select MFD_CORE + default n +config
MFD_TMIO
bool
default nReview
Quoted 1 line
(quoted diff) +0
-0b/drivers/mfd/Makefile
drivers/mfd/Makefile
Quoted 4 lines
index 78295d6..46e611d 100644
drivers/mfd/Makefile +0
-0@@ -30,6 +30,8 @@obj-$(CONFIG_TWL4030_CORE) += twl-core.o
twl4030-irq.o twl6030-irq.oQuoted 1 line
obj-$(CONFIG_TWL4030_POWER) +=
twl4030-power.o
Quoted 1 line
obj-$(CONFIG_TWL4030_CODEC) +=
twl4030-codec.o
Quoted 2 lines
+obj-$(CONFIG_WL1273_CORE) +=wl1273-core.o
Quoted 2 lines
+
obj-$(CONFIG_MFD_MC13783) +=mc13783-core.o
Quoted 2 lines
obj-$(CONFIG_MFD_CORE)+= mfd-core.o
Review
Quoted 1 line
(quoted diff) +0
-0
b/drivers/mfd/wl1273-core.cQuoted 7 lines
drivers/mfd/wl1273-core.c line 2
Quoted 7 lines
new file mode 100644
index 0000000..6c7dbbadrivers/mfd/wl1273-core.c new file +2
-0@@ -0,0 +1,616 @@ +/* +* MFD driver for wl1273 FM radio and audio codec
Quoted 5 lines
submodules.
drivers/mfd/wl1273-core.c line 6
Quoted 4 lines
drivers/mfd/wl1273-core.c new file +4
-0+* +* Author: Matti Aaltonen <[email protected]> +* +* Copyright: (C) 2010 Nokia Quoted 9 lines
Corporation
drivers/mfd/wl1273-core.c line 8
Quoted 2 lines
drivers/mfd/wl1273-core.c new file +2
-0+* +* This program is free software; you can redistribute it and/or modify
drivers/mfd/wl1273-core.c line 9
Quoted 1 line
drivers/mfd/wl1273-core.c new file +1
-0+* it under the terms of the GNU General Public License version 2 as
Quoted 3 lines
drivers/mfd/wl1273-core.c new file +3
-0+* published by the Free Software Foundation. +* +* This program is distributed in the hope that it
Quoted 2 lines
will be useful, but
Quoted 1 line
drivers/mfd/wl1273-core.c new file +1
-0+* WITHOUT ANY WARRANTY; without even the implied
Quoted 6 lines
warranty of
drivers/mfd/wl1273-core.c line 14
Quoted 1 line
drivers/mfd/wl1273-core.c new file +1
-0+* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
Quoted 3 lines
drivers/mfd/wl1273-core.c new file +3
-0+* General Public License for more details. +* +* You should have received a copy of the GNU General
Quoted 2 lines
Public License
Quoted 1 line
drivers/mfd/wl1273-core.c new file +1
-0+* along with this program; if not, write to the Free
Quoted 2 lines
Software
Quoted 1 line
drivers/mfd/wl1273-core.c new file +1
-0+* Foundation, Inc., 51 Franklin St, Fifth Floor,
Quoted 51 lines
Boston, MA
Quoted 13 lines
drivers/mfd/wl1273-core.c new file +13
-0+* 02110-1301 USA +* +*/ + +#undef DEBUG + +#include <asm/unaligned.h> +#include <linux/completion.h> +#include <linux/delay.h> +#include <linux/i2c.h> +#include <linux/interrupt.h> +#include <linux/module.h> +#include <linux/types.h> drivers/mfd/wl1273-core.c line 42
Quoted 10 lines
drivers/mfd/wl1273-core.c new file +10
-0+#include <linux/kernel.h> +#include <linux/fs.h> +#include <linux/platform_device.h> +#include <linux/mfd/core.h> +#include <linux/mfd/wl1273-core.h> +#include <media/v4l2-common.h> + +#define DRIVER_DESC "WL1273 FM Radio Core" + +#defineWL1273_IRQ_MASK (WL1273_FR_EVENT
| \drivers/mfd/wl1273-core.c line 43
Quoted 1 line
drivers/mfd/wl1273-core.c new file +1
-0+
WL1273_POW_ENB_EVENT)drivers/mfd/wl1273-core.c line 48
Quoted 5 lines
drivers/mfd/wl1273-core.c new file +5
-0+ +static const struct band_info bands[] = { + /* USA & Europe */ + { +.bottom_frequency = 87500,
drivers/mfd/wl1273-core.c line 49
Quoted 1 line
drivers/mfd/wl1273-core.c new file +1
-0+.top_frequency =
108000,drivers/mfd/wl1273-core.c line 50
Quoted 1 line
drivers/mfd/wl1273-core.c new file +1
-0+.band
=V4L2_FM_BAND_OTHER,drivers/mfd/wl1273-core.c line 54
Quoted 4 lines
drivers/mfd/wl1273-core.c new file +4
-0+ }, + /* Japan */ + { +.bottom_frequency = 76000,
drivers/mfd/wl1273-core.c line 55
Quoted 1 line
drivers/mfd/wl1273-core.c new file +1
-0+.top_frequency =
90000,drivers/mfd/wl1273-core.c line 56
Quoted 1 line
drivers/mfd/wl1273-core.c new file +1
-0+.band
=V4L2_FM_BAND_JAPAN,Quoted 7 lines
drivers/mfd/wl1273-core.c line 63
Quoted 7 lines
drivers/mfd/wl1273-core.c new file +7
-0+ }, +}; + +/* +* static unsigned char radio_band - Band +* +* The bands are 0=Japan, 1=USA-Europe. USA-Europe is
Quoted 9 lines
the default.
drivers/mfd/wl1273-core.c line 67
Quoted 4 lines
drivers/mfd/wl1273-core.c new file +4
-0+*/ +static unsigned char radio_band =1 ; +module_param (radio_band, byte,0 ); +MODULE_PARM_DESC(radio_band, "Band: 0=Japan,1=USA-Europe*");
drivers/mfd/wl1273-core.c line 70
Quoted 3 lines
drivers/mfd/wl1273-core.c new file +3
-0+ +/* +* static unsigned int rds_buf - the number of RDS
Quoted 10 lines
buffer blocks used.
drivers/mfd/wl1273-core.c line 76
Quoted 6 lines
drivers/mfd/wl1273-core.c new file +6
-0+* +* The default number is 100. +*/ +static unsigned int rds_buf =100 ; +module_param (rds_buf, uint,0 ); +MODULE_PARM_DESC(rds_buf, "RDS buffer entries:*100*");
drivers/mfd/wl1273-core.c line 78
Quoted 2 lines
drivers/mfd/wl1273-core.c new file +2
-0+ +int wl1273_fm_read_reg(struct wl1273_core *core,u8
Quoted 18 lines
reg, u16 *value)
drivers/mfd/wl1273-core.c line 80
Quoted 2 lines
drivers/mfd/wl1273-core.c new file +2
-0+{ + struct i2c_client *client =
core->i2c_dev;drivers/mfd/wl1273-core.c line 84
Quoted 4 lines
drivers/mfd/wl1273-core.c new file +4
-0+ u8 b[2]; + int r; + + r =
i2c_smbus_read_i2c_block_data(client, reg, 2, b);drivers/mfd/wl1273-core.c line 86
Quoted 2 lines
drivers/mfd/wl1273-core.c new file +2
-0+ if (r != 2) { +dev_err(&client->dev, "%s: Read: %d fails.\n",
__func__, reg);drivers/mfd/wl1273-core.c line 87
Quoted 1 line
drivers/mfd/wl1273-core.c new file +1
-0+ return
-EREMOTEIO;drivers/mfd/wl1273-core.c line 90
Quoted 3 lines
drivers/mfd/wl1273-core.c new file +3
-0+ } + + *value = (u16)b[0] << 8 |Quoted 7 lines
b[1];
drivers/mfd/wl1273-core.c line 96
Quoted 6 lines
drivers/mfd/wl1273-core.c new file +6
-0+ + return 0; +} +EXPORT_SYMBOL (wl1273_fm_read_reg); + +int wl1273_fm_write_cmd(struct wl1273_core*core, u8
Quoted 14 lines
cmd, u16 param)
drivers/mfd/wl1273-core.c line 98
Quoted 2 lines
drivers/mfd/wl1273-core.c new file +2
-0+{ + struct i2c_client *client =
core->i2c_dev;drivers/mfd/wl1273-core.c line 99
Quoted 1 line
drivers/mfd/wl1273-core.c new file +1
-0+ u8 buf[] = { (param >> 8)&
0xff, param &0xff};drivers/mfd/wl1273-core.c line 102
Quoted 3 lines
drivers/mfd/wl1273-core.c new file +3
-0+ int r; + + r =
i2c_smbus_write_i2c_block_data(client, cmd, 2, buf);drivers/mfd/wl1273-core.c line 104
Quoted 2 lines
drivers/mfd/wl1273-core.c new file +2
-0+ if (r) { +dev_err(&client->dev, "%s: Cmd: %d fails.\n",
__func__, cmd);Quoted 8 lines
drivers/mfd/wl1273-core.c line 112
Quoted 8 lines
drivers/mfd/wl1273-core.c new file +8
-0+ return r; + } + + return 0; +} +EXPORT_SYMBOL (wl1273_fm_write_cmd); + +int wl1273_fm_write_data(struct wl1273_core*core, u8
Quoted 30 lines
*data, u16 len)
drivers/mfd/wl1273-core.c line 114
Quoted 2 lines
drivers/mfd/wl1273-core.c new file +2
-0+{ + struct i2c_client *client =
core->i2c_dev;drivers/mfd/wl1273-core.c line 123
Quoted 9 lines
drivers/mfd/wl1273-core.c new file +9
-0+ struct i2c_msg msg[1]; + int r; + + msg[0].addr = client->addr; + msg[0].flags = 0; + msg[0].buf = data; + msg[0].len = len; + + r =
i2c_transfer(client->adapter, msg, 1);drivers/mfd/wl1273-core.c line 126
Quoted 3 lines
drivers/mfd/wl1273-core.c new file +3
-0+ + if (r != 1) { +dev_err(&client->dev, "%s: write error.\n",
__func__);drivers/mfd/wl1273-core.c line 127
Quoted 1 line
drivers/mfd/wl1273-core.c new file +1
-0+ return
-EREMOTEIO;drivers/mfd/wl1273-core.c line 135
Quoted 8 lines
drivers/mfd/wl1273-core.c new file +8
-0+ } + + return 0; +} +EXPORT_SYMBOL (wl1273_fm_write_data); + +/** +* wl1273_fm_set_audio() - Set audio mode.
Quoted 9 lines
drivers/mfd/wl1273-core.c line 136
Quoted 1 line
drivers/mfd/wl1273-core.c new file +1
-0+* @core: A pointer to the device struct.
drivers/mfd/wl1273-core.c line 137
Quoted 1 line
drivers/mfd/wl1273-core.c new file +1
-0+* @new_mode: The new audio mode.
drivers/mfd/wl1273-core.c line 139
Quoted 2 lines
drivers/mfd/wl1273-core.c new file +2
-0+* +* Audio modes are WL1273_AUDIO_DIGITAL and
WL1273_AUDIO_ANALOG.Quoted 2 lines
drivers/mfd/wl1273-core.c new file +2
-0+*/ +int wl1273_fm_set_audio(struct wl1273_core*core,
Quoted 6 lines
unsigned int
new_mode)drivers/mfd/wl1273-core.c line 145
Quoted 4 lines
drivers/mfd/wl1273-core.c new file +4
-0+{ + int r = 0; + + if (core->mode ==
WL1273_MODE_OFF||Quoted 6 lines
drivers/mfd/wl1273-core.c line 146
Quoted 1 line
drivers/mfd/wl1273-core.c new file +1
-0+ core->mode ==
WL1273_MODE_SUSPENDED)drivers/mfd/wl1273-core.c line 149
Quoted 3 lines
drivers/mfd/wl1273-core.c new file +3
-0+ return -EPERM; + + if (core->mode ==
WL1273_MODE_RX&&new_mode==
WL1273_AUDIO_DIGITAL)Quoted 87 lines
{
drivers/mfd/wl1273-core.c line 150
Quoted 1 line
drivers/mfd/wl1273-core.c new file +1
-0+ r =wl1273_fm_write_cmd(core,
WL1273_PCM_MODE_SET,drivers/mfd/wl1273-core.c line 151
Quoted 1 line
drivers/mfd/wl1273-core.c new file +1
-0+
WL1273_PCM_DEF_MODE);drivers/mfd/wl1273-core.c line 153
Quoted 2 lines
drivers/mfd/wl1273-core.c new file +2
-0+ if (r) +goto out;
drivers/mfd/wl1273-core.c line 155
Quoted 2 lines
drivers/mfd/wl1273-core.c new file +2
-0+ + r =wl1273_fm_write_cmd(core,
WL1273_I2S_MODE_CONFIG_SET,drivers/mfd/wl1273-core.c line 156
Quoted 1 line
drivers/mfd/wl1273-core.c new file +1
-0+
core->i2s_mode);drivers/mfd/wl1273-core.c line 158
Quoted 2 lines
drivers/mfd/wl1273-core.c new file +2
-0+ if (r) +goto out;
drivers/mfd/wl1273-core.c line 160
Quoted 2 lines
drivers/mfd/wl1273-core.c new file +2
-0+ + r =wl1273_fm_write_cmd(core,
WL1273_AUDIO_ENABLE,drivers/mfd/wl1273-core.c line 161
Quoted 1 line
drivers/mfd/wl1273-core.c new file +1
-0+
WL1273_AUDIO_ENABLE_I2S);drivers/mfd/wl1273-core.c line 163
Quoted 2 lines
drivers/mfd/wl1273-core.c new file +2
-0+ if (r) +goto out;
drivers/mfd/wl1273-core.c line 165
Quoted 2 lines
drivers/mfd/wl1273-core.c new file +2
-0+ + } else if (core->mode ==
WL1273_MODE_RX&&drivers/mfd/wl1273-core.c line 166
Quoted 1 line
drivers/mfd/wl1273-core.c new file +1
-0+new_mode ==
WL1273_AUDIO_ANALOG) {drivers/mfd/wl1273-core.c line 167
Quoted 1 line
drivers/mfd/wl1273-core.c new file +1
-0+ r =wl1273_fm_write_cmd(core,
WL1273_AUDIO_ENABLE,drivers/mfd/wl1273-core.c line 168
Quoted 1 line
drivers/mfd/wl1273-core.c new file +1
-0+
WL1273_AUDIO_ENABLE_ANALOG);drivers/mfd/wl1273-core.c line 170
Quoted 2 lines
drivers/mfd/wl1273-core.c new file +2
-0+ if (r) +goto out;
drivers/mfd/wl1273-core.c line 172
Quoted 2 lines
drivers/mfd/wl1273-core.c new file +2
-0+ + } else if (core->mode ==
WL1273_MODE_TX&&drivers/mfd/wl1273-core.c line 173
Quoted 1 line
drivers/mfd/wl1273-core.c new file +1
-0+new_mode ==
WL1273_AUDIO_DIGITAL) {drivers/mfd/wl1273-core.c line 174
Quoted 1 line
drivers/mfd/wl1273-core.c new file +1
-0+ r =wl1273_fm_write_cmd(core,
WL1273_I2S_MODE_CONFIG_SET,drivers/mfd/wl1273-core.c line 175
Quoted 1 line
drivers/mfd/wl1273-core.c new file +1
-0+
core->i2s_mode);drivers/mfd/wl1273-core.c line 177
Quoted 2 lines
drivers/mfd/wl1273-core.c new file +2
-0+ if (r) +goto out;
drivers/mfd/wl1273-core.c line 179
Quoted 2 lines
drivers/mfd/wl1273-core.c new file +2
-0+ + r =wl1273_fm_write_cmd(core,
WL1273_AUDIO_IO_SET,drivers/mfd/wl1273-core.c line 180
Quoted 1 line
drivers/mfd/wl1273-core.c new file +1
-0+
WL1273_AUDIO_IO_SET_I2S);drivers/mfd/wl1273-core.c line 182
Quoted 2 lines
drivers/mfd/wl1273-core.c new file +2
-0+ if (r) +goto out;
drivers/mfd/wl1273-core.c line 184
Quoted 2 lines
drivers/mfd/wl1273-core.c new file +2
-0+ + } else if (core->mode ==
WL1273_MODE_TX&&drivers/mfd/wl1273-core.c line 185
Quoted 1 line
drivers/mfd/wl1273-core.c new file +1
-0+new_mode ==
WL1273_AUDIO_ANALOG) {drivers/mfd/wl1273-core.c line 186
Quoted 1 line
drivers/mfd/wl1273-core.c new file +1
-0+ r =wl1273_fm_write_cmd(core,
WL1273_AUDIO_IO_SET,drivers/mfd/wl1273-core.c line 187
Quoted 1 line
drivers/mfd/wl1273-core.c new file +1
-0+
WL1273_AUDIO_IO_SET_ANALOG);drivers/mfd/wl1273-core.c line 189
Quoted 2 lines
drivers/mfd/wl1273-core.c new file +2
-0+ if (r) +goto out;
drivers/mfd/wl1273-core.c line 200
Quoted 11 lines
drivers/mfd/wl1273-core.c new file +11
-0+ } + + core->audio_mode = new_mode; + +out: + return r; +} +EXPORT_SYMBOL (wl1273_fm_set_audio); + +/** +* wl1273_fm_set_volume() - Set volume.
Quoted 6 lines
drivers/mfd/wl1273-core.c line 201
Quoted 1 line
drivers/mfd/wl1273-core.c new file +1
-0+* @core: A pointer to the device struct.
drivers/mfd/wl1273-core.c line 202
Quoted 1 line
drivers/mfd/wl1273-core.c new file +1
-0+* @volume: The new volume value.
Quoted 2 lines
drivers/mfd/wl1273-core.c new file +2
-0+*/ +int wl1273_fm_set_volume(struct wl1273_core*core,
Quoted 31 lines
unsigned int volume)
drivers/mfd/wl1273-core.c line 209
Quoted 5 lines
drivers/mfd/wl1273-core.c new file +5
-0+{ + u16 val; + int r; + + if (volume >
WL1273_MAX_VOLUME)drivers/mfd/wl1273-core.c line 210
Quoted 1 line
drivers/mfd/wl1273-core.c new file +1
-0+ return
-EINVAL;drivers/mfd/wl1273-core.c line 216
Quoted 6 lines
drivers/mfd/wl1273-core.c new file +6
-0+ + if (core->volume == volume) + return 0; + + val = volume; + r = wl1273_fm_read_reg(core,
WL1273_VOLUME_SET, &val);drivers/mfd/wl1273-core.c line 225
Quoted 9 lines
drivers/mfd/wl1273-core.c new file +9
-0+ if (r) + return r; + + core->volume = volume; + return 0; +} +EXPORT_SYMBOL (wl1273_fm_set_volume); + +#defineWL1273_RDS_FIFO_EMPTY(status) (!(1
<< 6 & status))drivers/mfd/wl1273-core.c line 227
Quoted 2 lines
drivers/mfd/wl1273-core.c new file +2
-0+ +#defineWL1273_RDS_CORRECTABLE_ERROR (1 <<
3)Quoted 5 lines
drivers/mfd/wl1273-core.c line 228
Quoted 1 line
drivers/mfd/wl1273-core.c new file +1
-0+#defineWL1273_RDS_UNCORRECTABLE_ERROR (1 <<
4)drivers/mfd/wl1273-core.c line 230
Quoted 2 lines
drivers/mfd/wl1273-core.c new file +2
-0+ +static int wl1273_fm_rds(struct wl1273_core*core)
Quoted 64 lines
drivers/mfd/wl1273-core.c line 232
Quoted 2 lines
drivers/mfd/wl1273-core.c new file +2
-0+{ + struct i2c_client *client =
core->i2c_dev;drivers/mfd/wl1273-core.c line 233
Quoted 1 line
drivers/mfd/wl1273-core.c new file +1
-0+ struct device *dev =
&client->dev;drivers/mfd/wl1273-core.c line 234
Quoted 1 line
drivers/mfd/wl1273-core.c new file +1
-0+ struct v4l2_rds_data rds = { 0, 0,0 };
drivers/mfd/wl1273-core.c line 237
Quoted 3 lines
drivers/mfd/wl1273-core.c new file +3
-0+ struct i2c_msg msg[] = { + { +.addr =
client->addr,drivers/mfd/wl1273-core.c line 238
Quoted 1 line
drivers/mfd/wl1273-core.c new file +1
-0+.flags = 0,
drivers/mfd/wl1273-core.c line 239
Quoted 1 line
drivers/mfd/wl1273-core.c new file +1
-0+.buf = b0,
drivers/mfd/wl1273-core.c line 240
Quoted 1 line
drivers/mfd/wl1273-core.c new file +1
-0+.len = 1
drivers/mfd/wl1273-core.c line 243
Quoted 3 lines
drivers/mfd/wl1273-core.c new file +3
-0+ }, + { +.addr =
client->addr,drivers/mfd/wl1273-core.c line 244
Quoted 1 line
drivers/mfd/wl1273-core.c new file +1
-0+.flags =
I2C_M_RD,drivers/mfd/wl1273-core.c line 245
Quoted 1 line
drivers/mfd/wl1273-core.c new file +1
-0+.buf = (u8 *) &rds,
drivers/mfd/wl1273-core.c line 246
Quoted 1 line
drivers/mfd/wl1273-core.c new file +1
-0+.len = 3
drivers/mfd/wl1273-core.c line 249
Quoted 3 lines
drivers/mfd/wl1273-core.c new file +3
-0+ } + }; + u8 b0[] = { WL1273_RDS_DATA_GET },status;
drivers/mfd/wl1273-core.c line 253
Quoted 4 lines
drivers/mfd/wl1273-core.c new file +4
-0+ u16 val; + int r; + + r = wl1273_fm_read_reg(core,
WL1273_RDS_SYNC_GET, &val);drivers/mfd/wl1273-core.c line 257
Quoted 4 lines
drivers/mfd/wl1273-core.c new file +4
-0+ if (r) + return r; + + /* Is RDS decoder synchronized?*/
drivers/mfd/wl1273-core.c line 259
Quoted 2 lines
drivers/mfd/wl1273-core.c new file +2
-0+ if ((val & 0x01) == 0) + return
-EAGAIN;drivers/mfd/wl1273-core.c line 261
Quoted 2 lines
drivers/mfd/wl1273-core.c new file +2
-0+ + /* copy all four RDS blocks tointernal buffer */
drivers/mfd/wl1273-core.c line 263
Quoted 2 lines
drivers/mfd/wl1273-core.c new file +2
-0+ do { + r =
i2c_transfer(client->adapter, msg, 2);drivers/mfd/wl1273-core.c line 265
Quoted 2 lines
drivers/mfd/wl1273-core.c new file +2
-0+ if (r != 2) { +dev_err(dev,
WL1273_FM_DRIVER_NAMEdrivers/mfd/wl1273-core.c line 266
Quoted 1 line
drivers/mfd/wl1273-core.c new file +1
-0+": %s:
read_rdserror
r == %i)\n",drivers/mfd/wl1273-core.c line 267
Quoted 1 line
drivers/mfd/wl1273-core.c new file +1
-0+
__func__, r);drivers/mfd/wl1273-core.c line 270
Quoted 3 lines
drivers/mfd/wl1273-core.c new file +3
-0+ } + + status =rds.block;
drivers/mfd/wl1273-core.c line 272
Quoted 2 lines
drivers/mfd/wl1273-core.c new file +2
-0+ + ifQuoted 8 lines
(
WL1273_RDS_FIFO_EMPTY(status))drivers/mfd/wl1273-core.c line 273
Quoted 1 line
drivers/mfd/wl1273-core.c new file +1
-0+break;
drivers/mfd/wl1273-core.c line 275
Quoted 2 lines
drivers/mfd/wl1273-core.c new file +2
-0+ + /* copy RDSblock to internal buffer */
drivers/mfd/wl1273-core.c line 276
Quoted 1 line
drivers/mfd/wl1273-core.c new file +1
-0+memcpy(&core->buffer[core->wr_index],
&rds,
Quoted 53 lines
3);
drivers/mfd/wl1273-core.c line 277
Quoted 1 line
drivers/mfd/wl1273-core.c new file +1
-0+
core->wr_index+= 3;drivers/mfd/wl1273-core.c line 279
Quoted 2 lines
drivers/mfd/wl1273-core.c new file +2
-0+ + /* copy theerror bits to standard positions */
drivers/mfd/wl1273-core.c line 280
Quoted 1 line
drivers/mfd/wl1273-core.c new file +1
-0+ if(
WL1273_RDS_UNCORRECTABLE_ERROR& status) {drivers/mfd/wl1273-core.c line 281
Quoted 1 line
drivers/mfd/wl1273-core.c new file +1
-0+rds.block |=
V4L2_RDS_BLOCK_ERROR;drivers/mfd/wl1273-core.c line 282
Quoted 1 line
drivers/mfd/wl1273-core.c new file +1
-0+rds.block &=
~V4L2_RDS_BLOCK_CORRECTED;drivers/mfd/wl1273-core.c line 283
Quoted 1 line
drivers/mfd/wl1273-core.c new file +1
-0+ } else if(
WL1273_RDS_CORRECTABLE_ERROR& status) {drivers/mfd/wl1273-core.c line 284
Quoted 1 line
drivers/mfd/wl1273-core.c new file +1
-0+rds.block &= ~V4L2_RDS_BLOCK_ERROR;
drivers/mfd/wl1273-core.c line 285
Quoted 1 line
drivers/mfd/wl1273-core.c new file +1
-0+rds.block |=
V4L2_RDS_BLOCK_CORRECTED;drivers/mfd/wl1273-core.c line 287
Quoted 2 lines
drivers/mfd/wl1273-core.c new file +2
-0+ } else { +rds.block &= ~V4L2_RDS_BLOCK_ERROR;
drivers/mfd/wl1273-core.c line 288
Quoted 1 line
drivers/mfd/wl1273-core.c new file +1
-0+rds.block &=
~V4L2_RDS_BLOCK_CORRECTED;drivers/mfd/wl1273-core.c line 291
Quoted 3 lines
drivers/mfd/wl1273-core.c new file +3
-0+ } + + /* wrap writepointer */
drivers/mfd/wl1273-core.c line 292
Quoted 1 line
drivers/mfd/wl1273-core.c new file +1
-0+ if(
core->wr_index>=core->buf_size)drivers/mfd/wl1273-core.c line 293
Quoted 1 line
drivers/mfd/wl1273-core.c new file +1
-0+
core->wr_index= 0;drivers/mfd/wl1273-core.c line 295
Quoted 2 lines
drivers/mfd/wl1273-core.c new file +2
-0+ + /* check foroverflow & start over */
drivers/mfd/wl1273-core.c line 296
Quoted 1 line
drivers/mfd/wl1273-core.c new file +1
-0+ if(
core->wr_index==core->rd_index) {drivers/mfd/wl1273-core.c line 297
Quoted 1 line
drivers/mfd/wl1273-core.c new file +1
-0+
dev_dbg(dev, "RDS OVERFLOW");drivers/mfd/wl1273-core.c line 299
Quoted 2 lines
drivers/mfd/wl1273-core.c new file +2
-0+ +
core->rd_index= 0;drivers/mfd/wl1273-core.c line 300
Quoted 1 line
drivers/mfd/wl1273-core.c new file +1
-0+
core->wr_index= 0;drivers/mfd/wl1273-core.c line 301
Quoted 1 line
drivers/mfd/wl1273-core.c new file +1
-0+break;
drivers/mfd/wl1273-core.c line 303
Quoted 2 lines
drivers/mfd/wl1273-core.c new file +2
-0+ } + } while(!WL1273_RDS_FIFO_EMPTY(status));
drivers/mfd/wl1273-core.c line 306
Quoted 3 lines
drivers/mfd/wl1273-core.c new file +3
-0+ + /* wake up read queue */ + if (core->wr_index !=Quoted 8 lines
core->rd_index)drivers/mfd/wl1273-core.c line 307
Quoted 1 line
drivers/mfd/wl1273-core.c new file +1
-0+
wake_up_interruptible(&core->read_queue);drivers/mfd/wl1273-core.c line 312
Quoted 5 lines
drivers/mfd/wl1273-core.c new file +5
-0+ + return 0; +} + +static void wl1273_fm_rds_work(struct
wl1273_coreQuoted 6 lines
*core)
drivers/mfd/wl1273-core.c line 317
Quoted 5 lines
drivers/mfd/wl1273-core.c new file +5
-0+{ + wl1273_fm_rds(core); +} + +static irqreturn_twl1273_fm_irq_thread_handler(int
Quoted 25 lines
irq, void
*dev_id)drivers/mfd/wl1273-core.c line 321
Quoted 4 lines
drivers/mfd/wl1273-core.c new file +4
-0+{ + int r; + u16 flags; + struct wl1273_core *core =
dev_id;drivers/mfd/wl1273-core.c line 323
Quoted 2 lines
drivers/mfd/wl1273-core.c new file +2
-0+ + r = wl1273_fm_read_reg(core,
WL1273_FLAG_GET, &flags);drivers/mfd/wl1273-core.c line 327
Quoted 4 lines
drivers/mfd/wl1273-core.c new file +4
-0+ if (r) + goto out; + + if (flags & WL1273_BL_EVENT){
drivers/mfd/wl1273-core.c line 328
Quoted 1 line
drivers/mfd/wl1273-core.c new file +1
-0+
core->irq_received= flags;drivers/mfd/wl1273-core.c line 329
Quoted 1 line
drivers/mfd/wl1273-core.c new file +1
-0+
dev_dbg(&core->i2c_dev->dev, "IRQ: BL\n");drivers/mfd/wl1273-core.c line 332
Quoted 3 lines
drivers/mfd/wl1273-core.c new file +3
-0+ } + + if (flags & WL1273_RDS_EVENT){
drivers/mfd/wl1273-core.c line 335
Quoted 3 lines
drivers/mfd/wl1273-core.c new file +3
-0+ msleep(200); + +Quoted 7 lines
wl1273_fm_rds_work(core);drivers/mfd/wl1273-core.c line 338
Quoted 3 lines
drivers/mfd/wl1273-core.c new file +3
-0+ } + + if (flags &
WL1273_BBLK_EVENT)drivers/mfd/wl1273-core.c line 339
Quoted 1 line
drivers/mfd/wl1273-core.c new file +1
-0+dev_dbg(&core->i2c_dev->dev, "IRQ:
BBLK\n");
Quoted 5 lines
drivers/mfd/wl1273-core.c line 341
Quoted 2 lines
drivers/mfd/wl1273-core.c new file +2
-0+ + if (flags &
WL1273_LSYNC_EVENT)drivers/mfd/wl1273-core.c line 342
Quoted 1 line
drivers/mfd/wl1273-core.c new file +1
-0+dev_dbg(&core->i2c_dev->dev, "IRQ:
LSYNC\n");
Quoted 7 lines
drivers/mfd/wl1273-core.c line 344
Quoted 2 lines
drivers/mfd/wl1273-core.c new file +2
-0+ + if (flags & WL1273_LEV_EVENT){
drivers/mfd/wl1273-core.c line 347
Quoted 3 lines
drivers/mfd/wl1273-core.c new file +3
-0+ u16 level; + + r =wl1273_fm_read_reg(core,
WL1273_RSSI_LVL_GET,&level);
Quoted 10 lines
drivers/mfd/wl1273-core.c line 350
Quoted 3 lines
drivers/mfd/wl1273-core.c new file +3
-0+ + if (r) +goto out;
drivers/mfd/wl1273-core.c line 352
Quoted 2 lines
drivers/mfd/wl1273-core.c new file +2
-0+ + if (level >14)
drivers/mfd/wl1273-core.c line 353
Quoted 1 line
drivers/mfd/wl1273-core.c new file +1
-0+dev_dbg(&core->i2c_dev->dev,
"IRQ: LEV: 0x%x04\n",Quoted 8 lines
drivers/mfd/wl1273-core.c line 354
Quoted 1 line
drivers/mfd/wl1273-core.c new file +1
-0+level);
drivers/mfd/wl1273-core.c line 357
Quoted 3 lines
drivers/mfd/wl1273-core.c new file +3
-0+ } + + if (flags &
WL1273_IFFR_EVENT)drivers/mfd/wl1273-core.c line 358
Quoted 1 line
drivers/mfd/wl1273-core.c new file +1
-0+dev_dbg(&core->i2c_dev->dev, "IRQ:
IFFR\n");
Quoted 7 lines
drivers/mfd/wl1273-core.c line 361
Quoted 3 lines
drivers/mfd/wl1273-core.c new file +3
-0+ + if (flags & WL1273_PI_EVENT) +
dev_dbg(&core->i2c_dev->dev, "IRQ: PI\n");drivers/mfd/wl1273-core.c line 364
Quoted 3 lines
drivers/mfd/wl1273-core.c new file +3
-0+ + if (flags & WL1273_PD_EVENT) +Quoted 6 lines
dev_dbg(&core->i2c_dev->dev, "IRQ: PD\n");drivers/mfd/wl1273-core.c line 366
Quoted 2 lines
drivers/mfd/wl1273-core.c new file +2
-0+ + if (flags &
WL1273_STIC_EVENT)drivers/mfd/wl1273-core.c line 367
Quoted 1 line
drivers/mfd/wl1273-core.c new file +1
-0+dev_dbg(&core->i2c_dev->dev, "IRQ:
STIC\n");
Quoted 6 lines
drivers/mfd/wl1273-core.c line 370
Quoted 3 lines
drivers/mfd/wl1273-core.c new file +3
-0+ + if (flags & WL1273_MAL_EVENT) +
dev_dbg(&core->i2c_dev->dev, "IRQ: MAL\n");drivers/mfd/wl1273-core.c line 372
Quoted 2 lines
drivers/mfd/wl1273-core.c new file +2
-0+ + if (flags &Quoted 7 lines
WL1273_POW_ENB_EVENT) {drivers/mfd/wl1273-core.c line 373
Quoted 1 line
drivers/mfd/wl1273-core.c new file +1
-0+
complete(&core->busy);drivers/mfd/wl1273-core.c line 374
Quoted 1 line
drivers/mfd/wl1273-core.c new file +1
-0+
dev_dbg(&core->i2c_dev->dev, "NOT BUSY\n");drivers/mfd/wl1273-core.c line 375
Quoted 1 line
drivers/mfd/wl1273-core.c new file +1
-0+dev_dbg(&core->i2c_dev->dev, "IRQ:
POW_ENB\n");
Quoted 6 lines
drivers/mfd/wl1273-core.c line 378
Quoted 3 lines
drivers/mfd/wl1273-core.c new file +3
-0+ } + + if (flags &
WL1273_SCAN_OVER_EVENT)drivers/mfd/wl1273-core.c line 379
Quoted 1 line
drivers/mfd/wl1273-core.c new file +1
-0+dev_dbg(&core->i2c_dev->dev, "IRQ:
SCAN_OVER\n");
Quoted 5 lines
drivers/mfd/wl1273-core.c line 381
Quoted 2 lines
drivers/mfd/wl1273-core.c new file +2
-0+ + if (flags &
WL1273_ERROR_EVENT)drivers/mfd/wl1273-core.c line 382
Quoted 1 line
drivers/mfd/wl1273-core.c new file +1
-0+dev_dbg(&core->i2c_dev->dev, "IRQ:
ERROR\n");
Quoted 56 lines
drivers/mfd/wl1273-core.c line 384
Quoted 2 lines
drivers/mfd/wl1273-core.c new file +2
-0+ + if (flags & WL1273_FR_EVENT){
drivers/mfd/wl1273-core.c line 387
Quoted 3 lines
drivers/mfd/wl1273-core.c new file +3
-0+ u16 freq; + +
dev_dbg(&core->i2c_dev->dev, "IRQ: FR:\n");drivers/mfd/wl1273-core.c line 389
Quoted 2 lines
drivers/mfd/wl1273-core.c new file +2
-0+ + if(
core->mode==WL1273_MODE_RX) {drivers/mfd/wl1273-core.c line 390
Quoted 1 line
drivers/mfd/wl1273-core.c new file +1
-0+r = wl1273_fm_write_cmd(core,
WL1273_TUNER_MODE_SET,drivers/mfd/wl1273-core.c line 391
Quoted 1 line
drivers/mfd/wl1273-core.c new file +1
-0+
TUNER_MODE_STOP_SEARCH);drivers/mfd/wl1273-core.c line 392
Quoted 1 line
drivers/mfd/wl1273-core.c new file +1
-0+if (r) {
drivers/mfd/wl1273-core.c line 393
Quoted 1 line
drivers/mfd/wl1273-core.c new file +1
-0+
dev_err(&core->i2c_dev->dev,drivers/mfd/wl1273-core.c line 394
Quoted 1 line
drivers/mfd/wl1273-core.c new file +1
-0+
"%s:TUNER_MODE_SETfails: %d\n",drivers/mfd/wl1273-core.c line 395
Quoted 1 line
drivers/mfd/wl1273-core.c new file +1
-0+
__func__, r);drivers/mfd/wl1273-core.c line 396
Quoted 1 line
drivers/mfd/wl1273-core.c new file +1
-0+goto out;
drivers/mfd/wl1273-core.c line 397
Quoted 1 line
drivers/mfd/wl1273-core.c new file +1
-0+}
drivers/mfd/wl1273-core.c line 399
Quoted 2 lines
drivers/mfd/wl1273-core.c new file +2
-0+ +r = wl1273_fm_read_reg(core,
WL1273_FREQ_SET, &freq);drivers/mfd/wl1273-core.c line 400
Quoted 1 line
drivers/mfd/wl1273-core.c new file +1
-0+if (r)
drivers/mfd/wl1273-core.c line 401
Quoted 1 line
drivers/mfd/wl1273-core.c new file +1
-0+goto out;
drivers/mfd/wl1273-core.c line 403
Quoted 2 lines
drivers/mfd/wl1273-core.c new file +2
-0+ +
core->rx_frequency=drivers/mfd/wl1273-core.c line 404
Quoted 1 line
drivers/mfd/wl1273-core.c new file +1
-0+
bands[core->band].bottom_frequency +drivers/mfd/wl1273-core.c line 405
Quoted 1 line
drivers/mfd/wl1273-core.c new file +1
-0+freq * 50;
drivers/mfd/wl1273-core.c line 407
Quoted 2 lines
drivers/mfd/wl1273-core.c new file +2
-0+ +/*
drivers/mfd/wl1273-core.c line 408
Quoted 1 line
drivers/mfd/wl1273-core.c new file +1
-0+* The driver works
better with this msleep,drivers/mfd/wl1273-core.c line 409
Quoted 1 line
drivers/mfd/wl1273-core.c new file +1
-0+* the documentation
doesn't mention it.Quoted 7 lines
drivers/mfd/wl1273-core.c line 410
Quoted 1 line
drivers/mfd/wl1273-core.c new file +1
-0+*/
drivers/mfd/wl1273-core.c line 411
Quoted 1 line
drivers/mfd/wl1273-core.c new file +1
-0+msleep(10);
msleep on an irq handler? You shouldn't be doing it!
You're
Quoted 2 lines
not allowed to sleep
during IRQ time. Kernel can panic here. You'llprobably
Quoted 17 lines
need to defer work and
handle it outside irq time.drivers/mfd/wl1273-core.c line 413
Quoted 2 lines
drivers/mfd/wl1273-core.c new file +2
-0+ +dev_dbg(&core->i2c_dev->dev,
"%dkHz\n",drivers/mfd/wl1273-core.c line 414
Quoted 1 line
drivers/mfd/wl1273-core.c new file +1
-0+
core->rx_frequency);drivers/mfd/wl1273-core.c line 417
Quoted 3 lines
drivers/mfd/wl1273-core.c new file +3
-0+ + } else { +r = wl1273_fm_read_reg(core,
WL1273_CHANL_SET, &freq);drivers/mfd/wl1273-core.c line 418
Quoted 1 line
drivers/mfd/wl1273-core.c new file +1
-0+if (r)
drivers/mfd/wl1273-core.c line 419
Quoted 1 line
drivers/mfd/wl1273-core.c new file +1
-0+Quoted 8 lines
goto out;
drivers/mfd/wl1273-core.c line 421
Quoted 2 lines
drivers/mfd/wl1273-core.c new file +2
-0+ +dev_dbg(&core->i2c_dev->dev,
"%dkHz\n", freq);drivers/mfd/wl1273-core.c line 423
Quoted 2 lines
drivers/mfd/wl1273-core.c new file +2
-0+ } +dev_dbg(&core->i2c_dev->dev, "%s: NOT
BUSY\n",
Quoted 6 lines
__func__);drivers/mfd/wl1273-core.c line 427
Quoted 4 lines
drivers/mfd/wl1273-core.c new file +4
-0+ } + +out: + wl1273_fm_write_cmd(core,
WL1273_INT_MASK_SET,Quoted 8 lines
drivers/mfd/wl1273-core.c line 428
Quoted 1 line
drivers/mfd/wl1273-core.c new file +1
-0+
core->irq_flags);drivers/mfd/wl1273-core.c line 434
Quoted 6 lines
drivers/mfd/wl1273-core.c new file +6
-0+ complete(&core->busy); + + return IRQ_HANDLED; +} + +static struct i2c_device_idwl1273_driver_id_table[]
Quoted 5 lines
= {
drivers/mfd/wl1273-core.c line 438
Quoted 4 lines
drivers/mfd/wl1273-core.c new file +4
-0+ { WL1273_FM_DRIVER_NAME, 0 }, + { } +}; +MODULE_DEVICE_TABLE(i2c,
wl1273_driver_id_table);Quoted 131 lines
drivers/mfd/wl1273-core.c line 440
Quoted 2 lines
drivers/mfd/wl1273-core.c new file +2
-0+ +static int wl1273_core_remove(struct i2c_client*client)
drivers/mfd/wl1273-core.c line 442
Quoted 2 lines
drivers/mfd/wl1273-core.c new file +2
-0+{ + struct wl1273_core *core =
i2c_get_clientdata(client);drivers/mfd/wl1273-core.c line 443
Quoted 1 line
drivers/mfd/wl1273-core.c new file +1
-0+ struct wl1273_fm_platform_data*pdata =
drivers/mfd/wl1273-core.c line 444
Quoted 1 line
drivers/mfd/wl1273-core.c new file +1
-0+
client->dev.platform_data;drivers/mfd/wl1273-core.c line 446
Quoted 2 lines
drivers/mfd/wl1273-core.c new file +2
-0+ + dev_dbg(&client->dev,"%s\n",
__func__);drivers/mfd/wl1273-core.c line 448
Quoted 2 lines
drivers/mfd/wl1273-core.c new file +2
-0+ +
mfd_remove_devices(&client->dev);drivers/mfd/wl1273-core.c line 460
Quoted 12 lines
drivers/mfd/wl1273-core.c new file +12
-0+ i2c_set_clientdata(client, core); + + free_irq(client->irq, core); + pdata->free_resources(); + + kfree(core->buffer); + kfree(core); + + return 0; +} + +static int __devinit wl1273_core_probe(struct
i2c_client*client,drivers/mfd/wl1273-core.c line 461
Quoted 1 line
drivers/mfd/wl1273-core.c new file +1
-0+
const structi2c_device_id*id)drivers/mfd/wl1273-core.c line 463
Quoted 2 lines
drivers/mfd/wl1273-core.c new file +2
-0+{ + struct wl1273_fm_platform_data*pdata =
client->dev.platform_data;drivers/mfd/wl1273-core.c line 468
Quoted 5 lines
drivers/mfd/wl1273-core.c new file +5
-0+ int r = 0; + struct wl1273_core *core; + int children = 0; + + dev_dbg(&client->dev,"%s\n",
__func__);drivers/mfd/wl1273-core.c line 471
Quoted 3 lines
drivers/mfd/wl1273-core.c new file +3
-0+ + if (!pdata) { +
dev_err(&client->dev, "No platform data.\n");drivers/mfd/wl1273-core.c line 472
Quoted 1 line
drivers/mfd/wl1273-core.c new file +1
-0+ return
-EINVAL;drivers/mfd/wl1273-core.c line 475
Quoted 3 lines
drivers/mfd/wl1273-core.c new file +3
-0+ } + + core = kzalloc(sizeof(*core),
GFP_KERNEL);drivers/mfd/wl1273-core.c line 477
Quoted 2 lines
drivers/mfd/wl1273-core.c new file +2
-0+ if (!core) + return
-ENOMEM;drivers/mfd/wl1273-core.c line 481
Quoted 4 lines
drivers/mfd/wl1273-core.c new file +4
-0+ + /* RDS buffer allocation */ + core->buf_size = rds_buf * 3; + core->buffer =
kmalloc(core->buf_size, GFP_KERNEL);drivers/mfd/wl1273-core.c line 483
Quoted 2 lines
drivers/mfd/wl1273-core.c new file +2
-0+ if (!core->buffer) { +dev_err(&client->dev,
drivers/mfd/wl1273-core.c line 484
Quoted 1 line
drivers/mfd/wl1273-core.c new file +1
-0+"Cannot allocate memory for RDS
buffer.\n");drivers/mfd/wl1273-core.c line 486
Quoted 2 lines
drivers/mfd/wl1273-core.c new file +2
-0+ r = -ENOMEM; + goto
err_kmalloc;drivers/mfd/wl1273-core.c line 489
Quoted 3 lines
drivers/mfd/wl1273-core.c new file +3
-0+ } + + core->irq_flags =
WL1273_IRQ_MASK;drivers/mfd/wl1273-core.c line 494
Quoted 5 lines
drivers/mfd/wl1273-core.c new file +5
-0+ core->i2c_dev = client; + core->rds_on = false; + core->mode = WL1273_MODE_OFF; + core->tx_power = 4; + core->audio_mode =
WL1273_AUDIO_ANALOG;drivers/mfd/wl1273-core.c line 497
Quoted 3 lines
drivers/mfd/wl1273-core.c new file +3
-0+ core->band = radio_band; + core->bands = bands; + core->number_of_bands =
ARRAY_SIZE(bands);drivers/mfd/wl1273-core.c line 498
Quoted 1 line
drivers/mfd/wl1273-core.c new file +1
-0+ core->i2s_mode =
WL1273_I2S_DEF_MODE;drivers/mfd/wl1273-core.c line 500
Quoted 2 lines
drivers/mfd/wl1273-core.c new file +2
-0+ core->channel_number = 2; + core->volume =
WL1273_DEFAULT_VOLUME;drivers/mfd/wl1273-core.c line 501
Quoted 1 line
drivers/mfd/wl1273-core.c new file +1
-0+ core->rx_frequency =bands[core->band].bottom_frequency;
drivers/mfd/wl1273-core.c line 502
Quoted 1 line
drivers/mfd/wl1273-core.c new file +1
-0+ core->tx_frequency =bands[core->band].top_frequency;
drivers/mfd/wl1273-core.c line 504
Quoted 2 lines
drivers/mfd/wl1273-core.c new file +2
-0+ + dev_dbg(&client->dev,"
radio_band: %d\n",radio_band);drivers/mfd/wl1273-core.c line 508
Quoted 4 lines
drivers/mfd/wl1273-core.c new file +4
-0+ + mutex_init(&core->lock); + + pdata =
client->dev.platform_data;drivers/mfd/wl1273-core.c line 510
Quoted 2 lines
drivers/mfd/wl1273-core.c new file +2
-0+ if (pdata) { + r =
pdata->request_resources(client);drivers/mfd/wl1273-core.c line 512
Quoted 2 lines
drivers/mfd/wl1273-core.c new file +2
-0+ if (r) { +dev_err(&client->dev,
WL1273_FM_DRIVER_NAMEdrivers/mfd/wl1273-core.c line 513
Quoted 1 line
drivers/mfd/wl1273-core.c new file +1
-0+": Cannot get platform
data\n");drivers/mfd/wl1273-core.c line 514
Quoted 1 line
drivers/mfd/wl1273-core.c new file +1
-0+goto
err_new_mixer;drivers/mfd/wl1273-core.c line 517
Quoted 3 lines
drivers/mfd/wl1273-core.c new file +3
-0+ } + + r =request_threaded_irq(client->irq, NULL,
drivers/mfd/wl1273-core.c line 518
Quoted 1 line
drivers/mfd/wl1273-core.c new file +1
-0+
wl1273_fm_irq_thread_handler,drivers/mfd/wl1273-core.c line 519
Quoted 1 line
drivers/mfd/wl1273-core.c new file +1
-0+
IRQF_ONESHOT |IRQF_TRIGGER_FALLING,drivers/mfd/wl1273-core.c line 520
Quoted 1 line
drivers/mfd/wl1273-core.c new file +1
-0+
"wl1273-fm", core);drivers/mfd/wl1273-core.c line 521
Quoted 1 line
drivers/mfd/wl1273-core.c new file +1
-0+ if (r < 0){
drivers/mfd/wl1273-core.c line 522
Quoted 1 line
drivers/mfd/wl1273-core.c new file +1
-0+dev_err(&client->dev,
WL1273_FM_DRIVER_NAMEdrivers/mfd/wl1273-core.c line 523
Quoted 1 line
drivers/mfd/wl1273-core.c new file +1
-0+Quoted 8 lines
": Unable to register
IRQ handler\n");drivers/mfd/wl1273-core.c line 524
Quoted 1 line
drivers/mfd/wl1273-core.c new file +1
-0+goto
err_request_irq;drivers/mfd/wl1273-core.c line 527
Quoted 3 lines
drivers/mfd/wl1273-core.c new file +3
-0+ } + } else { +dev_err(&client->dev,
WL1273_FM_DRIVER_NAME":Core
Quoted 17 lines
WL1273 IRQ"
drivers/mfd/wl1273-core.c line 528
Quoted 1 line
drivers/mfd/wl1273-core.c new file +1
-0+" not configured");
drivers/mfd/wl1273-core.c line 530
Quoted 2 lines
drivers/mfd/wl1273-core.c new file +2
-0+ r = -EINVAL; + goto
err_new_mixer;drivers/mfd/wl1273-core.c line 533
Quoted 3 lines
drivers/mfd/wl1273-core.c new file +3
-0+ } + +
init_completion(&core->busy);drivers/mfd/wl1273-core.c line 534
Quoted 1 line
drivers/mfd/wl1273-core.c new file +1
-0+
init_waitqueue_head(&core->read_queue);drivers/mfd/wl1273-core.c line 538
Quoted 4 lines
drivers/mfd/wl1273-core.c new file +4
-0+ + i2c_set_clientdata(client, core); + + if (pdata->children &
WL1273_RADIO_CHILD) {Quoted 4 lines
drivers/mfd/wl1273-core.c line 539
Quoted 1 line
drivers/mfd/wl1273-core.c new file +1
-0+ struct mfd_cell*cell = &core->cells[children];
drivers/mfd/wl1273-core.c line 540
Quoted 1 line
drivers/mfd/wl1273-core.c new file +1
-0+dev_dbg(&client->dev, "%s: Have V4L2.\n",
__func__);Quoted 27 lines
drivers/mfd/wl1273-core.c line 541
Quoted 1 line
drivers/mfd/wl1273-core.c new file +1
-0+ cell->name ="
wl1273_fm_radio";drivers/mfd/wl1273-core.c line 542
Quoted 1 line
drivers/mfd/wl1273-core.c new file +1
-0+
cell->platform_data= &core;drivers/mfd/wl1273-core.c line 543
Quoted 1 line
drivers/mfd/wl1273-core.c new file +1
-0+
cell->data_size= sizeof(core);drivers/mfd/wl1273-core.c line 547
Quoted 4 lines
drivers/mfd/wl1273-core.c new file +4
-0+ children++; + } + + if (pdata->children &
WL1273_CODEC_CHILD) {drivers/mfd/wl1273-core.c line 548
Quoted 1 line
drivers/mfd/wl1273-core.c new file +1
-0+ struct mfd_cell*cell = &core->cells[children];
drivers/mfd/wl1273-core.c line 549
Quoted 1 line
drivers/mfd/wl1273-core.c new file +1
-0+dev_dbg(&client->dev, "%s: Have codec.\n",
__func__);drivers/mfd/wl1273-core.c line 550
Quoted 1 line
drivers/mfd/wl1273-core.c new file +1
-0+ cell->name ="
wl1273_codec_audio";drivers/mfd/wl1273-core.c line 551
Quoted 1 line
drivers/mfd/wl1273-core.c new file +1
-0+
cell->platform_data= &core;drivers/mfd/wl1273-core.c line 552
Quoted 1 line
drivers/mfd/wl1273-core.c new file +1
-0+
cell->data_size= sizeof(core);drivers/mfd/wl1273-core.c line 557
Quoted 5 lines
drivers/mfd/wl1273-core.c new file +5
-0+ children++; + } + + if (children) { +Quoted 4 lines
dev_dbg(&client->dev, "%s: Have children.\n",
__func__);drivers/mfd/wl1273-core.c line 558
Quoted 1 line
drivers/mfd/wl1273-core.c new file +1
-0+ r =mfd_add_devices(&client->dev, -1,
core->cells,Quoted 6 lines
drivers/mfd/wl1273-core.c line 559
Quoted 1 line
drivers/mfd/wl1273-core.c new file +1
-0+
children, NULL, 0);drivers/mfd/wl1273-core.c line 561
Quoted 2 lines
drivers/mfd/wl1273-core.c new file +2
-0+ } else { +dev_err(&client->dev, "No platform data found
for
Quoted 81 lines
children.\n");
Quoted 6 lines
drivers/mfd/wl1273-core.c new file +6
-0+ r = -ENODEV; + } + + if (!r) + return 0; +drivers/mfd/wl1273-core.c line 577
Quoted 10 lines
drivers/mfd/wl1273-core.c new file +10
-0+ i2c_set_clientdata(client, NULL); + kfree(core); + free_irq(client->irq, core); +err_request_irq: + pdata->free_resources(); +err_new_mixer: + kfree(core->buffer); +err_kmalloc: + kfree(core); + dev_dbg(&client->dev,"%s\n",
__func__);drivers/mfd/wl1273-core.c line 584
Quoted 7 lines
drivers/mfd/wl1273-core.c new file +7
-0+ + return r; +} + +static struct i2c_driver wl1273_core_driver = { + .driver = { + .name =
WL1273_FM_DRIVER_NAME,drivers/mfd/wl1273-core.c line 587
Quoted 3 lines
drivers/mfd/wl1273-core.c new file +3
-0+ }, + .probe = wl1273_core_probe, + .id_table =
wl1273_driver_id_table,drivers/mfd/wl1273-core.c line 588
Quoted 1 line
drivers/mfd/wl1273-core.c new file +1
-0+ .remove =
__devexit_p(wl1273_core_remove),drivers/mfd/wl1273-core.c line 595
Quoted 7 lines
drivers/mfd/wl1273-core.c new file +7
-0+}; + +static int __init wl1273_core_init (void ) +{ + int r; + + r =
i2c_add_driver(&wl1273_core_driver);drivers/mfd/wl1273-core.c line 597
Quoted 2 lines
drivers/mfd/wl1273-core.c new file +2
-0+ if (r) { +pr_err(WL1273_FM_DRIVER_NAME
drivers/mfd/wl1273-core.c line 598
Quoted 1 line
drivers/mfd/wl1273-core.c new file +1
-0+": driver registration failed\n");
drivers/mfd/wl1273-core.c line 609
Quoted 11 lines
drivers/mfd/wl1273-core.c new file +11
-0+ return r; + } + + return 0; +} + +static void __exit wl1273_core_exit(void) +{ + flush_scheduled_work(); + +
i2c_del_driver(&wl1273_core_driver);Review
Quoted 8 lines
drivers/mfd/wl1273-core.c new file +7
-0+} +late_initcall (wl1273_core_init); +module_exit (wl1273_core_exit); + +MODULE_AUTHOR ("Matti Aaltonen <[email protected]>" ); +MODULE_DESCRIPTION (DRIVER_DESC ); +MODULE_LICENSE ("GPL" );(quoted diff) +0
-0
b/include/linux/mfd/wl1273-core.hinclude/linux/mfd/wl1273-core.h line 4
Quoted 9 lines
new file mode 100644
index 0000000..81c9743include/linux/mfd/wl1273-core.h new file +4
-0@@ -0,0 +1,326 @@ +/* +* include/media/radio/radio-wl1273.h +* +* Some definitions for the wl1273 radio receiver/transmitter chip.
include/linux/mfd/wl1273-core.h line 9
Quoted 5 lines
include/linux/mfd/wl1273-core.h new file +5
-0+* +* Copyright (C) Nokia Corporation +* Author: Matti J. Aaltonen <[email protected]> +* +* This program is free software; you can Quoted 7 lines
redistribute it and/or
include/linux/mfd/wl1273-core.h line 10
Quoted 1 line
include/linux/mfd/wl1273-core.h new file +1
-0+* modify it under the terms of the GNU General Public License
include/linux/mfd/wl1273-core.h line 11
Quoted 1 line
include/linux/mfd/wl1273-core.h new file +1
-0+* version 2 as published by the Free Software Foundation.
Quoted 2 lines
include/linux/mfd/wl1273-core.h new file +2
-0+* +* This program is distributed in the hope that it
Quoted 2 lines
will be useful, but
Quoted 1 line
include/linux/mfd/wl1273-core.h new file +1
-0+* WITHOUT ANY WARRANTY; without even the implied
Quoted 6 lines
warranty of
include/linux/mfd/wl1273-core.h line 15
Quoted 1 line
include/linux/mfd/wl1273-core.h new file +1
-0+* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
Quoted 3 lines
include/linux/mfd/wl1273-core.h new file +3
-0+* General Public License for more details. +* +* You should have received a copy of the GNU General
Quoted 2 lines
Public License
Quoted 1 line
include/linux/mfd/wl1273-core.h new file +1
-0+* along with this program; if not, write to the Free
Quoted 2 lines
Software
Quoted 1 line
include/linux/mfd/wl1273-core.h new file +1
-0+* Foundation, Inc., 51 Franklin St, Fifth Floor,
Quoted 232 lines
Boston, MA
include/linux/mfd/wl1273-core.h line 30
Quoted 10 lines
include/linux/mfd/wl1273-core.h new file +10
-0+* 02110-1301 USA +*/ + +#ifndef RADIO_WL1273_H +#define RADIO_WL1273_H + +#include <linux/i2c.h> +#include <linux/mfd/core.h> + +#define WL1273_FM_DRIVER_NAME "wl1273-fm"
include/linux/mfd/wl1273-core.h line 33
Quoted 3 lines
include/linux/mfd/wl1273-core.h new file +3
-0+#define RX71_FM_I2C_ADDR 0x22 + +#define WL1273_STEREO_GET 0
include/linux/mfd/wl1273-core.h line 34
Quoted 1 line
include/linux/mfd/wl1273-core.h new file +1
-0+#define WL1273_RSSI_LVL_GET 1
include/linux/mfd/wl1273-core.h line 35
Quoted 1 line
include/linux/mfd/wl1273-core.h new file +1
-0+#define WL1273_IF_COUNT_GET 2
include/linux/mfd/wl1273-core.h line 36
Quoted 1 line
include/linux/mfd/wl1273-core.h new file +1
-0+#define WL1273_FLAG_GET 3
include/linux/mfd/wl1273-core.h line 37
Quoted 1 line
include/linux/mfd/wl1273-core.h new file +1
-0+#define WL1273_RDS_SYNC_GET 4
include/linux/mfd/wl1273-core.h line 38
Quoted 1 line
include/linux/mfd/wl1273-core.h new file +1
-0+#define WL1273_RDS_DATA_GET 5
include/linux/mfd/wl1273-core.h line 39
Quoted 1 line
include/linux/mfd/wl1273-core.h new file +1
-0+#define WL1273_FREQ_SET 10
include/linux/mfd/wl1273-core.h line 40
Quoted 1 line
include/linux/mfd/wl1273-core.h new file +1
-0+#define WL1273_AF_FREQ_SET 11
include/linux/mfd/wl1273-core.h line 41
Quoted 1 line
include/linux/mfd/wl1273-core.h new file +1
-0+#define WL1273_MOST_MODE_SET 12
include/linux/mfd/wl1273-core.h line 42
Quoted 1 line
include/linux/mfd/wl1273-core.h new file +1
-0+#define WL1273_MOST_BLEND_SET 13
include/linux/mfd/wl1273-core.h line 43
Quoted 1 line
include/linux/mfd/wl1273-core.h new file +1
-0+#define WL1273_DEMPH_MODE_SET 14
include/linux/mfd/wl1273-core.h line 44
Quoted 1 line
include/linux/mfd/wl1273-core.h new file +1
-0+#define WL1273_SEARCH_LVL_SET 15
include/linux/mfd/wl1273-core.h line 45
Quoted 1 line
include/linux/mfd/wl1273-core.h new file +1
-0+#define WL1273_BAND_SET 16
include/linux/mfd/wl1273-core.h line 46
Quoted 1 line
include/linux/mfd/wl1273-core.h new file +1
-0+#define WL1273_MUTE_STATUS_SET 17
include/linux/mfd/wl1273-core.h line 47
Quoted 1 line
include/linux/mfd/wl1273-core.h new file +1
-0+#define WL1273_RDS_PAUSE_LVL_SET 18
include/linux/mfd/wl1273-core.h line 48
Quoted 1 line
include/linux/mfd/wl1273-core.h new file +1
-0+#define WL1273_RDS_PAUSE_DUR_SET 19
include/linux/mfd/wl1273-core.h line 49
Quoted 1 line
include/linux/mfd/wl1273-core.h new file +1
-0+#define WL1273_RDS_MEM_SET 20
include/linux/mfd/wl1273-core.h line 50
Quoted 1 line
include/linux/mfd/wl1273-core.h new file +1
-0+#define WL1273_RDS_BLK_B_SET 21
include/linux/mfd/wl1273-core.h line 51
Quoted 1 line
include/linux/mfd/wl1273-core.h new file +1
-0+#define WL1273_RDS_MSK_B_SET 22
include/linux/mfd/wl1273-core.h line 52
Quoted 1 line
include/linux/mfd/wl1273-core.h new file +1
-0+#define WL1273_RDS_PI_MASK_SET 23
include/linux/mfd/wl1273-core.h line 53
Quoted 1 line
include/linux/mfd/wl1273-core.h new file +1
-0+#define WL1273_RDS_PI_SET 24
include/linux/mfd/wl1273-core.h line 54
Quoted 1 line
include/linux/mfd/wl1273-core.h new file +1
-0+#define WL1273_RDS_SYSTEM_SET 25
include/linux/mfd/wl1273-core.h line 55
Quoted 1 line
include/linux/mfd/wl1273-core.h new file +1
-0+#define WL1273_INT_MASK_SET 26
include/linux/mfd/wl1273-core.h line 56
Quoted 1 line
include/linux/mfd/wl1273-core.h new file +1
-0+#define WL1273_SEARCH_DIR_SET 27
include/linux/mfd/wl1273-core.h line 57
Quoted 1 line
include/linux/mfd/wl1273-core.h new file +1
-0+#define WL1273_VOLUME_SET 28
include/linux/mfd/wl1273-core.h line 58
Quoted 1 line
include/linux/mfd/wl1273-core.h new file +1
-0+#define WL1273_AUDIO_ENABLE 29
include/linux/mfd/wl1273-core.h line 59
Quoted 1 line
include/linux/mfd/wl1273-core.h new file +1
-0+#define WL1273_PCM_MODE_SET 30
include/linux/mfd/wl1273-core.h line 60
Quoted 1 line
include/linux/mfd/wl1273-core.h new file +1
-0+#define WL1273_I2S_MODE_CONFIG_SET 31
include/linux/mfd/wl1273-core.h line 61
Quoted 1 line
include/linux/mfd/wl1273-core.h new file +1
-0+#define WL1273_POWER_SET 32
include/linux/mfd/wl1273-core.h line 62
Quoted 1 line
include/linux/mfd/wl1273-core.h new file +1
-0+#define WL1273_INTX_CONFIG_SET 33
include/linux/mfd/wl1273-core.h line 63
Quoted 1 line
include/linux/mfd/wl1273-core.h new file +1
-0+#define WL1273_PULL_EN_SET 34
include/linux/mfd/wl1273-core.h line 64
Quoted 1 line
include/linux/mfd/wl1273-core.h new file +1
-0+#define WL1273_HILO_SET 35
include/linux/mfd/wl1273-core.h line 65
Quoted 1 line
include/linux/mfd/wl1273-core.h new file +1
-0+#define WL1273_SWITCH2FREF 36
include/linux/mfd/wl1273-core.h line 66
Quoted 1 line
include/linux/mfd/wl1273-core.h new file +1
-0+#define WL1273_FREQ_DRIFT_REPORT 37
include/linux/mfd/wl1273-core.h line 68
Quoted 2 lines
include/linux/mfd/wl1273-core.h new file +2
-0+ +#define WL1273_PCE_GET 40
include/linux/mfd/wl1273-core.h line 69
Quoted 1 line
include/linux/mfd/wl1273-core.h new file +1
-0+#define WL1273_FIRM_VER_GET 41
include/linux/mfd/wl1273-core.h line 70
Quoted 1 line
include/linux/mfd/wl1273-core.h new file +1
-0+#define WL1273_ASIC_VER_GET 42
include/linux/mfd/wl1273-core.h line 71
Quoted 1 line
include/linux/mfd/wl1273-core.h new file +1
-0+#define WL1273_ASIC_ID_GET 43
include/linux/mfd/wl1273-core.h line 72
Quoted 1 line
include/linux/mfd/wl1273-core.h new file +1
-0+#define WL1273_MAN_ID_GET 44
include/linux/mfd/wl1273-core.h line 73
Quoted 1 line
include/linux/mfd/wl1273-core.h new file +1
-0+#define WL1273_TUNER_MODE_SET 45
include/linux/mfd/wl1273-core.h line 74
Quoted 1 line
include/linux/mfd/wl1273-core.h new file +1
-0+#define WL1273_STOP_SEARCH 46
include/linux/mfd/wl1273-core.h line 75
Quoted 1 line
include/linux/mfd/wl1273-core.h new file +1
-0+#define WL1273_RDS_CNTRL_SET 47
include/linux/mfd/wl1273-core.h line 77
Quoted 2 lines
include/linux/mfd/wl1273-core.h new file +2
-0+ +#define WL1273_WRITE_HARDWARE_REG 100
include/linux/mfd/wl1273-core.h line 78
Quoted 1 line
include/linux/mfd/wl1273-core.h new file +1
-0+#define WL1273_CODE_DOWNLOAD 101
include/linux/mfd/wl1273-core.h line 79
Quoted 1 line
include/linux/mfd/wl1273-core.h new file +1
-0+#define WL1273_RESET 102
include/linux/mfd/wl1273-core.h line 81
Quoted 2 lines
include/linux/mfd/wl1273-core.h new file +2
-0+ +#define WL1273_FM_POWER_MODE 254
include/linux/mfd/wl1273-core.h line 82
Quoted 1 line
include/linux/mfd/wl1273-core.h new file +1
-0+#define WL1273_FM_INTERRUPT 255
include/linux/mfd/wl1273-core.h line 86
Quoted 4 lines
include/linux/mfd/wl1273-core.h new file +4
-0+ +/* Transmitter API */ + +#define WL1273_CHANL_SET 55
include/linux/mfd/wl1273-core.h line 87
Quoted 1 line
include/linux/mfd/wl1273-core.h new file +1
-0+#define WL1273_SCAN_SPACING_SET 56
include/linux/mfd/wl1273-core.h line 88
Quoted 1 line
include/linux/mfd/wl1273-core.h new file +1
-0+#define WL1273_REF_SET 57
include/linux/mfd/wl1273-core.h line 89
Quoted 1 line
include/linux/mfd/wl1273-core.h new file +1
-0+#define WL1273_POWER_ENB_SET 90
include/linux/mfd/wl1273-core.h line 90
Quoted 1 line
include/linux/mfd/wl1273-core.h new file +1
-0+#define WL1273_POWER_ATT_SET 58
include/linux/mfd/wl1273-core.h line 91
Quoted 1 line
include/linux/mfd/wl1273-core.h new file +1
-0+#define WL1273_POWER_LEV_SET 59
include/linux/mfd/wl1273-core.h line 92
Quoted 1 line
include/linux/mfd/wl1273-core.h new file +1
-0+#define WL1273_AUDIO_DEV_SET 60
include/linux/mfd/wl1273-core.h line 93
Quoted 1 line
include/linux/mfd/wl1273-core.h new file +1
-0+#define WL1273_PILOT_DEV_SET 61
include/linux/mfd/wl1273-core.h line 94
Quoted 1 line
include/linux/mfd/wl1273-core.h new file +1
-0+#define WL1273_RDS_DEV_SET 62
include/linux/mfd/wl1273-core.h line 95
Quoted 1 line
include/linux/mfd/wl1273-core.h new file +1
-0+#define WL1273_PUPD_SET 91
include/linux/mfd/wl1273-core.h line 96
Quoted 1 line
include/linux/mfd/wl1273-core.h new file +1
-0+#define WL1273_AUDIO_IO_SET 63
include/linux/mfd/wl1273-core.h line 97
Quoted 1 line
include/linux/mfd/wl1273-core.h new file +1
-0+#define WL1273_PREMPH_SET 64
include/linux/mfd/wl1273-core.h line 98
Quoted 1 line
include/linux/mfd/wl1273-core.h new file +1
-0+#define WL1273_MONO_SET 66
include/linux/mfd/wl1273-core.h line 99
Quoted 1 line
include/linux/mfd/wl1273-core.h new file +1
-0+#define WL1273_MUTE 92
include/linux/mfd/wl1273-core.h line 100
Quoted 1 line
include/linux/mfd/wl1273-core.h new file +1
-0+#define WL1273_MPX_LMT_ENABLE 67
include/linux/mfd/wl1273-core.h line 101
Quoted 1 line
include/linux/mfd/wl1273-core.h new file +1
-0+#define WL1273_PI_SET 93
include/linux/mfd/wl1273-core.h line 102
Quoted 1 line
include/linux/mfd/wl1273-core.h new file +1
-0+#define WL1273_ECC_SET 69
include/linux/mfd/wl1273-core.h line 103
Quoted 1 line
include/linux/mfd/wl1273-core.h new file +1
-0+#define WL1273_PTY 70
include/linux/mfd/wl1273-core.h line 104
Quoted 1 line
include/linux/mfd/wl1273-core.h new file +1
-0+#define WL1273_AF 71
include/linux/mfd/wl1273-core.h line 105
Quoted 1 line
include/linux/mfd/wl1273-core.h new file +1
-0+#define WL1273_DISPLAY_MODE 74
include/linux/mfd/wl1273-core.h line 106
Quoted 1 line
include/linux/mfd/wl1273-core.h new file +1
-0+#define WL1273_RDS_REP_SET 77
include/linux/mfd/wl1273-core.h line 107
Quoted 1 line
include/linux/mfd/wl1273-core.h new file +1
-0+#define WL1273_RDS_CONFIG_DATA_SET 98
include/linux/mfd/wl1273-core.h line 108
Quoted 1 line
include/linux/mfd/wl1273-core.h new file +1
-0+#define WL1273_RDS_DATA_SET 99
include/linux/mfd/wl1273-core.h line 109
Quoted 1 line
include/linux/mfd/wl1273-core.h new file +1
-0+#define WL1273_RDS_DATA_ENB 94
include/linux/mfd/wl1273-core.h line 110
Quoted 1 line
include/linux/mfd/wl1273-core.h new file +1
-0+#define WL1273_TA_SET 78
include/linux/mfd/wl1273-core.h line 111
Quoted 1 line
include/linux/mfd/wl1273-core.h new file +1
-0+#define WL1273_TP_SET 79
include/linux/mfd/wl1273-core.h line 112
Quoted 1 line
include/linux/mfd/wl1273-core.h new file +1
-0+#define WL1273_DI_SET 80
include/linux/mfd/wl1273-core.h line 113
Quoted 1 line
include/linux/mfd/wl1273-core.h new file +1
-0+#define WL1273_MS_SET 81
include/linux/mfd/wl1273-core.h line 114
Quoted 1 line
include/linux/mfd/wl1273-core.h new file +1
-0+#define WL1273_PS_SCROLL_SPEED 82
include/linux/mfd/wl1273-core.h line 115
Quoted 1 line
include/linux/mfd/wl1273-core.h new file +1
-0+#define WL1273_TX_AUDIO_LEVEL_TEST 96
include/linux/mfd/wl1273-core.h line 116
Quoted 1 line
include/linux/mfd/wl1273-core.h new file +1
-0+#defineWL1273_TX_AUDIO_LEVEL_TEST_THRESHOLD 73
include/linux/mfd/wl1273-core.h line 117
Quoted 1 line
include/linux/mfd/wl1273-core.h new file +1
-0+#defineWL1273_TX_AUDIO_INPUT_LEVEL_RANGE_SET 54
include/linux/mfd/wl1273-core.h line 118
Quoted 1 line
include/linux/mfd/wl1273-core.h new file +1
-0+#define WL1273_RX_ANTENNA_SELECT 87
include/linux/mfd/wl1273-core.h line 119
Quoted 1 line
include/linux/mfd/wl1273-core.h new file +1
-0+#define WL1273_I2C_DEV_ADDR_SET 86
include/linux/mfd/wl1273-core.h line 120
Quoted 1 line
include/linux/mfd/wl1273-core.h new file +1
-0+#define
WL1273_REF_ERR_CALIB_PARAM_SET
88include/linux/mfd/wl1273-core.h line 121
Quoted 1 line
include/linux/mfd/wl1273-core.h new file +1
-0+#defineWL1273_REF_ERR_CALIB_PERIODICITY_SET 89
include/linux/mfd/wl1273-core.h line 122
Quoted 1 line
include/linux/mfd/wl1273-core.h new file +1
-0+#define WL1273_SOC_INT_TRIGGER 52
include/linux/mfd/wl1273-core.h line 123
Quoted 1 line
include/linux/mfd/wl1273-core.h new file +1
-0+#define WL1273_SOC_AUDIO_PATH_SET 83
include/linux/mfd/wl1273-core.h line 124
Quoted 1 line
include/linux/mfd/wl1273-core.h new file +1
-0+#define WL1273_SOC_PCMI_OVERRIDE 84
include/linux/mfd/wl1273-core.h line 125
Quoted 1 line
include/linux/mfd/wl1273-core.h new file +1
-0+#define WL1273_SOC_I2S_OVERRIDE 85
include/linux/mfd/wl1273-core.h line 126
Quoted 1 line
include/linux/mfd/wl1273-core.h new file +1
-0+#defineWL1273_RSSI_BLOCK_SCAN_FREQ_SET 95
include/linux/mfd/wl1273-core.h line 127
Quoted 1 line
include/linux/mfd/wl1273-core.h new file +1
-0+#defineWL1273_RSSI_BLOCK_SCAN_START 97
include/linux/mfd/wl1273-core.h line 128
Quoted 1 line
include/linux/mfd/wl1273-core.h new file +1
-0+#defineWL1273_RSSI_BLOCK_SCAN_DATA_GET 5
include/linux/mfd/wl1273-core.h line 129
Quoted 1 line
include/linux/mfd/wl1273-core.h new file +1
-0+#define
WL1273_READ_FMANT_TUNE_VALUE
104include/linux/mfd/wl1273-core.h line 131
Quoted 2 lines
include/linux/mfd/wl1273-core.h new file +2
-0+ +#define WL1273_RDS_OFF 0
include/linux/mfd/wl1273-core.h line 132
Quoted 1 line
include/linux/mfd/wl1273-core.h new file +1
-0+#define WL1273_RDS_ON 1
include/linux/mfd/wl1273-core.h line 138
Quoted 6 lines
include/linux/mfd/wl1273-core.h new file +6
-0+#define WL1273_RDS_RESET 2 + +#define WL1273_AUDIO_DIGITAL 0 +#define WL1273_AUDIO_ANALOG 1 + +#define WL1273_MODE_RX 0
include/linux/mfd/wl1273-core.h line 139
Quoted 1 line
include/linux/mfd/wl1273-core.h new file +1
-0+#define WL1273_MODE_TX 1
include/linux/mfd/wl1273-core.h line 140
Quoted 1 line
include/linux/mfd/wl1273-core.h new file +1
-0+#define WL1273_MODE_OFF 2
include/linux/mfd/wl1273-core.h line 143
Quoted 3 lines
include/linux/mfd/wl1273-core.h new file +3
-0+#define WL1273_MODE_SUSPENDED 3 + +#define WL1273_RADIO_CHILD (1<< 0)
include/linux/mfd/wl1273-core.h line 144
Quoted 1 line
include/linux/mfd/wl1273-core.h new file +1
-0+#define WL1273_CODEC_CHILD (1<< 1)
include/linux/mfd/wl1273-core.h line 146
Quoted 2 lines
include/linux/mfd/wl1273-core.h new file +2
-0+ +#define WL1273_RX_MONO 1
include/linux/mfd/wl1273-core.h line 148
Quoted 2 lines
include/linux/mfd/wl1273-core.h new file +2
-0+#define WL1273_RX_STEREO 0 +#define WL1273_TX_MONO 0
Quoted 7 lines
include/linux/mfd/wl1273-core.h line 152
Quoted 4 lines
include/linux/mfd/wl1273-core.h new file +4
-0+#define WL1273_TX_STEREO 1 + +#define WL1273_MAX_VOLUME 0xffff +#define WL1273_DEFAULT_VOLUME
0x78b8include/linux/mfd/wl1273-core.h line 154
Quoted 2 lines
include/linux/mfd/wl1273-core.h new file +2
-0+ +/* I2S protocol, left channel first, data width 16
Quoted 230 lines
bits */
include/linux/mfd/wl1273-core.h line 155
Quoted 1 line
include/linux/mfd/wl1273-core.h new file +1
-0+#define WL1273_PCM_DEF_MODE
0x00include/linux/mfd/wl1273-core.h line 158
Quoted 3 lines
include/linux/mfd/wl1273-core.h new file +3
-0+ +/* Rx */ +#define WL1273_AUDIO_ENABLE_I2S (1 << 0)
include/linux/mfd/wl1273-core.h line 159
Quoted 1 line
include/linux/mfd/wl1273-core.h new file +1
-0+#define WL1273_AUDIO_ENABLE_ANALOG (1 << 1)
include/linux/mfd/wl1273-core.h line 162
Quoted 3 lines
include/linux/mfd/wl1273-core.h new file +3
-0+ +/* Tx */ +#define WL1273_AUDIO_IO_SET_ANALOG 0
include/linux/mfd/wl1273-core.h line 163
Quoted 1 line
include/linux/mfd/wl1273-core.h new file +1
-0+#define WL1273_AUDIO_IO_SET_I2S 1
include/linux/mfd/wl1273-core.h line 165
Quoted 2 lines
include/linux/mfd/wl1273-core.h new file +2
-0+ +#define WL1273_POWER_SET_OFF 0
include/linux/mfd/wl1273-core.h line 166
Quoted 1 line
include/linux/mfd/wl1273-core.h new file +1
-0+#define WL1273_POWER_SET_FM (1 << 0)
include/linux/mfd/wl1273-core.h line 167
Quoted 1 line
include/linux/mfd/wl1273-core.h new file +1
-0+#define WL1273_POWER_SET_RDS (1 << 1)
include/linux/mfd/wl1273-core.h line 168
Quoted 1 line
include/linux/mfd/wl1273-core.h new file +1
-0+#define WL1273_POWER_SET_RETENTION (1 << 4)
include/linux/mfd/wl1273-core.h line 170
Quoted 2 lines
include/linux/mfd/wl1273-core.h new file +2
-0+ +#define WL1273_PUPD_SET_OFF
0x00include/linux/mfd/wl1273-core.h line 171
Quoted 1 line
include/linux/mfd/wl1273-core.h new file +1
-0+#define WL1273_PUPD_SET_ON
0x01include/linux/mfd/wl1273-core.h line 172
Quoted 1 line
include/linux/mfd/wl1273-core.h new file +1
-0+#define WL1273_PUPD_SET_RETENTION
0x10Quoted 6 lines
include/linux/mfd/wl1273-core.h new file +6
-0+ +/* I2S mode */ +#define WL1273_IS2_WIDTH_32 0x0 +#define WL1273_IS2_WIDTH_40 0x1 +#define WL1273_IS2_WIDTH_22_23 0x2 +#define WL1273_IS2_WIDTH_23_22 0x3include/linux/mfd/wl1273-core.h line 188
Quoted 10 lines
include/linux/mfd/wl1273-core.h new file +10
-0+#define WL1273_IS2_WIDTH_48 0x4 +#define WL1273_IS2_WIDTH_50 0x5 +#define WL1273_IS2_WIDTH_60 0x6 +#define WL1273_IS2_WIDTH_64 0x7 +#define WL1273_IS2_WIDTH_80 0x8 +#define WL1273_IS2_WIDTH_96 0x9 +#define WL1273_IS2_WIDTH_128 0xa +#define WL1273_IS2_WIDTH 0xf + +#define WL1273_IS2_FORMAT_STD (0x0<< 4)
include/linux/mfd/wl1273-core.h line 189
Quoted 1 line
include/linux/mfd/wl1273-core.h new file +1
-0+#define WL1273_IS2_FORMAT_LEFT (0x1<< 4)
include/linux/mfd/wl1273-core.h line 190
Quoted 1 line
include/linux/mfd/wl1273-core.h new file +1
-0+#define WL1273_IS2_FORMAT_RIGHT (
0x2<< 4)include/linux/mfd/wl1273-core.h line 191
Quoted 1 line
include/linux/mfd/wl1273-core.h new file +1
-0+#define WL1273_IS2_FORMAT_USER (0x3<< 4)
include/linux/mfd/wl1273-core.h line 193
Quoted 2 lines
include/linux/mfd/wl1273-core.h new file +2
-0+ +#define WL1273_IS2_MASTER (0x0<< 6)
include/linux/mfd/wl1273-core.h line 194
Quoted 1 line
include/linux/mfd/wl1273-core.h new file +1
-0+#define WL1273_IS2_SLAVEW (0x1<< 6)
include/linux/mfd/wl1273-core.h line 196
Quoted 2 lines
include/linux/mfd/wl1273-core.h new file +2
-0+ +#defineWL1273_IS2_TRI_AFTER_SENDING (
0x0<<
7)include/linux/mfd/wl1273-core.h line 197
Quoted 1 line
include/linux/mfd/wl1273-core.h new file +1
-0+#defineWL1273_IS2_TRI_ALWAYS_ACTIVE (
0x1<<
7)include/linux/mfd/wl1273-core.h line 199
Quoted 2 lines
include/linux/mfd/wl1273-core.h new file +2
-0+ +#define WL1273_IS2_SDOWS_RR (0x0<< 8)
include/linux/mfd/wl1273-core.h line 200
Quoted 1 line
include/linux/mfd/wl1273-core.h new file +1
-0+#define WL1273_IS2_SDOWS_RF (0x1<< 8)
include/linux/mfd/wl1273-core.h line 201
Quoted 1 line
include/linux/mfd/wl1273-core.h new file +1
-0+#define WL1273_IS2_SDOWS_FR (0x2<< 8)
include/linux/mfd/wl1273-core.h line 202
Quoted 1 line
include/linux/mfd/wl1273-core.h new file +1
-0+#define WL1273_IS2_SDOWS_FF (0x3<< 8)
include/linux/mfd/wl1273-core.h line 204
Quoted 2 lines
include/linux/mfd/wl1273-core.h new file +2
-0+ +#define WL1273_IS2_TRI_OPT (0x0<< 10)
include/linux/mfd/wl1273-core.h line 205
Quoted 1 line
include/linux/mfd/wl1273-core.h new file +1
-0+#define WL1273_IS2_TRI_ALWAYS (0x1<< 10)
include/linux/mfd/wl1273-core.h line 207
Quoted 2 lines
include/linux/mfd/wl1273-core.h new file +2
-0+ +#define WL1273_IS2_RATE_48K (0x0<< 12)
include/linux/mfd/wl1273-core.h line 208
Quoted 1 line
include/linux/mfd/wl1273-core.h new file +1
-0+#define WL1273_IS2_RATE_44_1K (0x1<< 12)
include/linux/mfd/wl1273-core.h line 209
Quoted 1 line
include/linux/mfd/wl1273-core.h new file +1
-0+#define WL1273_IS2_RATE_32K (0x2<< 12)
include/linux/mfd/wl1273-core.h line 210
Quoted 1 line
include/linux/mfd/wl1273-core.h new file +1
-0+#define WL1273_IS2_RATE_22_05K (0x4<< 12)
include/linux/mfd/wl1273-core.h line 211
Quoted 1 line
include/linux/mfd/wl1273-core.h new file +1
-0+#define WL1273_IS2_RATE_16K (0x5<< 12)
include/linux/mfd/wl1273-core.h line 212
Quoted 1 line
include/linux/mfd/wl1273-core.h new file +1
-0+#define WL1273_IS2_RATE_12K (0x8<< 12)
include/linux/mfd/wl1273-core.h line 213
Quoted 1 line
include/linux/mfd/wl1273-core.h new file +1
-0+#define WL1273_IS2_RATE_11_025 (0x9<< 12)
include/linux/mfd/wl1273-core.h line 214
Quoted 1 line
include/linux/mfd/wl1273-core.h new file +1
-0+#define WL1273_IS2_RATE_8K (0xa<< 12)
include/linux/mfd/wl1273-core.h line 215
Quoted 1 line
include/linux/mfd/wl1273-core.h new file +1
-0+#define WL1273_IS2_RATE (
0xf<< 12)include/linux/mfd/wl1273-core.h line 217
Quoted 2 lines
include/linux/mfd/wl1273-core.h new file +2
-0+ +#define WL1273_I2S_DEF_MODE (
WL1273_IS2_WIDTH_32| \include/linux/mfd/wl1273-core.h line 218
Quoted 1 line
include/linux/mfd/wl1273-core.h new file +1
-0+
WL1273_IS2_FORMAT_STD | \include/linux/mfd/wl1273-core.h line 219
Quoted 1 line
include/linux/mfd/wl1273-core.h new file +1
-0+
WL1273_IS2_MASTER | \include/linux/mfd/wl1273-core.h line 220
Quoted 1 line
include/linux/mfd/wl1273-core.h new file +1
-0+
WL1273_IS2_TRI_AFTER_SENDING |
\include/linux/mfd/wl1273-core.h line 221
Quoted 1 line
include/linux/mfd/wl1273-core.h new file +1
-0+
WL1273_IS2_SDOWS_RR | \include/linux/mfd/wl1273-core.h line 222
Quoted 1 line
include/linux/mfd/wl1273-core.h new file +1
-0+
WL1273_IS2_TRI_OPT | \include/linux/mfd/wl1273-core.h line 223
Quoted 1 line
include/linux/mfd/wl1273-core.h new file +1
-0+
WL1273_IS2_RATE_48K)include/linux/mfd/wl1273-core.h line 226
Quoted 3 lines
include/linux/mfd/wl1273-core.h new file +3
-0+ +/* Private IOCTL */ +#define WL1273_CID_FM_BAND (
V4L2_CID_PRIVATE_BASE+ 2)include/linux/mfd/wl1273-core.h line 231
Quoted 5 lines
include/linux/mfd/wl1273-core.h new file +5
-0+ +#define SCHAR_MIN (-128) +#define SCHAR_MAX 127 + +#define WL1273_FR_EVENT (1 << 0)
include/linux/mfd/wl1273-core.h line 232
Quoted 1 line
include/linux/mfd/wl1273-core.h new file +1
-0+#define WL1273_BL_EVENT (1 << 1)
include/linux/mfd/wl1273-core.h line 233
Quoted 1 line
include/linux/mfd/wl1273-core.h new file +1
-0+#define WL1273_RDS_EVENT (1 << 2)
include/linux/mfd/wl1273-core.h line 234
Quoted 1 line
include/linux/mfd/wl1273-core.h new file +1
-0+#define WL1273_BBLK_EVENT (1 << 3)
include/linux/mfd/wl1273-core.h line 235
Quoted 1 line
include/linux/mfd/wl1273-core.h new file +1
-0+#define WL1273_LSYNC_EVENT (1 << 4)
include/linux/mfd/wl1273-core.h line 236
Quoted 1 line
include/linux/mfd/wl1273-core.h new file +1
-0+#define WL1273_LEV_EVENT (1 << 5)
include/linux/mfd/wl1273-core.h line 237
Quoted 1 line
include/linux/mfd/wl1273-core.h new file +1
-0+#define WL1273_IFFR_EVENT (1 << 6)
include/linux/mfd/wl1273-core.h line 238
Quoted 1 line
include/linux/mfd/wl1273-core.h new file +1
-0+#define WL1273_PI_EVENT (1 << 7)
include/linux/mfd/wl1273-core.h line 239
Quoted 1 line
include/linux/mfd/wl1273-core.h new file +1
-0+#define WL1273_PD_EVENT (1 << 8)
include/linux/mfd/wl1273-core.h line 240
Quoted 1 line
include/linux/mfd/wl1273-core.h new file +1
-0+#define WL1273_STIC_EVENT (1 << 9)
include/linux/mfd/wl1273-core.h line 241
Quoted 1 line
include/linux/mfd/wl1273-core.h new file +1
-0+#define WL1273_MAL_EVENT (1 << 10)
include/linux/mfd/wl1273-core.h line 242
Quoted 1 line
include/linux/mfd/wl1273-core.h new file +1
-0+#define WL1273_POW_ENB_EVENT (1 << 11)
include/linux/mfd/wl1273-core.h line 243
Quoted 1 line
include/linux/mfd/wl1273-core.h new file +1
-0+#define WL1273_SCAN_OVER_EVENT (1 << 12)
include/linux/mfd/wl1273-core.h line 244
Quoted 1 line
include/linux/mfd/wl1273-core.h new file +1
-0+#define WL1273_ERROR_EVENT (1 << 13)
include/linux/mfd/wl1273-core.h line 246
Quoted 2 lines
include/linux/mfd/wl1273-core.h new file +2
-0+ +#define TUNER_MODE_STOP_SEARCH 0
include/linux/mfd/wl1273-core.h line 247
Quoted 1 line
include/linux/mfd/wl1273-core.h new file +1
-0+#define TUNER_MODE_PRESET 1
include/linux/mfd/wl1273-core.h line 248
Quoted 1 line
include/linux/mfd/wl1273-core.h new file +1
-0+#define TUNER_MODE_AUTO_SEEK 2
include/linux/mfd/wl1273-core.h line 249
Quoted 1 line
include/linux/mfd/wl1273-core.h new file +1
-0+#define TUNER_MODE_AF 3
include/linux/mfd/wl1273-core.h line 250
Quoted 1 line
include/linux/mfd/wl1273-core.h new file +1
-0+#define TUNER_MODE_AUTO_SEEK_PI 4
include/linux/mfd/wl1273-core.h line 251
Quoted 1 line
include/linux/mfd/wl1273-core.h new file +1
-0+#define TUNER_MODE_AUTO_SEEK_BULK 5
include/linux/mfd/wl1273-core.h line 256
Quoted 5 lines
include/linux/mfd/wl1273-core.h new file +5
-0+ +/* Allowed modes */ +#define WL1273_RX_ALLOWED 0x01 +#define WL1273_TX_ALLOWED 0x02 +#define WL1273_RXTX_ALLOWED (
WL1273_RX_ALLOWED|WL1273_TX_ALLOWED)include/linux/mfd/wl1273-core.h line 265
Quoted 9 lines
include/linux/mfd/wl1273-core.h new file +9
-0+ +struct band_info { + u32 bottom_frequency; + u32 top_frequency; + u8 band; +}; + +struct wl1273_fm_platform_data { + int (*request_resources) (struct
i2c_client*client);Quoted 4 lines
include/linux/mfd/wl1273-core.h new file +4
-0+ void (*free_resources) (void); + void (*enable) (void); + void (*disable) (void); +include/linux/mfd/wl1273-core.h line 279
Quoted 10 lines
include/linux/mfd/wl1273-core.h new file +10
-0+ u8 modes; + unsigned int children; +}; + +#define WL1273_FM_CORE_CELLS 2 + +/* Allowed modes */ +#define WL1273_RX_ALLOWED 0x01 +#define WL1273_TX_ALLOWED 0x02 +#define WL1273_RXTX_ALLOWED (
WL1273_RX_ALLOWED|WL1273_TX_ALLOWED)include/linux/mfd/wl1273-core.h line 282
Quoted 3 lines
include/linux/mfd/wl1273-core.h new file +3
-0+ +struct wl1273_core { + struct mfd_cellcells[WL1273_FM_CORE_CELLS];
Quoted 14 lines
include/linux/mfd/wl1273-core.h new file +14
-0+ struct i2c_client *i2c_dev; + + u8 allowed_modes; + unsigned int mode; + unsigned int preemphasis; + unsigned int audio_mode; + unsigned int spacing; + unsigned int tx_power; + unsigned int rx_frequency; + unsigned int tx_frequency; + unsigned int band; + unsigned int i2s_mode; + unsigned int channel_number; + unsigned int number_of_bands;include/linux/mfd/wl1273-core.h line 306
Quoted 10 lines
include/linux/mfd/wl1273-core.h new file +10
-0+ unsigned int volume; + + const struct band_info *bands; + + /* RDS */ + bool rds_on; + struct delayed_work work; + + wait_queue_head_t read_queue; + struct mutex lock; /* forserializing fm radio operations */
Quoted 13 lines
include/linux/mfd/wl1273-core.h line 319
Quoted 13 lines
include/linux/mfd/wl1273-core.h new file +13
-0+ struct completion busy; + + unsigned char *buffer; + unsigned int buf_size; + unsigned int rd_index; + unsigned int wr_index; + + /* Selected interrupts */ + u16 irq_flags; + u16 irq_received; +}; + +int wl1273_fm_write_cmd(struct wl1273_core*core, u8
Quoted 2 lines
cmd, u16 param);
Quoted 1 line
include/linux/mfd/wl1273-core.h new file +1
-0+int wl1273_fm_write_data(struct wl1273_core*core, u8
Quoted 2 lines
*data, u16 len);
Quoted 1 line
include/linux/mfd/wl1273-core.h new file +1
-0+int wl1273_fm_read_reg(struct wl1273_core *core,u8
Quoted 3 lines
reg, u16 *value);
include/linux/mfd/wl1273-core.h line 323
Quoted 2 lines
include/linux/mfd/wl1273-core.h new file +2
-0+ +int wl1273_fm_set_audio(struct wl1273_core*core,
Quoted 2 lines
unsigned int mode);
Quoted 1 line
include/linux/mfd/wl1273-core.h new file +1
-0+int wl1273_fm_set_volume(struct wl1273_core*core,
Quoted 6 lines
unsigned int volume);
include/linux/mfd/wl1273-core.h line 326
Quoted 2 lines
include/linux/mfd/wl1273-core.h new file +2
-0+ +#endif /* ifndef RADIO_WL1273_H */--
To unsubscribe from this list: send the line"unsubscribe
Quoted 4 lines
linux-media" in
the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html
Hello.
Quoted 36 lines · ext Pavan Savoy
Quoted 35 lines · Pavan Savoy
From: Pavan Savoy <[email protected]>
Subject: Re: [PATCH v4 2/5] MFD: WL1273 FM Radio: MFD driver for the FM radio.
To: "Matti J. Aaltonen" <[email protected]>, "Mauro Carvalho Chehab" <[email protected]>
Cc: [email protected], [email protected], [email protected], "pavan savoy" <[email protected]>
Date: Wednesday, 7 July, 2010, 10:51 AM--- On Tue, 6/7/10, Mauro Carvalho Chehab <[email protected]>
Quoted 2 lines · wrote:
From: Mauro Carvalho Chehab <[email protected]>
Subject: Re: [PATCH v4 2/5] MFD: WL1273 FM Radio: MFDdriver for the FM radio.
Quoted 2 lines
To: "Matti J. Aaltonen" <[email protected]>
Cc: [email protected],[email protected],
[email protected]Quoted 4 lines
Date: Tuesday, 6 July, 2010, 8:04 AM
Em 04-06-2010 07:34, Matti J.
Aaltonen escreveu:Quoted 1 line
This is a parent driver for two child drivers:
the
Quoted 2 lines
V4L2 driver and
Quoted 1 line
the ALSA codec driver. The MFD part provides the
I2C
Quoted 4 lines
communication
Quoted 1 line
to the device and a couple of functions that are
called from both
Quoted 1 line
children.
Where can I have a look at the whole code ? As in some local tree, where all codes are put up ? Basically, we have a V4L2 driver for WL128x (using TTY as transport) and plan to push them soon ...
Quoted 6 lines
Quoted 1 line
This would be a nice input ...
Anywhere I can have a look at the whole code?
We are trying to push out V4L2 drivers for FM on 128x, and intend to use several V4L2 new ioctls which you have defined (_BAND_) being one of them.Also we plan to push FM Tx of it too..
TX_CLASSfrom V4L2 has most of the ioctls and plan to introduce the rest.
I'm sorry for not answering to you earlier. But I don't have my own public repository. But to create the whole thing is extremely simple:
just take the current mainline tree and apply my patches on top of it...
Best Regards,
Matti
Quoted 1,594 lines
Quoted 1,592 lines
Quoted 60 lines
Quoted 5 lines
Signed-off-by Matti J. Aaltonen <[email protected]>---
drivers/mfd/Kconfig| 6 +Quoted 1 line
drivers/mfd/Makefile| 2 +Quoted 1 line
drivers/mfd/wl1273-core.c| 616
+++++++++++++++++++++++++++++++++++++++Quoted 1 line
include/linux/mfd/wl1273-core.h | 326+++++++++++++++++++++
Quoted 1 line
4 files changed, 950 insertions(+), 0deletions(-)
Quoted 2 lines
create mode 100644 drivers/mfd/wl1273-core.c create mode 100644
include/linux/mfd/wl1273-core.hReview
Quoted 2 lines
(quoted diff) +0
-0b/drivers/mfd/Kconfig
Review
Quoted 17 lines
index 413576a..5998a94 100644
drivers/mfd/Kconfig +6
-0@@ -135,6 +135,12 @@ config TWL4030_CODEC select MFD_CORE default n +config WL1273_CORE + bool + depends on I2C + select MFD_CORE + default n + config MFD_TMIO bool default n(quoted diff) +0
-0b/drivers/mfd/Makefile
drivers/mfd/Makefile
Quoted 4 lines
index 78295d6..46e611d 100644
drivers/mfd/Makefile +0
-0@@ -30,6 +30,8 @@obj-$(CONFIG_TWL4030_CORE) += twl-core.o
twl4030-irq.o twl6030-irq.odrivers/mfd/Makefile line 30
Quoted 1 line
drivers/mfd/Makefile +0
-0obj-$(CONFIG_TWL4030_POWER) +=twl4030-power.o
drivers/mfd/Makefile line 31
Quoted 1 line
drivers/mfd/Makefile +0
-0obj-$(CONFIG_TWL4030_CODEC) +=twl4030-codec.o
drivers/mfd/Makefile line 32
Quoted 2 lines
drivers/mfd/Makefile +1
-0+obj-$(CONFIG_WL1273_CORE) +=wl1273-core.o
drivers/mfd/Makefile line 34
Quoted 2 lines
drivers/mfd/Makefile +1
-0+ obj-$(CONFIG_MFD_MC13783) +=mc13783-core.o
drivers/mfd/Makefile line 35
Quoted 2 lines
drivers/mfd/Makefile +0
-0obj-$(CONFIG_MFD_CORE)+= mfd-core.oReview
Quoted 1 line
(quoted diff) +0
-0
b/drivers/mfd/wl1273-core.cQuoted 7 lines
drivers/mfd/wl1273-core.c line 2
Quoted 7 lines
new file mode 100644
index 0000000..6c7dbbadrivers/mfd/wl1273-core.c new file +2
-0@@ -0,0 +1,616 @@ +/* +* MFD driver for wl1273 FM radio and audio codec
Quoted 5 lines
submodules.
drivers/mfd/wl1273-core.c line 6
Quoted 4 lines
drivers/mfd/wl1273-core.c new file +4
-0+* +* Author: Matti Aaltonen <[email protected]> +* +* Copyright: (C) 2010 Nokia Quoted 9 lines
Corporation
drivers/mfd/wl1273-core.c line 8
Quoted 2 lines
drivers/mfd/wl1273-core.c new file +2
-0+* +* This program is free software; you can redistribute it and/or modify
drivers/mfd/wl1273-core.c line 9
Quoted 1 line
drivers/mfd/wl1273-core.c new file +1
-0+* it under the terms of the GNU General Public License version 2 as
Quoted 3 lines
drivers/mfd/wl1273-core.c new file +3
-0+* published by the Free Software Foundation. +* +* This program is distributed in the hope that it
Quoted 2 lines
will be useful, but
Quoted 1 line
drivers/mfd/wl1273-core.c new file +1
-0+* WITHOUT ANY WARRANTY; without even the implied
Quoted 6 lines
warranty of
drivers/mfd/wl1273-core.c line 14
Quoted 1 line
drivers/mfd/wl1273-core.c new file +1
-0+* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
Quoted 3 lines
drivers/mfd/wl1273-core.c new file +3
-0+* General Public License for more details. +* +* You should have received a copy of the GNU General
Quoted 2 lines
Public License
Quoted 1 line
drivers/mfd/wl1273-core.c new file +1
-0+* along with this program; if not, write to the Free
Quoted 2 lines
Software
Quoted 1 line
drivers/mfd/wl1273-core.c new file +1
-0+* Foundation, Inc., 51 Franklin St, Fifth Floor,
Quoted 50 lines
Boston, MA
Quoted 13 lines
drivers/mfd/wl1273-core.c new file +13
-0+* 02110-1301 USA +* +*/ + +#undef DEBUG + +#include <asm/unaligned.h> +#include <linux/completion.h> +#include <linux/delay.h> +#include <linux/i2c.h> +#include <linux/interrupt.h> +#include <linux/module.h> +#include <linux/types.h> drivers/mfd/wl1273-core.c line 42
Quoted 10 lines
drivers/mfd/wl1273-core.c new file +10
-0+#include <linux/kernel.h> +#include <linux/fs.h> +#include <linux/platform_device.h> +#include <linux/mfd/core.h> +#include <linux/mfd/wl1273-core.h> +#include <media/v4l2-common.h> + +#define DRIVER_DESC "WL1273 FM Radio Core" + +#define
WL1273_IRQ_MASK(WL1273_FR_EVENT| \drivers/mfd/wl1273-core.c line 43
Quoted 1 line
drivers/mfd/wl1273-core.c new file +1
-0+WL1273_POW_ENB_EVENT)drivers/mfd/wl1273-core.c line 48
Quoted 5 lines
drivers/mfd/wl1273-core.c new file +5
-0+ +static const struct band_info bands[] = { +/* USA & Europe */ + { +.bottom_frequency = 87500,
drivers/mfd/wl1273-core.c line 49
Quoted 1 line
drivers/mfd/wl1273-core.c new file +1
-0+.top_frequency =
108000,drivers/mfd/wl1273-core.c line 50
Quoted 1 line
drivers/mfd/wl1273-core.c new file +1
-0+.band
= V4L2_FM_BAND_OTHER,drivers/mfd/wl1273-core.c line 54
Quoted 4 lines
drivers/mfd/wl1273-core.c new file +4
-0+ }, +/* Japan */ + { +.bottom_frequency = 76000,
drivers/mfd/wl1273-core.c line 55
Quoted 1 line
drivers/mfd/wl1273-core.c new file +1
-0+.top_frequency =
90000,drivers/mfd/wl1273-core.c line 56
Quoted 1 line
drivers/mfd/wl1273-core.c new file +1
-0+.band
Quoted 8 lines
= V4L2_FM_BAND_JAPAN,drivers/mfd/wl1273-core.c line 63
Quoted 7 lines
drivers/mfd/wl1273-core.c new file +7
-0+ }, +}; + +/* +* static unsigned char radio_band - Band +* +* The bands are 0=Japan, 1=USA-Europe. USA-Europe is
Quoted 9 lines
the default.
drivers/mfd/wl1273-core.c line 67
Quoted 4 lines
drivers/mfd/wl1273-core.c new file +4
-0+*/ +static unsigned char radio_band =1 ; +module_param (radio_band, byte,0 ); +MODULE_PARM_DESC(radio_band, "Band: 0=Japan,1=USA-Europe*");
drivers/mfd/wl1273-core.c line 70
Quoted 3 lines
drivers/mfd/wl1273-core.c new file +3
-0+ +/* +* static unsigned int rds_buf - the number of RDS
Quoted 10 lines
buffer blocks used.
drivers/mfd/wl1273-core.c line 76
Quoted 6 lines
drivers/mfd/wl1273-core.c new file +6
-0+* +* The default number is 100. +*/ +static unsigned int rds_buf =100 ; +module_param (rds_buf, uint,0 ); +MODULE_PARM_DESC(rds_buf, "RDS buffer entries:*100*");
drivers/mfd/wl1273-core.c line 78
Quoted 2 lines
drivers/mfd/wl1273-core.c new file +2
-0+ +int wl1273_fm_read_reg(struct wl1273_core *core,u8
Quoted 18 lines
reg, u16 *value)
drivers/mfd/wl1273-core.c line 80
Quoted 2 lines
drivers/mfd/wl1273-core.c new file +2
-0+{ + struct i2c_client *client =
core->i2c_dev;drivers/mfd/wl1273-core.c line 84
Quoted 4 lines
drivers/mfd/wl1273-core.c new file +4
-0+u8 b[2 ]; +int r; + + r =
i2c_smbus_read_i2c_block_data(client, reg, 2, b);drivers/mfd/wl1273-core.c line 86
Quoted 2 lines
drivers/mfd/wl1273-core.c new file +2
-0+if (r !=2 ) { +dev_err(&client->dev, "%s: Read: %d fails.\n",
__func__, reg);drivers/mfd/wl1273-core.c line 87
Quoted 1 line
drivers/mfd/wl1273-core.c new file +1
-0+return
-EREMOTEIO;drivers/mfd/wl1273-core.c line 90
Quoted 3 lines
drivers/mfd/wl1273-core.c new file +3
-0+ } + + *value = (u16)b[0] << 8 |Quoted 7 lines
b[1];
drivers/mfd/wl1273-core.c line 96
Quoted 6 lines
drivers/mfd/wl1273-core.c new file +6
-0+ +return 0 ; +} +EXPORT_SYMBOL (wl1273_fm_read_reg); + +int wl1273_fm_write_cmd(struct wl1273_core*core, u8
Quoted 14 lines
cmd, u16 param)
drivers/mfd/wl1273-core.c line 98
Quoted 2 lines
drivers/mfd/wl1273-core.c new file +2
-0+{ + struct i2c_client *client =
core->i2c_dev;drivers/mfd/wl1273-core.c line 99
Quoted 1 line
drivers/mfd/wl1273-core.c new file +1
-0+u8 buf[] = { (param >>8 )&
0xff, param &0xff};drivers/mfd/wl1273-core.c line 102
Quoted 3 lines
drivers/mfd/wl1273-core.c new file +3
-0+int r; + + r =
i2c_smbus_write_i2c_block_data(client, cmd, 2, buf);drivers/mfd/wl1273-core.c line 104
Quoted 2 lines
drivers/mfd/wl1273-core.c new file +2
-0+if (r) { +dev_err(&client->dev, "%s: Cmd: %d fails.\n",
__func__, cmd);Quoted 8 lines
drivers/mfd/wl1273-core.c line 112
Quoted 8 lines
drivers/mfd/wl1273-core.c new file +8
-0+return r; + } + +return 0 ; +} +EXPORT_SYMBOL (wl1273_fm_write_cmd); + +int wl1273_fm_write_data(struct wl1273_core*core, u8
Quoted 30 lines
*data, u16 len)
drivers/mfd/wl1273-core.c line 114
Quoted 2 lines
drivers/mfd/wl1273-core.c new file +2
-0+{ + struct i2c_client *client =
core->i2c_dev;drivers/mfd/wl1273-core.c line 123
Quoted 9 lines
drivers/mfd/wl1273-core.c new file +9
-0+struct i2c_msg msg[1 ]; +int r; + + msg[0 ].addr = client->addr; + msg[0 ].flags =0 ; + msg[0 ].buf = data; + msg[0 ].len = len; + + r =
i2c_transfer(client->adapter, msg, 1);drivers/mfd/wl1273-core.c line 126
Quoted 3 lines
drivers/mfd/wl1273-core.c new file +3
-0+ +if (r !=1 ) { +dev_err(&client->dev, "%s: write error.\n",
__func__);drivers/mfd/wl1273-core.c line 127
Quoted 1 line
drivers/mfd/wl1273-core.c new file +1
-0+return
-EREMOTEIO;drivers/mfd/wl1273-core.c line 135
Quoted 8 lines
drivers/mfd/wl1273-core.c new file +8
-0+ } + +return 0 ; +} +EXPORT_SYMBOL (wl1273_fm_write_data); + +/** +* wl1273_fm_set_audio() - Set audio mode.
Quoted 9 lines
drivers/mfd/wl1273-core.c line 136
Quoted 1 line
drivers/mfd/wl1273-core.c new file +1
-0+* @core: A pointer to the device struct.
drivers/mfd/wl1273-core.c line 137
Quoted 1 line
drivers/mfd/wl1273-core.c new file +1
-0+* @new_mode: The new audio mode.
drivers/mfd/wl1273-core.c line 139
Quoted 2 lines
drivers/mfd/wl1273-core.c new file +2
-0+* +* Audio modes are WL1273_AUDIO_DIGITAL and
WL1273_AUDIO_ANALOG.Quoted 2 lines
drivers/mfd/wl1273-core.c new file +2
-0+*/ +int wl1273_fm_set_audio(struct wl1273_core*core,
Quoted 6 lines
unsigned int
new_mode)drivers/mfd/wl1273-core.c line 145
Quoted 4 lines
drivers/mfd/wl1273-core.c new file +4
-0+{ +int r =0 ; + + if (core->mode ==
WL1273_MODE_OFF||Quoted 6 lines
drivers/mfd/wl1273-core.c line 146
Quoted 1 line
drivers/mfd/wl1273-core.c new file +1
-0+ core->mode ==
WL1273_MODE_SUSPENDED)drivers/mfd/wl1273-core.c line 149
Quoted 3 lines
drivers/mfd/wl1273-core.c new file +3
-0+return -EPERM ; + + if (core->mode ==
WL1273_MODE_RX&&new_mode==
WL1273_AUDIO_DIGITAL)Quoted 87 lines
{
drivers/mfd/wl1273-core.c line 150
Quoted 1 line
drivers/mfd/wl1273-core.c new file +1
-0+ r =wl1273_fm_write_cmd(core,
WL1273_PCM_MODE_SET,drivers/mfd/wl1273-core.c line 151
Quoted 1 line
drivers/mfd/wl1273-core.c new file +1
-0+
WL1273_PCM_DEF_MODE);drivers/mfd/wl1273-core.c line 153
Quoted 2 lines
drivers/mfd/wl1273-core.c new file +2
-0+if (r) +goto out;drivers/mfd/wl1273-core.c line 155
Quoted 2 lines
drivers/mfd/wl1273-core.c new file +2
-0+ + r =wl1273_fm_write_cmd(core,
WL1273_I2S_MODE_CONFIG_SET,drivers/mfd/wl1273-core.c line 156
Quoted 1 line
drivers/mfd/wl1273-core.c new file +1
-0+
core->i2s_mode);drivers/mfd/wl1273-core.c line 158
Quoted 2 lines
drivers/mfd/wl1273-core.c new file +2
-0+if (r) +goto out;drivers/mfd/wl1273-core.c line 160
Quoted 2 lines
drivers/mfd/wl1273-core.c new file +2
-0+ + r =wl1273_fm_write_cmd(core,
WL1273_AUDIO_ENABLE,drivers/mfd/wl1273-core.c line 161
Quoted 1 line
drivers/mfd/wl1273-core.c new file +1
-0+
WL1273_AUDIO_ENABLE_I2S);drivers/mfd/wl1273-core.c line 163
Quoted 2 lines
drivers/mfd/wl1273-core.c new file +2
-0+if (r) +goto out;drivers/mfd/wl1273-core.c line 165
Quoted 2 lines
drivers/mfd/wl1273-core.c new file +2
-0+ + } else if (core->mode ==
WL1273_MODE_RX&&drivers/mfd/wl1273-core.c line 166
Quoted 1 line
drivers/mfd/wl1273-core.c new file +1
-0+
new_mode==WL1273_AUDIO_ANALOG) {drivers/mfd/wl1273-core.c line 167
Quoted 1 line
drivers/mfd/wl1273-core.c new file +1
-0+ r =wl1273_fm_write_cmd(core,
WL1273_AUDIO_ENABLE,drivers/mfd/wl1273-core.c line 168
Quoted 1 line
drivers/mfd/wl1273-core.c new file +1
-0+
WL1273_AUDIO_ENABLE_ANALOG);drivers/mfd/wl1273-core.c line 170
Quoted 2 lines
drivers/mfd/wl1273-core.c new file +2
-0+if (r) +goto out;drivers/mfd/wl1273-core.c line 172
Quoted 2 lines
drivers/mfd/wl1273-core.c new file +2
-0+ + } else if (core->mode ==
WL1273_MODE_TX&&drivers/mfd/wl1273-core.c line 173
Quoted 1 line
drivers/mfd/wl1273-core.c new file +1
-0+
new_mode==WL1273_AUDIO_DIGITAL) {drivers/mfd/wl1273-core.c line 174
Quoted 1 line
drivers/mfd/wl1273-core.c new file +1
-0+ r =wl1273_fm_write_cmd(core,
WL1273_I2S_MODE_CONFIG_SET,drivers/mfd/wl1273-core.c line 175
Quoted 1 line
drivers/mfd/wl1273-core.c new file +1
-0+
core->i2s_mode);drivers/mfd/wl1273-core.c line 177
Quoted 2 lines
drivers/mfd/wl1273-core.c new file +2
-0+if (r) +goto out;drivers/mfd/wl1273-core.c line 179
Quoted 2 lines
drivers/mfd/wl1273-core.c new file +2
-0+ + r =wl1273_fm_write_cmd(core,
WL1273_AUDIO_IO_SET,drivers/mfd/wl1273-core.c line 180
Quoted 1 line
drivers/mfd/wl1273-core.c new file +1
-0+
WL1273_AUDIO_IO_SET_I2S);drivers/mfd/wl1273-core.c line 182
Quoted 2 lines
drivers/mfd/wl1273-core.c new file +2
-0+if (r) +goto out;drivers/mfd/wl1273-core.c line 184
Quoted 2 lines
drivers/mfd/wl1273-core.c new file +2
-0+ + } else if (core->mode ==
WL1273_MODE_TX&&drivers/mfd/wl1273-core.c line 185
Quoted 1 line
drivers/mfd/wl1273-core.c new file +1
-0+
new_mode==WL1273_AUDIO_ANALOG) {drivers/mfd/wl1273-core.c line 186
Quoted 1 line
drivers/mfd/wl1273-core.c new file +1
-0+ r =wl1273_fm_write_cmd(core,
WL1273_AUDIO_IO_SET,drivers/mfd/wl1273-core.c line 187
Quoted 1 line
drivers/mfd/wl1273-core.c new file +1
-0+
WL1273_AUDIO_IO_SET_ANALOG);drivers/mfd/wl1273-core.c line 189
Quoted 2 lines
drivers/mfd/wl1273-core.c new file +2
-0+if (r) +goto out;drivers/mfd/wl1273-core.c line 200
Quoted 11 lines
drivers/mfd/wl1273-core.c new file +11
-0+ } + + core->audio_mode = new_mode; + +out: +return r; +} +EXPORT_SYMBOL (wl1273_fm_set_audio); + +/** +* wl1273_fm_set_volume() - Set volume.
Quoted 6 lines
drivers/mfd/wl1273-core.c line 201
Quoted 1 line
drivers/mfd/wl1273-core.c new file +1
-0+* @core: A pointer to the device struct.
drivers/mfd/wl1273-core.c line 202
Quoted 1 line
drivers/mfd/wl1273-core.c new file +1
-0+* @volume: The new volume value.
Quoted 2 lines
drivers/mfd/wl1273-core.c new file +2
-0+*/ +int wl1273_fm_set_volume(struct wl1273_core*core,
Quoted 31 lines
unsigned int volume)
drivers/mfd/wl1273-core.c line 209
Quoted 5 lines
drivers/mfd/wl1273-core.c new file +5
-0+{ +u16 val; +int r; + + if (volume >
WL1273_MAX_VOLUME)drivers/mfd/wl1273-core.c line 210
Quoted 1 line
drivers/mfd/wl1273-core.c new file +1
-0+return
-EINVAL;drivers/mfd/wl1273-core.c line 216
Quoted 6 lines
drivers/mfd/wl1273-core.c new file +6
-0+ +if (core->volume == volume) +return 0 ; + + val = volume; + r = wl1273_fm_read_reg(core,
WL1273_VOLUME_SET, &val);drivers/mfd/wl1273-core.c line 225
Quoted 9 lines
drivers/mfd/wl1273-core.c new file +9
-0+if (r) +return r; + + core->volume = volume; +return 0 ; +} +EXPORT_SYMBOL (wl1273_fm_set_volume); + +#define
WL1273_RDS_FIFO_EMPTY(status)(!(1
<< 6 & status))drivers/mfd/wl1273-core.c line 227
Quoted 2 lines
drivers/mfd/wl1273-core.c new file +2
-0+ +#define
WL1273_RDS_CORRECTABLE_ERROR(1 <<
3)Quoted 5 lines
drivers/mfd/wl1273-core.c line 228
Quoted 1 line
drivers/mfd/wl1273-core.c new file +1
-0+#define
WL1273_RDS_UNCORRECTABLE_ERROR(1 <<
4)drivers/mfd/wl1273-core.c line 230
Quoted 2 lines
drivers/mfd/wl1273-core.c new file +2
-0+ +static int wl1273_fm_rds(struct wl1273_core*core)
Quoted 64 lines
drivers/mfd/wl1273-core.c line 232
Quoted 2 lines
drivers/mfd/wl1273-core.c new file +2
-0+{ + struct i2c_client *client =
core->i2c_dev;drivers/mfd/wl1273-core.c line 233
Quoted 1 line
drivers/mfd/wl1273-core.c new file +1
-0+ struct device *dev =
&client->dev;drivers/mfd/wl1273-core.c line 234
Quoted 1 line
drivers/mfd/wl1273-core.c new file +1
-0+struct v4l2_rds_data rds = {0 ,0 ,0 };
drivers/mfd/wl1273-core.c line 237
Quoted 3 lines
drivers/mfd/wl1273-core.c new file +3
-0+struct i2c_msg msg[] = { + { +.addr = client->addr,drivers/mfd/wl1273-core.c line 238
Quoted 1 line
drivers/mfd/wl1273-core.c new file +1
-0+.flags = 0,drivers/mfd/wl1273-core.c line 239
Quoted 1 line
drivers/mfd/wl1273-core.c new file +1
-0+.buf = b0,drivers/mfd/wl1273-core.c line 240
Quoted 1 line
drivers/mfd/wl1273-core.c new file +1
-0+.len = 1drivers/mfd/wl1273-core.c line 243
Quoted 3 lines
drivers/mfd/wl1273-core.c new file +3
-0+ }, + { +.addr = client->addr,drivers/mfd/wl1273-core.c line 244
Quoted 1 line
drivers/mfd/wl1273-core.c new file +1
-0+.flags = I2C_M_RD,drivers/mfd/wl1273-core.c line 245
Quoted 1 line
drivers/mfd/wl1273-core.c new file +1
-0+.buf = (u8 *) &rds,drivers/mfd/wl1273-core.c line 246
Quoted 1 line
drivers/mfd/wl1273-core.c new file +1
-0+.len = 3drivers/mfd/wl1273-core.c line 249
Quoted 3 lines
drivers/mfd/wl1273-core.c new file +3
-0+ } + }; + u8 b0[] = { WL1273_RDS_DATA_GET },status;
drivers/mfd/wl1273-core.c line 253
Quoted 4 lines
drivers/mfd/wl1273-core.c new file +4
-0+u16 val; +int r; + + r = wl1273_fm_read_reg(core,
WL1273_RDS_SYNC_GET, &val);drivers/mfd/wl1273-core.c line 257
Quoted 4 lines
drivers/mfd/wl1273-core.c new file +4
-0+if (r) +return r; + +/* Is RDS decoder synchronized? */
drivers/mfd/wl1273-core.c line 259
Quoted 2 lines
drivers/mfd/wl1273-core.c new file +2
-0+if ((val &0x01 ) ==0 ) +return
-EAGAIN;drivers/mfd/wl1273-core.c line 261
Quoted 2 lines
drivers/mfd/wl1273-core.c new file +2
-0+ +/* copy all four RDS blocks to internal buffer */
drivers/mfd/wl1273-core.c line 263
Quoted 2 lines
drivers/mfd/wl1273-core.c new file +2
-0+ do { + r =
i2c_transfer(client->adapter, msg, 2);drivers/mfd/wl1273-core.c line 265
Quoted 2 lines
drivers/mfd/wl1273-core.c new file +2
-0+if (r !=2 ) { +dev_err(dev, WL1273_FM_DRIVER_NAMEdrivers/mfd/wl1273-core.c line 266
Quoted 1 line
drivers/mfd/wl1273-core.c new file +1
-0+": %s:
read_rdserror
r == %i)\n",drivers/mfd/wl1273-core.c line 267
Quoted 1 line
drivers/mfd/wl1273-core.c new file +1
-0+__func__, r);drivers/mfd/wl1273-core.c line 270
Quoted 3 lines
drivers/mfd/wl1273-core.c new file +3
-0+ } + + status =rds.block;
drivers/mfd/wl1273-core.c line 272
Quoted 2 lines
drivers/mfd/wl1273-core.c new file +2
-0+ + ifQuoted 8 lines
(
WL1273_RDS_FIFO_EMPTY(status))drivers/mfd/wl1273-core.c line 273
Quoted 1 line
drivers/mfd/wl1273-core.c new file +1
-0+break;drivers/mfd/wl1273-core.c line 275
Quoted 2 lines
drivers/mfd/wl1273-core.c new file +2
-0+ +/* copy RDS block to internal buffer */
drivers/mfd/wl1273-core.c line 276
Quoted 1 line
drivers/mfd/wl1273-core.c new file +1
-0+memcpy(&core->buffer[core->wr_index],
&rds,
Quoted 53 lines
3);
drivers/mfd/wl1273-core.c line 277
Quoted 1 line
drivers/mfd/wl1273-core.c new file +1
-0+
core->wr_index+= 3;drivers/mfd/wl1273-core.c line 279
Quoted 2 lines
drivers/mfd/wl1273-core.c new file +2
-0+ +/* copy the error bits to standard positions */
drivers/mfd/wl1273-core.c line 280
Quoted 1 line
drivers/mfd/wl1273-core.c new file +1
-0+ if(
WL1273_RDS_UNCORRECTABLE_ERROR& status) {drivers/mfd/wl1273-core.c line 281
Quoted 1 line
drivers/mfd/wl1273-core.c new file +1
-0+rds.block |= V4L2_RDS_BLOCK_ERROR;drivers/mfd/wl1273-core.c line 282
Quoted 1 line
drivers/mfd/wl1273-core.c new file +1
-0+rds.block &=
~V4L2_RDS_BLOCK_CORRECTED;drivers/mfd/wl1273-core.c line 283
Quoted 1 line
drivers/mfd/wl1273-core.c new file +1
-0+ } else if(
WL1273_RDS_CORRECTABLE_ERROR& status) {drivers/mfd/wl1273-core.c line 284
Quoted 1 line
drivers/mfd/wl1273-core.c new file +1
-0+rds.block &= ~V4L2_RDS_BLOCK_ERROR;drivers/mfd/wl1273-core.c line 285
Quoted 1 line
drivers/mfd/wl1273-core.c new file +1
-0+rds.block |= V4L2_RDS_BLOCK_CORRECTED;drivers/mfd/wl1273-core.c line 287
Quoted 2 lines
drivers/mfd/wl1273-core.c new file +2
-0+ }else { +rds.block &= ~V4L2_RDS_BLOCK_ERROR;drivers/mfd/wl1273-core.c line 288
Quoted 1 line
drivers/mfd/wl1273-core.c new file +1
-0+rds.block &=
~V4L2_RDS_BLOCK_CORRECTED;drivers/mfd/wl1273-core.c line 291
Quoted 3 lines
drivers/mfd/wl1273-core.c new file +3
-0+ } + +/* wrap write pointer */
drivers/mfd/wl1273-core.c line 292
Quoted 1 line
drivers/mfd/wl1273-core.c new file +1
-0+ if(
core->wr_index>=core->buf_size)drivers/mfd/wl1273-core.c line 293
Quoted 1 line
drivers/mfd/wl1273-core.c new file +1
-0+core->wr_index = 0;drivers/mfd/wl1273-core.c line 295
Quoted 2 lines
drivers/mfd/wl1273-core.c new file +2
-0+ +/* check for overflow & start over */
drivers/mfd/wl1273-core.c line 296
Quoted 1 line
drivers/mfd/wl1273-core.c new file +1
-0+ if(
core->wr_index==core->rd_index) {drivers/mfd/wl1273-core.c line 297
Quoted 1 line
drivers/mfd/wl1273-core.c new file +1
-0+dev_dbg(dev, "RDS OVERFLOW");drivers/mfd/wl1273-core.c line 299
Quoted 2 lines
drivers/mfd/wl1273-core.c new file +2
-0+ +core->rd_index = 0;drivers/mfd/wl1273-core.c line 300
Quoted 1 line
drivers/mfd/wl1273-core.c new file +1
-0+core->wr_index = 0;drivers/mfd/wl1273-core.c line 301
Quoted 1 line
drivers/mfd/wl1273-core.c new file +1
-0+break;drivers/mfd/wl1273-core.c line 303
Quoted 2 lines
drivers/mfd/wl1273-core.c new file +2
-0+ } + } while(!WL1273_RDS_FIFO_EMPTY(status));
drivers/mfd/wl1273-core.c line 306
Quoted 3 lines
drivers/mfd/wl1273-core.c new file +3
-0+ +/* wake up read queue */ + if (core->wr_index !=Quoted 8 lines
core->rd_index)drivers/mfd/wl1273-core.c line 307
Quoted 1 line
drivers/mfd/wl1273-core.c new file +1
-0+
wake_up_interruptible(&core->read_queue);drivers/mfd/wl1273-core.c line 312
Quoted 5 lines
drivers/mfd/wl1273-core.c new file +5
-0+ +return 0 ; +} + +static void wl1273_fm_rds_work(struct
wl1273_coreQuoted 6 lines
*core)
drivers/mfd/wl1273-core.c line 317
Quoted 5 lines
drivers/mfd/wl1273-core.c new file +5
-0+{ +wl1273_fm_rds (core); +} + +static irqreturn_twl1273_fm_irq_thread_handler(int
Quoted 26 lines
irq, void
*dev_id)drivers/mfd/wl1273-core.c line 321
Quoted 4 lines
drivers/mfd/wl1273-core.c new file +4
-0+{ +int r; +u16 flags; + struct wl1273_core *core =
dev_id;drivers/mfd/wl1273-core.c line 323
Quoted 2 lines
drivers/mfd/wl1273-core.c new file +2
-0+ + r = wl1273_fm_read_reg(core,
WL1273_FLAG_GET, &flags);drivers/mfd/wl1273-core.c line 327
Quoted 4 lines
drivers/mfd/wl1273-core.c new file +4
-0+if (r) + goto out; + +if (flags &WL1273_BL_EVENT ){
drivers/mfd/wl1273-core.c line 328
Quoted 1 line
drivers/mfd/wl1273-core.c new file +1
-0+
core->irq_received= flags;drivers/mfd/wl1273-core.c line 329
Quoted 1 line
drivers/mfd/wl1273-core.c new file +1
-0+
dev_dbg(&core->i2c_dev->dev, "IRQ: BL\n");drivers/mfd/wl1273-core.c line 332
Quoted 3 lines
drivers/mfd/wl1273-core.c new file +3
-0+ } + +if (flags &WL1273_RDS_EVENT ){
drivers/mfd/wl1273-core.c line 335
Quoted 3 lines
drivers/mfd/wl1273-core.c new file +3
-0+msleep (200 ); + +
wl1273_fm_rds_work(core);Quoted 6 lines
drivers/mfd/wl1273-core.c line 338
Quoted 3 lines
drivers/mfd/wl1273-core.c new file +3
-0+ } + + if (flags &
WL1273_BBLK_EVENT)drivers/mfd/wl1273-core.c line 339
Quoted 1 line
drivers/mfd/wl1273-core.c new file +1
-0+dev_dbg(&core->i2c_dev->dev, "IRQ:
BBLK\n");
Quoted 5 lines
drivers/mfd/wl1273-core.c line 341
Quoted 2 lines
drivers/mfd/wl1273-core.c new file +2
-0+ + if (flags &
WL1273_LSYNC_EVENT)drivers/mfd/wl1273-core.c line 342
Quoted 1 line
drivers/mfd/wl1273-core.c new file +1
-0+dev_dbg(&core->i2c_dev->dev, "IRQ:
LSYNC\n");
Quoted 7 lines
drivers/mfd/wl1273-core.c line 344
Quoted 2 lines
drivers/mfd/wl1273-core.c new file +2
-0+ +if (flags &WL1273_LEV_EVENT ){
drivers/mfd/wl1273-core.c line 347
Quoted 3 lines
drivers/mfd/wl1273-core.c new file +3
-0+u16 level; + + r =wl1273_fm_read_reg(core,
WL1273_RSSI_LVL_GET,&level);
Quoted 10 lines
drivers/mfd/wl1273-core.c line 350
Quoted 3 lines
drivers/mfd/wl1273-core.c new file +3
-0+ +if (r) +goto out;drivers/mfd/wl1273-core.c line 352
Quoted 2 lines
drivers/mfd/wl1273-core.c new file +2
-0+ + if (level >14)
drivers/mfd/wl1273-core.c line 353
Quoted 1 line
drivers/mfd/wl1273-core.c new file +1
-0+dev_dbg(&core->i2c_dev->dev,"IRQ: LEV: 0x%x04\n",
Quoted 8 lines
drivers/mfd/wl1273-core.c line 354
Quoted 1 line
drivers/mfd/wl1273-core.c new file +1
-0+level);drivers/mfd/wl1273-core.c line 357
Quoted 3 lines
drivers/mfd/wl1273-core.c new file +3
-0+ } + + if (flags &
WL1273_IFFR_EVENT)drivers/mfd/wl1273-core.c line 358
Quoted 1 line
drivers/mfd/wl1273-core.c new file +1
-0+dev_dbg(&core->i2c_dev->dev, "IRQ:
IFFR\n");
Quoted 8 lines
drivers/mfd/wl1273-core.c line 361
Quoted 3 lines
drivers/mfd/wl1273-core.c new file +3
-0+ +if (flags &WL1273_PI_EVENT ) +
dev_dbg(&core->i2c_dev->dev, "IRQ: PI\n");drivers/mfd/wl1273-core.c line 364
Quoted 3 lines
drivers/mfd/wl1273-core.c new file +3
-0+ +if (flags &WL1273_PD_EVENT ) +
dev_dbg(&core->i2c_dev->dev, "IRQ: PD\n");Quoted 5 lines
drivers/mfd/wl1273-core.c line 366
Quoted 2 lines
drivers/mfd/wl1273-core.c new file +2
-0+ + if (flags &
WL1273_STIC_EVENT)drivers/mfd/wl1273-core.c line 367
Quoted 1 line
drivers/mfd/wl1273-core.c new file +1
-0+dev_dbg(&core->i2c_dev->dev, "IRQ:
STIC\n");
Quoted 6 lines
drivers/mfd/wl1273-core.c line 370
Quoted 3 lines
drivers/mfd/wl1273-core.c new file +3
-0+ +if (flags &WL1273_MAL_EVENT ) +
dev_dbg(&core->i2c_dev->dev, "IRQ: MAL\n");drivers/mfd/wl1273-core.c line 372
Quoted 2 lines
drivers/mfd/wl1273-core.c new file +2
-0+ + if (flags &Quoted 7 lines
WL1273_POW_ENB_EVENT) {drivers/mfd/wl1273-core.c line 373
Quoted 1 line
drivers/mfd/wl1273-core.c new file +1
-0+
complete(&core->busy);drivers/mfd/wl1273-core.c line 374
Quoted 1 line
drivers/mfd/wl1273-core.c new file +1
-0+
dev_dbg(&core->i2c_dev->dev, "NOT BUSY\n");drivers/mfd/wl1273-core.c line 375
Quoted 1 line
drivers/mfd/wl1273-core.c new file +1
-0+dev_dbg(&core->i2c_dev->dev, "IRQ:
POW_ENB\n");
Quoted 6 lines
drivers/mfd/wl1273-core.c line 378
Quoted 3 lines
drivers/mfd/wl1273-core.c new file +3
-0+ } + + if (flags &
WL1273_SCAN_OVER_EVENT)drivers/mfd/wl1273-core.c line 379
Quoted 1 line
drivers/mfd/wl1273-core.c new file +1
-0+dev_dbg(&core->i2c_dev->dev, "IRQ:
SCAN_OVER\n");
Quoted 5 lines
drivers/mfd/wl1273-core.c line 381
Quoted 2 lines
drivers/mfd/wl1273-core.c new file +2
-0+ + if (flags &
WL1273_ERROR_EVENT)drivers/mfd/wl1273-core.c line 382
Quoted 1 line
drivers/mfd/wl1273-core.c new file +1
-0+dev_dbg(&core->i2c_dev->dev, "IRQ:
ERROR\n");
Quoted 56 lines
drivers/mfd/wl1273-core.c line 384
Quoted 2 lines
drivers/mfd/wl1273-core.c new file +2
-0+ +if (flags &WL1273_FR_EVENT ){
drivers/mfd/wl1273-core.c line 387
Quoted 3 lines
drivers/mfd/wl1273-core.c new file +3
-0+u16 freq; + +
dev_dbg(&core->i2c_dev->dev, "IRQ: FR:\n");drivers/mfd/wl1273-core.c line 389
Quoted 2 lines
drivers/mfd/wl1273-core.c new file +2
-0+ + if(
core->mode==WL1273_MODE_RX) {drivers/mfd/wl1273-core.c line 390
Quoted 1 line
drivers/mfd/wl1273-core.c new file +1
-0+r = wl1273_fm_write_cmd(core,
WL1273_TUNER_MODE_SET,drivers/mfd/wl1273-core.c line 391
Quoted 1 line
drivers/mfd/wl1273-core.c new file +1
-0+TUNER_MODE_STOP_SEARCH);drivers/mfd/wl1273-core.c line 392
Quoted 1 line
drivers/mfd/wl1273-core.c new file +1
-0+if (r) {drivers/mfd/wl1273-core.c line 393
Quoted 1 line
drivers/mfd/wl1273-core.c new file +1
-0+dev_err(&core->i2c_dev->dev,
drivers/mfd/wl1273-core.c line 394
Quoted 1 line
drivers/mfd/wl1273-core.c new file +1
-0+"%s:
TUNER_MODE_SETfails: %d\n",drivers/mfd/wl1273-core.c line 395
Quoted 1 line
drivers/mfd/wl1273-core.c new file +1
-0+
__func__, r);drivers/mfd/wl1273-core.c line 396
Quoted 1 line
drivers/mfd/wl1273-core.c new file +1
-0+goto out;drivers/mfd/wl1273-core.c line 397
Quoted 1 line
drivers/mfd/wl1273-core.c new file +1
-0+}drivers/mfd/wl1273-core.c line 399
Quoted 2 lines
drivers/mfd/wl1273-core.c new file +2
-0+ +r = wl1273_fm_read_reg(core,
WL1273_FREQ_SET, &freq);drivers/mfd/wl1273-core.c line 400
Quoted 1 line
drivers/mfd/wl1273-core.c new file +1
-0+if (r)drivers/mfd/wl1273-core.c line 401
Quoted 1 line
drivers/mfd/wl1273-core.c new file +1
-0+goto out;drivers/mfd/wl1273-core.c line 403
Quoted 2 lines
drivers/mfd/wl1273-core.c new file +2
-0+ +core->rx_frequency =drivers/mfd/wl1273-core.c line 404
Quoted 1 line
drivers/mfd/wl1273-core.c new file +1
-0+bands[core->band].bottom_frequency +
drivers/mfd/wl1273-core.c line 405
Quoted 1 line
drivers/mfd/wl1273-core.c new file +1
-0+freq * 50;drivers/mfd/wl1273-core.c line 407
Quoted 2 lines
drivers/mfd/wl1273-core.c new file +2
-0+ +/*drivers/mfd/wl1273-core.c line 408
Quoted 1 line
drivers/mfd/wl1273-core.c new file +1
-0+* The driver works
better with this msleep,drivers/mfd/wl1273-core.c line 409
Quoted 1 line
drivers/mfd/wl1273-core.c new file +1
-0+* the documentation
doesn't mention it.Quoted 7 lines
drivers/mfd/wl1273-core.c line 410
Quoted 1 line
drivers/mfd/wl1273-core.c new file +1
-0+*/drivers/mfd/wl1273-core.c line 411
Quoted 1 line
drivers/mfd/wl1273-core.c new file +1
-0+msleep(10);msleep on an irq handler? You shouldn't be doing it!
You're
Quoted 2 lines
not allowed to sleep
during IRQ time. Kernel can panic here. You'llprobably
Quoted 17 lines
need to defer work and
handle it outside irq time.drivers/mfd/wl1273-core.c line 413
Quoted 2 lines
drivers/mfd/wl1273-core.c new file +2
-0+ +dev_dbg(&core->i2c_dev->dev,"%dkHz\n",
drivers/mfd/wl1273-core.c line 414
Quoted 1 line
drivers/mfd/wl1273-core.c new file +1
-0+
core->rx_frequency);drivers/mfd/wl1273-core.c line 417
Quoted 3 lines
drivers/mfd/wl1273-core.c new file +3
-0+ + }else { +r = wl1273_fm_read_reg(core,
WL1273_CHANL_SET, &freq);drivers/mfd/wl1273-core.c line 418
Quoted 1 line
drivers/mfd/wl1273-core.c new file +1
-0+if (r)drivers/mfd/wl1273-core.c line 419
Quoted 1 line
drivers/mfd/wl1273-core.c new file +1
-0+Quoted 8 lines
goto out;drivers/mfd/wl1273-core.c line 421
Quoted 2 lines
drivers/mfd/wl1273-core.c new file +2
-0+ +dev_dbg(&core->i2c_dev->dev,"%dkHz\n", freq);
drivers/mfd/wl1273-core.c line 423
Quoted 2 lines
drivers/mfd/wl1273-core.c new file +2
-0+ } +dev_dbg(&core->i2c_dev->dev, "%s: NOT
BUSY\n",
Quoted 6 lines
__func__);drivers/mfd/wl1273-core.c line 427
Quoted 4 lines
drivers/mfd/wl1273-core.c new file +4
-0+ } + +out: + wl1273_fm_write_cmd(core,
WL1273_INT_MASK_SET,Quoted 8 lines
drivers/mfd/wl1273-core.c line 428
Quoted 1 line
drivers/mfd/wl1273-core.c new file +1
-0+core->irq_flags);drivers/mfd/wl1273-core.c line 434
Quoted 6 lines
drivers/mfd/wl1273-core.c new file +6
-0+complete (&core->busy); + +return IRQ_HANDLED ; +} + +static struct i2c_device_idwl1273_driver_id_table[]
Quoted 5 lines
= {
drivers/mfd/wl1273-core.c line 438
Quoted 4 lines
drivers/mfd/wl1273-core.c new file +4
-0+ { WL1273_FM_DRIVER_NAME, 0 }, + { } +}; +MODULE_DEVICE_TABLE(i2c,
wl1273_driver_id_table);Quoted 131 lines
drivers/mfd/wl1273-core.c line 440
Quoted 2 lines
drivers/mfd/wl1273-core.c new file +2
-0+ +static int wl1273_core_remove(struct i2c_client*client)
drivers/mfd/wl1273-core.c line 442
Quoted 2 lines
drivers/mfd/wl1273-core.c new file +2
-0+{ + struct wl1273_core *core =
i2c_get_clientdata(client);drivers/mfd/wl1273-core.c line 443
Quoted 1 line
drivers/mfd/wl1273-core.c new file +1
-0+struct wl1273_fm_platform_data *pdata =
drivers/mfd/wl1273-core.c line 444
Quoted 1 line
drivers/mfd/wl1273-core.c new file +1
-0+
client->dev.platform_data;drivers/mfd/wl1273-core.c line 446
Quoted 2 lines
drivers/mfd/wl1273-core.c new file +2
-0+ + dev_dbg(&client->dev,"%s\n",
__func__);drivers/mfd/wl1273-core.c line 448
Quoted 2 lines
drivers/mfd/wl1273-core.c new file +2
-0+ +
mfd_remove_devices(&client->dev);drivers/mfd/wl1273-core.c line 460
Quoted 12 lines
drivers/mfd/wl1273-core.c new file +12
-0+i2c_set_clientdata (client, core); + +free_irq (client->irq, core); + pdata->free_resources (); + +kfree (core->buffer); +kfree (core); + +return 0 ; +} + +static int __devinit wl1273_core_probe(struct
i2c_client*client,drivers/mfd/wl1273-core.c line 461
Quoted 1 line
drivers/mfd/wl1273-core.c new file +1
-0+const struct
i2c_device_id*id)drivers/mfd/wl1273-core.c line 463
Quoted 2 lines
drivers/mfd/wl1273-core.c new file +2
-0+{ +struct wl1273_fm_platform_data *pdata =
client->dev.platform_data;drivers/mfd/wl1273-core.c line 468
Quoted 5 lines
drivers/mfd/wl1273-core.c new file +5
-0+int r =0 ; +struct wl1273_core *core; +int children =0 ; + + dev_dbg(&client->dev,"%s\n",
__func__);drivers/mfd/wl1273-core.c line 471
Quoted 3 lines
drivers/mfd/wl1273-core.c new file +3
-0+ +if (!pdata) { +
dev_err(&client->dev, "No platform data.\n");drivers/mfd/wl1273-core.c line 472
Quoted 1 line
drivers/mfd/wl1273-core.c new file +1
-0+return
-EINVAL;drivers/mfd/wl1273-core.c line 475
Quoted 3 lines
drivers/mfd/wl1273-core.c new file +3
-0+ } + + core = kzalloc(sizeof(*core),
GFP_KERNEL);drivers/mfd/wl1273-core.c line 477
Quoted 2 lines
drivers/mfd/wl1273-core.c new file +2
-0+if (!core) +return
-ENOMEM;drivers/mfd/wl1273-core.c line 481
Quoted 4 lines
drivers/mfd/wl1273-core.c new file +4
-0+ +/* RDS buffer allocation */ + core->buf_size = rds_buf *3 ; + core->buffer =
kmalloc(core->buf_size, GFP_KERNEL);drivers/mfd/wl1273-core.c line 483
Quoted 2 lines
drivers/mfd/wl1273-core.c new file +2
-0+if (!core->buffer) { +dev_err(&client->dev,
drivers/mfd/wl1273-core.c line 484
Quoted 1 line
drivers/mfd/wl1273-core.c new file +1
-0+"Cannot allocate memory for RDS
buffer.\n");drivers/mfd/wl1273-core.c line 486
Quoted 2 lines
drivers/mfd/wl1273-core.c new file +2
-0+ r = -ENOMEM ; + goto
err_kmalloc;drivers/mfd/wl1273-core.c line 489
Quoted 3 lines
drivers/mfd/wl1273-core.c new file +3
-0+ } + + core->irq_flags =
WL1273_IRQ_MASK;drivers/mfd/wl1273-core.c line 494
Quoted 5 lines
drivers/mfd/wl1273-core.c new file +5
-0+ core->i2c_dev = client; + core->rds_on = false; + core->mode =WL1273_MODE_OFF ; + core->tx_power =4 ; + core->audio_mode =
WL1273_AUDIO_ANALOG;drivers/mfd/wl1273-core.c line 497
Quoted 3 lines
drivers/mfd/wl1273-core.c new file +3
-0+ core->band = radio_band; + core->bands = bands; + core->number_of_bands =
ARRAY_SIZE(bands);drivers/mfd/wl1273-core.c line 498
Quoted 1 line
drivers/mfd/wl1273-core.c new file +1
-0+ core->i2s_mode =
WL1273_I2S_DEF_MODE;drivers/mfd/wl1273-core.c line 500
Quoted 2 lines
drivers/mfd/wl1273-core.c new file +2
-0+ core->channel_number =2 ; + core->volume =
WL1273_DEFAULT_VOLUME;drivers/mfd/wl1273-core.c line 501
Quoted 1 line
drivers/mfd/wl1273-core.c new file +1
-0+ core->rx_frequency =bands[core->band].bottom_frequency;
drivers/mfd/wl1273-core.c line 502
Quoted 1 line
drivers/mfd/wl1273-core.c new file +1
-0+ core->tx_frequency =bands[core->band].top_frequency;
drivers/mfd/wl1273-core.c line 504
Quoted 2 lines
drivers/mfd/wl1273-core.c new file +2
-0+ + dev_dbg(&client->dev,"
radio_band: %d\n",radio_band);drivers/mfd/wl1273-core.c line 508
Quoted 4 lines
drivers/mfd/wl1273-core.c new file +4
-0+ +mutex_init (&core->lock); + + pdata =
client->dev.platform_data;drivers/mfd/wl1273-core.c line 510
Quoted 2 lines
drivers/mfd/wl1273-core.c new file +2
-0+if (pdata) { + r =
pdata->request_resources(client);drivers/mfd/wl1273-core.c line 512
Quoted 2 lines
drivers/mfd/wl1273-core.c new file +2
-0+if (r) { +dev_err(&client->dev,
WL1273_FM_DRIVER_NAMEdrivers/mfd/wl1273-core.c line 513
Quoted 1 line
drivers/mfd/wl1273-core.c new file +1
-0+": Cannot get platform
data\n");drivers/mfd/wl1273-core.c line 514
Quoted 1 line
drivers/mfd/wl1273-core.c new file +1
-0+goto err_new_mixer;drivers/mfd/wl1273-core.c line 517
Quoted 3 lines
drivers/mfd/wl1273-core.c new file +3
-0+ } + + r =request_threaded_irq(client->irq, NULL,
drivers/mfd/wl1273-core.c line 518
Quoted 1 line
drivers/mfd/wl1273-core.c new file +1
-0+wl1273_fm_irq_thread_handler,drivers/mfd/wl1273-core.c line 519
Quoted 1 line
drivers/mfd/wl1273-core.c new file +1
-0+
IRQF_ONESHOT|IRQF_TRIGGER_FALLING,drivers/mfd/wl1273-core.c line 520
Quoted 1 line
drivers/mfd/wl1273-core.c new file +1
-0+"wl1273-fm", core);drivers/mfd/wl1273-core.c line 521
Quoted 1 line
drivers/mfd/wl1273-core.c new file +1
-0+if (r <0 ){
drivers/mfd/wl1273-core.c line 522
Quoted 1 line
drivers/mfd/wl1273-core.c new file +1
-0+dev_err(&client->dev,
WL1273_FM_DRIVER_NAMEdrivers/mfd/wl1273-core.c line 523
Quoted 1 line
drivers/mfd/wl1273-core.c new file +1
-0+Quoted 8 lines
": Unable to register
IRQ handler\n");drivers/mfd/wl1273-core.c line 524
Quoted 1 line
drivers/mfd/wl1273-core.c new file +1
-0+goto err_request_irq;drivers/mfd/wl1273-core.c line 527
Quoted 3 lines
drivers/mfd/wl1273-core.c new file +3
-0+ } + }else { +dev_err(&client->dev,
WL1273_FM_DRIVER_NAME":Core
Quoted 17 lines
WL1273 IRQ"
drivers/mfd/wl1273-core.c line 528
Quoted 1 line
drivers/mfd/wl1273-core.c new file +1
-0+" not configured");drivers/mfd/wl1273-core.c line 530
Quoted 2 lines
drivers/mfd/wl1273-core.c new file +2
-0+ r = -EINVAL ; + goto
err_new_mixer;drivers/mfd/wl1273-core.c line 533
Quoted 3 lines
drivers/mfd/wl1273-core.c new file +3
-0+ } + +
init_completion(&core->busy);drivers/mfd/wl1273-core.c line 534
Quoted 1 line
drivers/mfd/wl1273-core.c new file +1
-0+
init_waitqueue_head(&core->read_queue);drivers/mfd/wl1273-core.c line 538
Quoted 4 lines
drivers/mfd/wl1273-core.c new file +4
-0+ +i2c_set_clientdata (client, core); + + if (pdata->children &
WL1273_RADIO_CHILD) {Quoted 4 lines
drivers/mfd/wl1273-core.c line 539
Quoted 1 line
drivers/mfd/wl1273-core.c new file +1
-0+struct mfd_cell *cell = &core->cells[children];
drivers/mfd/wl1273-core.c line 540
Quoted 1 line
drivers/mfd/wl1273-core.c new file +1
-0+dev_dbg(&client->dev, "%s: Have V4L2.\n",
__func__);Quoted 29 lines
drivers/mfd/wl1273-core.c line 541
Quoted 1 line
drivers/mfd/wl1273-core.c new file +1
-0+ cell->name ="
wl1273_fm_radio";drivers/mfd/wl1273-core.c line 542
Quoted 1 line
drivers/mfd/wl1273-core.c new file +1
-0+
cell->platform_data= &core;drivers/mfd/wl1273-core.c line 543
Quoted 1 line
drivers/mfd/wl1273-core.c new file +1
-0+
cell->data_size= sizeof(core);drivers/mfd/wl1273-core.c line 547
Quoted 4 lines
drivers/mfd/wl1273-core.c new file +4
-0+ children++; + } + + if (pdata->children &
WL1273_CODEC_CHILD) {drivers/mfd/wl1273-core.c line 548
Quoted 1 line
drivers/mfd/wl1273-core.c new file +1
-0+struct mfd_cell *cell = &core->cells[children];
drivers/mfd/wl1273-core.c line 549
Quoted 1 line
drivers/mfd/wl1273-core.c new file +1
-0+dev_dbg(&client->dev, "%s: Have codec.\n",
__func__);drivers/mfd/wl1273-core.c line 550
Quoted 1 line
drivers/mfd/wl1273-core.c new file +1
-0+ cell->name ="
wl1273_codec_audio";drivers/mfd/wl1273-core.c line 551
Quoted 1 line
drivers/mfd/wl1273-core.c new file +1
-0+
cell->platform_data= &core;drivers/mfd/wl1273-core.c line 552
Quoted 1 line
drivers/mfd/wl1273-core.c new file +1
-0+
cell->data_size= sizeof(core);drivers/mfd/wl1273-core.c line 557
Quoted 5 lines
drivers/mfd/wl1273-core.c new file +5
-0+ children++; + } + +if (children) { +dev_dbg(&client->dev, "%s: Have children.\n",
__func__);Quoted 2 lines
drivers/mfd/wl1273-core.c line 558
Quoted 1 line
drivers/mfd/wl1273-core.c new file +1
-0+ r =mfd_add_devices(&client->dev, -1,
core->cells,Quoted 6 lines
drivers/mfd/wl1273-core.c line 559
Quoted 1 line
drivers/mfd/wl1273-core.c new file +1
-0+children, NULL, 0);
drivers/mfd/wl1273-core.c line 561
Quoted 2 lines
drivers/mfd/wl1273-core.c new file +2
-0+ }else { +dev_err(&client->dev, "No platform data found
for
Quoted 81 lines
children.\n");
Quoted 6 lines
drivers/mfd/wl1273-core.c new file +6
-0+ r = -ENODEV ; + } + +if (!r) +return 0 ; +drivers/mfd/wl1273-core.c line 577
Quoted 10 lines
drivers/mfd/wl1273-core.c new file +10
-0+i2c_set_clientdata (client,NULL ); +kfree (core); +free_irq (client->irq, core); +err_request_irq: + pdata->free_resources (); +err_new_mixer: +kfree (core->buffer); +err_kmalloc: +kfree (core); + dev_dbg(&client->dev,"%s\n",
__func__);drivers/mfd/wl1273-core.c line 584
Quoted 7 lines
drivers/mfd/wl1273-core.c new file +7
-0+ +return r; +} + +static struct i2c_driver wl1273_core_driver = { + .driver = { + .name =
WL1273_FM_DRIVER_NAME,drivers/mfd/wl1273-core.c line 587
Quoted 3 lines
drivers/mfd/wl1273-core.c new file +3
-0+ }, + .probe = wl1273_core_probe, + .id_table =
wl1273_driver_id_table,drivers/mfd/wl1273-core.c line 588
Quoted 1 line
drivers/mfd/wl1273-core.c new file +1
-0+ .remove =
__devexit_p(wl1273_core_remove),drivers/mfd/wl1273-core.c line 595
Quoted 7 lines
drivers/mfd/wl1273-core.c new file +7
-0+}; + +static int __init wl1273_core_init (void ) +{ +int r; + + r =
i2c_add_driver(&wl1273_core_driver);drivers/mfd/wl1273-core.c line 597
Quoted 2 lines
drivers/mfd/wl1273-core.c new file +2
-0+if (r) { +pr_err(WL1273_FM_DRIVER_NAME
drivers/mfd/wl1273-core.c line 598
Quoted 1 line
drivers/mfd/wl1273-core.c new file +1
-0+": driver registration failed\n");
drivers/mfd/wl1273-core.c line 609
Quoted 11 lines
drivers/mfd/wl1273-core.c new file +11
-0+return r; + } + +return 0 ; +} + +static void __exit wl1273_core_exit(void) +{ +flush_scheduled_work (); + +
i2c_del_driver(&wl1273_core_driver);Review
Quoted 8 lines
drivers/mfd/wl1273-core.c new file +7
-0+} +late_initcall (wl1273_core_init); +module_exit (wl1273_core_exit); + +MODULE_AUTHOR ("Matti Aaltonen <[email protected]>" ); +MODULE_DESCRIPTION (DRIVER_DESC ); +MODULE_LICENSE ("GPL" );(quoted diff) +0
-0
b/include/linux/mfd/wl1273-core.hinclude/linux/mfd/wl1273-core.h line 4
Quoted 9 lines
new file mode 100644
index 0000000..81c9743include/linux/mfd/wl1273-core.h new file +4
-0@@ -0,0 +1,326 @@ +/* +* include/media/radio/radio-wl1273.h +* +* Some definitions for the wl1273 radio receiver/transmitter chip.
include/linux/mfd/wl1273-core.h line 9
Quoted 5 lines
include/linux/mfd/wl1273-core.h new file +5
-0+* +* Copyright (C) Nokia Corporation +* Author: Matti J. Aaltonen <[email protected]> +* +* This program is free software; you can Quoted 7 lines
redistribute it and/or
include/linux/mfd/wl1273-core.h line 10
Quoted 1 line
include/linux/mfd/wl1273-core.h new file +1
-0+* modify it under the terms of the GNU General Public License
include/linux/mfd/wl1273-core.h line 11
Quoted 1 line
include/linux/mfd/wl1273-core.h new file +1
-0+* version 2 as published by the Free Software Foundation.
Quoted 2 lines
include/linux/mfd/wl1273-core.h new file +2
-0+* +* This program is distributed in the hope that it
Quoted 2 lines
will be useful, but
Quoted 1 line
include/linux/mfd/wl1273-core.h new file +1
-0+* WITHOUT ANY WARRANTY; without even the implied
Quoted 6 lines
warranty of
include/linux/mfd/wl1273-core.h line 15
Quoted 1 line
include/linux/mfd/wl1273-core.h new file +1
-0+* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
Quoted 3 lines
include/linux/mfd/wl1273-core.h new file +3
-0+* General Public License for more details. +* +* You should have received a copy of the GNU General
Quoted 2 lines
Public License
Quoted 1 line
include/linux/mfd/wl1273-core.h new file +1
-0+* along with this program; if not, write to the Free
Quoted 2 lines
Software
Quoted 1 line
include/linux/mfd/wl1273-core.h new file +1
-0+* Foundation, Inc., 51 Franklin St, Fifth Floor,
Quoted 232 lines
Boston, MA
include/linux/mfd/wl1273-core.h line 30
Quoted 10 lines
include/linux/mfd/wl1273-core.h new file +10
-0+* 02110-1301 USA +*/ + +#ifndef RADIO_WL1273_H +#define RADIO_WL1273_H + +#include <linux/i2c.h> +#include <linux/mfd/core.h> + +#define WL1273_FM_DRIVER_NAME "wl1273-fm"
include/linux/mfd/wl1273-core.h line 33
Quoted 3 lines
include/linux/mfd/wl1273-core.h new file +3
-0+#define RX71_FM_I2C_ADDR 0x22 + +#define WL1273_STEREO_GET 0include/linux/mfd/wl1273-core.h line 34
Quoted 1 line
include/linux/mfd/wl1273-core.h new file +1
-0+#define WL1273_RSSI_LVL_GET 1include/linux/mfd/wl1273-core.h line 35
Quoted 1 line
include/linux/mfd/wl1273-core.h new file +1
-0+#define WL1273_IF_COUNT_GET 2include/linux/mfd/wl1273-core.h line 36
Quoted 1 line
include/linux/mfd/wl1273-core.h new file +1
-0+#define WL1273_FLAG_GET 3include/linux/mfd/wl1273-core.h line 37
Quoted 1 line
include/linux/mfd/wl1273-core.h new file +1
-0+#define WL1273_RDS_SYNC_GET 4include/linux/mfd/wl1273-core.h line 38
Quoted 1 line
include/linux/mfd/wl1273-core.h new file +1
-0+#define WL1273_RDS_DATA_GET 5include/linux/mfd/wl1273-core.h line 39
Quoted 1 line
include/linux/mfd/wl1273-core.h new file +1
-0+#define WL1273_FREQ_SET 10include/linux/mfd/wl1273-core.h line 40
Quoted 1 line
include/linux/mfd/wl1273-core.h new file +1
-0+#define WL1273_AF_FREQ_SET 11include/linux/mfd/wl1273-core.h line 41
Quoted 1 line
include/linux/mfd/wl1273-core.h new file +1
-0+#define WL1273_MOST_MODE_SET 12include/linux/mfd/wl1273-core.h line 42
Quoted 1 line
include/linux/mfd/wl1273-core.h new file +1
-0+#define WL1273_MOST_BLEND_SET 13include/linux/mfd/wl1273-core.h line 43
Quoted 1 line
include/linux/mfd/wl1273-core.h new file +1
-0+#define WL1273_DEMPH_MODE_SET 14include/linux/mfd/wl1273-core.h line 44
Quoted 1 line
include/linux/mfd/wl1273-core.h new file +1
-0+#define WL1273_SEARCH_LVL_SET 15include/linux/mfd/wl1273-core.h line 45
Quoted 1 line
include/linux/mfd/wl1273-core.h new file +1
-0+#define WL1273_BAND_SET 16include/linux/mfd/wl1273-core.h line 46
Quoted 1 line
include/linux/mfd/wl1273-core.h new file +1
-0+#define WL1273_MUTE_STATUS_SET 17include/linux/mfd/wl1273-core.h line 47
Quoted 1 line
include/linux/mfd/wl1273-core.h new file +1
-0+#define WL1273_RDS_PAUSE_LVL_SET 18
include/linux/mfd/wl1273-core.h line 48
Quoted 1 line
include/linux/mfd/wl1273-core.h new file +1
-0+#define WL1273_RDS_PAUSE_DUR_SET 19
include/linux/mfd/wl1273-core.h line 49
Quoted 1 line
include/linux/mfd/wl1273-core.h new file +1
-0+#define WL1273_RDS_MEM_SET 20include/linux/mfd/wl1273-core.h line 50
Quoted 1 line
include/linux/mfd/wl1273-core.h new file +1
-0+#define WL1273_RDS_BLK_B_SET 21include/linux/mfd/wl1273-core.h line 51
Quoted 1 line
include/linux/mfd/wl1273-core.h new file +1
-0+#define WL1273_RDS_MSK_B_SET 22include/linux/mfd/wl1273-core.h line 52
Quoted 1 line
include/linux/mfd/wl1273-core.h new file +1
-0+#define WL1273_RDS_PI_MASK_SET 23include/linux/mfd/wl1273-core.h line 53
Quoted 1 line
include/linux/mfd/wl1273-core.h new file +1
-0+#define WL1273_RDS_PI_SET 24include/linux/mfd/wl1273-core.h line 54
Quoted 1 line
include/linux/mfd/wl1273-core.h new file +1
-0+#define WL1273_RDS_SYSTEM_SET 25include/linux/mfd/wl1273-core.h line 55
Quoted 1 line
include/linux/mfd/wl1273-core.h new file +1
-0+#define WL1273_INT_MASK_SET 26include/linux/mfd/wl1273-core.h line 56
Quoted 1 line
include/linux/mfd/wl1273-core.h new file +1
-0+#define WL1273_SEARCH_DIR_SET 27include/linux/mfd/wl1273-core.h line 57
Quoted 1 line
include/linux/mfd/wl1273-core.h new file +1
-0+#define WL1273_VOLUME_SET 28include/linux/mfd/wl1273-core.h line 58
Quoted 1 line
include/linux/mfd/wl1273-core.h new file +1
-0+#define WL1273_AUDIO_ENABLE 29include/linux/mfd/wl1273-core.h line 59
Quoted 1 line
include/linux/mfd/wl1273-core.h new file +1
-0+#define WL1273_PCM_MODE_SET 30include/linux/mfd/wl1273-core.h line 60
Quoted 1 line
include/linux/mfd/wl1273-core.h new file +1
-0+#define WL1273_I2S_MODE_CONFIG_SET 31
include/linux/mfd/wl1273-core.h line 61
Quoted 1 line
include/linux/mfd/wl1273-core.h new file +1
-0+#define WL1273_POWER_SET 32include/linux/mfd/wl1273-core.h line 62
Quoted 1 line
include/linux/mfd/wl1273-core.h new file +1
-0+#define WL1273_INTX_CONFIG_SET 33include/linux/mfd/wl1273-core.h line 63
Quoted 1 line
include/linux/mfd/wl1273-core.h new file +1
-0+#define WL1273_PULL_EN_SET 34include/linux/mfd/wl1273-core.h line 64
Quoted 1 line
include/linux/mfd/wl1273-core.h new file +1
-0+#define WL1273_HILO_SET 35include/linux/mfd/wl1273-core.h line 65
Quoted 1 line
include/linux/mfd/wl1273-core.h new file +1
-0+#define WL1273_SWITCH2FREF 36include/linux/mfd/wl1273-core.h line 66
Quoted 1 line
include/linux/mfd/wl1273-core.h new file +1
-0+#define WL1273_FREQ_DRIFT_REPORT 37
include/linux/mfd/wl1273-core.h line 68
Quoted 2 lines
include/linux/mfd/wl1273-core.h new file +2
-0+ +#define WL1273_PCE_GET 40include/linux/mfd/wl1273-core.h line 69
Quoted 1 line
include/linux/mfd/wl1273-core.h new file +1
-0+#define WL1273_FIRM_VER_GET 41include/linux/mfd/wl1273-core.h line 70
Quoted 1 line
include/linux/mfd/wl1273-core.h new file +1
-0+#define WL1273_ASIC_VER_GET 42include/linux/mfd/wl1273-core.h line 71
Quoted 1 line
include/linux/mfd/wl1273-core.h new file +1
-0+#define WL1273_ASIC_ID_GET 43include/linux/mfd/wl1273-core.h line 72
Quoted 1 line
include/linux/mfd/wl1273-core.h new file +1
-0+#define WL1273_MAN_ID_GET 44include/linux/mfd/wl1273-core.h line 73
Quoted 1 line
include/linux/mfd/wl1273-core.h new file +1
-0+#define WL1273_TUNER_MODE_SET 45include/linux/mfd/wl1273-core.h line 74
Quoted 1 line
include/linux/mfd/wl1273-core.h new file +1
-0+#define WL1273_STOP_SEARCH 46include/linux/mfd/wl1273-core.h line 75
Quoted 1 line
include/linux/mfd/wl1273-core.h new file +1
-0+#define WL1273_RDS_CNTRL_SET 47include/linux/mfd/wl1273-core.h line 77
Quoted 2 lines
include/linux/mfd/wl1273-core.h new file +2
-0+ +#define WL1273_WRITE_HARDWARE_REG 100
include/linux/mfd/wl1273-core.h line 78
Quoted 1 line
include/linux/mfd/wl1273-core.h new file +1
-0+#define WL1273_CODE_DOWNLOAD 101include/linux/mfd/wl1273-core.h line 79
Quoted 1 line
include/linux/mfd/wl1273-core.h new file +1
-0+#define WL1273_RESET 102include/linux/mfd/wl1273-core.h line 81
Quoted 2 lines
include/linux/mfd/wl1273-core.h new file +2
-0+ +#define WL1273_FM_POWER_MODE 254include/linux/mfd/wl1273-core.h line 82
Quoted 1 line
include/linux/mfd/wl1273-core.h new file +1
-0+#define WL1273_FM_INTERRUPT 255include/linux/mfd/wl1273-core.h line 86
Quoted 4 lines
include/linux/mfd/wl1273-core.h new file +4
-0+ +/* Transmitter API */ + +#define WL1273_CHANL_SET 55include/linux/mfd/wl1273-core.h line 87
Quoted 1 line
include/linux/mfd/wl1273-core.h new file +1
-0+#define WL1273_SCAN_SPACING_SET 56include/linux/mfd/wl1273-core.h line 88
Quoted 1 line
include/linux/mfd/wl1273-core.h new file +1
-0+#define WL1273_REF_SET 57include/linux/mfd/wl1273-core.h line 89
Quoted 1 line
include/linux/mfd/wl1273-core.h new file +1
-0+#define WL1273_POWER_ENB_SET 90include/linux/mfd/wl1273-core.h line 90
Quoted 1 line
include/linux/mfd/wl1273-core.h new file +1
-0+#define WL1273_POWER_ATT_SET 58include/linux/mfd/wl1273-core.h line 91
Quoted 1 line
include/linux/mfd/wl1273-core.h new file +1
-0+#define WL1273_POWER_LEV_SET 59include/linux/mfd/wl1273-core.h line 92
Quoted 1 line
include/linux/mfd/wl1273-core.h new file +1
-0+#define WL1273_AUDIO_DEV_SET 60include/linux/mfd/wl1273-core.h line 93
Quoted 1 line
include/linux/mfd/wl1273-core.h new file +1
-0+#define WL1273_PILOT_DEV_SET 61include/linux/mfd/wl1273-core.h line 94
Quoted 1 line
include/linux/mfd/wl1273-core.h new file +1
-0+#define WL1273_RDS_DEV_SET 62include/linux/mfd/wl1273-core.h line 95
Quoted 1 line
include/linux/mfd/wl1273-core.h new file +1
-0+#define WL1273_PUPD_SET 91include/linux/mfd/wl1273-core.h line 96
Quoted 1 line
include/linux/mfd/wl1273-core.h new file +1
-0+#define WL1273_AUDIO_IO_SET 63include/linux/mfd/wl1273-core.h line 97
Quoted 1 line
include/linux/mfd/wl1273-core.h new file +1
-0+#define WL1273_PREMPH_SET 64include/linux/mfd/wl1273-core.h line 98
Quoted 1 line
include/linux/mfd/wl1273-core.h new file +1
-0+#define WL1273_MONO_SET 66include/linux/mfd/wl1273-core.h line 99
Quoted 1 line
include/linux/mfd/wl1273-core.h new file +1
-0+#define WL1273_MUTE 92include/linux/mfd/wl1273-core.h line 100
Quoted 1 line
include/linux/mfd/wl1273-core.h new file +1
-0+#define WL1273_MPX_LMT_ENABLE 67include/linux/mfd/wl1273-core.h line 101
Quoted 1 line
include/linux/mfd/wl1273-core.h new file +1
-0+#define WL1273_PI_SET 93include/linux/mfd/wl1273-core.h line 102
Quoted 1 line
include/linux/mfd/wl1273-core.h new file +1
-0+#define WL1273_ECC_SET 69include/linux/mfd/wl1273-core.h line 103
Quoted 1 line
include/linux/mfd/wl1273-core.h new file +1
-0+#define WL1273_PTY 70include/linux/mfd/wl1273-core.h line 104
Quoted 1 line
include/linux/mfd/wl1273-core.h new file +1
-0+#define WL1273_AF 71include/linux/mfd/wl1273-core.h line 105
Quoted 1 line
include/linux/mfd/wl1273-core.h new file +1
-0+#define WL1273_DISPLAY_MODE 74include/linux/mfd/wl1273-core.h line 106
Quoted 1 line
include/linux/mfd/wl1273-core.h new file +1
-0+#define WL1273_RDS_REP_SET 77include/linux/mfd/wl1273-core.h line 107
Quoted 1 line
include/linux/mfd/wl1273-core.h new file +1
-0+#define WL1273_RDS_CONFIG_DATA_SET 98
include/linux/mfd/wl1273-core.h line 108
Quoted 1 line
include/linux/mfd/wl1273-core.h new file +1
-0+#define WL1273_RDS_DATA_SET 99include/linux/mfd/wl1273-core.h line 109
Quoted 1 line
include/linux/mfd/wl1273-core.h new file +1
-0+#define WL1273_RDS_DATA_ENB 94include/linux/mfd/wl1273-core.h line 110
Quoted 1 line
include/linux/mfd/wl1273-core.h new file +1
-0+#define WL1273_TA_SET 78include/linux/mfd/wl1273-core.h line 111
Quoted 1 line
include/linux/mfd/wl1273-core.h new file +1
-0+#define WL1273_TP_SET 79include/linux/mfd/wl1273-core.h line 112
Quoted 1 line
include/linux/mfd/wl1273-core.h new file +1
-0+#define WL1273_DI_SET 80include/linux/mfd/wl1273-core.h line 113
Quoted 1 line
include/linux/mfd/wl1273-core.h new file +1
-0+#define WL1273_MS_SET 81include/linux/mfd/wl1273-core.h line 114
Quoted 1 line
include/linux/mfd/wl1273-core.h new file +1
-0+#define WL1273_PS_SCROLL_SPEED 82include/linux/mfd/wl1273-core.h line 115
Quoted 1 line
include/linux/mfd/wl1273-core.h new file +1
-0+#define WL1273_TX_AUDIO_LEVEL_TEST 96
include/linux/mfd/wl1273-core.h line 116
Quoted 1 line
include/linux/mfd/wl1273-core.h new file +1
-0+#define
WL1273_TX_AUDIO_LEVEL_TEST_THRESHOLD73include/linux/mfd/wl1273-core.h line 117
Quoted 1 line
include/linux/mfd/wl1273-core.h new file +1
-0+#define
WL1273_TX_AUDIO_INPUT_LEVEL_RANGE_SET54include/linux/mfd/wl1273-core.h line 118
Quoted 1 line
include/linux/mfd/wl1273-core.h new file +1
-0+#define WL1273_RX_ANTENNA_SELECT 87
include/linux/mfd/wl1273-core.h line 119
Quoted 1 line
include/linux/mfd/wl1273-core.h new file +1
-0+#define WL1273_I2C_DEV_ADDR_SET 86include/linux/mfd/wl1273-core.h line 120
Quoted 1 line
include/linux/mfd/wl1273-core.h new file +1
-0+#define
WL1273_REF_ERR_CALIB_PARAM_SET88include/linux/mfd/wl1273-core.h line 121
Quoted 1 line
include/linux/mfd/wl1273-core.h new file +1
-0+#define
WL1273_REF_ERR_CALIB_PERIODICITY_SET89include/linux/mfd/wl1273-core.h line 122
Quoted 1 line
include/linux/mfd/wl1273-core.h new file +1
-0+#define WL1273_SOC_INT_TRIGGER 52include/linux/mfd/wl1273-core.h line 123
Quoted 1 line
include/linux/mfd/wl1273-core.h new file +1
-0+#define WL1273_SOC_AUDIO_PATH_SET 83include/linux/mfd/wl1273-core.h line 124
Quoted 1 line
include/linux/mfd/wl1273-core.h new file +1
-0+#define WL1273_SOC_PCMI_OVERRIDE 84include/linux/mfd/wl1273-core.h line 125
Quoted 1 line
include/linux/mfd/wl1273-core.h new file +1
-0+#define WL1273_SOC_I2S_OVERRIDE 85include/linux/mfd/wl1273-core.h line 126
Quoted 1 line
include/linux/mfd/wl1273-core.h new file +1
-0+#define
WL1273_RSSI_BLOCK_SCAN_FREQ_SET95include/linux/mfd/wl1273-core.h line 127
Quoted 1 line
include/linux/mfd/wl1273-core.h new file +1
-0+#define
WL1273_RSSI_BLOCK_SCAN_START97include/linux/mfd/wl1273-core.h line 128
Quoted 1 line
include/linux/mfd/wl1273-core.h new file +1
-0+#define
WL1273_RSSI_BLOCK_SCAN_DATA_GET5include/linux/mfd/wl1273-core.h line 129
Quoted 1 line
include/linux/mfd/wl1273-core.h new file +1
-0+#define
WL1273_READ_FMANT_TUNE_VALUE104include/linux/mfd/wl1273-core.h line 131
Quoted 2 lines
include/linux/mfd/wl1273-core.h new file +2
-0+ +#define WL1273_RDS_OFF 0include/linux/mfd/wl1273-core.h line 132
Quoted 1 line
include/linux/mfd/wl1273-core.h new file +1
-0+#define WL1273_RDS_ON 1include/linux/mfd/wl1273-core.h line 138
Quoted 6 lines
include/linux/mfd/wl1273-core.h new file +6
-0+#define WL1273_RDS_RESET 2 + +#define WL1273_AUDIO_DIGITAL 0 +#define WL1273_AUDIO_ANALOG 1 + +#define WL1273_MODE_RX 0include/linux/mfd/wl1273-core.h line 139
Quoted 1 line
include/linux/mfd/wl1273-core.h new file +1
-0+#define WL1273_MODE_TX 1include/linux/mfd/wl1273-core.h line 140
Quoted 1 line
include/linux/mfd/wl1273-core.h new file +1
-0+#define WL1273_MODE_OFF 2include/linux/mfd/wl1273-core.h line 143
Quoted 3 lines
include/linux/mfd/wl1273-core.h new file +3
-0+#define WL1273_MODE_SUSPENDED 3 + +#define WL1273_RADIO_CHILD (1<< 0)
include/linux/mfd/wl1273-core.h line 144
Quoted 1 line
include/linux/mfd/wl1273-core.h new file +1
-0+#define WL1273_CODEC_CHILD (1<< 1)
include/linux/mfd/wl1273-core.h line 146
Quoted 2 lines
include/linux/mfd/wl1273-core.h new file +2
-0+ +#define WL1273_RX_MONO 1include/linux/mfd/wl1273-core.h line 148
Quoted 2 lines
include/linux/mfd/wl1273-core.h new file +2
-0+#define WL1273_RX_STEREO 0 +#define WL1273_TX_MONO 0Quoted 7 lines
include/linux/mfd/wl1273-core.h line 152
Quoted 4 lines
include/linux/mfd/wl1273-core.h new file +4
-0+#define WL1273_TX_STEREO 1 + +#define WL1273_MAX_VOLUME 0xffff +#define WL1273_DEFAULT_VOLUME
0x78b8include/linux/mfd/wl1273-core.h line 154
Quoted 2 lines
include/linux/mfd/wl1273-core.h new file +2
-0+ +/* I2S protocol, left channel first, data width 16
Quoted 230 lines
bits */
include/linux/mfd/wl1273-core.h line 155
Quoted 1 line
include/linux/mfd/wl1273-core.h new file +1
-0+#define WL1273_PCM_DEF_MODE 0x00include/linux/mfd/wl1273-core.h line 158
Quoted 3 lines
include/linux/mfd/wl1273-core.h new file +3
-0+ +/* Rx */ +#define WL1273_AUDIO_ENABLE_I2S (1 << 0)include/linux/mfd/wl1273-core.h line 159
Quoted 1 line
include/linux/mfd/wl1273-core.h new file +1
-0+#define WL1273_AUDIO_ENABLE_ANALOG (1 << 1)
include/linux/mfd/wl1273-core.h line 162
Quoted 3 lines
include/linux/mfd/wl1273-core.h new file +3
-0+ +/* Tx */ +#define WL1273_AUDIO_IO_SET_ANALOG 0
include/linux/mfd/wl1273-core.h line 163
Quoted 1 line
include/linux/mfd/wl1273-core.h new file +1
-0+#define WL1273_AUDIO_IO_SET_I2S 1include/linux/mfd/wl1273-core.h line 165
Quoted 2 lines
include/linux/mfd/wl1273-core.h new file +2
-0+ +#define WL1273_POWER_SET_OFF 0include/linux/mfd/wl1273-core.h line 166
Quoted 1 line
include/linux/mfd/wl1273-core.h new file +1
-0+#define WL1273_POWER_SET_FM (1 << 0)include/linux/mfd/wl1273-core.h line 167
Quoted 1 line
include/linux/mfd/wl1273-core.h new file +1
-0+#define WL1273_POWER_SET_RDS (1 << 1)include/linux/mfd/wl1273-core.h line 168
Quoted 1 line
include/linux/mfd/wl1273-core.h new file +1
-0+#define WL1273_POWER_SET_RETENTION (1 << 4)
include/linux/mfd/wl1273-core.h line 170
Quoted 2 lines
include/linux/mfd/wl1273-core.h new file +2
-0+ +#define WL1273_PUPD_SET_OFF 0x00include/linux/mfd/wl1273-core.h line 171
Quoted 1 line
include/linux/mfd/wl1273-core.h new file +1
-0+#define WL1273_PUPD_SET_ON 0x01include/linux/mfd/wl1273-core.h line 172
Quoted 1 line
include/linux/mfd/wl1273-core.h new file +1
-0+#define WL1273_PUPD_SET_RETENTION
0x10Quoted 6 lines
include/linux/mfd/wl1273-core.h new file +6
-0+ +/* I2S mode */ +#define WL1273_IS2_WIDTH_32 0x0 +#define WL1273_IS2_WIDTH_40 0x1 +#define WL1273_IS2_WIDTH_22_23 0x2 +#define WL1273_IS2_WIDTH_23_22 0x3include/linux/mfd/wl1273-core.h line 188
Quoted 10 lines
include/linux/mfd/wl1273-core.h new file +10
-0+#define WL1273_IS2_WIDTH_48 0x4 +#define WL1273_IS2_WIDTH_50 0x5 +#define WL1273_IS2_WIDTH_60 0x6 +#define WL1273_IS2_WIDTH_64 0x7 +#define WL1273_IS2_WIDTH_80 0x8 +#define WL1273_IS2_WIDTH_96 0x9 +#define WL1273_IS2_WIDTH_128 0xa +#define WL1273_IS2_WIDTH 0xf + +#define WL1273_IS2_FORMAT_STD (0x0<< 4)
include/linux/mfd/wl1273-core.h line 189
Quoted 1 line
include/linux/mfd/wl1273-core.h new file +1
-0+#define WL1273_IS2_FORMAT_LEFT (0x1<< 4)
include/linux/mfd/wl1273-core.h line 190
Quoted 1 line
include/linux/mfd/wl1273-core.h new file +1
-0+#define WL1273_IS2_FORMAT_RIGHT (
0x2<< 4)include/linux/mfd/wl1273-core.h line 191
Quoted 1 line
include/linux/mfd/wl1273-core.h new file +1
-0+#define WL1273_IS2_FORMAT_USER (0x3<< 4)
include/linux/mfd/wl1273-core.h line 193
Quoted 2 lines
include/linux/mfd/wl1273-core.h new file +2
-0+ +#define WL1273_IS2_MASTER (0x0<< 6)
include/linux/mfd/wl1273-core.h line 194
Quoted 1 line
include/linux/mfd/wl1273-core.h new file +1
-0+#define WL1273_IS2_SLAVEW (0x1<< 6)
include/linux/mfd/wl1273-core.h line 196
Quoted 2 lines
include/linux/mfd/wl1273-core.h new file +2
-0+ +#define
WL1273_IS2_TRI_AFTER_SENDING(0x0<<
7)include/linux/mfd/wl1273-core.h line 197
Quoted 1 line
include/linux/mfd/wl1273-core.h new file +1
-0+#define
WL1273_IS2_TRI_ALWAYS_ACTIVE(0x1<<
7)include/linux/mfd/wl1273-core.h line 199
Quoted 2 lines
include/linux/mfd/wl1273-core.h new file +2
-0+ +#define WL1273_IS2_SDOWS_RR (0x0<< 8)
include/linux/mfd/wl1273-core.h line 200
Quoted 1 line
include/linux/mfd/wl1273-core.h new file +1
-0+#define WL1273_IS2_SDOWS_RF (0x1<< 8)
include/linux/mfd/wl1273-core.h line 201
Quoted 1 line
include/linux/mfd/wl1273-core.h new file +1
-0+#define WL1273_IS2_SDOWS_FR (0x2<< 8)
include/linux/mfd/wl1273-core.h line 202
Quoted 1 line
include/linux/mfd/wl1273-core.h new file +1
-0+#define WL1273_IS2_SDOWS_FF (0x3<< 8)
include/linux/mfd/wl1273-core.h line 204
Quoted 2 lines
include/linux/mfd/wl1273-core.h new file +2
-0+ +#define WL1273_IS2_TRI_OPT (0x0<< 10)
include/linux/mfd/wl1273-core.h line 205
Quoted 1 line
include/linux/mfd/wl1273-core.h new file +1
-0+#define WL1273_IS2_TRI_ALWAYS (0x1<< 10)
include/linux/mfd/wl1273-core.h line 207
Quoted 2 lines
include/linux/mfd/wl1273-core.h new file +2
-0+ +#define WL1273_IS2_RATE_48K (0x0<< 12)
include/linux/mfd/wl1273-core.h line 208
Quoted 1 line
include/linux/mfd/wl1273-core.h new file +1
-0+#define WL1273_IS2_RATE_44_1K (0x1<< 12)
include/linux/mfd/wl1273-core.h line 209
Quoted 1 line
include/linux/mfd/wl1273-core.h new file +1
-0+#define WL1273_IS2_RATE_32K (0x2<< 12)
include/linux/mfd/wl1273-core.h line 210
Quoted 1 line
include/linux/mfd/wl1273-core.h new file +1
-0+#define WL1273_IS2_RATE_22_05K (0x4<< 12)
include/linux/mfd/wl1273-core.h line 211
Quoted 1 line
include/linux/mfd/wl1273-core.h new file +1
-0+#define WL1273_IS2_RATE_16K (0x5<< 12)
include/linux/mfd/wl1273-core.h line 212
Quoted 1 line
include/linux/mfd/wl1273-core.h new file +1
-0+#define WL1273_IS2_RATE_12K (0x8<< 12)
include/linux/mfd/wl1273-core.h line 213
Quoted 1 line
include/linux/mfd/wl1273-core.h new file +1
-0+#define WL1273_IS2_RATE_11_025 (0x9<< 12)
include/linux/mfd/wl1273-core.h line 214
Quoted 1 line
include/linux/mfd/wl1273-core.h new file +1
-0+#define WL1273_IS2_RATE_8K (0xa<< 12)
include/linux/mfd/wl1273-core.h line 215
Quoted 1 line
include/linux/mfd/wl1273-core.h new file +1
-0+#define WL1273_IS2_RATE (0xf << 12)include/linux/mfd/wl1273-core.h line 217
Quoted 2 lines
include/linux/mfd/wl1273-core.h new file +2
-0+ +#define WL1273_I2S_DEF_MODE (
WL1273_IS2_WIDTH_32| \include/linux/mfd/wl1273-core.h line 218
Quoted 1 line
include/linux/mfd/wl1273-core.h new file +1
-0+WL1273_IS2_FORMAT_STD | \include/linux/mfd/wl1273-core.h line 219
Quoted 1 line
include/linux/mfd/wl1273-core.h new file +1
-0+WL1273_IS2_MASTER | \include/linux/mfd/wl1273-core.h line 220
Quoted 1 line
include/linux/mfd/wl1273-core.h new file +1
-0+WL1273_IS2_TRI_AFTER_SENDING |\
include/linux/mfd/wl1273-core.h line 221
Quoted 1 line
include/linux/mfd/wl1273-core.h new file +1
-0+WL1273_IS2_SDOWS_RR | \include/linux/mfd/wl1273-core.h line 222
Quoted 1 line
include/linux/mfd/wl1273-core.h new file +1
-0+WL1273_IS2_TRI_OPT | \include/linux/mfd/wl1273-core.h line 223
Quoted 1 line
include/linux/mfd/wl1273-core.h new file +1
-0+WL1273_IS2_RATE_48K)include/linux/mfd/wl1273-core.h line 226
Quoted 3 lines
include/linux/mfd/wl1273-core.h new file +3
-0+ +/* Private IOCTL */ +#define WL1273_CID_FM_BAND (
V4L2_CID_PRIVATE_BASE+ 2)include/linux/mfd/wl1273-core.h line 231
Quoted 5 lines
include/linux/mfd/wl1273-core.h new file +5
-0+ +#define SCHAR_MIN (-128) +#define SCHAR_MAX 127 + +#define WL1273_FR_EVENT (1 << 0)include/linux/mfd/wl1273-core.h line 232
Quoted 1 line
include/linux/mfd/wl1273-core.h new file +1
-0+#define WL1273_BL_EVENT (1 << 1)include/linux/mfd/wl1273-core.h line 233
Quoted 1 line
include/linux/mfd/wl1273-core.h new file +1
-0+#define WL1273_RDS_EVENT (1 << 2)include/linux/mfd/wl1273-core.h line 234
Quoted 1 line
include/linux/mfd/wl1273-core.h new file +1
-0+#define WL1273_BBLK_EVENT (1 << 3)include/linux/mfd/wl1273-core.h line 235
Quoted 1 line
include/linux/mfd/wl1273-core.h new file +1
-0+#define WL1273_LSYNC_EVENT (1 << 4)include/linux/mfd/wl1273-core.h line 236
Quoted 1 line
include/linux/mfd/wl1273-core.h new file +1
-0+#define WL1273_LEV_EVENT (1 << 5)include/linux/mfd/wl1273-core.h line 237
Quoted 1 line
include/linux/mfd/wl1273-core.h new file +1
-0+#define WL1273_IFFR_EVENT (1 << 6)include/linux/mfd/wl1273-core.h line 238
Quoted 1 line
include/linux/mfd/wl1273-core.h new file +1
-0+#define WL1273_PI_EVENT (1 << 7)include/linux/mfd/wl1273-core.h line 239
Quoted 1 line
include/linux/mfd/wl1273-core.h new file +1
-0+#define WL1273_PD_EVENT (1 << 8)include/linux/mfd/wl1273-core.h line 240
Quoted 1 line
include/linux/mfd/wl1273-core.h new file +1
-0+#define WL1273_STIC_EVENT (1 << 9)include/linux/mfd/wl1273-core.h line 241
Quoted 1 line
include/linux/mfd/wl1273-core.h new file +1
-0+#define WL1273_MAL_EVENT (1 << 10)include/linux/mfd/wl1273-core.h line 242
Quoted 1 line
include/linux/mfd/wl1273-core.h new file +1
-0+#define WL1273_POW_ENB_EVENT (1 << 11)include/linux/mfd/wl1273-core.h line 243
Quoted 1 line
include/linux/mfd/wl1273-core.h new file +1
-0+#define WL1273_SCAN_OVER_EVENT (1 << 12)include/linux/mfd/wl1273-core.h line 244
Quoted 1 line
include/linux/mfd/wl1273-core.h new file +1
-0+#define WL1273_ERROR_EVENT (1 << 13)include/linux/mfd/wl1273-core.h line 246
Quoted 2 lines
include/linux/mfd/wl1273-core.h new file +2
-0+ +#define TUNER_MODE_STOP_SEARCH 0include/linux/mfd/wl1273-core.h line 247
Quoted 1 line
include/linux/mfd/wl1273-core.h new file +1
-0+#define TUNER_MODE_PRESET 1include/linux/mfd/wl1273-core.h line 248
Quoted 1 line
include/linux/mfd/wl1273-core.h new file +1
-0+#define TUNER_MODE_AUTO_SEEK 2include/linux/mfd/wl1273-core.h line 249
Quoted 1 line
include/linux/mfd/wl1273-core.h new file +1
-0+#define TUNER_MODE_AF 3include/linux/mfd/wl1273-core.h line 250
Quoted 1 line
include/linux/mfd/wl1273-core.h new file +1
-0+#define TUNER_MODE_AUTO_SEEK_PI 4include/linux/mfd/wl1273-core.h line 251
Quoted 1 line
include/linux/mfd/wl1273-core.h new file +1
-0+#define TUNER_MODE_AUTO_SEEK_BULK 5
include/linux/mfd/wl1273-core.h line 256
Quoted 5 lines
include/linux/mfd/wl1273-core.h new file +5
-0+ +/* Allowed modes */ +#define WL1273_RX_ALLOWED 0x01 +#define WL1273_TX_ALLOWED 0x02 +#define WL1273_RXTX_ALLOWED (
WL1273_RX_ALLOWED|WL1273_TX_ALLOWED)include/linux/mfd/wl1273-core.h line 265
Quoted 9 lines
include/linux/mfd/wl1273-core.h new file +9
-0+ +struct band_info { +u32 bottom_frequency; +u32 top_frequency; +u8 band; +}; + +struct wl1273_fm_platform_data { + int (*request_resources) (struct
i2c_client*client);Quoted 4 lines
include/linux/mfd/wl1273-core.h new file +4
-0+void (*free_resources) (void ); +void (*enable) (void ); +void (*disable) (void ); +include/linux/mfd/wl1273-core.h line 279
Quoted 10 lines
include/linux/mfd/wl1273-core.h new file +10
-0+u8 modes; +unsigned int children; +}; + +#define WL1273_FM_CORE_CELLS 2 + +/* Allowed modes */ +#define WL1273_RX_ALLOWED 0x01 +#define WL1273_TX_ALLOWED 0x02 +#define WL1273_RXTX_ALLOWED (
WL1273_RX_ALLOWED|WL1273_TX_ALLOWED)include/linux/mfd/wl1273-core.h line 282
Quoted 3 lines
include/linux/mfd/wl1273-core.h new file +3
-0+ +struct wl1273_core { +struct mfd_cell cells[WL1273_FM_CORE_CELLS];
Quoted 14 lines
include/linux/mfd/wl1273-core.h new file +14
-0+struct i2c_client *i2c_dev; + +u8 allowed_modes; +unsigned int mode; +unsigned int preemphasis; +unsigned int audio_mode; +unsigned int spacing; +unsigned int tx_power; +unsigned int rx_frequency; +unsigned int tx_frequency; +unsigned int band; +unsigned int i2s_mode; +unsigned int channel_number; +unsigned int number_of_bands;include/linux/mfd/wl1273-core.h line 306
Quoted 10 lines
include/linux/mfd/wl1273-core.h new file +10
-0+unsigned int volume; + +const struct band_info *bands; + +/* RDS */ +bool rds_on; +struct delayed_work work; + +wait_queue_head_t read_queue; +struct mutex lock;/* for serializing fm radio operations */
Quoted 13 lines
include/linux/mfd/wl1273-core.h line 319
Quoted 13 lines
include/linux/mfd/wl1273-core.h new file +13
-0+struct completion busy; + +unsigned char *buffer; +unsigned int buf_size; +unsigned int rd_index; +unsigned int wr_index; + +/* Selected interrupts */ +u16 irq_flags; +u16 irq_received; +}; + +int wl1273_fm_write_cmd(struct wl1273_core*core, u8
Quoted 2 lines
cmd, u16 param);
Quoted 1 line
include/linux/mfd/wl1273-core.h new file +1
-0+int wl1273_fm_write_data(struct wl1273_core*core, u8
Quoted 2 lines
*data, u16 len);
Quoted 1 line
include/linux/mfd/wl1273-core.h new file +1
-0+int wl1273_fm_read_reg(struct wl1273_core *core,u8
Quoted 3 lines
reg, u16 *value);
include/linux/mfd/wl1273-core.h line 323
Quoted 2 lines
include/linux/mfd/wl1273-core.h new file +2
-0+ +int wl1273_fm_set_audio(struct wl1273_core*core,
Quoted 2 lines
unsigned int mode);
Quoted 1 line
include/linux/mfd/wl1273-core.h new file +1
-0+int wl1273_fm_set_volume(struct wl1273_core*core,
Quoted 6 lines
unsigned int volume);
include/linux/mfd/wl1273-core.h line 326
Quoted 2 lines
include/linux/mfd/wl1273-core.h new file +2
-0+ +#endif /* ifndef RADIO_WL1273_H */ --
To unsubscribe from this list: send the line"unsubscribe
Quoted 4 lines
linux-media" in
the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html
Quoted 65 lines · Matti J. Aaltonen
From: Matti J. Aaltonen <[email protected]>
Subject: Re: [PATCH v4 2/5] MFD: WL1273 FM Radio: MFD driver for the FM radio.
To: "ext Pavan Savoy" <[email protected]>
Cc: "Mauro Carvalho Chehab" <[email protected]>, "[email protected]" <[email protected]>, "[email protected]" <[email protected]>, "Valentin Eduardo (Nokia-MS/Helsinki)" <[email protected]>
Date: Thursday, 19 August, 2010, 12:35 PM
Hello.Quoted 1 line · ext Pavan Savoy
--- On Wed, 7/7/10, Pavan Savoy <[email protected]>
Quoted 3 lines · wrote:
Quoted 3 lines
From: Pavan Savoy <[email protected]>
Subject: Re: [PATCH v4 2/5] MFD: WL1273 FM Radio:MFD driver for the FM radio.
Quoted 1 line
Quoted 1 line
To: "Matti J. Aaltonen" <[email protected]>,
"Mauro Carvalho Chehab" <[email protected]>
Quoted 1 line
Quoted 1 line
[email protected],
[email protected],
"pavan savoy" <[email protected]>Quoted 7 lines
Quoted 7 lines
Date: Wednesday, 7 July, 2010, 10:51 AM
--- On Tue, 6/7/10, Mauro Carvalho Chehab <[email protected]>
Quoted 2 lines · wrote:
From: Mauro Carvalho Chehab <[email protected]>
Subject: Re: [PATCH v4 2/5] MFD: WL1273 FMRadio: MFD
Quoted 9 lines
Quoted 9 lines
driver for the FM radio.
Quoted 2 lines
To: "Matti J. Aaltonen" <[email protected]>
Cc: [email protected],[email protected],
[email protected]Quoted 4 lines
Date: Tuesday, 6 July, 2010, 8:04 AM
Em 04-06-2010 07:34, Matti J.
Aaltonen escreveu:Quoted 1 line
This is a parent driver for two child
drivers:
Quoted 3 lines
Quoted 3 lines
the
Quoted 2 lines
V4L2 driver and
Quoted 1 line
the ALSA codec driver. The MFD part
provides the
Quoted 3 lines
Quoted 3 lines
I2C
Quoted 2 lines
communication
Quoted 1 line
to the device and a couple of functions
that are
Quoted 4 lines
Quoted 4 lines
Quoted 2 lines
called from both
Quoted 1 line
children.
Where can I have a look at the whole code ? As in
some
Quoted 2 lines
Quoted 2 lines
local tree, where all codes are put up ?
Basically, we have a V4L2 driver for WL128x(using TTY as
Quoted 6 lines
Quoted 3 lines
transport) and plan to push them soon ...
This would be a nice input ...
Anywhere I can have a look at the whole code? We are trying to push out V4L2 drivers for FM on 128x,
and intend to use several V4L2 new ioctls which you have defined (_BAND_) being one of them.
Quoted 2 lines
Also we plan to push FM Tx of it too..
TX_CLASSfrom
Quoted 8 lines
V4L2 has most of the ioctls and plan to introduce the rest.
I'm sorry for not answering to you earlier. But I don't have my own
public repository. But to create the whole thing is extremely simple:
just take the current mainline tree and apply my patches on top of it...
Yep, that I can do, the reason I asked for was, we've pushed a few patches of our own for WL1283 over shared transport/UART (Not HCI-VS, but I2C like commands, packed in a CH8 protocol format). The FM register set in both chip are a match, with only transport being the difference (i2c vs. UART).
Also we have the Tx version of driver ready too, it just needs a bit of cleanup and more conformance to already existing V4L2 TX Class..
So I was wondering, although there is no problem with WL1273 with I2C and WL1283 with UART being there on the kernel (whenever that happens), but it would be way more cooler if the transport was say abstracted out ..
what do you say? just an idea...
Quoted 1,915 lines
Best Regards,
MattiQuoted 5 lines
Quoted 5 lines
Quoted 5 lines
Quoted 5 lines
Signed-off-by Matti J. Aaltonen <[email protected]>---
drivers/mfd/KconfigQuoted 7 lines
Quoted 7 lines
Quoted 7 lines
| 6 +
Quoted 1 line
drivers/mfd/Makefile| 2 +
Quoted 1 line
drivers/mfd/wl1273-core.c| 616
+++++++++++++++++++++++++++++++++++++++Quoted 1 line
include/linux/mfd/wl1273-core.h| 326
Quoted 2 lines
Quoted 2 lines
Quoted 2 lines
+++++++++++++++++++++
Quoted 1 line
4 files changed, 950insertions(+), 0
Quoted 2 lines
Quoted 2 lines
Quoted 2 lines
deletions(-)
Quoted 1 line
create mode 100644
drivers/mfd/wl1273-core.cQuoted 9 lines
Quoted 9 lines
Quoted 9 lines
Quoted 1 line
create mode 100644
include/linux/mfd/wl1273-core.hReview
Quoted 2 lines
(quoted diff) +0
-0b/drivers/mfd/Kconfig
drivers/mfd/Kconfig config
Quoted 4 lines
index 413576a..5998a94 100644
drivers/mfd/Kconfig +0
-0@@ -135,6 +135,12 @@ config
TWL4030_CODECQuoted 14 lines
Quoted 14 lines
Quoted 14 lines
Quoted 12 lines
select
MFD_CORE
default ndrivers/mfd/Kconfig +6
-0+config WL1273_CORE + bool + depends on I2C + select MFD_CORE + default n +config
MFD_TMIO
bool
default nReview
Quoted 1 line
(quoted diff) +0
-0b/drivers/mfd/Makefile
Quoted 5 lines
Quoted 5 lines
Quoted 5 lines
drivers/mfd/Makefile
Quoted 4 lines
index 78295d6..46e611d 100644
drivers/mfd/Makefile +0
-0@@ -30,6 +30,8 @@obj-$(CONFIG_TWL4030_CORE) +=
twl-core.o
Quoted 2 lines
Quoted 2 lines
Quoted 2 lines
twl4030-irq.o twl6030-irq.o
Quoted 1 line
drivers/mfd/Makefile +0
-0obj-$(CONFIG_TWL4030_POWER)+=
Quoted 2 lines
Quoted 2 lines
Quoted 2 lines
twl4030-power.o
Quoted 1 line
drivers/mfd/Makefile +0
-0obj-$(CONFIG_TWL4030_CODEC)+=
Quoted 3 lines
Quoted 3 lines
Quoted 3 lines
twl4030-codec.o
Quoted 2 lines
drivers/mfd/Makefile +1
-0+obj-$(CONFIG_WL1273_CORE)+=
Quoted 3 lines
Quoted 3 lines
Quoted 3 lines
wl1273-core.o
Quoted 2 lines
drivers/mfd/Makefile +1
-0+ obj-$(CONFIG_MFD_MC13783)+=
Quoted 6 lines
Quoted 6 lines
Quoted 6 lines
mc13783-core.o
drivers/mfd/Makefile line 35
Quoted 2 lines
drivers/mfd/Makefile +0
-0obj-$(CONFIG_MFD_CORE)+= mfd-core.o
Review
Quoted 1 line
(quoted diff) +0
-0
b/drivers/mfd/wl1273-core.cQuoted 7 lines
Quoted 7 lines
Quoted 7 lines
drivers/mfd/wl1273-core.c line 2
Quoted 7 lines
new file mode 100644
index 0000000..6c7dbbadrivers/mfd/wl1273-core.c new file +2
-0@@ -0,0 +1,616 @@ +/* +* MFD driver for wl1273 FM radio and audio
Quoted 4 lines
Quoted 4 lines
codec
Quoted 3 lines
submodules.
Quoted 2 lines
drivers/mfd/wl1273-core.c new file +2
-0+* +* Author: Matti Aaltonen Quoted 2 lines
Quoted 2 lines
Quoted 2 lines
drivers/mfd/wl1273-core.c line 6
Quoted 2 lines
drivers/mfd/wl1273-core.c new file +2
-0+* +* Copyright: (C) 2010 Nokia
Quoted 3 lines
Quoted 3 lines
Quoted 3 lines
Corporation
Quoted 2 lines
drivers/mfd/wl1273-core.c new file +2
-0+* +* This program is free software; you can
Quoted 2 lines
Quoted 2 lines
Quoted 2 lines
redistribute it and/or modify
Quoted 1 line
drivers/mfd/wl1273-core.c new file +1
-0+* it under the terms of the GNU General Public
Quoted 2 lines
Quoted 2 lines
Quoted 2 lines
License version 2 as
Quoted 1 line
drivers/mfd/wl1273-core.c new file +1
-0+* published by the Free Software Foundation.
Quoted 2 lines
Quoted 2 lines
Quoted 2 lines
drivers/mfd/wl1273-core.c line 12
Quoted 2 lines
drivers/mfd/wl1273-core.c new file +2
-0+* +* This program is distributed in the hope that
Quoted 3 lines
Quoted 3 lines
it
Quoted 2 lines
will be useful, but
Quoted 1 line
drivers/mfd/wl1273-core.c new file +1
-0+* WITHOUT ANY WARRANTY; without even the
Quoted 3 lines
Quoted 3 lines
implied
Quoted 2 lines
warranty of
Quoted 1 line
drivers/mfd/wl1273-core.c new file +1
-0+* MERCHANTABILITY or FITNESS FOR A PARTICULAR
Quoted 2 lines
Quoted 2 lines
Quoted 2 lines
PURPOSE. See the GNU
Quoted 1 line
drivers/mfd/wl1273-core.c new file +1
-0+* General Public License for more details.
Quoted 2 lines
Quoted 2 lines
Quoted 2 lines
drivers/mfd/wl1273-core.c line 17
Quoted 2 lines
drivers/mfd/wl1273-core.c new file +2
-0+* +* You should have received a copy of the GNU
Quoted 3 lines
Quoted 3 lines
General
Quoted 2 lines
Public License
Quoted 1 line
drivers/mfd/wl1273-core.c new file +1
-0+* along with this program; if not, write to the
Quoted 3 lines
Quoted 3 lines
Free
Quoted 2 lines
Software
Quoted 1 line
drivers/mfd/wl1273-core.c new file +1
-0+* Foundation, Inc., 51 Franklin St, Fifth
Quoted 18 lines
Quoted 18 lines
Floor,
Quoted 17 lines
Boston, MA
Quoted 6 lines
drivers/mfd/wl1273-core.c new file +6
-0+* 02110-1301 USA +* +*/ + +#undef DEBUG +drivers/mfd/wl1273-core.c line 35
Quoted 10 lines
drivers/mfd/wl1273-core.c new file +10
-0+#include <asm/unaligned.h> +#include <linux/completion.h> +#include <linux/delay.h> +#include <linux/i2c.h> +#include <linux/interrupt.h> +#include <linux/module.h> +#include <linux/types.h> +#include <linux/kernel.h> +#include <linux/fs.h> +#include<
linux/platform_device.h>Quoted 2 lines
Quoted 2 lines
Quoted 2 lines
drivers/mfd/wl1273-core.c line 37
Quoted 2 lines
drivers/mfd/wl1273-core.c new file +2
-0+#include <linux/mfd/core.h> +#include<
linux/mfd/wl1273-core.h>Quoted 3 lines
Quoted 3 lines
Quoted 3 lines
drivers/mfd/wl1273-core.c line 40
Quoted 3 lines
drivers/mfd/wl1273-core.c new file +3
-0+#include <media/v4l2-common.h> + +#define DRIVER_DESC "WL1273 FM RadioCore"
Quoted 3 lines
Quoted 3 lines
Quoted 3 lines
drivers/mfd/wl1273-core.c line 42
Quoted 2 lines
drivers/mfd/wl1273-core.c new file +2
-0+ +#define
WL1273_IRQ_MASK(WL1273_FR_EVENT
Quoted 3 lines
Quoted 3 lines
Quoted 3 lines
| \
drivers/mfd/wl1273-core.c line 43
Quoted 1 line
drivers/mfd/wl1273-core.c new file +1
-0+WL1273_POW_ENB_EVENT)
Quoted 2 lines
Quoted 2 lines
Quoted 2 lines
drivers/mfd/wl1273-core.c line 45
Quoted 2 lines
drivers/mfd/wl1273-core.c new file +2
-0+ +static const struct band_info bands[]= {
Quoted 10 lines
Quoted 10 lines
Quoted 10 lines
drivers/mfd/wl1273-core.c line 48
Quoted 3 lines
drivers/mfd/wl1273-core.c new file +3
-0+ /* USA & Europe */ + { +.bottom_frequency = 87500,
drivers/mfd/wl1273-core.c line 49
Quoted 1 line
drivers/mfd/wl1273-core.c new file +1
-0+.top_frequency =
108000,drivers/mfd/wl1273-core.c line 50
Quoted 1 line
drivers/mfd/wl1273-core.c new file +1
-0+.band
=
V4L2_FM_BAND_OTHER,Quoted 11 lines
Quoted 11 lines
Quoted 11 lines
drivers/mfd/wl1273-core.c line 54
Quoted 4 lines
drivers/mfd/wl1273-core.c new file +4
-0+ }, + /* Japan */ + { +.bottom_frequency = 76000,
drivers/mfd/wl1273-core.c line 55
Quoted 1 line
drivers/mfd/wl1273-core.c new file +1
-0+.top_frequency =
90000,drivers/mfd/wl1273-core.c line 56
Quoted 1 line
drivers/mfd/wl1273-core.c new file +1
-0+.band
=
V4L2_FM_BAND_JAPAN,Quoted 5 lines
Quoted 5 lines
Quoted 5 lines
drivers/mfd/wl1273-core.c line 61
Quoted 5 lines
drivers/mfd/wl1273-core.c new file +5
-0+ }, +}; + +/* +* static unsigned char radio_band - Band
Quoted 2 lines
Quoted 2 lines
Quoted 2 lines
drivers/mfd/wl1273-core.c line 63
Quoted 2 lines
drivers/mfd/wl1273-core.c new file +2
-0+* +* The bands are 0=Japan, 1=USA-Europe.
Quoted 6 lines
Quoted 6 lines
USA-Europe is
Quoted 5 lines
the default.
drivers/mfd/wl1273-core.c line 67
Quoted 4 lines
drivers/mfd/wl1273-core.c new file +4
-0+*/ +static unsigned char radio_band =1 ; +module_param (radio_band, byte,0 ); +MODULE_PARM_DESC(radio_band, "Band:0=Japan,
Quoted 4 lines
Quoted 4 lines
Quoted 4 lines
1=USA-Europe*");
drivers/mfd/wl1273-core.c line 70
Quoted 3 lines
drivers/mfd/wl1273-core.c new file +3
-0+ +/* +* static unsigned int rds_buf - the number of
Quoted 8 lines
Quoted 8 lines
RDS
Quoted 7 lines
buffer blocks used.
drivers/mfd/wl1273-core.c line 76
Quoted 6 lines
drivers/mfd/wl1273-core.c new file +6
-0+* +* The default number is 100. +*/ +static unsigned int rds_buf =100 ; +module_param (rds_buf, uint,0 ); +MODULE_PARM_DESC(rds_buf, "RDS bufferentries:
Quoted 3 lines
Quoted 3 lines
Quoted 3 lines
*100*");
drivers/mfd/wl1273-core.c line 78
Quoted 2 lines
drivers/mfd/wl1273-core.c new file +2
-0+ +int wl1273_fm_read_reg(struct
wl1273_core*core,Quoted 4 lines
Quoted 4 lines
u8
Quoted 3 lines
reg, u16 *value)
Quoted 2 lines
drivers/mfd/wl1273-core.c new file +2
-0+{ + struct i2c_client*client =
Quoted 6 lines
Quoted 6 lines
Quoted 6 lines
core->i2c_dev;drivers/mfd/wl1273-core.c line 84
Quoted 4 lines
drivers/mfd/wl1273-core.c new file +4
-0+ u8 b[2]; + int r; + + r =i2c_smbus_read_i2c_block_data(client, reg,
2, b);
Quoted 3 lines
Quoted 3 lines
Quoted 3 lines
drivers/mfd/wl1273-core.c line 86
Quoted 2 lines
drivers/mfd/wl1273-core.c new file +2
-0+ if (r != 2) { +dev_err(&client->dev, "%s: Read: %d
fails.\n",
Quoted 6 lines
Quoted 6 lines
Quoted 6 lines
__func__, reg);drivers/mfd/wl1273-core.c line 87
Quoted 1 line
drivers/mfd/wl1273-core.c new file +1
-0+ return
-EREMOTEIO;Quoted 3 lines
drivers/mfd/wl1273-core.c new file +3
-0+ } + + *value = (u16)b[0]<< 8 |
Quoted 7 lines
Quoted 7 lines
Quoted 7 lines
b[1];
drivers/mfd/wl1273-core.c line 96
Quoted 6 lines
drivers/mfd/wl1273-core.c new file +6
-0+ + return 0; +} +EXPORT_SYMBOL (wl1273_fm_read_reg); + +int wl1273_fm_write_cmd(struct
wl1273_coreQuoted 4 lines
Quoted 4 lines
*core, u8
Quoted 3 lines
cmd, u16 param)
Quoted 2 lines
drivers/mfd/wl1273-core.c new file +2
-0+{ + struct i2c_client*client =
Quoted 8 lines
Quoted 8 lines
Quoted 2 lines
core->i2c_dev;Quoted 1 line
drivers/mfd/wl1273-core.c new file +1
-0+ u8 buf[] = { (param8)
Quoted 5 lines
&
0xff, param &0xff};drivers/mfd/wl1273-core.c line 102
Quoted 3 lines
drivers/mfd/wl1273-core.c new file +3
-0+ int r; + + r =i2c_smbus_write_i2c_block_data(client, cmd,
2, buf);
Quoted 3 lines
Quoted 3 lines
Quoted 3 lines
drivers/mfd/wl1273-core.c line 104
Quoted 2 lines
drivers/mfd/wl1273-core.c new file +2
-0+ if (r) { +dev_err(&client->dev, "%s: Cmd: %d
fails.\n",
Quoted 9 lines
Quoted 9 lines
Quoted 9 lines
__func__, cmd);drivers/mfd/wl1273-core.c line 112
Quoted 8 lines
drivers/mfd/wl1273-core.c new file +8
-0+ return r; + } + + return 0; +} +EXPORT_SYMBOL (wl1273_fm_write_cmd); + +int wl1273_fm_write_data(struct
wl1273_coreQuoted 4 lines
Quoted 4 lines
*core, u8
Quoted 3 lines
*data, u16 len)
Quoted 2 lines
drivers/mfd/wl1273-core.c new file +2
-0+{ + struct i2c_client*client =
Quoted 5 lines
Quoted 5 lines
Quoted 5 lines
core->i2c_dev;Quoted 4 lines
drivers/mfd/wl1273-core.c new file +4
-0+ struct i2c_msg msg[1]; + int r; + + msg[0].addr =
client->addr;Quoted 10 lines
Quoted 10 lines
Quoted 10 lines
drivers/mfd/wl1273-core.c line 123
Quoted 5 lines
drivers/mfd/wl1273-core.c new file +5
-0+ msg[0].flags = 0; + msg[0].buf = data; + msg[0].len = len; + + r =
i2c_transfer(client->adapter, msg, 1);drivers/mfd/wl1273-core.c line 126
Quoted 3 lines
drivers/mfd/wl1273-core.c new file +3
-0+ + if (r != 1) { +dev_err(&client->dev, "%s: write
error.\n",
Quoted 11 lines
Quoted 11 lines
Quoted 11 lines
__func__);drivers/mfd/wl1273-core.c line 127
Quoted 1 line
drivers/mfd/wl1273-core.c new file +1
-0+ return
-EREMOTEIO;drivers/mfd/wl1273-core.c line 135
Quoted 8 lines
drivers/mfd/wl1273-core.c new file +8
-0+ } + + return 0; +} +EXPORT_SYMBOL (wl1273_fm_write_data); + +/** +* wl1273_fm_set_audio() - Set
Quoted 3 lines
Quoted 3 lines
Quoted 3 lines
audio mode.
drivers/mfd/wl1273-core.c line 136
Quoted 1 line
drivers/mfd/wl1273-core.c new file +1
-0+* @core: A pointer to the
device struct.
Quoted 4 lines
Quoted 4 lines
Quoted 4 lines
drivers/mfd/wl1273-core.c line 137
Quoted 1 line
drivers/mfd/wl1273-core.c new file +1
-0+* @new_mode: The new audio mode.
Quoted 2 lines
drivers/mfd/wl1273-core.c new file +2
-0+* +* Audio modes are
WL1273_AUDIO_DIGITALandQuoted 3 lines
Quoted 3 lines
Quoted 3 lines
WL1273_AUDIO_ANALOG.Quoted 2 lines
drivers/mfd/wl1273-core.c new file +2
-0+*/ +int wl1273_fm_set_audio(struct
wl1273_coreQuoted 8 lines
Quoted 8 lines
*core,
Quoted 7 lines
unsigned int
new_mode)drivers/mfd/wl1273-core.c line 145
Quoted 4 lines
drivers/mfd/wl1273-core.c new file +4
-0+{ + int r = 0; + + if (core->mode ==
WL1273_MODE_OFF||Quoted 1 line
drivers/mfd/wl1273-core.c new file +1
-0+
core->mode==Quoted 2 lines
Quoted 2 lines
Quoted 2 lines
WL1273_MODE_SUSPENDED)Quoted 1 line
drivers/mfd/wl1273-core.c new file +1
-0+ return
-EPERM;Quoted 7 lines
Quoted 7 lines
Quoted 3 lines
drivers/mfd/wl1273-core.c line 149
Quoted 2 lines
drivers/mfd/wl1273-core.c new file +2
-0+ + if (core->mode ==
WL1273_MODE_RX&&new_mode==
WL1273_AUDIO_DIGITAL)Quoted 3 lines
{
drivers/mfd/wl1273-core.c line 150
Quoted 1 line
drivers/mfd/wl1273-core.c new file +1
-0+ r =wl1273_fm_write_cmd(core,
WL1273_PCM_MODE_SET,Quoted 9 lines
Quoted 9 lines
Quoted 9 lines
drivers/mfd/wl1273-core.c line 151
Quoted 1 line
drivers/mfd/wl1273-core.c new file +1
-0+
WL1273_PCM_DEF_MODE);drivers/mfd/wl1273-core.c line 153
Quoted 2 lines
drivers/mfd/wl1273-core.c new file +2
-0+ if (r) +goto out;
drivers/mfd/wl1273-core.c line 155
Quoted 2 lines
drivers/mfd/wl1273-core.c new file +2
-0+ + r =wl1273_fm_write_cmd(core,
WL1273_I2S_MODE_CONFIG_SET,Quoted 9 lines
Quoted 9 lines
Quoted 9 lines
drivers/mfd/wl1273-core.c line 156
Quoted 1 line
drivers/mfd/wl1273-core.c new file +1
-0+
core->i2s_mode);drivers/mfd/wl1273-core.c line 158
Quoted 2 lines
drivers/mfd/wl1273-core.c new file +2
-0+ if (r) +goto out;
drivers/mfd/wl1273-core.c line 160
Quoted 2 lines
drivers/mfd/wl1273-core.c new file +2
-0+ + r =wl1273_fm_write_cmd(core,
WL1273_AUDIO_ENABLE,Quoted 8 lines
Quoted 8 lines
Quoted 8 lines
drivers/mfd/wl1273-core.c line 161
Quoted 1 line
drivers/mfd/wl1273-core.c new file +1
-0+
WL1273_AUDIO_ENABLE_I2S);drivers/mfd/wl1273-core.c line 163
Quoted 2 lines
drivers/mfd/wl1273-core.c new file +2
-0+ if (r) +goto out;
Quoted 2 lines
drivers/mfd/wl1273-core.c new file +2
-0+ + } else if (core->mode==
Quoted 3 lines
Quoted 3 lines
Quoted 3 lines
WL1273_MODE_RX&&drivers/mfd/wl1273-core.c line 166
Quoted 1 line
drivers/mfd/wl1273-core.c new file +1
-0+
new_mode==
WL1273_AUDIO_ANALOG) {Quoted 2 lines
Quoted 2 lines
Quoted 2 lines
drivers/mfd/wl1273-core.c line 167
Quoted 1 line
drivers/mfd/wl1273-core.c new file +1
-0+ r =wl1273_fm_write_cmd(core,
WL1273_AUDIO_ENABLE,Quoted 8 lines
Quoted 8 lines
Quoted 8 lines
drivers/mfd/wl1273-core.c line 168
Quoted 1 line
drivers/mfd/wl1273-core.c new file +1
-0+
WL1273_AUDIO_ENABLE_ANALOG);drivers/mfd/wl1273-core.c line 170
Quoted 2 lines
drivers/mfd/wl1273-core.c new file +2
-0+ if (r) +goto out;
Quoted 2 lines
drivers/mfd/wl1273-core.c new file +2
-0+ + } else if (core->mode==
Quoted 3 lines
Quoted 3 lines
Quoted 3 lines
WL1273_MODE_TX&&drivers/mfd/wl1273-core.c line 173
Quoted 1 line
drivers/mfd/wl1273-core.c new file +1
-0+
new_mode==
WL1273_AUDIO_DIGITAL) {Quoted 2 lines
Quoted 2 lines
Quoted 2 lines
drivers/mfd/wl1273-core.c line 174
Quoted 1 line
drivers/mfd/wl1273-core.c new file +1
-0+ r =wl1273_fm_write_cmd(core,
WL1273_I2S_MODE_CONFIG_SET,Quoted 9 lines
Quoted 9 lines
Quoted 9 lines
drivers/mfd/wl1273-core.c line 175
Quoted 1 line
drivers/mfd/wl1273-core.c new file +1
-0+
core->i2s_mode);drivers/mfd/wl1273-core.c line 177
Quoted 2 lines
drivers/mfd/wl1273-core.c new file +2
-0+ if (r) +goto out;
drivers/mfd/wl1273-core.c line 179
Quoted 2 lines
drivers/mfd/wl1273-core.c new file +2
-0+ + r =wl1273_fm_write_cmd(core,
WL1273_AUDIO_IO_SET,Quoted 8 lines
Quoted 8 lines
Quoted 8 lines
drivers/mfd/wl1273-core.c line 180
Quoted 1 line
drivers/mfd/wl1273-core.c new file +1
-0+
WL1273_AUDIO_IO_SET_I2S);drivers/mfd/wl1273-core.c line 182
Quoted 2 lines
drivers/mfd/wl1273-core.c new file +2
-0+ if (r) +goto out;
Quoted 2 lines
drivers/mfd/wl1273-core.c new file +2
-0+ + } else if (core->mode==
Quoted 3 lines
Quoted 3 lines
Quoted 3 lines
WL1273_MODE_TX&&drivers/mfd/wl1273-core.c line 185
Quoted 1 line
drivers/mfd/wl1273-core.c new file +1
-0+
new_mode==
WL1273_AUDIO_ANALOG) {Quoted 2 lines
Quoted 2 lines
Quoted 2 lines
drivers/mfd/wl1273-core.c line 186
Quoted 1 line
drivers/mfd/wl1273-core.c new file +1
-0+ r =wl1273_fm_write_cmd(core,
WL1273_AUDIO_IO_SET,Quoted 9 lines
Quoted 9 lines
Quoted 9 lines
drivers/mfd/wl1273-core.c line 187
Quoted 1 line
drivers/mfd/wl1273-core.c new file +1
-0+
WL1273_AUDIO_IO_SET_ANALOG);drivers/mfd/wl1273-core.c line 189
Quoted 2 lines
drivers/mfd/wl1273-core.c new file +2
-0+ if (r) +goto out;
Quoted 3 lines
drivers/mfd/wl1273-core.c new file +3
-0+ } + + core->audio_mode =
new_mode;Quoted 8 lines
Quoted 8 lines
Quoted 8 lines
drivers/mfd/wl1273-core.c line 200
Quoted 8 lines
drivers/mfd/wl1273-core.c new file +8
-0+ +out: + return r; +} +EXPORT_SYMBOL (wl1273_fm_set_audio); + +/** +* wl1273_fm_set_volume() - Set
Quoted 3 lines
Quoted 3 lines
Quoted 3 lines
volume.
drivers/mfd/wl1273-core.c line 201
Quoted 1 line
drivers/mfd/wl1273-core.c new file +1
-0+* @core: A pointer to the
device struct.
Quoted 2 lines
Quoted 2 lines
Quoted 2 lines
drivers/mfd/wl1273-core.c line 202
Quoted 1 line
drivers/mfd/wl1273-core.c new file +1
-0+* @volume: The new volume
value.
Quoted 2 lines
Quoted 2 lines
Quoted 2 lines
drivers/mfd/wl1273-core.c line 204
Quoted 2 lines
drivers/mfd/wl1273-core.c new file +2
-0+*/ +int wl1273_fm_set_volume(struct
wl1273_coreQuoted 8 lines
Quoted 8 lines
*core,
Quoted 7 lines
unsigned int volume)
drivers/mfd/wl1273-core.c line 209
Quoted 5 lines
drivers/mfd/wl1273-core.c new file +5
-0+{ + u16 val; + int r; + + if (volume >
WL1273_MAX_VOLUME)Quoted 4 lines
Quoted 4 lines
Quoted 4 lines
drivers/mfd/wl1273-core.c line 210
Quoted 1 line
drivers/mfd/wl1273-core.c new file +1
-0+ return
-EINVAL;Quoted 2 lines
drivers/mfd/wl1273-core.c new file +2
-0+ + if (core->volume ==volume)
Quoted 4 lines
Quoted 4 lines
Quoted 4 lines
drivers/mfd/wl1273-core.c line 216
Quoted 4 lines
drivers/mfd/wl1273-core.c new file +4
-0+ return 0; + + val = volume; + r =wl1273_fm_read_reg(core,
Quoted 5 lines
Quoted 5 lines
Quoted 5 lines
WL1273_VOLUME_SET, &val);Quoted 4 lines
drivers/mfd/wl1273-core.c new file +4
-0+ if (r) + return r; + + core->volume =volume;
Quoted 6 lines
Quoted 6 lines
Quoted 6 lines
drivers/mfd/wl1273-core.c line 225
Quoted 5 lines
drivers/mfd/wl1273-core.c new file +5
-0+ return 0; +} +EXPORT_SYMBOL (wl1273_fm_set_volume); + +#define
WL1273_RDS_FIFO_EMPTY(status)(!(1
Quoted 4 lines
Quoted 4 lines
Quoted 4 lines
<< 6 & status))
drivers/mfd/wl1273-core.c line 227
Quoted 2 lines
drivers/mfd/wl1273-core.c new file +2
-0+ +#defineWL1273_RDS_CORRECTABLE_ERROR (1
<<
Quoted 3 lines
Quoted 3 lines
Quoted 3 lines
3)
drivers/mfd/wl1273-core.c line 228
Quoted 1 line
drivers/mfd/wl1273-core.c new file +1
-0+#define
WL1273_RDS_UNCORRECTABLE_ERROR(1 <<
Quoted 3 lines
Quoted 3 lines
Quoted 3 lines
4)
drivers/mfd/wl1273-core.c line 230
Quoted 2 lines
drivers/mfd/wl1273-core.c new file +2
-0+ +static int wl1273_fm_rds(struct
wl1273_coreQuoted 3 lines
Quoted 3 lines
*core)
Quoted 2 lines
Quoted 2 lines
drivers/mfd/wl1273-core.c new file +2
-0+{ + struct i2c_client*client =
Quoted 4 lines
Quoted 4 lines
Quoted 4 lines
core->i2c_dev;drivers/mfd/wl1273-core.c line 233
Quoted 1 line
drivers/mfd/wl1273-core.c new file +1
-0+ struct device *dev =
&client->dev;Quoted 1 line
drivers/mfd/wl1273-core.c new file +1
-0+ struct v4l2_rds_data rds= { 0, 0,
Quoted 2 lines
Quoted 2 lines
Quoted 2 lines
0 };
Quoted 1 line
drivers/mfd/wl1273-core.c new file +1
-0+ struct i2c_msg msg[] ={
Quoted 3 lines
Quoted 3 lines
Quoted 3 lines
drivers/mfd/wl1273-core.c line 237
Quoted 2 lines
drivers/mfd/wl1273-core.c new file +2
-0+ { +.addr =
client->addr,Quoted 10 lines
Quoted 10 lines
Quoted 10 lines
drivers/mfd/wl1273-core.c line 238
Quoted 1 line
drivers/mfd/wl1273-core.c new file +1
-0+.flags = 0,
drivers/mfd/wl1273-core.c line 239
Quoted 1 line
drivers/mfd/wl1273-core.c new file +1
-0+.buf = b0,
drivers/mfd/wl1273-core.c line 240
Quoted 1 line
drivers/mfd/wl1273-core.c new file +1
-0+.len = 1
drivers/mfd/wl1273-core.c line 243
Quoted 3 lines
drivers/mfd/wl1273-core.c new file +3
-0+ }, + { +.addr =
client->addr,Quoted 4 lines
Quoted 4 lines
Quoted 4 lines
drivers/mfd/wl1273-core.c line 244
Quoted 1 line
drivers/mfd/wl1273-core.c new file +1
-0+.flags =
I2C_M_RD,drivers/mfd/wl1273-core.c line 245
Quoted 1 line
drivers/mfd/wl1273-core.c new file +1
-0+.buf = (u8 *)
&rds,
Quoted 5 lines
Quoted 5 lines
Quoted 5 lines
drivers/mfd/wl1273-core.c line 246
Quoted 1 line
drivers/mfd/wl1273-core.c new file +1
-0+.len = 3
Quoted 3 lines
drivers/mfd/wl1273-core.c new file +3
-0+ } + }; + u8 b0[] = {
WL1273_RDS_DATA_GET},Quoted 5 lines
Quoted 5 lines
Quoted 5 lines
status;
Quoted 4 lines
drivers/mfd/wl1273-core.c new file +4
-0+ u16 val; + int r; + + r =wl1273_fm_read_reg(core,
Quoted 5 lines
Quoted 5 lines
Quoted 5 lines
WL1273_RDS_SYNC_GET, &val);Quoted 4 lines
drivers/mfd/wl1273-core.c new file +4
-0+ if (r) + return r; + + /* Is RDS decodersynchronized?
Quoted 2 lines
Quoted 2 lines
Quoted 2 lines
*/
Quoted 1 line
drivers/mfd/wl1273-core.c new file +1
-0+ if ((val & 0x01) ==0)
Quoted 4 lines
Quoted 4 lines
Quoted 4 lines
drivers/mfd/wl1273-core.c line 259
Quoted 1 line
drivers/mfd/wl1273-core.c new file +1
-0+ return
-EAGAIN;Quoted 2 lines
drivers/mfd/wl1273-core.c new file +2
-0+ + /* copy all four RDSblocks to
Quoted 5 lines
Quoted 5 lines
Quoted 5 lines
internal buffer */
drivers/mfd/wl1273-core.c line 263
Quoted 2 lines
drivers/mfd/wl1273-core.c new file +2
-0+ do { + r =
i2c_transfer(client->adapter, msg, 2);Quoted 1 line
drivers/mfd/wl1273-core.c new file +1
-0+ if (r !=2) {
Quoted 2 lines
Quoted 2 lines
Quoted 2 lines
drivers/mfd/wl1273-core.c line 265
Quoted 1 line
drivers/mfd/wl1273-core.c new file +1
-0+dev_err(dev,
WL1273_FM_DRIVER_NAMEQuoted 2 lines
Quoted 2 lines
Quoted 2 lines
drivers/mfd/wl1273-core.c line 266
Quoted 1 line
drivers/mfd/wl1273-core.c new file +1
-0+": %s:
read_rdserrorQuoted 3 lines
Quoted 3 lines
Quoted 3 lines
r == %i)\n",
drivers/mfd/wl1273-core.c line 267
Quoted 1 line
drivers/mfd/wl1273-core.c new file +1
-0+__func__, r);
Quoted 11 lines
Quoted 11 lines
Quoted 11 lines
drivers/mfd/wl1273-core.c line 270
Quoted 3 lines
drivers/mfd/wl1273-core.c new file +3
-0+ } + + status =rds.block;
drivers/mfd/wl1273-core.c line 272
Quoted 2 lines
drivers/mfd/wl1273-core.c new file +2
-0+ + if(
WL1273_RDS_FIFO_EMPTY(status))drivers/mfd/wl1273-core.c line 273
Quoted 1 line
drivers/mfd/wl1273-core.c new file +1
-0+break;
Quoted 2 lines
drivers/mfd/wl1273-core.c new file +2
-0+ + /* copyRDS
Quoted 3 lines
Quoted 3 lines
Quoted 3 lines
block to internal buffer */
Quoted 1 line
drivers/mfd/wl1273-core.c new file +1
-0+memcpy(&core->buffer[core->wr_index],
Quoted 6 lines
Quoted 6 lines
&rds,
Quoted 5 lines
3);
drivers/mfd/wl1273-core.c line 277
Quoted 1 line
drivers/mfd/wl1273-core.c new file +1
-0+
core->wr_index+= 3;Quoted 2 lines
drivers/mfd/wl1273-core.c new file +2
-0+ + /* copythe
Quoted 3 lines
Quoted 3 lines
Quoted 3 lines
error bits to standard positions */
drivers/mfd/wl1273-core.c line 280
Quoted 1 line
drivers/mfd/wl1273-core.c new file +1
-0+ if(
WL1273_RDS_UNCORRECTABLE_ERROR&status) {
Quoted 2 lines
Quoted 2 lines
Quoted 2 lines
drivers/mfd/wl1273-core.c line 281
Quoted 1 line
drivers/mfd/wl1273-core.c new file +1
-0+rds.block |=
V4L2_RDS_BLOCK_ERROR;Quoted 5 lines
Quoted 5 lines
Quoted 5 lines
drivers/mfd/wl1273-core.c line 282
Quoted 1 line
drivers/mfd/wl1273-core.c new file +1
-0+rds.block &=
~V4L2_RDS_BLOCK_CORRECTED;drivers/mfd/wl1273-core.c line 283
Quoted 1 line
drivers/mfd/wl1273-core.c new file +1
-0+ } else if(
WL1273_RDS_CORRECTABLE_ERROR& status){
Quoted 2 lines
Quoted 2 lines
Quoted 2 lines
drivers/mfd/wl1273-core.c line 284
Quoted 1 line
drivers/mfd/wl1273-core.c new file +1
-0+rds.block &=
~V4L2_RDS_BLOCK_ERROR;
Quoted 2 lines
Quoted 2 lines
Quoted 2 lines
drivers/mfd/wl1273-core.c line 285
Quoted 1 line
drivers/mfd/wl1273-core.c new file +1
-0+rds.block |=
V4L2_RDS_BLOCK_CORRECTED;Quoted 3 lines
Quoted 3 lines
Quoted 3 lines
drivers/mfd/wl1273-core.c line 287
Quoted 2 lines
drivers/mfd/wl1273-core.c new file +2
-0+ } else { +rds.block &=
~V4L2_RDS_BLOCK_ERROR;
Quoted 6 lines
Quoted 6 lines
Quoted 6 lines
drivers/mfd/wl1273-core.c line 288
Quoted 1 line
drivers/mfd/wl1273-core.c new file +1
-0+rds.block &=
~V4L2_RDS_BLOCK_CORRECTED;Quoted 3 lines
drivers/mfd/wl1273-core.c new file +3
-0+ } + + /* wrapwrite
Quoted 5 lines
Quoted 5 lines
Quoted 5 lines
pointer */
drivers/mfd/wl1273-core.c line 292
Quoted 1 line
drivers/mfd/wl1273-core.c new file +1
-0+ if(
core->wr_index>=core->buf_size)drivers/mfd/wl1273-core.c line 293
Quoted 1 line
drivers/mfd/wl1273-core.c new file +1
-0+core->wr_index =
0;
Quoted 2 lines
Quoted 2 lines
Quoted 2 lines
drivers/mfd/wl1273-core.c line 295
Quoted 2 lines
drivers/mfd/wl1273-core.c new file +2
-0+ + /* checkfor
Quoted 5 lines
Quoted 5 lines
Quoted 5 lines
overflow & start over */
drivers/mfd/wl1273-core.c line 296
Quoted 1 line
drivers/mfd/wl1273-core.c new file +1
-0+ if(
core->wr_index==core->rd_index) {drivers/mfd/wl1273-core.c line 297
Quoted 1 line
drivers/mfd/wl1273-core.c new file +1
-0+dev_dbg(dev, "RDS
OVERFLOW");
Quoted 3 lines
Quoted 3 lines
Quoted 3 lines
drivers/mfd/wl1273-core.c line 299
Quoted 2 lines
drivers/mfd/wl1273-core.c new file +2
-0+ +core->rd_index =
0;
Quoted 2 lines
Quoted 2 lines
Quoted 2 lines
drivers/mfd/wl1273-core.c line 300
Quoted 1 line
drivers/mfd/wl1273-core.c new file +1
-0+core->wr_index =
0;
Quoted 7 lines
Quoted 7 lines
Quoted 7 lines
drivers/mfd/wl1273-core.c line 301
Quoted 1 line
drivers/mfd/wl1273-core.c new file +1
-0+break;
drivers/mfd/wl1273-core.c line 303
Quoted 2 lines
drivers/mfd/wl1273-core.c new file +2
-0+ } + } while(!WL1273_RDS_FIFO_EMPTY(status));
Quoted 2 lines
drivers/mfd/wl1273-core.c new file +2
-0+ + /* wake up read queue*/
Quoted 1 line
Quoted 1 line
Quoted 1 line
drivers/mfd/wl1273-core.c line 306
Quoted 1 line
drivers/mfd/wl1273-core.c new file +1
-0+ if (core->wr_index!=
Quoted 3 lines
Quoted 3 lines
Quoted 3 lines
core->rd_index)Quoted 1 line
drivers/mfd/wl1273-core.c new file +1
-0+
wake_up_interruptible(&core->read_queue);Quoted 13 lines
Quoted 13 lines
Quoted 5 lines
drivers/mfd/wl1273-core.c line 312
Quoted 5 lines
drivers/mfd/wl1273-core.c new file +5
-0+ + return 0; +} + +static void wl1273_fm_rds_work(struct
wl1273_coreQuoted 6 lines
*core)
drivers/mfd/wl1273-core.c line 317
Quoted 5 lines
drivers/mfd/wl1273-core.c new file +5
-0+{ + wl1273_fm_rds(core); +} + +static irqreturn_twl1273_fm_irq_thread_handler(int
Quoted 5 lines
Quoted 5 lines
Quoted 5 lines
irq, void
*dev_id)Quoted 4 lines
drivers/mfd/wl1273-core.c new file +4
-0+{ + int r; + u16 flags; + struct wl1273_core *core=
Quoted 3 lines
Quoted 3 lines
Quoted 3 lines
dev_id;Quoted 2 lines
drivers/mfd/wl1273-core.c new file +2
-0+ + r =wl1273_fm_read_reg(core,
Quoted 5 lines
Quoted 5 lines
Quoted 5 lines
WL1273_FLAG_GET, &flags);Quoted 4 lines
drivers/mfd/wl1273-core.c new file +4
-0+ if (r) + goto out; + + if (flags &
WL1273_BL_EVENT)Quoted 5 lines
Quoted 5 lines
Quoted 5 lines
{
drivers/mfd/wl1273-core.c line 328
Quoted 1 line
drivers/mfd/wl1273-core.c new file +1
-0+
core->irq_received= flags;drivers/mfd/wl1273-core.c line 329
Quoted 1 line
drivers/mfd/wl1273-core.c new file +1
-0+dev_dbg(&core->i2c_dev->dev, "IRQ:
BL\n");
Quoted 3 lines
Quoted 3 lines
Quoted 3 lines
drivers/mfd/wl1273-core.c line 332
Quoted 3 lines
drivers/mfd/wl1273-core.c new file +3
-0+ } + + if (flags &
WL1273_RDS_EVENT)Quoted 2 lines
Quoted 2 lines
Quoted 2 lines
{
Quoted 1 line
drivers/mfd/wl1273-core.c new file +1
-0+msleep(200);
Quoted 9 lines
Quoted 9 lines
Quoted 9 lines
drivers/mfd/wl1273-core.c line 335
Quoted 2 lines
drivers/mfd/wl1273-core.c new file +2
-0+ +
wl1273_fm_rds_work(core);drivers/mfd/wl1273-core.c line 338
Quoted 3 lines
drivers/mfd/wl1273-core.c new file +3
-0+ } + + if (flags &
WL1273_BBLK_EVENT)drivers/mfd/wl1273-core.c line 339
Quoted 1 line
drivers/mfd/wl1273-core.c new file +1
-0+dev_dbg(&core->i2c_dev->dev,
"IRQ:
Quoted 6 lines
Quoted 6 lines
BBLK\n");
Quoted 5 lines
drivers/mfd/wl1273-core.c line 341
Quoted 2 lines
drivers/mfd/wl1273-core.c new file +2
-0+ + if (flags &
WL1273_LSYNC_EVENT)drivers/mfd/wl1273-core.c line 342
Quoted 1 line
drivers/mfd/wl1273-core.c new file +1
-0+dev_dbg(&core->i2c_dev->dev,
"IRQ:
Quoted 3 lines
Quoted 3 lines
LSYNC\n");
Quoted 2 lines
Quoted 2 lines
drivers/mfd/wl1273-core.c new file +2
-0+ + if (flags &
WL1273_LEV_EVENT)Quoted 2 lines
Quoted 2 lines
Quoted 2 lines
{
Quoted 1 line
drivers/mfd/wl1273-core.c new file +1
-0+ u16level;
Quoted 3 lines
Quoted 3 lines
Quoted 3 lines
drivers/mfd/wl1273-core.c line 347
Quoted 2 lines
drivers/mfd/wl1273-core.c new file +2
-0+ + r =wl1273_fm_read_reg(core,
WL1273_RSSI_LVL_GET,Quoted 11 lines
Quoted 11 lines
&level);
Quoted 10 lines
drivers/mfd/wl1273-core.c line 350
Quoted 3 lines
drivers/mfd/wl1273-core.c new file +3
-0+ + if (r) +goto out;
drivers/mfd/wl1273-core.c line 352
Quoted 2 lines
drivers/mfd/wl1273-core.c new file +2
-0+ + if (level14)
drivers/mfd/wl1273-core.c line 353
Quoted 1 line
drivers/mfd/wl1273-core.c new file +1
-0+dev_dbg(&core->i2c_dev->dev,
Quoted 3 lines
Quoted 3 lines
Quoted 3 lines
"IRQ: LEV: 0x%x04\n",
drivers/mfd/wl1273-core.c line 354
Quoted 1 line
drivers/mfd/wl1273-core.c new file +1
-0+level);
Quoted 6 lines
Quoted 6 lines
Quoted 6 lines
drivers/mfd/wl1273-core.c line 357
Quoted 3 lines
drivers/mfd/wl1273-core.c new file +3
-0+ } + + if (flags &
WL1273_IFFR_EVENT)drivers/mfd/wl1273-core.c line 358
Quoted 1 line
drivers/mfd/wl1273-core.c new file +1
-0+dev_dbg(&core->i2c_dev->dev,
"IRQ:
Quoted 3 lines
Quoted 3 lines
IFFR\n");
Quoted 2 lines
Quoted 2 lines
drivers/mfd/wl1273-core.c new file +2
-0+ + if (flags &
WL1273_PI_EVENT)Quoted 2 lines
Quoted 2 lines
Quoted 2 lines
drivers/mfd/wl1273-core.c line 361
Quoted 1 line
drivers/mfd/wl1273-core.c new file +1
-0+dev_dbg(&core->i2c_dev->dev, "IRQ:
PI\n");
Quoted 2 lines
Quoted 2 lines
Quoted 2 lines
drivers/mfd/wl1273-core.c line 363
Quoted 2 lines
drivers/mfd/wl1273-core.c new file +2
-0+ + if (flags &
WL1273_PD_EVENT)Quoted 2 lines
Quoted 2 lines
Quoted 2 lines
drivers/mfd/wl1273-core.c line 364
Quoted 1 line
drivers/mfd/wl1273-core.c new file +1
-0+dev_dbg(&core->i2c_dev->dev, "IRQ:
PD\n");
Quoted 5 lines
Quoted 5 lines
Quoted 5 lines
drivers/mfd/wl1273-core.c line 366
Quoted 2 lines
drivers/mfd/wl1273-core.c new file +2
-0+ + if (flags &
WL1273_STIC_EVENT)drivers/mfd/wl1273-core.c line 367
Quoted 1 line
drivers/mfd/wl1273-core.c new file +1
-0+dev_dbg(&core->i2c_dev->dev,
"IRQ:
Quoted 3 lines
Quoted 3 lines
STIC\n");
Quoted 2 lines
Quoted 2 lines
drivers/mfd/wl1273-core.c new file +2
-0+ + if (flags &
WL1273_MAL_EVENT)Quoted 2 lines
Quoted 2 lines
Quoted 2 lines
drivers/mfd/wl1273-core.c line 370
Quoted 1 line
drivers/mfd/wl1273-core.c new file +1
-0+dev_dbg(&core->i2c_dev->dev, "IRQ:
MAL\n");
Quoted 7 lines
Quoted 7 lines
Quoted 7 lines
drivers/mfd/wl1273-core.c line 372
Quoted 2 lines
drivers/mfd/wl1273-core.c new file +2
-0+ + if (flags &
WL1273_POW_ENB_EVENT) {drivers/mfd/wl1273-core.c line 373
Quoted 1 line
drivers/mfd/wl1273-core.c new file +1
-0+
complete(&core->busy);drivers/mfd/wl1273-core.c line 374
Quoted 1 line
drivers/mfd/wl1273-core.c new file +1
-0+dev_dbg(&core->i2c_dev->dev, "NOT
BUSY\n");
Quoted 2 lines
Quoted 2 lines
Quoted 2 lines
drivers/mfd/wl1273-core.c line 375
Quoted 1 line
drivers/mfd/wl1273-core.c new file +1
-0+dev_dbg(&core->i2c_dev->dev,
"IRQ:
Quoted 7 lines
Quoted 7 lines
POW_ENB\n");
Quoted 6 lines
drivers/mfd/wl1273-core.c line 378
Quoted 3 lines
drivers/mfd/wl1273-core.c new file +3
-0+ } + + if (flags &
WL1273_SCAN_OVER_EVENT)drivers/mfd/wl1273-core.c line 379
Quoted 1 line
drivers/mfd/wl1273-core.c new file +1
-0+dev_dbg(&core->i2c_dev->dev,
"IRQ:
Quoted 6 lines
Quoted 6 lines
SCAN_OVER\n");
Quoted 5 lines
drivers/mfd/wl1273-core.c line 381
Quoted 2 lines
drivers/mfd/wl1273-core.c new file +2
-0+ + if (flags &
WL1273_ERROR_EVENT)drivers/mfd/wl1273-core.c line 382
Quoted 1 line
drivers/mfd/wl1273-core.c new file +1
-0+dev_dbg(&core->i2c_dev->dev,
"IRQ:
Quoted 3 lines
Quoted 3 lines
ERROR\n");
Quoted 2 lines
Quoted 2 lines
drivers/mfd/wl1273-core.c new file +2
-0+ + if (flags &
WL1273_FR_EVENT)Quoted 5 lines
Quoted 5 lines
Quoted 5 lines
{
drivers/mfd/wl1273-core.c line 387
Quoted 3 lines
drivers/mfd/wl1273-core.c new file +3
-0+ u16 freq; + +dev_dbg(&core->i2c_dev->dev, "IRQ:
FR:\n");
Quoted 5 lines
Quoted 5 lines
Quoted 5 lines
drivers/mfd/wl1273-core.c line 389
Quoted 2 lines
drivers/mfd/wl1273-core.c new file +2
-0+ + if(
core->mode==WL1273_MODE_RX) {drivers/mfd/wl1273-core.c line 390
Quoted 1 line
drivers/mfd/wl1273-core.c new file +1
-0+r =
wl1273_fm_write_cmd(core,
Quoted 4 lines
Quoted 4 lines
Quoted 4 lines
WL1273_TUNER_MODE_SET,drivers/mfd/wl1273-core.c line 391
Quoted 1 line
drivers/mfd/wl1273-core.c new file +1
-0+TUNER_MODE_STOP_SEARCH);
Quoted 5 lines
Quoted 5 lines
Quoted 5 lines
drivers/mfd/wl1273-core.c line 392
Quoted 1 line
drivers/mfd/wl1273-core.c new file +1
-0+if (r) {
drivers/mfd/wl1273-core.c line 393
Quoted 1 line
drivers/mfd/wl1273-core.c new file +1
-0+dev_err(&core->i2c_dev->dev,
Quoted 8 lines
Quoted 8 lines
Quoted 8 lines
drivers/mfd/wl1273-core.c line 394
Quoted 1 line
drivers/mfd/wl1273-core.c new file +1
-0+"%s:
TUNER_MODE_SETfails: %d\n",drivers/mfd/wl1273-core.c line 395
Quoted 1 line
drivers/mfd/wl1273-core.c new file +1
-0+
__func__, r);drivers/mfd/wl1273-core.c line 396
Quoted 1 line
drivers/mfd/wl1273-core.c new file +1
-0+goto
out;
Quoted 5 lines
Quoted 5 lines
Quoted 5 lines
drivers/mfd/wl1273-core.c line 397
Quoted 1 line
drivers/mfd/wl1273-core.c new file +1
-0+}
drivers/mfd/wl1273-core.c line 399
Quoted 2 lines
drivers/mfd/wl1273-core.c new file +2
-0+ +r =
wl1273_fm_read_reg(core,
Quoted 5 lines
Quoted 5 lines
Quoted 5 lines
WL1273_FREQ_SET, &freq);drivers/mfd/wl1273-core.c line 400
Quoted 1 line
drivers/mfd/wl1273-core.c new file +1
-0+if (r)
drivers/mfd/wl1273-core.c line 401
Quoted 1 line
drivers/mfd/wl1273-core.c new file +1
-0+goto
out;
Quoted 3 lines
Quoted 3 lines
Quoted 3 lines
drivers/mfd/wl1273-core.c line 403
Quoted 2 lines
drivers/mfd/wl1273-core.c new file +2
-0+ +core->rx_frequency =
Quoted 5 lines
Quoted 5 lines
Quoted 5 lines
drivers/mfd/wl1273-core.c line 404
Quoted 1 line
drivers/mfd/wl1273-core.c new file +1
-0+bands[core->band].bottom_frequency +
drivers/mfd/wl1273-core.c line 405
Quoted 1 line
drivers/mfd/wl1273-core.c new file +1
-0+freq *
50;
Quoted 5 lines
Quoted 5 lines
Quoted 5 lines
drivers/mfd/wl1273-core.c line 407
Quoted 2 lines
drivers/mfd/wl1273-core.c new file +2
-0+ +/*
drivers/mfd/wl1273-core.c line 408
Quoted 1 line
drivers/mfd/wl1273-core.c new file +1
-0+* The driver
works
Quoted 3 lines
Quoted 3 lines
Quoted 3 lines
better with this msleep,
drivers/mfd/wl1273-core.c line 409
Quoted 1 line
drivers/mfd/wl1273-core.c new file +1
-0+* the
documentation
Quoted 8 lines
Quoted 8 lines
Quoted 8 lines
doesn't mention it.
drivers/mfd/wl1273-core.c line 410
Quoted 1 line
drivers/mfd/wl1273-core.c new file +1
-0+*/
drivers/mfd/wl1273-core.c line 411
Quoted 1 line
drivers/mfd/wl1273-core.c new file +1
-0+msleep(10);
msleep on an irq handler? You shouldn't be
doing it!
Quoted 3 lines
Quoted 3 lines
You're
Quoted 2 lines
not allowed to sleep
during IRQ time. Kernel can panic here.You'll
Quoted 6 lines
Quoted 6 lines
probably
Quoted 5 lines
need to defer work and
handle it outside irq time.drivers/mfd/wl1273-core.c line 413
Quoted 2 lines
drivers/mfd/wl1273-core.c new file +2
-0+ +dev_dbg(&core->i2c_dev->dev,
Quoted 8 lines
Quoted 8 lines
Quoted 8 lines
"%dkHz\n",
drivers/mfd/wl1273-core.c line 414
Quoted 1 line
drivers/mfd/wl1273-core.c new file +1
-0+
core->rx_frequency);drivers/mfd/wl1273-core.c line 417
Quoted 3 lines
drivers/mfd/wl1273-core.c new file +3
-0+ + } else { +r =
wl1273_fm_read_reg(core,
Quoted 5 lines
Quoted 5 lines
Quoted 5 lines
WL1273_CHANL_SET, &freq);drivers/mfd/wl1273-core.c line 418
Quoted 1 line
drivers/mfd/wl1273-core.c new file +1
-0+if (r)
drivers/mfd/wl1273-core.c line 419
Quoted 1 line
drivers/mfd/wl1273-core.c new file +1
-0+goto
out;
Quoted 3 lines
Quoted 3 lines
Quoted 3 lines
drivers/mfd/wl1273-core.c line 421
Quoted 2 lines
drivers/mfd/wl1273-core.c new file +2
-0+ +dev_dbg(&core->i2c_dev->dev,
Quoted 4 lines
Quoted 4 lines
Quoted 4 lines
"%dkHz\n", freq);
drivers/mfd/wl1273-core.c line 423
Quoted 2 lines
drivers/mfd/wl1273-core.c new file +2
-0+ } +dev_dbg(&core->i2c_dev->dev, "%s:
NOT
Quoted 6 lines
Quoted 6 lines
BUSY\n",
Quoted 5 lines
__func__);drivers/mfd/wl1273-core.c line 427
Quoted 4 lines
drivers/mfd/wl1273-core.c new file +4
-0+ } + +out: +wl1273_fm_write_cmd(core,
Quoted 3 lines
Quoted 3 lines
Quoted 3 lines
WL1273_INT_MASK_SET,drivers/mfd/wl1273-core.c line 428
Quoted 1 line
drivers/mfd/wl1273-core.c new file +1
-0+core->irq_flags);
Quoted 1 line
Quoted 1 line
Quoted 1 line
drivers/mfd/wl1273-core.c line 429
Quoted 1 line
drivers/mfd/wl1273-core.c new file +1
-0+
complete(&core->busy);Quoted 8 lines
Quoted 8 lines
Quoted 5 lines
drivers/mfd/wl1273-core.c line 434
Quoted 5 lines
drivers/mfd/wl1273-core.c new file +5
-0+ + return IRQ_HANDLED; +} + +static struct i2c_device_idwl1273_driver_id_table[]
Quoted 2 lines
= {
Quoted 1 line
drivers/mfd/wl1273-core.c new file +1
-0+ { WL1273_FM_DRIVER_NAME,0 },
Quoted 6 lines
Quoted 6 lines
Quoted 3 lines
drivers/mfd/wl1273-core.c line 438
Quoted 3 lines
drivers/mfd/wl1273-core.c new file +3
-0+ { } +}; +MODULE_DEVICE_TABLE(i2c,
wl1273_driver_id_table);Quoted 2 lines
drivers/mfd/wl1273-core.c line 440
Quoted 2 lines
drivers/mfd/wl1273-core.c new file +2
-0+ +static int wl1273_core_remove(struct
i2c_clientQuoted 3 lines
Quoted 3 lines
Quoted 3 lines
*client)
Quoted 2 lines
drivers/mfd/wl1273-core.c new file +2
-0+{ + struct wl1273_core *core=
Quoted 2 lines
Quoted 2 lines
Quoted 2 lines
i2c_get_clientdata(client);Quoted 1 line
drivers/mfd/wl1273-core.c new file +1
-0+ struct
wl1273_fm_platform_dataQuoted 5 lines
Quoted 5 lines
Quoted 5 lines
*pdata =
drivers/mfd/wl1273-core.c line 444
Quoted 1 line
drivers/mfd/wl1273-core.c new file +1
-0+
client->dev.platform_data;Quoted 2 lines
drivers/mfd/wl1273-core.c new file +2
-0+ +dev_dbg(&client->dev,
Quoted 5 lines
Quoted 5 lines
Quoted 5 lines
"%s\n",
__func__);drivers/mfd/wl1273-core.c line 448
Quoted 2 lines
drivers/mfd/wl1273-core.c new file +2
-0+ +
mfd_remove_devices(&client->dev);Quoted 1 line
drivers/mfd/wl1273-core.c new file +1
-0+
i2c_set_clientdata(client, core);Quoted 2 lines
Quoted 2 lines
Quoted 2 lines
drivers/mfd/wl1273-core.c line 451
Quoted 2 lines
drivers/mfd/wl1273-core.c new file +2
-0+ + free_irq(client->irq,core);
Quoted 1 line
Quoted 1 line
Quoted 1 line
drivers/mfd/wl1273-core.c line 452
Quoted 1 line
drivers/mfd/wl1273-core.c new file +1
-0+
pdata->free_resources();Quoted 8 lines
Quoted 8 lines
Quoted 8 lines
drivers/mfd/wl1273-core.c line 460
Quoted 8 lines
drivers/mfd/wl1273-core.c new file +8
-0+ + kfree(core->buffer); + kfree(core); + + return 0; +} + +static int __devinitwl1273_core_probe(struct
Quoted 4 lines
Quoted 4 lines
Quoted 4 lines
i2c_client*client,drivers/mfd/wl1273-core.c line 461
Quoted 1 line
drivers/mfd/wl1273-core.c new file +1
-0+const struct
i2c_device_id*id)
Quoted 2 lines
Quoted 2 lines
Quoted 2 lines
drivers/mfd/wl1273-core.c line 463
Quoted 2 lines
drivers/mfd/wl1273-core.c new file +2
-0+{ + struct
wl1273_fm_platform_dataQuoted 3 lines
Quoted 3 lines
Quoted 3 lines
*pdata =
client->dev.platform_data;Quoted 2 lines
drivers/mfd/wl1273-core.c new file +2
-0+ int r = 0; + struct wl1273_core*core;
Quoted 3 lines
Quoted 3 lines
Quoted 3 lines
drivers/mfd/wl1273-core.c line 468
Quoted 3 lines
drivers/mfd/wl1273-core.c new file +3
-0+ int children = 0; + +dev_dbg(&client->dev,
Quoted 5 lines
Quoted 5 lines
Quoted 5 lines
"%s\n",
__func__);drivers/mfd/wl1273-core.c line 471
Quoted 3 lines
drivers/mfd/wl1273-core.c new file +3
-0+ + if (!pdata) { +dev_err(&client->dev, "No platform
data.\n");
Quoted 5 lines
Quoted 5 lines
Quoted 5 lines
drivers/mfd/wl1273-core.c line 472
Quoted 1 line
drivers/mfd/wl1273-core.c new file +1
-0+ return
-EINVAL;Quoted 3 lines
drivers/mfd/wl1273-core.c new file +3
-0+ } + + core =kzalloc(sizeof(*core),
Quoted 6 lines
Quoted 6 lines
Quoted 6 lines
GFP_KERNEL);drivers/mfd/wl1273-core.c line 477
Quoted 2 lines
drivers/mfd/wl1273-core.c new file +2
-0+ if (!core) + return
-ENOMEM;Quoted 2 lines
drivers/mfd/wl1273-core.c new file +2
-0+ + /* RDS buffer allocation*/
Quoted 1 line
Quoted 1 line
Quoted 1 line
drivers/mfd/wl1273-core.c line 480
Quoted 1 line
drivers/mfd/wl1273-core.c new file +1
-0+ core->buf_size =
rds_buf* 3;Quoted 7 lines
Quoted 7 lines
Quoted 7 lines
drivers/mfd/wl1273-core.c line 481
Quoted 1 line
drivers/mfd/wl1273-core.c new file +1
-0+ core->buffer =
kmalloc(core->buf_size, GFP_KERNEL);drivers/mfd/wl1273-core.c line 483
Quoted 2 lines
drivers/mfd/wl1273-core.c new file +2
-0+ if (!core->buffer) { +dev_err(&client->dev,
drivers/mfd/wl1273-core.c line 484
Quoted 1 line
drivers/mfd/wl1273-core.c new file +1
-0+"Cannot allocate
memory for RDS
Quoted 2 lines
Quoted 2 lines
Quoted 2 lines
buffer.\n");
Quoted 1 line
drivers/mfd/wl1273-core.c new file +1
-0+ r =
-ENOMEM;Quoted 7 lines
Quoted 7 lines
Quoted 7 lines
drivers/mfd/wl1273-core.c line 486
Quoted 1 line
drivers/mfd/wl1273-core.c new file +1
-0+ goto
err_kmalloc;drivers/mfd/wl1273-core.c line 489
Quoted 3 lines
drivers/mfd/wl1273-core.c new file +3
-0+ } + + core->irq_flags =
WL1273_IRQ_MASK;Quoted 1 line
drivers/mfd/wl1273-core.c new file +1
-0+ core->i2c_dev =client;
Quoted 1 line
Quoted 1 line
Quoted 1 line
drivers/mfd/wl1273-core.c line 491
Quoted 1 line
drivers/mfd/wl1273-core.c new file +1
-0+ core->rds_on =false;
Quoted 1 line
Quoted 1 line
Quoted 1 line
drivers/mfd/wl1273-core.c line 492
Quoted 1 line
drivers/mfd/wl1273-core.c new file +1
-0+ core->mode =
WL1273_MODE_OFF;Quoted 4 lines
Quoted 4 lines
Quoted 4 lines
drivers/mfd/wl1273-core.c line 494
Quoted 2 lines
drivers/mfd/wl1273-core.c new file +2
-0+ core->tx_power = 4; + core->audio_mode =
WL1273_AUDIO_ANALOG;Quoted 1 line
drivers/mfd/wl1273-core.c new file +1
-0+ core->band =
radio_band;Quoted 2 lines
Quoted 2 lines
Quoted 2 lines
drivers/mfd/wl1273-core.c line 497
Quoted 2 lines
drivers/mfd/wl1273-core.c new file +2
-0+ core->bands = bands; + core->number_of_bands=
Quoted 4 lines
Quoted 4 lines
Quoted 4 lines
ARRAY_SIZE(bands);drivers/mfd/wl1273-core.c line 498
Quoted 1 line
drivers/mfd/wl1273-core.c new file +1
-0+ core->i2s_mode =
WL1273_I2S_DEF_MODE;Quoted 1 line
drivers/mfd/wl1273-core.c new file +1
-0+ core->channel_number= 2;
Quoted 8 lines
Quoted 8 lines
Quoted 8 lines
drivers/mfd/wl1273-core.c line 500
Quoted 1 line
drivers/mfd/wl1273-core.c new file +1
-0+ core->volume =
WL1273_DEFAULT_VOLUME;drivers/mfd/wl1273-core.c line 501
Quoted 1 line
drivers/mfd/wl1273-core.c new file +1
-0+ core->rx_frequency =bands[core->band].bottom_frequency;
drivers/mfd/wl1273-core.c line 502
Quoted 1 line
drivers/mfd/wl1273-core.c new file +1
-0+ core->tx_frequency =bands[core->band].top_frequency;
Quoted 2 lines
drivers/mfd/wl1273-core.c new file +2
-0+ +dev_dbg(&client->dev,
Quoted 3 lines
Quoted 3 lines
Quoted 3 lines
"
radio_band: %d\n",radio_band);Quoted 2 lines
drivers/mfd/wl1273-core.c new file +2
-0+ +
mutex_init(&core->lock);Quoted 9 lines
Quoted 9 lines
Quoted 9 lines
drivers/mfd/wl1273-core.c line 508
Quoted 2 lines
drivers/mfd/wl1273-core.c new file +2
-0+ + pdata =
client->dev.platform_data;drivers/mfd/wl1273-core.c line 510
Quoted 2 lines
drivers/mfd/wl1273-core.c new file +2
-0+ if (pdata) { + r =
pdata->request_resources(client);drivers/mfd/wl1273-core.c line 512
Quoted 2 lines
drivers/mfd/wl1273-core.c new file +2
-0+ if (r) { +dev_err(&client->dev,
Quoted 3 lines
Quoted 3 lines
Quoted 3 lines
WL1273_FM_DRIVER_NAMEdrivers/mfd/wl1273-core.c line 513
Quoted 1 line
drivers/mfd/wl1273-core.c new file +1
-0+":
Cannot get platform
Quoted 10 lines
Quoted 10 lines
Quoted 10 lines
data\n");
drivers/mfd/wl1273-core.c line 514
Quoted 1 line
drivers/mfd/wl1273-core.c new file +1
-0+goto
err_new_mixer;drivers/mfd/wl1273-core.c line 517
Quoted 3 lines
drivers/mfd/wl1273-core.c new file +3
-0+ } + + r =request_threaded_irq(client->irq, NULL,
drivers/mfd/wl1273-core.c line 518
Quoted 1 line
drivers/mfd/wl1273-core.c new file +1
-0+
wl1273_fm_irq_thread_handler,Quoted 8 lines
Quoted 8 lines
Quoted 8 lines
drivers/mfd/wl1273-core.c line 519
Quoted 1 line
drivers/mfd/wl1273-core.c new file +1
-0+
IRQF_ONESHOT|IRQF_TRIGGER_FALLING,drivers/mfd/wl1273-core.c line 520
Quoted 1 line
drivers/mfd/wl1273-core.c new file +1
-0+"wl1273-fm", core);
Quoted 1 line
drivers/mfd/wl1273-core.c new file +1
-0+ if (r <0)
Quoted 3 lines
Quoted 3 lines
Quoted 3 lines
{
drivers/mfd/wl1273-core.c line 522
Quoted 1 line
drivers/mfd/wl1273-core.c new file +1
-0+dev_err(&client->dev,
Quoted 3 lines
Quoted 3 lines
Quoted 3 lines
WL1273_FM_DRIVER_NAMEdrivers/mfd/wl1273-core.c line 523
Quoted 1 line
drivers/mfd/wl1273-core.c new file +1
-0+":
Unable to register
Quoted 3 lines
Quoted 3 lines
Quoted 3 lines
IRQ handler\n");
drivers/mfd/wl1273-core.c line 524
Quoted 1 line
drivers/mfd/wl1273-core.c new file +1
-0+goto
err_request_irq;Quoted 4 lines
Quoted 4 lines
Quoted 4 lines
drivers/mfd/wl1273-core.c line 527
Quoted 3 lines
drivers/mfd/wl1273-core.c new file +3
-0+ } + } else { +dev_err(&client->dev,
WL1273_FM_DRIVER_NAME":Quoted 5 lines
Quoted 5 lines
Core
Quoted 4 lines
WL1273 IRQ"
drivers/mfd/wl1273-core.c line 528
Quoted 1 line
drivers/mfd/wl1273-core.c new file +1
-0+" not configured");
Quoted 1 line
drivers/mfd/wl1273-core.c new file +1
-0+ r =
-EINVAL;Quoted 8 lines
Quoted 8 lines
Quoted 8 lines
drivers/mfd/wl1273-core.c line 530
Quoted 1 line
drivers/mfd/wl1273-core.c new file +1
-0+ goto
err_new_mixer;drivers/mfd/wl1273-core.c line 533
Quoted 3 lines
drivers/mfd/wl1273-core.c new file +3
-0+ } + +
init_completion(&core->busy);Quoted 1 line
drivers/mfd/wl1273-core.c new file +1
-0+
init_waitqueue_head(&core->read_queue);Quoted 2 lines
Quoted 2 lines
Quoted 2 lines
drivers/mfd/wl1273-core.c line 536
Quoted 2 lines
drivers/mfd/wl1273-core.c new file +2
-0+ +
i2c_set_clientdata(client, core);Quoted 2 lines
Quoted 2 lines
Quoted 2 lines
drivers/mfd/wl1273-core.c line 538
Quoted 2 lines
drivers/mfd/wl1273-core.c new file +2
-0+ + if (pdata->children&
Quoted 2 lines
Quoted 2 lines
Quoted 2 lines
WL1273_RADIO_CHILD) {Quoted 1 line
drivers/mfd/wl1273-core.c new file +1
-0+ struct
mfd_cellQuoted 3 lines
Quoted 3 lines
Quoted 3 lines
*cell = &core->cells[children];
drivers/mfd/wl1273-core.c line 540
Quoted 1 line
drivers/mfd/wl1273-core.c new file +1
-0+dev_dbg(&client->dev, "%s: Have
V4L2.\n",
Quoted 2 lines
Quoted 2 lines
__func__);Quoted 1 line
Quoted 1 line
drivers/mfd/wl1273-core.c new file +1
-0+
cell->name=Quoted 6 lines
Quoted 6 lines
Quoted 6 lines
"
wl1273_fm_radio";drivers/mfd/wl1273-core.c line 542
Quoted 1 line
drivers/mfd/wl1273-core.c new file +1
-0+
cell->platform_data= &core;drivers/mfd/wl1273-core.c line 543
Quoted 1 line
drivers/mfd/wl1273-core.c new file +1
-0+
cell->data_size= sizeof(core);Quoted 1 line
drivers/mfd/wl1273-core.c new file +1
-0+children++;
Quoted 3 lines
Quoted 3 lines
Quoted 3 lines
drivers/mfd/wl1273-core.c line 547
Quoted 3 lines
drivers/mfd/wl1273-core.c new file +3
-0+ } + + if (pdata->children&
Quoted 2 lines
Quoted 2 lines
Quoted 2 lines
WL1273_CODEC_CHILD) {Quoted 1 line
drivers/mfd/wl1273-core.c new file +1
-0+ struct
mfd_cellQuoted 3 lines
Quoted 3 lines
Quoted 3 lines
*cell = &core->cells[children];
drivers/mfd/wl1273-core.c line 549
Quoted 1 line
drivers/mfd/wl1273-core.c new file +1
-0+dev_dbg(&client->dev, "%s: Have
codec.\n",
Quoted 2 lines
Quoted 2 lines
Quoted 2 lines
__func__);Quoted 1 line
drivers/mfd/wl1273-core.c new file +1
-0+
cell->name=Quoted 6 lines
Quoted 6 lines
Quoted 6 lines
"
wl1273_codec_audio";drivers/mfd/wl1273-core.c line 551
Quoted 1 line
drivers/mfd/wl1273-core.c new file +1
-0+
cell->platform_data= &core;drivers/mfd/wl1273-core.c line 552
Quoted 1 line
drivers/mfd/wl1273-core.c new file +1
-0+
cell->data_size= sizeof(core);Quoted 1 line
drivers/mfd/wl1273-core.c new file +1
-0+children++;
Quoted 5 lines
Quoted 5 lines
Quoted 5 lines
drivers/mfd/wl1273-core.c line 557
Quoted 4 lines
drivers/mfd/wl1273-core.c new file +4
-0+ } + + if (children) { +dev_dbg(&client->dev, "%s: Have
children.\n",
Quoted 10 lines
Quoted 10 lines
Quoted 3 lines
__func__);drivers/mfd/wl1273-core.c line 558
Quoted 1 line
drivers/mfd/wl1273-core.c new file +1
-0+ r =mfd_add_devices(&client->dev, -1,
core->cells,Quoted 6 lines
drivers/mfd/wl1273-core.c line 559
Quoted 1 line
drivers/mfd/wl1273-core.c new file +1
-0+children, NULL, 0);
drivers/mfd/wl1273-core.c line 561
Quoted 2 lines
drivers/mfd/wl1273-core.c new file +2
-0+ } else { +dev_err(&client->dev, "No platform
data found
Quoted 3 lines
Quoted 3 lines
for
Quoted 2 lines
children.\n");
Quoted 1 line
drivers/mfd/wl1273-core.c new file +1
-0+ r =
-ENODEV;Quoted 6 lines
Quoted 6 lines
Quoted 6 lines
drivers/mfd/wl1273-core.c line 568
Quoted 6 lines
drivers/mfd/wl1273-core.c new file +6
-0+ } + + if (!r) + return 0; + +
i2c_set_clientdata(client, NULL);Quoted 2 lines
Quoted 2 lines
Quoted 2 lines
drivers/mfd/wl1273-core.c line 570
Quoted 2 lines
drivers/mfd/wl1273-core.c new file +2
-0+ kfree(core); + free_irq(client->irq,core);
Quoted 2 lines
Quoted 2 lines
Quoted 2 lines
drivers/mfd/wl1273-core.c line 572
Quoted 2 lines
drivers/mfd/wl1273-core.c new file +2
-0+err_request_irq: +
pdata->free_resources();Quoted 5 lines
Quoted 5 lines
Quoted 5 lines
drivers/mfd/wl1273-core.c line 577
Quoted 5 lines
drivers/mfd/wl1273-core.c new file +5
-0+err_new_mixer: + kfree(core->buffer); +err_kmalloc: + kfree(core); +dev_dbg(&client->dev,
Quoted 6 lines
Quoted 6 lines
Quoted 6 lines
"%s\n",
__func__);drivers/mfd/wl1273-core.c line 582
Quoted 5 lines
drivers/mfd/wl1273-core.c new file +5
-0+ + return r; +} + +static struct i2c_driver
wl1273_core_driver= {Quoted 5 lines
Quoted 5 lines
Quoted 5 lines
drivers/mfd/wl1273-core.c line 584
Quoted 2 lines
drivers/mfd/wl1273-core.c new file +2
-0+ .driver = { + .name =
WL1273_FM_DRIVER_NAME,Quoted 2 lines
drivers/mfd/wl1273-core.c new file +2
-0+ }, + .probe =
wl1273_core_probe,Quoted 7 lines
Quoted 7 lines
Quoted 7 lines
drivers/mfd/wl1273-core.c line 587
Quoted 1 line
drivers/mfd/wl1273-core.c new file +1
-0+ .id_table =
wl1273_driver_id_table,drivers/mfd/wl1273-core.c line 588
Quoted 1 line
drivers/mfd/wl1273-core.c new file +1
-0+ .remove =
__devexit_p(wl1273_core_remove),drivers/mfd/wl1273-core.c line 591
Quoted 3 lines
drivers/mfd/wl1273-core.c new file +3
-0+}; + +static int __init
wl1273_core_init(void)Quoted 10 lines
Quoted 10 lines
Quoted 10 lines
drivers/mfd/wl1273-core.c line 595
Quoted 4 lines
drivers/mfd/wl1273-core.c new file +4
-0+{ + int r; + + r =
i2c_add_driver(&wl1273_core_driver);drivers/mfd/wl1273-core.c line 597
Quoted 2 lines
drivers/mfd/wl1273-core.c new file +2
-0+ if (r) { +pr_err(WL1273_FM_DRIVER_NAME
drivers/mfd/wl1273-core.c line 598
Quoted 1 line
drivers/mfd/wl1273-core.c new file +1
-0+": driver registration
failed\n");
Quoted 7 lines
Quoted 7 lines
Quoted 7 lines
drivers/mfd/wl1273-core.c line 605
Quoted 7 lines
drivers/mfd/wl1273-core.c new file +7
-0+ return r; + } + + return 0; +} + +static void __exit
wl1273_core_exit(void)Quoted 5 lines
Quoted 5 lines
Quoted 5 lines
drivers/mfd/wl1273-core.c line 609
Quoted 4 lines
drivers/mfd/wl1273-core.c new file +4
-0+{ + flush_scheduled_work(); + +
i2c_del_driver(&wl1273_core_driver);Quoted 8 lines
Quoted 8 lines
Quoted 8 lines
Quoted 8 lines
drivers/mfd/wl1273-core.c new file +7
-0+} +late_initcall (wl1273_core_init); +module_exit (wl1273_core_exit); + +MODULE_AUTHOR ("Matti Aaltonen <[email protected]>" ); +MODULE_DESCRIPTION (DRIVER_DESC ); +MODULE_LICENSE ("GPL" );diff --git
a/include/linux/mfd/wl1273-core.hQuoted 10 lines
Quoted 10 lines
Quoted 10 lines
b/include/linux/mfd/wl1273-core.hinclude/linux/mfd/wl1273-core.h line 4
Quoted 9 lines
new file mode 100644
index 0000000..81c9743include/linux/mfd/wl1273-core.h new file +4
-0@@ -0,0 +1,326 @@ +/* +* include/media/radio/radio-wl1273.h +* +* Some definitions for the wl1273 radio
Quoted 6 lines
Quoted 6 lines
Quoted 6 lines
receiver/transmitter chip.
Quoted 5 lines
include/linux/mfd/wl1273-core.h new file +5
-0+* +* Copyright (C) Nokia Corporation +* Author: Matti J. Aaltonen <[email protected]> +* +* This program is free software; you can
Quoted 2 lines
Quoted 2 lines
Quoted 2 lines
redistribute it and/or
Quoted 1 line
include/linux/mfd/wl1273-core.h new file +1
-0+* modify it under the terms of the GNU General
Quoted 2 lines
Quoted 2 lines
Quoted 2 lines
Public License
Quoted 1 line
include/linux/mfd/wl1273-core.h new file +1
-0+* version 2 as published by the Free Software
Quoted 3 lines
Quoted 3 lines
Quoted 3 lines
Foundation.
Quoted 2 lines
include/linux/mfd/wl1273-core.h new file +2
-0+* +* This program is distributed in the hope that
Quoted 3 lines
Quoted 3 lines
it
Quoted 2 lines
will be useful, but
Quoted 1 line
include/linux/mfd/wl1273-core.h new file +1
-0+* WITHOUT ANY WARRANTY; without even the
Quoted 3 lines
Quoted 3 lines
implied
Quoted 2 lines
warranty of
Quoted 1 line
include/linux/mfd/wl1273-core.h new file +1
-0+* MERCHANTABILITY or FITNESS FOR A PARTICULAR
Quoted 2 lines
Quoted 2 lines
Quoted 2 lines
PURPOSE. See the GNU
Quoted 1 line
include/linux/mfd/wl1273-core.h new file +1
-0+* General Public License for more details.
Quoted 2 lines
Quoted 2 lines
Quoted 2 lines
include/linux/mfd/wl1273-core.h line 18
Quoted 2 lines
include/linux/mfd/wl1273-core.h new file +2
-0+* +* You should have received a copy of the GNU
Quoted 3 lines
Quoted 3 lines
General
Quoted 2 lines
Public License
Quoted 1 line
include/linux/mfd/wl1273-core.h new file +1
-0+* along with this program; if not, write to the
Quoted 3 lines
Quoted 3 lines
Free
Quoted 2 lines
Software
Quoted 1 line
include/linux/mfd/wl1273-core.h new file +1
-0+* Foundation, Inc., 51 Franklin St, Fifth
Quoted 13 lines
Quoted 13 lines
Floor,
Quoted 12 lines
Boston, MA
include/linux/mfd/wl1273-core.h line 30
Quoted 10 lines
include/linux/mfd/wl1273-core.h new file +10
-0+* 02110-1301 USA +*/ + +#ifndef RADIO_WL1273_H +#define RADIO_WL1273_H + +#include <linux/i2c.h> +#include <linux/mfd/core.h> + +#define WL1273_FM_DRIVER_NAME "wl1273-fm"
Quoted 1 line
Quoted 1 line
Quoted 1 line
include/linux/mfd/wl1273-core.h line 31
Quoted 1 line
include/linux/mfd/wl1273-core.h new file +1
-0+#define RX71_FM_I2C_ADDR
0x22Quoted 155 lines
Quoted 155 lines
Quoted 155 lines
include/linux/mfd/wl1273-core.h line 33
Quoted 2 lines
include/linux/mfd/wl1273-core.h new file +2
-0+ +#define WL1273_STEREO_GET 0
include/linux/mfd/wl1273-core.h line 34
Quoted 1 line
include/linux/mfd/wl1273-core.h new file +1
-0+#define WL1273_RSSI_LVL_GET 1
include/linux/mfd/wl1273-core.h line 35
Quoted 1 line
include/linux/mfd/wl1273-core.h new file +1
-0+#define WL1273_IF_COUNT_GET 2
include/linux/mfd/wl1273-core.h line 36
Quoted 1 line
include/linux/mfd/wl1273-core.h new file +1
-0+#define WL1273_FLAG_GET 3
include/linux/mfd/wl1273-core.h line 37
Quoted 1 line
include/linux/mfd/wl1273-core.h new file +1
-0+#define WL1273_RDS_SYNC_GET 4
include/linux/mfd/wl1273-core.h line 38
Quoted 1 line
include/linux/mfd/wl1273-core.h new file +1
-0+#define WL1273_RDS_DATA_GET 5
include/linux/mfd/wl1273-core.h line 39
Quoted 1 line
include/linux/mfd/wl1273-core.h new file +1
-0+#define WL1273_FREQ_SET 10
include/linux/mfd/wl1273-core.h line 40
Quoted 1 line
include/linux/mfd/wl1273-core.h new file +1
-0+#define WL1273_AF_FREQ_SET 11
include/linux/mfd/wl1273-core.h line 41
Quoted 1 line
include/linux/mfd/wl1273-core.h new file +1
-0+#define WL1273_MOST_MODE_SET 12
include/linux/mfd/wl1273-core.h line 42
Quoted 1 line
include/linux/mfd/wl1273-core.h new file +1
-0+#define WL1273_MOST_BLEND_SET 13
include/linux/mfd/wl1273-core.h line 43
Quoted 1 line
include/linux/mfd/wl1273-core.h new file +1
-0+#define WL1273_DEMPH_MODE_SET 14
include/linux/mfd/wl1273-core.h line 44
Quoted 1 line
include/linux/mfd/wl1273-core.h new file +1
-0+#define WL1273_SEARCH_LVL_SET 15
include/linux/mfd/wl1273-core.h line 45
Quoted 1 line
include/linux/mfd/wl1273-core.h new file +1
-0+#define WL1273_BAND_SET 16
include/linux/mfd/wl1273-core.h line 46
Quoted 1 line
include/linux/mfd/wl1273-core.h new file +1
-0+#define WL1273_MUTE_STATUS_SET 17
include/linux/mfd/wl1273-core.h line 47
Quoted 1 line
include/linux/mfd/wl1273-core.h new file +1
-0+#define WL1273_RDS_PAUSE_LVL_SET 18
include/linux/mfd/wl1273-core.h line 48
Quoted 1 line
include/linux/mfd/wl1273-core.h new file +1
-0+#define WL1273_RDS_PAUSE_DUR_SET 19
include/linux/mfd/wl1273-core.h line 49
Quoted 1 line
include/linux/mfd/wl1273-core.h new file +1
-0+#define WL1273_RDS_MEM_SET 20
include/linux/mfd/wl1273-core.h line 50
Quoted 1 line
include/linux/mfd/wl1273-core.h new file +1
-0+#define WL1273_RDS_BLK_B_SET 21
include/linux/mfd/wl1273-core.h line 51
Quoted 1 line
include/linux/mfd/wl1273-core.h new file +1
-0+#define WL1273_RDS_MSK_B_SET 22
include/linux/mfd/wl1273-core.h line 52
Quoted 1 line
include/linux/mfd/wl1273-core.h new file +1
-0+#define WL1273_RDS_PI_MASK_SET 23
include/linux/mfd/wl1273-core.h line 53
Quoted 1 line
include/linux/mfd/wl1273-core.h new file +1
-0+#define WL1273_RDS_PI_SET 24
include/linux/mfd/wl1273-core.h line 54
Quoted 1 line
include/linux/mfd/wl1273-core.h new file +1
-0+#define WL1273_RDS_SYSTEM_SET 25
include/linux/mfd/wl1273-core.h line 55
Quoted 1 line
include/linux/mfd/wl1273-core.h new file +1
-0+#define WL1273_INT_MASK_SET 26
include/linux/mfd/wl1273-core.h line 56
Quoted 1 line
include/linux/mfd/wl1273-core.h new file +1
-0+#define WL1273_SEARCH_DIR_SET 27
include/linux/mfd/wl1273-core.h line 57
Quoted 1 line
include/linux/mfd/wl1273-core.h new file +1
-0+#define WL1273_VOLUME_SET 28
include/linux/mfd/wl1273-core.h line 58
Quoted 1 line
include/linux/mfd/wl1273-core.h new file +1
-0+#define WL1273_AUDIO_ENABLE 29
include/linux/mfd/wl1273-core.h line 59
Quoted 1 line
include/linux/mfd/wl1273-core.h new file +1
-0+#define WL1273_PCM_MODE_SET 30
include/linux/mfd/wl1273-core.h line 60
Quoted 1 line
include/linux/mfd/wl1273-core.h new file +1
-0+#define WL1273_I2S_MODE_CONFIG_SET 31
include/linux/mfd/wl1273-core.h line 61
Quoted 1 line
include/linux/mfd/wl1273-core.h new file +1
-0+#define WL1273_POWER_SET 32
include/linux/mfd/wl1273-core.h line 62
Quoted 1 line
include/linux/mfd/wl1273-core.h new file +1
-0+#define WL1273_INTX_CONFIG_SET 33
include/linux/mfd/wl1273-core.h line 63
Quoted 1 line
include/linux/mfd/wl1273-core.h new file +1
-0+#define WL1273_PULL_EN_SET 34
include/linux/mfd/wl1273-core.h line 64
Quoted 1 line
include/linux/mfd/wl1273-core.h new file +1
-0+#define WL1273_HILO_SET 35
include/linux/mfd/wl1273-core.h line 65
Quoted 1 line
include/linux/mfd/wl1273-core.h new file +1
-0+#define WL1273_SWITCH2FREF 36
include/linux/mfd/wl1273-core.h line 66
Quoted 1 line
include/linux/mfd/wl1273-core.h new file +1
-0+#define WL1273_FREQ_DRIFT_REPORT 37
include/linux/mfd/wl1273-core.h line 68
Quoted 2 lines
include/linux/mfd/wl1273-core.h new file +2
-0+ +#define WL1273_PCE_GET 40
include/linux/mfd/wl1273-core.h line 69
Quoted 1 line
include/linux/mfd/wl1273-core.h new file +1
-0+#define WL1273_FIRM_VER_GET 41
include/linux/mfd/wl1273-core.h line 70
Quoted 1 line
include/linux/mfd/wl1273-core.h new file +1
-0+#define WL1273_ASIC_VER_GET 42
include/linux/mfd/wl1273-core.h line 71
Quoted 1 line
include/linux/mfd/wl1273-core.h new file +1
-0+#define WL1273_ASIC_ID_GET 43
include/linux/mfd/wl1273-core.h line 72
Quoted 1 line
include/linux/mfd/wl1273-core.h new file +1
-0+#define WL1273_MAN_ID_GET 44
include/linux/mfd/wl1273-core.h line 73
Quoted 1 line
include/linux/mfd/wl1273-core.h new file +1
-0+#define WL1273_TUNER_MODE_SET 45
include/linux/mfd/wl1273-core.h line 74
Quoted 1 line
include/linux/mfd/wl1273-core.h new file +1
-0+#define WL1273_STOP_SEARCH 46
include/linux/mfd/wl1273-core.h line 75
Quoted 1 line
include/linux/mfd/wl1273-core.h new file +1
-0+#define WL1273_RDS_CNTRL_SET 47
include/linux/mfd/wl1273-core.h line 77
Quoted 2 lines
include/linux/mfd/wl1273-core.h new file +2
-0+ +#define WL1273_WRITE_HARDWARE_REG 100
include/linux/mfd/wl1273-core.h line 78
Quoted 1 line
include/linux/mfd/wl1273-core.h new file +1
-0+#define WL1273_CODE_DOWNLOAD 101
include/linux/mfd/wl1273-core.h line 79
Quoted 1 line
include/linux/mfd/wl1273-core.h new file +1
-0+#define WL1273_RESET 102
include/linux/mfd/wl1273-core.h line 81
Quoted 2 lines
include/linux/mfd/wl1273-core.h new file +2
-0+ +#define WL1273_FM_POWER_MODE 254
include/linux/mfd/wl1273-core.h line 82
Quoted 1 line
include/linux/mfd/wl1273-core.h new file +1
-0+#define WL1273_FM_INTERRUPT 255
include/linux/mfd/wl1273-core.h line 86
Quoted 4 lines
include/linux/mfd/wl1273-core.h new file +4
-0+ +/* Transmitter API */ + +#define WL1273_CHANL_SET 55
include/linux/mfd/wl1273-core.h line 87
Quoted 1 line
include/linux/mfd/wl1273-core.h new file +1
-0+#define WL1273_SCAN_SPACING_SET 56
include/linux/mfd/wl1273-core.h line 88
Quoted 1 line
include/linux/mfd/wl1273-core.h new file +1
-0+#define WL1273_REF_SET 57
include/linux/mfd/wl1273-core.h line 89
Quoted 1 line
include/linux/mfd/wl1273-core.h new file +1
-0+#define WL1273_POWER_ENB_SET 90
include/linux/mfd/wl1273-core.h line 90
Quoted 1 line
include/linux/mfd/wl1273-core.h new file +1
-0+#define WL1273_POWER_ATT_SET 58
include/linux/mfd/wl1273-core.h line 91
Quoted 1 line
include/linux/mfd/wl1273-core.h new file +1
-0+#define WL1273_POWER_LEV_SET 59
include/linux/mfd/wl1273-core.h line 92
Quoted 1 line
include/linux/mfd/wl1273-core.h new file +1
-0+#define WL1273_AUDIO_DEV_SET 60
include/linux/mfd/wl1273-core.h line 93
Quoted 1 line
include/linux/mfd/wl1273-core.h new file +1
-0+#define WL1273_PILOT_DEV_SET 61
include/linux/mfd/wl1273-core.h line 94
Quoted 1 line
include/linux/mfd/wl1273-core.h new file +1
-0+#define WL1273_RDS_DEV_SET 62
include/linux/mfd/wl1273-core.h line 95
Quoted 1 line
include/linux/mfd/wl1273-core.h new file +1
-0+#define WL1273_PUPD_SET 91
include/linux/mfd/wl1273-core.h line 96
Quoted 1 line
include/linux/mfd/wl1273-core.h new file +1
-0+#define WL1273_AUDIO_IO_SET 63
include/linux/mfd/wl1273-core.h line 97
Quoted 1 line
include/linux/mfd/wl1273-core.h new file +1
-0+#define WL1273_PREMPH_SET 64
include/linux/mfd/wl1273-core.h line 98
Quoted 1 line
include/linux/mfd/wl1273-core.h new file +1
-0+#define WL1273_MONO_SET 66
include/linux/mfd/wl1273-core.h line 99
Quoted 1 line
include/linux/mfd/wl1273-core.h new file +1
-0+#define WL1273_MUTE 92
include/linux/mfd/wl1273-core.h line 100
Quoted 1 line
include/linux/mfd/wl1273-core.h new file +1
-0+#define WL1273_MPX_LMT_ENABLE 67
include/linux/mfd/wl1273-core.h line 101
Quoted 1 line
include/linux/mfd/wl1273-core.h new file +1
-0+#define WL1273_PI_SET 93
include/linux/mfd/wl1273-core.h line 102
Quoted 1 line
include/linux/mfd/wl1273-core.h new file +1
-0+#define WL1273_ECC_SET 69
include/linux/mfd/wl1273-core.h line 103
Quoted 1 line
include/linux/mfd/wl1273-core.h new file +1
-0+#define WL1273_PTY 70
include/linux/mfd/wl1273-core.h line 104
Quoted 1 line
include/linux/mfd/wl1273-core.h new file +1
-0+#define WL1273_AF 71
include/linux/mfd/wl1273-core.h line 105
Quoted 1 line
include/linux/mfd/wl1273-core.h new file +1
-0+#define WL1273_DISPLAY_MODE 74
include/linux/mfd/wl1273-core.h line 106
Quoted 1 line
include/linux/mfd/wl1273-core.h new file +1
-0+#define WL1273_RDS_REP_SET 77
include/linux/mfd/wl1273-core.h line 107
Quoted 1 line
include/linux/mfd/wl1273-core.h new file +1
-0+#define WL1273_RDS_CONFIG_DATA_SET 98
include/linux/mfd/wl1273-core.h line 108
Quoted 1 line
include/linux/mfd/wl1273-core.h new file +1
-0+#define WL1273_RDS_DATA_SET 99
include/linux/mfd/wl1273-core.h line 109
Quoted 1 line
include/linux/mfd/wl1273-core.h new file +1
-0+#define WL1273_RDS_DATA_ENB 94
include/linux/mfd/wl1273-core.h line 110
Quoted 1 line
include/linux/mfd/wl1273-core.h new file +1
-0+#define WL1273_TA_SET 78
include/linux/mfd/wl1273-core.h line 111
Quoted 1 line
include/linux/mfd/wl1273-core.h new file +1
-0+#define WL1273_TP_SET 79
include/linux/mfd/wl1273-core.h line 112
Quoted 1 line
include/linux/mfd/wl1273-core.h new file +1
-0+#define WL1273_DI_SET 80
Quoted 8 lines
Quoted 8 lines
Quoted 8 lines
include/linux/mfd/wl1273-core.h line 113
Quoted 1 line
include/linux/mfd/wl1273-core.h new file +1
-0+#define WL1273_MS_SET 81
include/linux/mfd/wl1273-core.h line 114
Quoted 1 line
include/linux/mfd/wl1273-core.h new file +1
-0+#define WL1273_PS_SCROLL_SPEED 82
include/linux/mfd/wl1273-core.h line 115
Quoted 1 line
include/linux/mfd/wl1273-core.h new file +1
-0+#define WL1273_TX_AUDIO_LEVEL_TEST 96
include/linux/mfd/wl1273-core.h line 116
Quoted 1 line
include/linux/mfd/wl1273-core.h new file +1
-0+#define
WL1273_TX_AUDIO_LEVEL_TEST_THRESHOLD73
Quoted 2 lines
Quoted 2 lines
Quoted 2 lines
include/linux/mfd/wl1273-core.h line 117
Quoted 1 line
include/linux/mfd/wl1273-core.h new file +1
-0+#define
WL1273_TX_AUDIO_INPUT_LEVEL_RANGE_SET54
Quoted 9 lines
Quoted 9 lines
Quoted 9 lines
include/linux/mfd/wl1273-core.h line 118
Quoted 1 line
include/linux/mfd/wl1273-core.h new file +1
-0+#define WL1273_RX_ANTENNA_SELECT 87
include/linux/mfd/wl1273-core.h line 119
Quoted 1 line
include/linux/mfd/wl1273-core.h new file +1
-0+#define WL1273_I2C_DEV_ADDR_SET 86
include/linux/mfd/wl1273-core.h line 120
Quoted 1 line
include/linux/mfd/wl1273-core.h new file +1
-0+#define
WL1273_REF_ERR_CALIB_PARAM_SET
88include/linux/mfd/wl1273-core.h line 121
Quoted 1 line
include/linux/mfd/wl1273-core.h new file +1
-0+#define
WL1273_REF_ERR_CALIB_PERIODICITY_SET89
Quoted 10 lines
Quoted 10 lines
Quoted 10 lines
include/linux/mfd/wl1273-core.h line 122
Quoted 1 line
include/linux/mfd/wl1273-core.h new file +1
-0+#define WL1273_SOC_INT_TRIGGER 52
include/linux/mfd/wl1273-core.h line 123
Quoted 1 line
include/linux/mfd/wl1273-core.h new file +1
-0+#define WL1273_SOC_AUDIO_PATH_SET 83
include/linux/mfd/wl1273-core.h line 124
Quoted 1 line
include/linux/mfd/wl1273-core.h new file +1
-0+#define WL1273_SOC_PCMI_OVERRIDE 84
include/linux/mfd/wl1273-core.h line 125
Quoted 1 line
include/linux/mfd/wl1273-core.h new file +1
-0+#define WL1273_SOC_I2S_OVERRIDE 85
include/linux/mfd/wl1273-core.h line 126
Quoted 1 line
include/linux/mfd/wl1273-core.h new file +1
-0+#define
WL1273_RSSI_BLOCK_SCAN_FREQ_SET95
Quoted 2 lines
Quoted 2 lines
Quoted 2 lines
include/linux/mfd/wl1273-core.h line 127
Quoted 1 line
include/linux/mfd/wl1273-core.h new file +1
-0+#define
WL1273_RSSI_BLOCK_SCAN_START97
Quoted 2 lines
Quoted 2 lines
Quoted 2 lines
include/linux/mfd/wl1273-core.h line 128
Quoted 1 line
include/linux/mfd/wl1273-core.h new file +1
-0+#define
WL1273_RSSI_BLOCK_SCAN_DATA_GET5
Quoted 9 lines
Quoted 9 lines
Quoted 9 lines
include/linux/mfd/wl1273-core.h line 129
Quoted 1 line
include/linux/mfd/wl1273-core.h new file +1
-0+#define
WL1273_READ_FMANT_TUNE_VALUE
104include/linux/mfd/wl1273-core.h line 131
Quoted 2 lines
include/linux/mfd/wl1273-core.h new file +2
-0+ +#define WL1273_RDS_OFF 0
include/linux/mfd/wl1273-core.h line 132
Quoted 1 line
include/linux/mfd/wl1273-core.h new file +1
-0+#define WL1273_RDS_ON 1
Quoted 1 line
include/linux/mfd/wl1273-core.h new file +1
-0+#define WL1273_RDS_RESET 2
Quoted 2 lines
Quoted 2 lines
Quoted 2 lines
include/linux/mfd/wl1273-core.h line 135
Quoted 2 lines
include/linux/mfd/wl1273-core.h new file +2
-0+ +#define WL1273_AUDIO_DIGITAL 0
Quoted 1 line
Quoted 1 line
Quoted 1 line
include/linux/mfd/wl1273-core.h line 136
Quoted 1 line
include/linux/mfd/wl1273-core.h new file +1
-0+#define WL1273_AUDIO_ANALOG 1
Quoted 8 lines
Quoted 8 lines
Quoted 8 lines
include/linux/mfd/wl1273-core.h line 138
Quoted 2 lines
include/linux/mfd/wl1273-core.h new file +2
-0+ +#define WL1273_MODE_RX 0
include/linux/mfd/wl1273-core.h line 139
Quoted 1 line
include/linux/mfd/wl1273-core.h new file +1
-0+#define WL1273_MODE_TX 1
include/linux/mfd/wl1273-core.h line 140
Quoted 1 line
include/linux/mfd/wl1273-core.h new file +1
-0+#define WL1273_MODE_OFF 2
Quoted 1 line
include/linux/mfd/wl1273-core.h new file +1
-0+#define WL1273_MODE_SUSPENDED 3
Quoted 2 lines
Quoted 2 lines
Quoted 2 lines
include/linux/mfd/wl1273-core.h line 143
Quoted 2 lines
include/linux/mfd/wl1273-core.h new file +2
-0+ +#define WL1273_RADIO_CHILD (1
Quoted 2 lines
Quoted 2 lines
Quoted 2 lines
<< 0)
Quoted 1 line
include/linux/mfd/wl1273-core.h new file +1
-0+#define WL1273_CODEC_CHILD (1
Quoted 5 lines
Quoted 5 lines
Quoted 5 lines
<< 1)
include/linux/mfd/wl1273-core.h line 146
Quoted 2 lines
include/linux/mfd/wl1273-core.h new file +2
-0+ +#define WL1273_RX_MONO 1
Quoted 1 line
include/linux/mfd/wl1273-core.h new file +1
-0+#define WL1273_RX_STEREO 0
Quoted 3 lines
Quoted 3 lines
Quoted 3 lines
include/linux/mfd/wl1273-core.h line 148
Quoted 1 line
include/linux/mfd/wl1273-core.h new file +1
-0+#define WL1273_TX_MONO 0
Quoted 1 line
include/linux/mfd/wl1273-core.h new file +1
-0+#define WL1273_TX_STEREO 1
Quoted 2 lines
Quoted 2 lines
Quoted 2 lines
include/linux/mfd/wl1273-core.h line 151
Quoted 2 lines
include/linux/mfd/wl1273-core.h new file +2
-0+ +#define WL1273_MAX_VOLUME
0xffffQuoted 4 lines
Quoted 4 lines
Quoted 4 lines
include/linux/mfd/wl1273-core.h line 152
Quoted 1 line
include/linux/mfd/wl1273-core.h new file +1
-0+#define WL1273_DEFAULT_VOLUME
0x78b8include/linux/mfd/wl1273-core.h line 154
Quoted 2 lines
include/linux/mfd/wl1273-core.h new file +2
-0+ +/* I2S protocol, left channel first, data width
Quoted 28 lines
Quoted 28 lines
16
Quoted 27 lines
bits */
include/linux/mfd/wl1273-core.h line 155
Quoted 1 line
include/linux/mfd/wl1273-core.h new file +1
-0+#define WL1273_PCM_DEF_MODE 0x00
include/linux/mfd/wl1273-core.h line 158
Quoted 3 lines
include/linux/mfd/wl1273-core.h new file +3
-0+ +/* Rx */ +#define WL1273_AUDIO_ENABLE_I2S (1 << 0)
include/linux/mfd/wl1273-core.h line 159
Quoted 1 line
include/linux/mfd/wl1273-core.h new file +1
-0+#define WL1273_AUDIO_ENABLE_ANALOG (1 << 1)
include/linux/mfd/wl1273-core.h line 162
Quoted 3 lines
include/linux/mfd/wl1273-core.h new file +3
-0+ +/* Tx */ +#define WL1273_AUDIO_IO_SET_ANALOG 0
include/linux/mfd/wl1273-core.h line 163
Quoted 1 line
include/linux/mfd/wl1273-core.h new file +1
-0+#define WL1273_AUDIO_IO_SET_I2S 1
include/linux/mfd/wl1273-core.h line 165
Quoted 2 lines
include/linux/mfd/wl1273-core.h new file +2
-0+ +#define WL1273_POWER_SET_OFF 0
include/linux/mfd/wl1273-core.h line 166
Quoted 1 line
include/linux/mfd/wl1273-core.h new file +1
-0+#define WL1273_POWER_SET_FM (1 << 0)
include/linux/mfd/wl1273-core.h line 167
Quoted 1 line
include/linux/mfd/wl1273-core.h new file +1
-0+#define WL1273_POWER_SET_RDS (1 << 1)
include/linux/mfd/wl1273-core.h line 168
Quoted 1 line
include/linux/mfd/wl1273-core.h new file +1
-0+#define WL1273_POWER_SET_RETENTION (1 << 4)
include/linux/mfd/wl1273-core.h line 170
Quoted 2 lines
include/linux/mfd/wl1273-core.h new file +2
-0+ +#define WL1273_PUPD_SET_OFF 0x00
Quoted 7 lines
Quoted 7 lines
Quoted 7 lines
include/linux/mfd/wl1273-core.h line 171
Quoted 1 line
include/linux/mfd/wl1273-core.h new file +1
-0+#define WL1273_PUPD_SET_ON 0x01
include/linux/mfd/wl1273-core.h line 172
Quoted 1 line
include/linux/mfd/wl1273-core.h new file +1
-0+#define WL1273_PUPD_SET_RETENTION
0x10include/linux/mfd/wl1273-core.h line 175
Quoted 3 lines
include/linux/mfd/wl1273-core.h new file +3
-0+ +/* I2S mode */ +#define WL1273_IS2_WIDTH_32
0x0Quoted 1 line
Quoted 1 line
Quoted 1 line
include/linux/mfd/wl1273-core.h line 176
Quoted 1 line
include/linux/mfd/wl1273-core.h new file +1
-0+#define WL1273_IS2_WIDTH_40
0x1Quoted 1 line
Quoted 1 line
Quoted 1 line
include/linux/mfd/wl1273-core.h line 177
Quoted 1 line
include/linux/mfd/wl1273-core.h new file +1
-0+#define WL1273_IS2_WIDTH_22_23
0x2Quoted 1 line
Quoted 1 line
Quoted 1 line
include/linux/mfd/wl1273-core.h line 178
Quoted 1 line
include/linux/mfd/wl1273-core.h new file +1
-0+#define WL1273_IS2_WIDTH_23_22
0x3Quoted 1 line
Quoted 1 line
Quoted 1 line
include/linux/mfd/wl1273-core.h line 179
Quoted 1 line
include/linux/mfd/wl1273-core.h new file +1
-0+#define WL1273_IS2_WIDTH_48
0x4Quoted 1 line
Quoted 1 line
Quoted 1 line
include/linux/mfd/wl1273-core.h line 180
Quoted 1 line
include/linux/mfd/wl1273-core.h new file +1
-0+#define WL1273_IS2_WIDTH_50
0x5Quoted 1 line
Quoted 1 line
Quoted 1 line
include/linux/mfd/wl1273-core.h line 181
Quoted 1 line
include/linux/mfd/wl1273-core.h new file +1
-0+#define WL1273_IS2_WIDTH_60
0x6Quoted 1 line
Quoted 1 line
Quoted 1 line
include/linux/mfd/wl1273-core.h line 182
Quoted 1 line
include/linux/mfd/wl1273-core.h new file +1
-0+#define WL1273_IS2_WIDTH_64
0x7Quoted 1 line
Quoted 1 line
Quoted 1 line
include/linux/mfd/wl1273-core.h line 183
Quoted 1 line
include/linux/mfd/wl1273-core.h new file +1
-0+#define WL1273_IS2_WIDTH_80
0x8Quoted 1 line
Quoted 1 line
Quoted 1 line
include/linux/mfd/wl1273-core.h line 184
Quoted 1 line
include/linux/mfd/wl1273-core.h new file +1
-0+#define WL1273_IS2_WIDTH_96
0x9Quoted 1 line
Quoted 1 line
Quoted 1 line
include/linux/mfd/wl1273-core.h line 185
Quoted 1 line
include/linux/mfd/wl1273-core.h new file +1
-0+#define WL1273_IS2_WIDTH_128
0xaQuoted 1 line
Quoted 1 line
Quoted 1 line
include/linux/mfd/wl1273-core.h line 186
Quoted 1 line
include/linux/mfd/wl1273-core.h new file +1
-0+#define WL1273_IS2_WIDTH
0xfQuoted 2 lines
Quoted 2 lines
Quoted 2 lines
include/linux/mfd/wl1273-core.h line 188
Quoted 2 lines
include/linux/mfd/wl1273-core.h new file +2
-0+ +#define WL1273_IS2_FORMAT_STD (
0x0Quoted 2 lines
Quoted 2 lines
Quoted 2 lines
<< 4)
Quoted 1 line
include/linux/mfd/wl1273-core.h new file +1
-0+#define WL1273_IS2_FORMAT_LEFT (
0x1Quoted 4 lines
Quoted 4 lines
Quoted 4 lines
<< 4)
include/linux/mfd/wl1273-core.h line 190
Quoted 1 line
include/linux/mfd/wl1273-core.h new file +1
-0+#define WL1273_IS2_FORMAT_RIGHT (
0x2<< 4)Quoted 1 line
include/linux/mfd/wl1273-core.h new file +1
-0+#define WL1273_IS2_FORMAT_USER (
0x3Quoted 3 lines
Quoted 3 lines
Quoted 3 lines
<< 4)
include/linux/mfd/wl1273-core.h line 193
Quoted 2 lines
include/linux/mfd/wl1273-core.h new file +2
-0+ +#define WL1273_IS2_MASTER (
0x0Quoted 2 lines
Quoted 2 lines
Quoted 2 lines
<< 6)
Quoted 1 line
include/linux/mfd/wl1273-core.h new file +1
-0+#define WL1273_IS2_SLAVEW (
0x1Quoted 4 lines
Quoted 4 lines
Quoted 4 lines
<< 6)
include/linux/mfd/wl1273-core.h line 196
Quoted 2 lines
include/linux/mfd/wl1273-core.h new file +2
-0+ +#define
WL1273_IS2_TRI_AFTER_SENDING(
0x0<<Quoted 3 lines
Quoted 3 lines
Quoted 3 lines
7)
include/linux/mfd/wl1273-core.h line 197
Quoted 1 line
include/linux/mfd/wl1273-core.h new file +1
-0+#define
WL1273_IS2_TRI_ALWAYS_ACTIVE(
0x1<<Quoted 3 lines
Quoted 3 lines
Quoted 3 lines
7)
include/linux/mfd/wl1273-core.h line 199
Quoted 2 lines
include/linux/mfd/wl1273-core.h new file +2
-0+ +#define WL1273_IS2_SDOWS_RR (
0x0Quoted 2 lines
Quoted 2 lines
Quoted 2 lines
<< 8)
Quoted 1 line
include/linux/mfd/wl1273-core.h new file +1
-0+#define WL1273_IS2_SDOWS_RF (
0x1Quoted 2 lines
Quoted 2 lines
Quoted 2 lines
<< 8)
Quoted 1 line
include/linux/mfd/wl1273-core.h new file +1
-0+#define WL1273_IS2_SDOWS_FR (
0x2Quoted 2 lines
Quoted 2 lines
Quoted 2 lines
<< 8)
Quoted 1 line
include/linux/mfd/wl1273-core.h new file +1
-0+#define WL1273_IS2_SDOWS_FF (
0x3Quoted 3 lines
Quoted 3 lines
Quoted 3 lines
<< 8)
include/linux/mfd/wl1273-core.h line 204
Quoted 2 lines
include/linux/mfd/wl1273-core.h new file +2
-0+ +#define WL1273_IS2_TRI_OPT (
0x0Quoted 2 lines
Quoted 2 lines
Quoted 2 lines
<< 10)
Quoted 1 line
include/linux/mfd/wl1273-core.h new file +1
-0+#define WL1273_IS2_TRI_ALWAYS (
0x1Quoted 3 lines
Quoted 3 lines
Quoted 3 lines
<< 10)
include/linux/mfd/wl1273-core.h line 207
Quoted 2 lines
include/linux/mfd/wl1273-core.h new file +2
-0+ +#define WL1273_IS2_RATE_48K (
0x0Quoted 2 lines
Quoted 2 lines
Quoted 2 lines
<< 12)
Quoted 1 line
include/linux/mfd/wl1273-core.h new file +1
-0+#define WL1273_IS2_RATE_44_1K (
0x1Quoted 2 lines
Quoted 2 lines
Quoted 2 lines
<< 12)
Quoted 1 line
include/linux/mfd/wl1273-core.h new file +1
-0+#define WL1273_IS2_RATE_32K (
0x2Quoted 2 lines
Quoted 2 lines
Quoted 2 lines
<< 12)
Quoted 1 line
include/linux/mfd/wl1273-core.h new file +1
-0+#define WL1273_IS2_RATE_22_05K (
0x4Quoted 2 lines
Quoted 2 lines
Quoted 2 lines
<< 12)
Quoted 1 line
include/linux/mfd/wl1273-core.h new file +1
-0+#define WL1273_IS2_RATE_16K (
0x5Quoted 2 lines
Quoted 2 lines
Quoted 2 lines
<< 12)
Quoted 1 line
include/linux/mfd/wl1273-core.h new file +1
-0+#define WL1273_IS2_RATE_12K (
0x8Quoted 2 lines
Quoted 2 lines
Quoted 2 lines
<< 12)
Quoted 1 line
include/linux/mfd/wl1273-core.h new file +1
-0+#define WL1273_IS2_RATE_11_025 (
0x9Quoted 2 lines
Quoted 2 lines
Quoted 2 lines
<< 12)
Quoted 1 line
include/linux/mfd/wl1273-core.h new file +1
-0+#define WL1273_IS2_RATE_8K (
0xaQuoted 9 lines
Quoted 9 lines
Quoted 9 lines
<< 12)
include/linux/mfd/wl1273-core.h line 215
Quoted 1 line
include/linux/mfd/wl1273-core.h new file +1
-0+#define WL1273_IS2_RATE (0xf << 12)
include/linux/mfd/wl1273-core.h line 217
Quoted 2 lines
include/linux/mfd/wl1273-core.h new file +2
-0+ +#define WL1273_I2S_DEF_MODE (
WL1273_IS2_WIDTH_32| \include/linux/mfd/wl1273-core.h line 218
Quoted 1 line
include/linux/mfd/wl1273-core.h new file +1
-0+
WL1273_IS2_FORMAT_STD|\
Quoted 6 lines
Quoted 6 lines
Quoted 6 lines
include/linux/mfd/wl1273-core.h line 219
Quoted 1 line
include/linux/mfd/wl1273-core.h new file +1
-0+
WL1273_IS2_MASTER| \include/linux/mfd/wl1273-core.h line 220
Quoted 1 line
include/linux/mfd/wl1273-core.h new file +1
-0+
WL1273_IS2_TRI_AFTER_SENDING|Quoted 14 lines
Quoted 14 lines
Quoted 14 lines
\
include/linux/mfd/wl1273-core.h line 221
Quoted 1 line
include/linux/mfd/wl1273-core.h new file +1
-0+
WL1273_IS2_SDOWS_RR| \include/linux/mfd/wl1273-core.h line 222
Quoted 1 line
include/linux/mfd/wl1273-core.h new file +1
-0+
WL1273_IS2_TRI_OPT| \include/linux/mfd/wl1273-core.h line 223
Quoted 1 line
include/linux/mfd/wl1273-core.h new file +1
-0+
WL1273_IS2_RATE_48K)include/linux/mfd/wl1273-core.h line 226
Quoted 3 lines
include/linux/mfd/wl1273-core.h new file +3
-0+ +/* Private IOCTL */ +#define WL1273_CID_FM_BAND (
V4L2_CID_PRIVATE_BASE+ 2)Quoted 6 lines
Quoted 6 lines
Quoted 6 lines
include/linux/mfd/wl1273-core.h line 231
Quoted 5 lines
include/linux/mfd/wl1273-core.h new file +5
-0+ +#define SCHAR_MIN (-128) +#define SCHAR_MAX 127 + +#define WL1273_FR_EVENT (1
<< 0)
Quoted 2 lines
Quoted 2 lines
Quoted 2 lines
include/linux/mfd/wl1273-core.h line 232
Quoted 1 line
include/linux/mfd/wl1273-core.h new file +1
-0+#define WL1273_BL_EVENT (1
<< 1)
Quoted 4 lines
Quoted 4 lines
Quoted 4 lines
include/linux/mfd/wl1273-core.h line 233
Quoted 1 line
include/linux/mfd/wl1273-core.h new file +1
-0+#define WL1273_RDS_EVENT (1 << 2)
include/linux/mfd/wl1273-core.h line 234
Quoted 1 line
include/linux/mfd/wl1273-core.h new file +1
-0+#define WL1273_BBLK_EVENT (1 << 3)
Quoted 8 lines
Quoted 8 lines
Quoted 8 lines
include/linux/mfd/wl1273-core.h line 235
Quoted 1 line
include/linux/mfd/wl1273-core.h new file +1
-0+#define WL1273_LSYNC_EVENT (1 << 4)
include/linux/mfd/wl1273-core.h line 236
Quoted 1 line
include/linux/mfd/wl1273-core.h new file +1
-0+#define WL1273_LEV_EVENT (1 << 5)
include/linux/mfd/wl1273-core.h line 237
Quoted 1 line
include/linux/mfd/wl1273-core.h new file +1
-0+#define WL1273_IFFR_EVENT (1 << 6)
include/linux/mfd/wl1273-core.h line 238
Quoted 1 line
include/linux/mfd/wl1273-core.h new file +1
-0+#define WL1273_PI_EVENT (1
<< 7)
Quoted 2 lines
Quoted 2 lines
Quoted 2 lines
include/linux/mfd/wl1273-core.h line 239
Quoted 1 line
include/linux/mfd/wl1273-core.h new file +1
-0+#define WL1273_PD_EVENT (1
<< 8)
Quoted 18 lines
Quoted 18 lines
Quoted 18 lines
include/linux/mfd/wl1273-core.h line 240
Quoted 1 line
include/linux/mfd/wl1273-core.h new file +1
-0+#define WL1273_STIC_EVENT (1 << 9)
include/linux/mfd/wl1273-core.h line 241
Quoted 1 line
include/linux/mfd/wl1273-core.h new file +1
-0+#define WL1273_MAL_EVENT (1 << 10)
include/linux/mfd/wl1273-core.h line 242
Quoted 1 line
include/linux/mfd/wl1273-core.h new file +1
-0+#define WL1273_POW_ENB_EVENT (1 << 11)
include/linux/mfd/wl1273-core.h line 243
Quoted 1 line
include/linux/mfd/wl1273-core.h new file +1
-0+#define WL1273_SCAN_OVER_EVENT (1 << 12)
include/linux/mfd/wl1273-core.h line 244
Quoted 1 line
include/linux/mfd/wl1273-core.h new file +1
-0+#define WL1273_ERROR_EVENT (1 << 13)
include/linux/mfd/wl1273-core.h line 246
Quoted 2 lines
include/linux/mfd/wl1273-core.h new file +2
-0+ +#define TUNER_MODE_STOP_SEARCH 0
include/linux/mfd/wl1273-core.h line 247
Quoted 1 line
include/linux/mfd/wl1273-core.h new file +1
-0+#define TUNER_MODE_PRESET 1
include/linux/mfd/wl1273-core.h line 248
Quoted 1 line
include/linux/mfd/wl1273-core.h new file +1
-0+#define TUNER_MODE_AUTO_SEEK 2
Quoted 1 line
include/linux/mfd/wl1273-core.h new file +1
-0+#define TUNER_MODE_AF Quoted 8 lines
Quoted 8 lines
Quoted 8 lines
3
include/linux/mfd/wl1273-core.h line 250
Quoted 1 line
include/linux/mfd/wl1273-core.h new file +1
-0+#define TUNER_MODE_AUTO_SEEK_PI 4
include/linux/mfd/wl1273-core.h line 251
Quoted 1 line
include/linux/mfd/wl1273-core.h new file +1
-0+#define TUNER_MODE_AUTO_SEEK_BULK 5
include/linux/mfd/wl1273-core.h line 254
Quoted 3 lines
include/linux/mfd/wl1273-core.h new file +3
-0+ +/* Allowed modes */ +#define WL1273_RX_ALLOWED
0x01Quoted 1 line
Quoted 1 line
Quoted 1 line
include/linux/mfd/wl1273-core.h line 255
Quoted 1 line
include/linux/mfd/wl1273-core.h new file +1
-0+#define WL1273_TX_ALLOWED
0x02Quoted 11 lines
Quoted 11 lines
Quoted 11 lines
include/linux/mfd/wl1273-core.h line 256
Quoted 1 line
include/linux/mfd/wl1273-core.h new file +1
-0+#define WL1273_RXTX_ALLOWED (
WL1273_RX_ALLOWED|WL1273_TX_ALLOWED)include/linux/mfd/wl1273-core.h line 265
Quoted 9 lines
include/linux/mfd/wl1273-core.h new file +9
-0+ +struct band_info { + u32 bottom_frequency; + u32 top_frequency; + u8 band; +}; + +struct wl1273_fm_platform_data { + int (*request_resources)(struct
Quoted 2 lines
Quoted 2 lines
Quoted 2 lines
i2c_client*client);Quoted 1 line
include/linux/mfd/wl1273-core.h new file +1
-0+ void (*free_resources)(void);
Quoted 8 lines
Quoted 8 lines
Quoted 8 lines
include/linux/mfd/wl1273-core.h line 274
Quoted 8 lines
include/linux/mfd/wl1273-core.h new file +8
-0+ void (*enable) (void); + void (*disable) (void); + + u8 modes; + unsigned int children; +}; + +#define WL1273_FM_CORE_CELLS 2
Quoted 3 lines
Quoted 3 lines
Quoted 3 lines
include/linux/mfd/wl1273-core.h line 277
Quoted 3 lines
include/linux/mfd/wl1273-core.h new file +3
-0+ +/* Allowed modes */ +#define WL1273_RX_ALLOWED
0x01Quoted 1 line
Quoted 1 line
Quoted 1 line
include/linux/mfd/wl1273-core.h line 278
Quoted 1 line
include/linux/mfd/wl1273-core.h new file +1
-0+#define WL1273_TX_ALLOWED
0x02Quoted 7 lines
Quoted 7 lines
Quoted 7 lines
include/linux/mfd/wl1273-core.h line 279
Quoted 1 line
include/linux/mfd/wl1273-core.h new file +1
-0+#define WL1273_RXTX_ALLOWED (
WL1273_RX_ALLOWED|WL1273_TX_ALLOWED)include/linux/mfd/wl1273-core.h line 282
Quoted 3 lines
include/linux/mfd/wl1273-core.h new file +3
-0+ +struct wl1273_core { + struct mfd_cellcells[WL1273_FM_CORE_CELLS];
Quoted 1 line
include/linux/mfd/wl1273-core.h new file +1
-0+ struct i2c_client
*i2c_dev;Quoted 2 lines
Quoted 2 lines
Quoted 2 lines
include/linux/mfd/wl1273-core.h line 285
Quoted 2 lines
include/linux/mfd/wl1273-core.h new file +2
-0+ + u8
allowed_modes;Quoted 2 lines
Quoted 2 lines
Quoted 2 lines
include/linux/mfd/wl1273-core.h line 287
Quoted 2 lines
include/linux/mfd/wl1273-core.h new file +2
-0+ unsigned int mode; + unsigned intpreemphasis;
Quoted 1 line
Quoted 1 line
Quoted 1 line
include/linux/mfd/wl1273-core.h line 288
Quoted 1 line
include/linux/mfd/wl1273-core.h new file +1
-0+ unsigned int
audio_mode;Quoted 3 lines
Quoted 3 lines
Quoted 3 lines
include/linux/mfd/wl1273-core.h line 291
Quoted 3 lines
include/linux/mfd/wl1273-core.h new file +3
-0+ unsigned int spacing; + unsigned int tx_power; + unsigned int
rx_frequency;Quoted 1 line
Quoted 1 line
Quoted 1 line
include/linux/mfd/wl1273-core.h line 292
Quoted 1 line
include/linux/mfd/wl1273-core.h new file +1
-0+ unsigned int
tx_frequency;Quoted 3 lines
Quoted 3 lines
Quoted 3 lines
include/linux/mfd/wl1273-core.h line 295
Quoted 3 lines
include/linux/mfd/wl1273-core.h new file +3
-0+ unsigned int band; + unsigned int i2s_mode; + unsigned int
channel_number;Quoted 1 line
Quoted 1 line
Quoted 1 line
include/linux/mfd/wl1273-core.h line 296
Quoted 1 line
include/linux/mfd/wl1273-core.h new file +1
-0+ unsigned int
number_of_bands;Quoted 3 lines
Quoted 3 lines
Quoted 3 lines
include/linux/mfd/wl1273-core.h line 299
Quoted 3 lines
include/linux/mfd/wl1273-core.h new file +3
-0+ unsigned int volume; + + const struct band_info*bands;
Quoted 4 lines
Quoted 4 lines
Quoted 4 lines
include/linux/mfd/wl1273-core.h line 303
Quoted 4 lines
include/linux/mfd/wl1273-core.h new file +4
-0+ + /* RDS */ + bool rds_on; + struct delayed_workwork;
Quoted 2 lines
Quoted 2 lines
Quoted 2 lines
include/linux/mfd/wl1273-core.h line 305
Quoted 2 lines
include/linux/mfd/wl1273-core.h new file +2
-0+ + wait_queue_head_t
read_queue;Quoted 1 line
Quoted 1 line
Quoted 1 line
include/linux/mfd/wl1273-core.h line 306
Quoted 1 line
include/linux/mfd/wl1273-core.h new file +1
-0+ struct mutex lock; /*for
Quoted 9 lines
Quoted 9 lines
Quoted 9 lines
serializing fm radio operations */
include/linux/mfd/wl1273-core.h line 314
Quoted 8 lines
include/linux/mfd/wl1273-core.h new file +8
-0+ struct completion busy; + + unsigned char *buffer; + unsigned int buf_size; + unsigned int rd_index; + unsigned int wr_index; + + /* Selected interrupts*/
Quoted 5 lines
Quoted 5 lines
Quoted 5 lines
include/linux/mfd/wl1273-core.h line 319
Quoted 5 lines
include/linux/mfd/wl1273-core.h new file +5
-0+ u16 irq_flags; + u16 irq_received; +}; + +int wl1273_fm_write_cmd(struct
wl1273_coreQuoted 3 lines
Quoted 3 lines
*core, u8
Quoted 2 lines
cmd, u16 param);
Quoted 1 line
include/linux/mfd/wl1273-core.h new file +1
-0+int wl1273_fm_write_data(struct
wl1273_coreQuoted 3 lines
Quoted 3 lines
*core, u8
Quoted 2 lines
*data, u16 len);
Quoted 1 line
include/linux/mfd/wl1273-core.h new file +1
-0+int wl1273_fm_read_reg(struct
wl1273_core*core,Quoted 4 lines
Quoted 4 lines
u8
Quoted 3 lines
reg, u16 *value);
include/linux/mfd/wl1273-core.h line 323
Quoted 2 lines
include/linux/mfd/wl1273-core.h new file +2
-0+ +int wl1273_fm_set_audio(struct
wl1273_coreQuoted 3 lines
Quoted 3 lines
*core,
Quoted 2 lines
unsigned int mode);
Quoted 1 line
include/linux/mfd/wl1273-core.h new file +1
-0+int wl1273_fm_set_volume(struct
wl1273_coreQuoted 4 lines
Quoted 4 lines
*core,
Quoted 3 lines
unsigned int volume);
include/linux/mfd/wl1273-core.h line 326
Quoted 2 lines
include/linux/mfd/wl1273-core.h new file +2
-0+ +#endif /* ifndef
RADIO_WL1273_H*/Quoted 3 lines
Quoted 3 lines
Quoted 3 lines
--
To unsubscribe from this list: send theline
Quoted 10 lines
Quoted 8 lines
"unsubscribe
Quoted 4 lines
linux-media" in
the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html
Hi.
Quoted 8 lines · ext Pavan Savoy
Quoted 7 lines
I'm sorry for not answering to you earlier. But I don't have my own
public repository. But to create the whole thing is extremely simple:
just take the current mainline tree and apply my patches on top of it...
Quoted 7 lines
Yep, that I can do, the reason I asked for was, we've pushed a few patches of our own for WL1283 over shared transport/UART (Not HCI-VS, but I2C like commands, packed in a CH8 protocol format). The FM register set in both chip are a match, with only transport being the difference (i2c vs. UART).
Also we have the Tx version of driver ready too, it just needs a bit of cleanup and more conformance to already existing V4L2 TX Class..So I was wondering, although there is no problem with WL1273 with I2C and WL1283 with UART being there on the kernel (whenever that happens), but it would be way more cooler if the transport was say abstracted out ..
what do you say? just an idea...
I think it's a good idea. And the WL1273 ship can also used with a UART connection, we just chose I2C when the driver development started etc...
B.R.
Matti A.
Quoted 15 lines · On Thursday, August 26, 2010 09:39:45 Matti J. Aaltonen wrote:
Hi.
Quoted 12 lines · ext Pavan Savoy
Quoted 7 lines
I'm sorry for not answering to you earlier. But I don't have my own
public repository. But to create the whole thing is extremely simple:
just take the current mainline tree and apply my patches on top of it...Yep, that I can do, the reason I asked for was, we've pushed a few patches of our own for WL1283 over shared transport/UART (Not HCI-VS, but I2C like commands, packed in a CH8 protocol format). The FM register set in both chip are a match, with only transport being the difference (i2c vs. UART).
Also we have the Tx version of driver ready too, it just needs a bit of cleanup and more conformance to already existing V4L2 TX Class..
Quoted 6 lines
Quoted 3 lines
So I was wondering, although there is no problem with WL1273 with I2C and WL1283 with UART being there on the kernel (whenever that happens), but it would be way more cooler if the transport was say abstracted out ..
what do you say? just an idea...
I think it's a good idea. And the WL1273 ship can also used with a UART connection, we just chose I2C when the driver development started etc...
Making a completely bus-independent driver is actually possible. It would require that the driver uses the subdev API (include/media/v4l2-subdev.h). Any register read or writes can be done by calling the v4l2_device notify() callback and the bridge/host driver can then translate the callback to either i2c or uart read or writes.
Both v4l2_device and v4l2_subdev structs are completely abstract structs (i.e. they do not rely on any particular bus), so it should be possible to implement this.
I had this scenario in the back of my mind when I designed these APIs, but this would be the first driver where this would actually apply to.
Regards,
Hans
Signature · 1 line
Hans Verkuil - video4linux developer - sponsored by TANDBERG, part of Cisco
Hello.
Quoted 29 lines · ext Hans Verkuil
Quoted 15 lines · On Thursday, August 26, 2010 09:39:45 Matti J. Aaltonen wrote:
Hi.
Quoted 12 lines · ext Pavan Savoy
Quoted 7 lines
I'm sorry for not answering to you earlier. But I don't have my own
public repository. But to create the whole thing is extremely simple:
just take the current mainline tree and apply my patches on top of it...Yep, that I can do, the reason I asked for was, we've pushed a few patches of our own for WL1283 over shared transport/UART (Not HCI-VS, but I2C like commands, packed in a CH8 protocol format). The FM register set in both chip are a match, with only transport being the difference (i2c vs. UART).
Also we have the Tx version of driver ready too, it just needs a bit of cleanup and more conformance to already existing V4L2 TX Class..Quoted 6 lines
Quoted 3 lines
So I was wondering, although there is no problem with WL1273 with I2C and WL1283 with UART being there on the kernel (whenever that happens), but it would be way more cooler if the transport was say abstracted out ..
what do you say? just an idea...
I think it's a good idea. And the WL1273 ship can also used with a UART connection, we just chose I2C when the driver development started etc...
Making a completely bus-independent driver is actually possible. It would require that the driver uses the subdev API (
include/media/v4l2-subdev.h). Any register read or writes can be done by calling thev4l2_devicenotify()callback and the bridge/host driver can then translate the callback to either i2c or uart read or writes.
Quoted 7 lines
Both
v4l2_deviceandv4l2_subdevstructs are completely abstract structs (i.e. they do not rely on any particular bus), so it should be possible to implement this.I had this scenario in the back of my mind when I designed these APIs, but this would be the first driver where this would actually apply to.
That sounds interesting. I think that after the driver gets accepted in its current form we can start to work according to the above scenario...
Cheers,
Matti
Matti/Hans,
Quoted 66 lines · Matti J. Aaltonen
From: Matti J. Aaltonen <[email protected]>
Subject: Re: [PATCH v4 2/5] MFD: WL1273 FM Radio: MFD driver for the FM radio.
To: "ext Hans Verkuil" <[email protected]>
Cc: "ext Pavan Savoy" <[email protected]>, "Mauro Carvalho Chehab" <[email protected]>, "[email protected]" <[email protected]>, "Valentin Eduardo (Nokia-MS/Helsinki)" <[email protected]>, [email protected]
Date: Monday, 30 August, 2010, 5:14 PM
Hello.Quoted 1 line · ext Hans Verkuil
On Thursday, August 26, 2010 09:39:45 Matti J.
Quoted 3 lines · Aaltonen
Quoted 3 lines
Hi.
On Wed, 2010-08-25 at 23:20 +0200, ext Pavan
Quoted 2 lines · Savoy
Quoted 2 lines
Quoted 2 lines
Quoted 2 lines
I'm sorry for not answering to you
earlier. But I don't
Quoted 2 lines
Quoted 2 lines
Quoted 2 lines
Quoted 2 lines
have my own
public repository. But to create thewhole thing is
Quoted 2 lines
Quoted 2 lines
Quoted 2 lines
Quoted 2 lines
extremely simple:
just take the current mainline tree andapply my patches on
Quoted 3 lines
Quoted 3 lines
Quoted 3 lines
Quoted 1 line
top of it...
Yep, that I can do, the reason I asked for
was, we've pushed a few patches of our own for WL1283 over shared transport/UART (Not HCI-VS, but I2C like commands, packed in a CH8 protocol format).
Quoted 1 line
Quoted 1 line
Quoted 1 line
The FM register set in both chip are a
match, with only transport being the difference (i2c vs. UART).
Quoted 1 line
Quoted 1 line
Quoted 1 line
Also we have the Tx version of driver ready
too, it just needs a bit of cleanup and more conformance to already existing V4L2 TX Class..
Quoted 2 lines
Quoted 2 lines
Quoted 2 lines
So I was wondering, although there is no
problem with WL1273 with I2C and WL1283 with UART being there on the kernel (whenever that happens), but it would be way more cooler if the transport was say abstracted out ..
Quoted 4 lines
Quoted 4 lines
Quoted 2 lines
what do you say? just an idea...
I think it's a good idea. And the WL1273 ship can
also used with a UART
Quoted 1 line
Quoted 1 line
connection, we just chose I2C when the driver
development started etc...
Quoted 2 lines
Making a completely bus-independent driver is actually
possible. It would require
Quoted 1 line
that the driver uses the subdev API
(
include/media/v4l2-subdev.h). Any registerQuoted 1 line
read or writes can be done by calling the
v4l2_device
notify()callback and theQuoted 1 line
bridge/host driver can then translate the callback to
either i2c or uart read
Quoted 3 lines
or writes.
Both
v4l2_deviceandv4l2_subdevstructs arecompletely abstract structs (i.e.
Quoted 1 line
they do not rely on any particular bus), so it should
be possible to implement
Quoted 3 lines
this.
I had this scenario in the back of my mind when I
designed these APIs, but this
Quoted 8 lines
Quoted 1 line
would be the first driver where this would actually
apply to.
Quoted 1 line
That sounds interesting. I think that after the driver gets accepted in
its current form we can start to work according to the above scenario...
Please have a look at the patches at
http://www.mail-archive.com/[email protected]/msg21477.html
which are for Wl128x/UART transport.
also here's a tree where the other set of patches would come from,
http://git.omapzoom.org/?p=kernel/omap.git;a=tree;f=drivers/misc/ti-st;h=028ff4a739d7b59b94d0c613b5ef510ff338b65d;hb=refs/heads/p-android-omap-2.6.32
We are trying to make the drivers listed above conform to other V4L2 drivers and then post patches.
Please comment ...
Thanks in advance...
Quoted 9 lines
Cheers,
Matti