@@ -70,8 +70,7 @@ struct clk_init_data;
7070 * clk_foo's clk_ops
7171 *
7272 * @init: pointer to struct clk_init_data that contains the init data shared
73- * with the common clock framework. This pointer will be set to NULL once
74- * a clk_register() variant is called on this clk_hw pointer.
73+ * with the common clock framework.
7574 */
7675struct clk_hw {
7776 struct clk * clk ;
@@ -83,20 +82,6 @@ struct clk_hw {
8382 * be provided by the clock implementation, and will be called by drivers
8483 * through the clk_* api.
8584 *
86- * @prepare: Prepare the clock for enabling. This must not return until
87- * the clock is fully prepared, and it's safe to call clk_enable.
88- * This callback is intended to allow clock implementations to
89- * do any initialisation that may sleep. Called with
90- * prepare_lock held.
91- *
92- * @unprepare: Release the clock from its prepared state. This will typically
93- * undo any work done in the @prepare callback. Called with
94- * prepare_lock held.
95- *
96- * @is_prepared: Queries the hardware to determine if the clock is prepared.
97- * This function is allowed to sleep. Optional, if this op is not
98- * set then the prepare count will be used.
99- *
10085 * @enable: Enable the clock atomically. This must not return until the
10186 * clock is generating a valid clock signal, usable by consumer
10287 * devices. Called with enable_lock held. This function must not
@@ -109,11 +94,6 @@ struct clk_hw {
10994 * This function must not sleep. Optional, if this op is not
11095 * set then the enable count will be used.
11196 *
112- * @disable_unused: Disable the clock atomically. Only called from
113- * clk_disable_unused for gate clocks with special needs.
114- * Called with enable_lock held. This function must not
115- * sleep.
116- *
11797 * @recalc_rate: Recalculate the rate of this clock, by querying hardware. The
11898 * parent rate is an input parameter. It is up to the caller to
11999 * ensure that the prepare_mutex is held across this call. If the
@@ -165,9 +145,8 @@ struct clk_hw {
165145struct clk_ops {
166146 uint8_t (* get_parent )(const struct clk * clk );
167147 int (* set_parent )(struct clk * clk , uint8_t index );
168- unsigned long (* recalc_rate )(const struct clk * clk ,
169- unsigned long parent_rate );
170- int (* set_rate )(const struct clk * clk , uint32_t rate , uint32_t parent_rate );
148+ uint64_t (* recalc_rate )(const struct clk * clk , uint64_t parent_rate );
149+ int (* set_rate )(const struct clk * clk , uint64_t rate , uint64_t parent_rate );
171150 void (* init )(struct clk * clk );
172151 int (* enable )(struct clk * clk );
173152 int (* disable )(struct clk * clk );
@@ -334,9 +313,6 @@ struct clk_fixed_factor_data {
334313 * .get_parent clk_op.
335314 * CLK_MUX_ROUND_CLOSEST - Use the parent rate that is closest to the desired
336315 * frequency.
337- * CLK_MUX_BIG_ENDIAN - By default little endian register accesses are used for
338- * the mux register. Setting this flag makes the register accesses big
339- * endian.
340316 */
341317struct clk_mux_data {
342318 uint32_t offset ;
@@ -368,21 +344,21 @@ const struct clk *get_parent(const struct clk *clk);
368344 * @clk: pointer to the current clk
369345 *
370346 */
371- uint32_t clk_get_rate (const struct clk * clk , uint64_t * rate );
347+ int clk_get_rate (const struct clk * clk , uint64_t * rate );
372348
373349/**
374350 * function clk_enable() - enable the target clock signal
375351 *
376352 * @clk: pointer to the current clk
377353 */
378- uint32_t clk_enable (struct clk * clk );
354+ int clk_enable (struct clk * clk );
379355
380356/**
381357 * function clk_disable() - disable the target clock signal
382358 *
383359 * @clk: pointer to the current clk
384360 */
385- uint32_t clk_disable (struct clk * clk );
361+ int clk_disable (struct clk * clk );
386362
387363/**
388364 * function clk_set_rate() - set the nearest rate to the requested rate for
@@ -392,4 +368,4 @@ uint32_t clk_disable(struct clk *clk);
392368 * @req_rate: request rate
393369 * @rate: pointer to result variable
394370 */
395- uint32_t clk_set_rate (struct clk * clk , uint64_t req_rate , uint64_t * rate );
371+ int clk_set_rate (struct clk * clk , uint64_t req_rate , uint64_t * rate );
0 commit comments