From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752562AbcF1Izj (ORCPT ); Tue, 28 Jun 2016 04:55:39 -0400 Received: from mail-wm0-f54.google.com ([74.125.82.54]:35957 "EHLO mail-wm0-f54.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752277AbcF1Izc (ORCPT ); Tue, 28 Jun 2016 04:55:32 -0400 Date: Tue, 28 Jun 2016 09:56:22 +0100 From: Lee Jones To: linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org Cc: kernel@stlinux.com, maxime.coquelin@st.com, srinivas.kandagatla@gmail.com, kishon@ti.com, balbi@kernel.org, gregkh@linuxfoundation.org, p.zabel@pengutronix.de, linux-usb@vger.kernel.org Subject: Re: [PATCH 4/7] reset: Supply *_shared variant calls when using *_optional APIs Message-ID: <20160628085622.GM6720@dell> References: <20160606155655.10860-1-lee.jones@linaro.org> <20160606155655.10860-5-lee.jones@linaro.org> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <20160606155655.10860-5-lee.jones@linaro.org> User-Agent: Mutt/1.5.24 (2015-08-30) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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 > --- > 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() -- Lee Jones Linaro STMicroelectronics Landing Team Lead Linaro.org │ Open source software for ARM SoCs Follow Linaro: Facebook | Twitter | Blog