Merge branches 'clk-bulk-optional', 'clk-kirkwood', 'clk-socfpga' and 'clk-docs' into clk-next
- Add a clk_bulk_get_optional() API (with devm too) - Support for Marvell 98DX1135 SoCs * clk-bulk-optional: clk: Document some devm_clk_bulk*() APIs clk: Add devm_clk_bulk_get_optional() function clk: Add clk_bulk_get_optional() function * clk-kirkwood: clk: kirkwood: Add support for MV98DX1135 dt-bindings: clock: mvebu: Add compatible string for 98dx1135 core clock * clk-socfpga: clk: socfpga: stratix10: fix divider entry for the emac clocks clk: socfpga: stratix10: add additional clocks needed for the NAND IP * clk-docs: clk: Grammar missing "and", Spelling s/statisfied/satisfied/
This commit is contained in:
commit
dfe1d3a283
9 changed files with 120 additions and 12 deletions
|
|
@ -332,6 +332,19 @@ int __must_check clk_bulk_get(struct device *dev, int num_clks,
|
|||
*/
|
||||
int __must_check clk_bulk_get_all(struct device *dev,
|
||||
struct clk_bulk_data **clks);
|
||||
|
||||
/**
|
||||
* clk_bulk_get_optional - lookup and obtain a number of references to clock producer
|
||||
* @dev: device for clock "consumer"
|
||||
* @num_clks: the number of clk_bulk_data
|
||||
* @clks: the clk_bulk_data table of consumer
|
||||
*
|
||||
* Behaves the same as clk_bulk_get() except where there is no clock producer.
|
||||
* In this case, instead of returning -ENOENT, the function returns 0 and
|
||||
* NULL for a clk for which a clock producer could not be determined.
|
||||
*/
|
||||
int __must_check clk_bulk_get_optional(struct device *dev, int num_clks,
|
||||
struct clk_bulk_data *clks);
|
||||
/**
|
||||
* devm_clk_bulk_get - managed get multiple clk consumers
|
||||
* @dev: device for clock "consumer"
|
||||
|
|
@ -346,6 +359,28 @@ int __must_check clk_bulk_get_all(struct device *dev,
|
|||
*/
|
||||
int __must_check devm_clk_bulk_get(struct device *dev, int num_clks,
|
||||
struct clk_bulk_data *clks);
|
||||
/**
|
||||
* devm_clk_bulk_get_optional - managed get multiple optional consumer clocks
|
||||
* @dev: device for clock "consumer"
|
||||
* @clks: pointer to the clk_bulk_data table of consumer
|
||||
*
|
||||
* Behaves the same as devm_clk_bulk_get() except where there is no clock
|
||||
* producer. In this case, instead of returning -ENOENT, the function returns
|
||||
* NULL for given clk. It is assumed all clocks in clk_bulk_data are optional.
|
||||
*
|
||||
* Returns 0 if all clocks specified in clk_bulk_data table are obtained
|
||||
* successfully or for any clk there was no clk provider available, otherwise
|
||||
* returns valid IS_ERR() condition containing errno.
|
||||
* The implementation uses @dev and @clk_bulk_data.id to determine the
|
||||
* clock consumer, and thereby the clock producer.
|
||||
* The clock returned is stored in each @clk_bulk_data.clk field.
|
||||
*
|
||||
* Drivers must assume that the clock source is not enabled.
|
||||
*
|
||||
* clk_bulk_get should not be called from within interrupt context.
|
||||
*/
|
||||
int __must_check devm_clk_bulk_get_optional(struct device *dev, int num_clks,
|
||||
struct clk_bulk_data *clks);
|
||||
/**
|
||||
* devm_clk_bulk_get_all - managed get multiple clk consumers
|
||||
* @dev: device for clock "consumer"
|
||||
|
|
@ -718,6 +753,12 @@ static inline int __must_check clk_bulk_get(struct device *dev, int num_clks,
|
|||
return 0;
|
||||
}
|
||||
|
||||
static inline int __must_check clk_bulk_get_optional(struct device *dev,
|
||||
int num_clks, struct clk_bulk_data *clks)
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
|
||||
static inline int __must_check clk_bulk_get_all(struct device *dev,
|
||||
struct clk_bulk_data **clks)
|
||||
{
|
||||
|
|
@ -741,6 +782,12 @@ static inline int __must_check devm_clk_bulk_get(struct device *dev, int num_clk
|
|||
return 0;
|
||||
}
|
||||
|
||||
static inline int __must_check devm_clk_bulk_get_optional(struct device *dev,
|
||||
int num_clks, struct clk_bulk_data *clks)
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
|
||||
static inline int __must_check devm_clk_bulk_get_all(struct device *dev,
|
||||
struct clk_bulk_data **clks)
|
||||
{
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue