Re: [PATCH 1/6] watchdog: davinci: change driver to use WDT core

2013-11-25 Thread ivan.khoronzhuk
On 11/25/2013 01:56 PM, Sekhar Nori wrote: On Monday 18 November 2013 10:48 PM, Ivan Khoronzhuk wrote: @@ -211,29 +129,34 @@ static int davinci_wdt_probe(struct platform_device *pdev) clk_prepare_enable(wdt_clk); - if (heartbeat < 1 || heartbeat > MAX_HEARTBEAT) - h

Re: [PATCH 1/6] watchdog: davinci: change driver to use WDT core

2013-11-25 Thread Sekhar Nori
On Monday 18 November 2013 10:48 PM, Ivan Khoronzhuk wrote: > @@ -211,29 +129,34 @@ static int davinci_wdt_probe(struct platform_device > *pdev) > > clk_prepare_enable(wdt_clk); > > - if (heartbeat < 1 || heartbeat > MAX_HEARTBEAT) > - heartbeat = DEFAULT_HEARTBEAT; > +

Re: [PATCH 1/6] watchdog: davinci: change driver to use WDT core

2013-11-19 Thread Grygorii Strashko
On 11/19/2013 07:12 AM, Guenter Roeck wrote: On 11/18/2013 09:18 AM, Ivan Khoronzhuk wrote: To reduce code duplicate and increase code readability use WDT core code to handle WDT interface. Remove io_lock as the WDT core uses mutex to lock each wdt device. Remove wdt_state as the WDT core track

Re: [PATCH 1/6] watchdog: davinci: change driver to use WDT core

2013-11-18 Thread Guenter Roeck
On 11/18/2013 09:18 AM, Ivan Khoronzhuk wrote: To reduce code duplicate and increase code readability use WDT core code to handle WDT interface. Remove io_lock as the WDT core uses mutex to lock each wdt device. Remove wdt_state as the WDT core track state with its own variable. The watchdog_in

[PATCH 1/6] watchdog: davinci: change driver to use WDT core

2013-11-18 Thread Ivan Khoronzhuk
To reduce code duplicate and increase code readability use WDT core code to handle WDT interface. Remove io_lock as the WDT core uses mutex to lock each wdt device. Remove wdt_state as the WDT core track state with its own variable. The watchdog_init_timeout() can read timeout value from timeout-