LKML Archive on lore.kernel.org
help / color / mirror / Atom feed
From: Arnd Bergmann <arnd@arndb.de>
To: linux-arm-kernel@lists.infradead.org
Cc: Mark Brown <broonie@kernel.org>, Barry Song <Baohua.Song@csr.com>,
	linux-kernel@vger.kernel.org, linux-spi@vger.kernel.org,
	Philipp Zabel <p.zabel@pengutronix.de>,
	Maxime Ripard <maxime.ripard@free-electrons.com>,
	Marek Vasut <marex@denx.de>, Wolfram Sang <wsa@the-dreams.de>
Subject: Re: [PATCH] spi: sirf: add reset controller dependency
Date: Thu, 19 Feb 2015 16:01:29 +0100	[thread overview]
Message-ID: <7767301.zaEX63gvjp@wuerfel> (raw)
In-Reply-To: <20150219094155.GA3198@finisterre.sirena.org.uk>

On Thursday 19 February 2015 18:41:55 Mark Brown wrote:
> On Wed, Feb 18, 2015 at 04:29:10PM +0100, Arnd Bergmann wrote:
> 
> > The adds a dependency in Kconfig to prevent it from being selected
> > if the resets are not available.
> 
> Why is this a better fix than making the reset controller API stub
> itself out?  It's probably not such a big deal here but for devices that
> could be integrated into SoCs with and without reset controllers it
> seems like we might want that.

I would prefer that too, but it's not what the reset maintainer decided
to have, citing b424080a9e0 ("reset: Add optional resets and stubs"):
    
    This patch adds device_reset_optional and (devm_)reset_control_get_optional
    variants that drivers can use to indicate they can function without control
    over the reset line. For those functions, stubs are added so the drivers can
    be compiled with CONFIG_RESET_CONTROLLER disabled.
    Also, device_reset is annotated with __must_check. Drivers ignoring the return
    value should use device_reset_optional instead.
    
    Signed-off-by: Philipp Zabel <p.zabel@pengutronix.de>
    Reviewed-by: Maxime Ripard <maxime.ripard@free-electrons.com>
    Reviewed-by: Marek Vasut <marex@denx.de>
    Acked-by: Wolfram Sang <wsa@the-dreams.de>

So the stubs are provided for all functions except device_reset() and
reset_control_get(), and drivers using the API need to either call the
stubbed-out _optional() versions of these functions or have the explicit
dependency.

	Arnd

  reply	other threads:[~2015-02-19 15:01 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-02-18 15:29 Arnd Bergmann
2015-02-19  9:41 ` Mark Brown
2015-02-19 15:01   ` Arnd Bergmann [this message]
2015-02-21  9:44     ` Mark Brown
2015-02-23 22:01       ` Arnd Bergmann
2015-02-24  7:50         ` Mark Brown
2015-02-24 10:27           ` Arnd Bergmann
2015-02-24 10:56             ` Chen-Yu Tsai
2015-02-24 13:34               ` Arnd Bergmann
2015-02-24 13:36                 ` Chen-Yu Tsai
2015-02-24 13:02           ` Arnd Bergmann
2015-02-24 14:27             ` Philipp Zabel

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=7767301.zaEX63gvjp@wuerfel \
    --to=arnd@arndb.de \
    --cc=Baohua.Song@csr.com \
    --cc=broonie@kernel.org \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-spi@vger.kernel.org \
    --cc=marex@denx.de \
    --cc=maxime.ripard@free-electrons.com \
    --cc=p.zabel@pengutronix.de \
    --cc=wsa@the-dreams.de \
    --subject='Re: [PATCH] spi: sirf: add reset controller dependency' \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).