aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/mfd/mc13xxx-spi.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/mfd/mc13xxx-spi.c')
-rw-r--r--drivers/mfd/mc13xxx-spi.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/drivers/mfd/mc13xxx-spi.c b/drivers/mfd/mc13xxx-spi.c
index 77189daadf1e..5f14ef6693c2 100644
--- a/drivers/mfd/mc13xxx-spi.c
+++ b/drivers/mfd/mc13xxx-spi.c
@@ -94,10 +94,15 @@ static int mc13xxx_spi_write(void *context, const void *data, size_t count)
94{ 94{
95 struct device *dev = context; 95 struct device *dev = context;
96 struct spi_device *spi = to_spi_device(dev); 96 struct spi_device *spi = to_spi_device(dev);
97 const char *reg = data;
97 98
98 if (count != 4) 99 if (count != 4)
99 return -ENOTSUPP; 100 return -ENOTSUPP;
100 101
102 /* include errata fix for spi audio problems */
103 if (*reg == MC13783_AUDIO_CODEC || *reg == MC13783_AUDIO_DAC)
104 spi_write(spi, data, count);
105
101 return spi_write(spi, data, count); 106 return spi_write(spi, data, count);
102} 107}
103 108