spi: davinci: Set prescale value based on register value
authorFranklin S Cooper Jr <fcooper@ti.com>
Wed, 22 Jul 2015 12:32:21 +0000 (07:32 -0500)
committerMark Brown <broonie@kernel.org>
Fri, 24 Jul 2015 16:35:48 +0000 (17:35 +0100)
commitbba732d86694f7217a41e83a2c1deb42ed9aa7fd
tree61e30c00d99ae293b546fc7226ea4c2fd1d6cc78
parentbc0195aad0daa2ad5b0d76cce22b167bc3435590
spi: davinci: Set prescale value based on register value

Within davinci_spi_get_prescale() the prescale has two meanings. First one
being the calculated prescale value and then at the end translates it to the
prescale value that will be written to the SPI register.

At first glance this can be confusing especially when comparing the minimum
prescale value against what is seen in the TRM.

To simplify things make it clear that the calculated prescale value will always
be based on the value that will be written into the SPI register.

Signed-off-by: Franklin S Cooper Jr <fcooper@ti.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
drivers/spi/spi-davinci.c