Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1415258

[PATCH 4/7] reset: Supply *_shared variant calls when using *_optional APIs

From Lee Jones <lee.jones@linaro.org>
Newsgroups linux.kernel
Subject [PATCH 4/7] reset: Supply *_shared variant calls when using *_optional APIs
Date 2016-06-06 18:10 +0200
Message-ID <rH5ge-7ea-29@gated-at.bofh.it> (permalink)
References <rH56x-6VJ-19@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


Consumers need to be able to specify whether they are requesting an
'exclusive' or 'shared' reset line no matter which API (of_*, devm_*,
etc) they are using.  This change allows users of the optional_* API
in particular to specify that their request is for a 'shared' line.

Signed-off-by: Lee Jones <lee.jones@linaro.org>
---
 include/linux/reset.h | 12 ++++++++++++
 1 file changed, 12 insertions(+)

diff --git a/include/linux/reset.h b/include/linux/reset.h
index fd69240..c358106 100644
--- a/include/linux/reset.h
+++ b/include/linux/reset.h
@@ -141,6 +141,12 @@ static inline struct reset_control *reset_control_get_optional_exclusive(
 	return __of_reset_control_get(dev ? dev->of_node : NULL, id, 0, 0);
 }
 
+static inline struct reset_control *reset_control_get_optional_shared(
+					struct device *dev, const char *id)
+{
+	return __of_reset_control_get(dev ? dev->of_node : NULL, id, 0, 1);
+}
+
 /**
  * of_reset_control_get_exclusive - Lookup and obtain an exclusive reference
  *                                  to a reset controller.
@@ -270,6 +276,12 @@ static inline struct reset_control *devm_reset_control_get_optional_exclusive(
 	return __devm_reset_control_get(dev, id, 0, 0);
 }
 
+static inline struct reset_control *devm_reset_control_get_optional_shared(
+					struct device *dev, const char *id)
+{
+	return __devm_reset_control_get(dev, id, 0, 1);
+}
+
 /**
  * devm_reset_control_get_exclusive_by_index - resource managed
  *                                             reset_control_get_exclusive()
-- 
2.8.3

Back to linux.kernel | Previous | NextPrevious in thread | Next in thread | Find similar | Unroll thread


Thread

[PATCH 0/7] reset: Consumers to explicitly request 'exclusive' or 'shared' lines Lee Jones <lee.jones@linaro.org> - 2016-06-06 18:00 +0200
  [PATCH 6/7] phy: miphy28lp: Inform the reset framework that our reset line may be shared Lee Jones <lee.jones@linaro.org> - 2016-06-06 18:00 +0200
    Re: [STLinux Kernel] [PATCH 6/7] phy: miphy28lp: Inform the reset  framework that our reset line may be shared Peter Griffin <peter.griffin@linaro.org> - 2016-06-07 10:40 +0200
    Re: [PATCH 6/7] phy: miphy28lp: Inform the reset framework that our  reset line may be shared Kishon Vijay Abraham I <kishon@ti.com> - 2016-06-07 11:10 +0200
  [PATCH 2/7] reset: Ensure drivers are explicit when requesting reset lines Lee Jones <lee.jones@linaro.org> - 2016-06-06 18:00 +0200
  [PATCH 7/7] usb: dwc3: st: Inform the reset framework that our reset line may be shared Lee Jones <lee.jones@linaro.org> - 2016-06-06 18:00 +0200
    [PATCH 9/10] usb: host: ehci-st: Inform the reset framework that our reset line may be shared Lee Jones <lee.jones@linaro.org> - 2016-06-06 19:20 +0200
      Re: [PATCH 9/10] usb: host: ehci-st: Inform the reset framework that  our reset line may be shared Alan Stern <stern@rowland.harvard.edu> - 2016-06-06 19:50 +0200
    [PATCH 8/10] phy: phy-stih407-usb: Inform the reset framework that our reset line may be shared Lee Jones <lee.jones@linaro.org> - 2016-06-06 19:20 +0200
      [PATCH 10/10] usb: host: ohci-st: Inform the reset framework that our reset line may be shared Lee Jones <lee.jones@linaro.org> - 2016-06-06 19:20 +0200
      Re: [STLinux Kernel] [PATCH 8/10] phy: phy-stih407-usb: Inform the  reset framework that our reset line may be shared Peter Griffin <peter.griffin@linaro.org> - 2016-06-07 10:40 +0200
      Re: [PATCH 8/10] phy: phy-stih407-usb: Inform the reset framework  that our reset line may be shared Kishon Vijay Abraham I <kishon@ti.com> - 2016-06-07 11:10 +0200
    Re: [STLinux Kernel] [PATCH 7/7] usb: dwc3: st: Inform the reset  framework that our reset line may be shared Peter Griffin <peter.griffin@linaro.org> - 2016-06-07 10:50 +0200
  [PATCH 5/7] reset: TRIVIAL: Add line break at same place for similar APIs Lee Jones <lee.jones@linaro.org> - 2016-06-06 18:00 +0200
  [PATCH 1/7] reset: Reorder inline reset_control_get*() wrappers Lee Jones <lee.jones@linaro.org> - 2016-06-06 18:10 +0200
  [PATCH 3/7] reset: Supply *_shared variant calls when using of_* API Lee Jones <lee.jones@linaro.org> - 2016-06-06 18:10 +0200
  [PATCH 4/7] reset: Supply *_shared variant calls when using *_optional APIs Lee Jones <lee.jones@linaro.org> - 2016-06-06 18:10 +0200
  Re: [STLinux Kernel] [PATCH 0/7] reset: Consumers to explicitly  request 'exclusive' or 'shared' lines Peter Griffin <peter.griffin@linaro.org> - 2016-06-07 10:50 +0200
    Re: [STLinux Kernel] [PATCH 0/7] reset: Consumers to explicitly  request 'exclusive' or 'shared' lines Lee Jones <lee.jones@linaro.org> - 2016-06-07 11:20 +0200
      Re: [STLinux Kernel] [PATCH 0/7] reset: Consumers to explicitly  request 'exclusive' or 'shared' lines Lee Jones <lee.jones@linaro.org> - 2016-06-07 11:30 +0200

csiph-web