Date:2012-08-25 19:52:49 (11 years 3 months ago)
Author:Marcos Paulo de Souza
Commit:cc31bcc0f9a139c0d51e7ec33e426c819fe3671b
Message:media: radio: RDA5807: Sleep 0.5s after chip enable

As suggested by the programming guide, this 0.5s sleep ensures
that the chip is ready for the tuning process.

Suggested-by: Maarten ter Huurne <maarten@treewalker.org>
Signed-off-by: Marcos Paulo de Souza <marcos.souza.org@gmail.com>
Files: drivers/media/radio/radio-rda5807.c (2 diffs)

Change Details

drivers/media/radio/radio-rda5807.c
3333
3434#include <asm/byteorder.h>
3535#include <linux/bitops.h>
36#include <linux/delay.h>
3637#include <linux/module.h>
3738#include <linux/i2c.h>
3839#include <linux/kernel.h>
...... 
177178    if (err < 0)
178179        return err;
179180    /* Tuning is lost when the chip is disabled, so re-tune when enabled. */
180    if (enabled)
181        return rda5807_update_reg(radio, RDA5807_REG_CHAN,
181    if (enabled) {
182        err = rda5807_update_reg(radio, RDA5807_REG_CHAN,
182183                      RDA5807_MASK_CHAN_TUNE,
183184                      RDA5807_MASK_CHAN_TUNE);
184    else
185        return 0;
185
186        /* following the rda5807 programming guide, we
187         * need to wait for 0.5 seconds before tune */
188        if (!err)
189            msleep(500);
190    }
191
192    return err;
186193}
187194
188195static int rda5807_set_mute(struct rda5807_driver *radio, int muted)

Archive Download the corresponding diff file



interactive