ALSA: oxygen: fix SPI clocks slower than 6.25 MHz
Fix wrong register bits for SPI clock cycle times longer than 160 ns, and adjust the polling loop timeout for these speeds. Signed-off-by: Clemens Ladisch <clemens@ladisch.de> Signed-off-by: Takashi Iwai <tiwai@suse.de>
This commit is contained in:
@@ -197,11 +197,11 @@ void oxygen_write_spi(struct oxygen *chip, u8 control, unsigned int data)
|
||||
{
|
||||
unsigned int count;
|
||||
|
||||
/* should not need more than 7.68 us (24 * 320 ns) */
|
||||
/* should not need more than 30.72 us (24 * 1.28 us) */
|
||||
count = 10;
|
||||
while ((oxygen_read8(chip, OXYGEN_SPI_CONTROL) & OXYGEN_SPI_BUSY)
|
||||
&& count > 0) {
|
||||
udelay(1);
|
||||
udelay(4);
|
||||
--count;
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user