aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/mfd
diff options
context:
space:
mode:
authorPatil, Rachna <rachna@ti.com>2013-07-20 12:27:35 -0400
committerSamuel Ortiz <sameo@linux.intel.com>2013-07-30 20:04:34 -0400
commitefe3126afce32e3100af3029a80701d47e1b6999 (patch)
tree7c3d2528a2bdb158fd6720637239c7c7716702cf /drivers/mfd
parentebe38f80b290fe6d86404d0b21eae479d4aeb21f (diff)
MFD: ti_tscadc: ADC Clock check not required
ADC is ideally expected to work at a frequency of 3MHz. The present code had a check, which returned error if the frequency went below the threshold value. But since AM335x supports various working frequencies, this check is not required. Now the code just uses the internal ADC clock divider to set the ADC frequency w.r.t the sys clock. Signed-off-by: Patil, Rachna <rachna@ti.com> Signed-off-by: Zubair Lutfullah <zubair.lutfullah@gmail.com> Signed-off-by: Lee Jones <lee.jones@linaro.org> Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
Diffstat (limited to 'drivers/mfd')
-rw-r--r--drivers/mfd/ti_am335x_tscadc.c6
1 files changed, 1 insertions, 5 deletions
diff --git a/drivers/mfd/ti_am335x_tscadc.c b/drivers/mfd/ti_am335x_tscadc.c
index b003a16ba227..e0852ecbc767 100644
--- a/drivers/mfd/ti_am335x_tscadc.c
+++ b/drivers/mfd/ti_am335x_tscadc.c
@@ -197,11 +197,7 @@ static int ti_tscadc_probe(struct platform_device *pdev)
197 clock_rate = clk_get_rate(clk); 197 clock_rate = clk_get_rate(clk);
198 clk_put(clk); 198 clk_put(clk);
199 clk_value = clock_rate / ADC_CLK; 199 clk_value = clock_rate / ADC_CLK;
200 if (clk_value < MAX_CLK_DIV) { 200
201 dev_err(&pdev->dev, "clock input less than min clock requirement\n");
202 err = -EINVAL;
203 goto err_disable_clk;
204 }
205 /* TSCADC_CLKDIV needs to be configured to the value minus 1 */ 201 /* TSCADC_CLKDIV needs to be configured to the value minus 1 */
206 clk_value = clk_value - 1; 202 clk_value = clk_value - 1;
207 tscadc_writel(tscadc, REG_CLKDIV, clk_value); 203 tscadc_writel(tscadc, REG_CLKDIV, clk_value);