All of lore.kernel.org
 help / color / mirror / Atom feed
* [U-Boot] [PATCH 1/6] clk: add clk_valid()
@ 2018-07-23 12:35 Fabrice Gasnier
  2018-07-23 12:35 ` [U-Boot] [PATCH 2/6] dm: adc: uclass: get reference regulator once Fabrice Gasnier
                   ` (5 more replies)
  0 siblings, 6 replies; 12+ messages in thread
From: Fabrice Gasnier @ 2018-07-23 12:35 UTC (permalink / raw)
  To: u-boot

add clk_valid() to check for optional clocks are valid.

Signed-off-by: Fabrice Gasnier <fabrice.gasnier@st.com>
---

 include/clk.h | 10 ++++++++++
 1 file changed, 10 insertions(+)

diff --git a/include/clk.h b/include/clk.h
index 9a35764..71679a9 100644
--- a/include/clk.h
+++ b/include/clk.h
@@ -294,4 +294,14 @@ int clk_disable_bulk(struct clk_bulk *bulk);
 
 int soc_clk_dump(void);
 
+/**
+ * clk_valid() - check if clk is valid
+ *
+ * @clk:	the clock to check
+ * @return TRUE if valid, or FALSE
+ */
+static inline bool clk_valid(struct clk *clk)
+{
+	return !!clk->dev;
+}
 #endif
-- 
1.9.1

^ permalink raw reply related	[flat|nested] 12+ messages in thread

end of thread, other threads:[~2018-07-24 14:37 UTC | newest]

Thread overview: 12+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-07-23 12:35 [U-Boot] [PATCH 1/6] clk: add clk_valid() Fabrice Gasnier
2018-07-23 12:35 ` [U-Boot] [PATCH 2/6] dm: adc: uclass: get reference regulator once Fabrice Gasnier
2018-07-23 23:48   ` Simon Glass
2018-07-24 14:37     ` Fabrice Gasnier
2018-07-23 12:35 ` [U-Boot] [PATCH 3/6] dt-bindings: Document STM32 ADC DT bindings Fabrice Gasnier
2018-07-23 23:48   ` Simon Glass
2018-07-23 12:35 ` [U-Boot] [PATCH 4/6] adc: Add driver for STM32 ADC Fabrice Gasnier
2018-07-23 23:48   ` Simon Glass
2018-07-23 12:35 ` [U-Boot] [PATCH 5/6] configs: stm32mp15: enable ADC Fabrice Gasnier
2018-07-23 23:48   ` Simon Glass
2018-07-23 12:35 ` [U-Boot] [PATCH 6/6] ARM: dts: stm32mp157: Add ADC DT node Fabrice Gasnier
2018-07-23 23:48 ` [U-Boot] [PATCH 1/6] clk: add clk_valid() Simon Glass

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.