Thread (12 messages) flat view 12 messages, 4 authors, 2015-02-24

[PATCH] spi: sirf: add reset controller dependency

From: arnd@arndb.de (Arnd Bergmann)
Date: 2015-02-19 15:01:53
Also in: linux-spi, lkml

On Thursday 19 February 2015 18:41:55 Mark Brown wrote:
On Wed, Feb 18, 2015 at 04:29:10PM +0100, Arnd Bergmann wrote:
quoted
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 [off-list ref]
    Reviewed-by: Maxime Ripard [off-list ref]
    Reviewed-by: Marek Vasut [off-list ref]
    Acked-by: Wolfram Sang [off-list ref]

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
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help