Thread (138 messages) 138 messages, 11 authors, 2013-08-28

Re: [PATCH v3 11/31] net: can: mscan: improve clock API use

From: Marc Kleine-Budde <mkl@pengutronix.de>
Date: 2013-07-22 12:31:21
Also in: linux-arm-kernel, linux-devicetree

On 07/22/2013 02:14 PM, Gerhard Sittig wrote:
the .get_clock() callback is run from probe() and might allocate
resources, introduce a .put_clock() callback that is run from remove()
to undo any allocation activities
looks good
use devm_get_clk() upon lookup (for SYS and REF) to have the clocks put
upon driver unload
fine
assume that resources get prepared but not necessarily enabled in the
setup phase, make the open() and close() callbacks of the CAN network
device enable and disable a previously acquired and prepared clock
I think you should call prepare_enable and disable_unprepare in the
open/close functions.

Marc

-- 
Pengutronix e.K.                  | Marc Kleine-Budde           |
Industrial Linux Solutions        | Phone: +49-231-2826-924     |
Vertretung West/Dortmund          | Fax:   +49-5121-206917-5555 |
Amtsgericht Hildesheim, HRA 2686  | http://www.pengutronix.de   |

Attachments

Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help