Message ID | 20160606155655.10860-5-lee.jones@linaro.org (mailing list archive) |
---|---|
State | New, archived |
Headers | show |
Philipp, I need this to go into the -rcs too. Can I add it with your Ack please? > 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()
Hi Lee, Am Dienstag, den 28.06.2016, 09:56 +0100 schrieb Lee Jones: > Philipp, > > I need this to go into the -rcs too. > > Can I add it with your Ack please? I have already added your patches to my branch, and I intend to send a pull request for it tomorrow. I am afraid applying this patch in another branch would create a merge conflict with git://git.pengutronix.de/git/pza/linux.git reset/next in arm-soc. If that is not the case, go ahead. Otherwise I could provide a tag at commit 2485394d9e0b ("reset: TRIVIAL: Add line break at same place for similar APIs") for you to merge. regards Philipp
On Wed, 29 Jun 2016, Philipp Zabel wrote: > Am Dienstag, den 28.06.2016, 09:56 +0100 schrieb Lee Jones: > > Philipp, > > > > I need this to go into the -rcs too. > > > > Can I add it with your Ack please? > > I have already added your patches to my branch, and I intend to send a > pull request for it tomorrow. I am afraid applying this patch in another > branch would create a merge conflict with > git://git.pengutronix.de/git/pza/linux.git reset/next > in arm-soc. If that is not the case, go ahead. Otherwise I could provide > a tag at commit 2485394d9e0b ("reset: TRIVIAL: Add line break at same > place for similar APIs") for you to merge. Yes please. If you could tag a branch containing commit: reset: Supply *_shared variant calls when using *_optional APIs ... that would be perfect. Would you mind sending me the tag name ASAP please, since I am ready to send my pull-request to Linus.
Am Mittwoch, den 29.06.2016, 09:06 +0100 schrieb Lee Jones: > On Wed, 29 Jun 2016, Philipp Zabel wrote: > > Am Dienstag, den 28.06.2016, 09:56 +0100 schrieb Lee Jones: > > > Philipp, > > > > > > I need this to go into the -rcs too. > > > > > > Can I add it with your Ack please? > > > > I have already added your patches to my branch, and I intend to send a > > pull request for it tomorrow. I am afraid applying this patch in another > > branch would create a merge conflict with > > git://git.pengutronix.de/git/pza/linux.git reset/next > > in arm-soc. If that is not the case, go ahead. Otherwise I could provide > > a tag at commit 2485394d9e0b ("reset: TRIVIAL: Add line break at same > > place for similar APIs") for you to merge. > > Yes please. If you could tag a branch containing commit: > > reset: Supply *_shared variant calls when using *_optional APIs > > ... that would be perfect. Would you mind sending me the tag name > ASAP please, since I am ready to send my pull-request to Linus. git://git.pengutronix.de/git/pza/linux.git tags/reset-shared-optional regards Philipp
On Wed, 29 Jun 2016, Philipp Zabel wrote: > Am Mittwoch, den 29.06.2016, 09:06 +0100 schrieb Lee Jones: > > On Wed, 29 Jun 2016, Philipp Zabel wrote: > > > Am Dienstag, den 28.06.2016, 09:56 +0100 schrieb Lee Jones: > > > > Philipp, > > > > > > > > I need this to go into the -rcs too. > > > > > > > > Can I add it with your Ack please? > > > > > > I have already added your patches to my branch, and I intend to send a > > > pull request for it tomorrow. I am afraid applying this patch in another > > > branch would create a merge conflict with > > > git://git.pengutronix.de/git/pza/linux.git reset/next > > > in arm-soc. If that is not the case, go ahead. Otherwise I could provide > > > a tag at commit 2485394d9e0b ("reset: TRIVIAL: Add line break at same > > > place for similar APIs") for you to merge. > > > > Yes please. If you could tag a branch containing commit: > > > > reset: Supply *_shared variant calls when using *_optional APIs > > > > ... that would be perfect. Would you mind sending me the tag name > > ASAP please, since I am ready to send my pull-request to Linus. > > git://git.pengutronix.de/git/pza/linux.git tags/reset-shared-optional Ah! If I rebase on that tag, I will also take in all of the patches between it and v4.7-rc1, which is 14 commits. Is there any way you can place it onto it's own branch, then we both merge it into our respective trees?
Hi Lee, On Wed, Jun 29, 2016 at 10:37:34AM +0100, Lee Jones wrote: [...] > > > > If that is not the case, go ahead. Otherwise I could provide > > > > a tag at commit 2485394d9e0b ("reset: TRIVIAL: Add line break at same > > > > place for similar APIs") for you to merge. > > > > > > Yes please. If you could tag a branch containing commit: > > > > > > reset: Supply *_shared variant calls when using *_optional APIs > > > > > > ... that would be perfect. Would you mind sending me the tag name > > > ASAP please, since I am ready to send my pull-request to Linus. > > > > git://git.pengutronix.de/git/pza/linux.git tags/reset-shared-optional > > Ah! If I rebase on that tag, I will also take in all of the patches > between it and v4.7-rc1, which is 14 commits. Is there any way you > can place it onto it's own branch, then we both merge it into our > respective trees? I have now moved your patches into their own branch at git://git.pengutronix.de/git/pza/linux.git tags/reset-explicit-api and merged that back in. regards Philipp
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()
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(+)