summaryrefslogtreecommitdiff
path: root/drivers/misc
diff options
context:
space:
mode:
authorScott Peterson <speterson@nvidia.com>2013-02-08 16:17:25 -0800
committerMandar Padmawar <mpadmawar@nvidia.com>2013-02-19 08:39:22 -0800
commit9bd34a41737e49321db885b48ee299976e1cb09f (patch)
tree8ad883c931e67ad148fc4321db9ca8953aaecfea /drivers/misc
parent8713f8e1b46c046487fb65bb1fc1c7b645d2f08f (diff)
arm:misc: Change tfa9887 driver debug spew
Changed the driver for the tfa8997 device so that it only prints a message for the SetParam function if there is an error and audio is playing. If audio is not playing access to the device is not possible so an error is expected. Bug 1233775 Change-Id: I5e3b4f7958104d28c74dac730ea936efed567325 Signed-off-by: Scott Peterson <speterson@nvidia.com> Reviewed-on: http://git-master/r/198963 Reviewed-by: Automatic_Commit_Validation_User Reviewed-by: Niranjan Wartikar <nwartikar@nvidia.com> Reviewed-by: Shaoming Feng <shaomingf@nvidia.com>
Diffstat (limited to 'drivers/misc')
-rw-r--r--drivers/misc/tfa9887.c15
1 files changed, 9 insertions, 6 deletions
diff --git a/drivers/misc/tfa9887.c b/drivers/misc/tfa9887.c
index 41709cd3cbac..611414070f0d 100644
--- a/drivers/misc/tfa9887.c
+++ b/drivers/misc/tfa9887.c
@@ -56,6 +56,8 @@ static int calibration;
static int recalibration;
+static int powerDown = 1;
+
unsigned int volume_step[5] = {0, 2, 4, 6, 12};
/* begin binary data: */
@@ -502,10 +504,10 @@ int DspSetParam(struct tfa9887_priv *tfa9887, struct tfa9887_priv *tfa9887_byte,
usleep_range(100, 200);
} while ((error == Tfa9887_Error_Ok) && ((cf_status & 0x0100) == 0) && (tries < 100)); /* don't wait forever, DSP is pretty quick to respond (< 1ms) */
- if (tries >= 100) {
+ if (tries >= 100 && !powerDown) {
/* something wrong with communication with DSP */
pr_info("Setparam failed\n");
- error = -1;
+ error = -1;
}
}
cf_ctrl = 0x0002;
@@ -1145,6 +1147,8 @@ int Tfa9887_Powerdown(int powerdown)
{
int error = 0;
+ powerDown = powerdown;
+
if (tfa9887R) {
mutex_lock(&tfa9887R->lock);
if (tfa9887R->deviceInit)
@@ -1192,7 +1196,6 @@ int Powerdown(struct tfa9887_priv *tfa9887, struct tfa9887_priv *tfa9887_byte, i
SetEq(tfa9887,tfa9887_byte);
}
-
return error;
}
@@ -1441,19 +1444,19 @@ static __devinit int tfa9887R_i2c_probe(struct i2c_client *i2c,
tfa9887_kobj = kobject_create_and_add("tfa9887", kernel_kobj);
ret = sysfs_create_file(tfa9887_kobj, &tfa9887_config);
- printk("tfa9887_add_sysfs ret=%d",ret);
+ printk("tfa9887_add_sysfs ret=%d\n", ret);
if (ret != 0) {
dev_err(&i2c->dev, "Failed to add sysfs: %d\n", ret);
goto err;
}
ret = sysfs_create_file(tfa9887_kobj, &tfa9887_cal);
- printk("tfa9887_add_sysfs ret=%d",ret);
+ printk("tfa9887_add_sysfs ret=%d\n", ret);
if (ret != 0) {
dev_err(&i2c->dev, "Failed to add sysfs: %d\n", ret);
goto err;
}
ret = sysfs_create_file(tfa9887_kobj, &tfa9887_vol);
- printk("tfa9887_add_sysfs ret=%d",ret);
+ printk("tfa9887_add_sysfs ret=%d\n", ret);
if (ret != 0) {
dev_err(&i2c->dev, "Failed to add sysfs: %d\n", ret);
goto err;