Re: [PATCH 01/11] spi: Provide core support for runtime PM during transfers

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Sun, Jul 28, 2013 at 4:43 PM, Mark Brown <broonie@xxxxxxxxxx> wrote:

> Most SPI drivers that implement runtime PM support use identical code to
> do so: they acquire a runtime PM lock in prepare_transfer_hardware() and
> then they release it in unprepare_transfer_hardware(). The variations in
> this are mostly missing error checking and the choice to use autosuspend.
>
> Since these runtime PM calls are normally the only thing in the prepare
> and unprepare callbacks and the autosuspend API transparently does the
> right thing on devices with autosuspend disabled factor all of this out
> into the core with a flag to enable the behaviour.
>
> Signed-off-by: Mark Brown <broonie@xxxxxxxxxx>

Acked-by: Linus Walleij <linus.walleij@xxxxxxxxxx>

> + * @auto_runtime_pm: the core should ensure a runtime PM reference is held
> + *                   while the hardware is prepared

I'd mention here that the reference is taken on the parent
device of the SPI master, i.e. the very platform or AMBA
device, so that it will hit upwards to the bus.

Yours,
Linus Walleij
--
To unsubscribe from this list: send the line "unsubscribe linux-samsung-soc" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html




[Index of Archives]     [Linux SoC Development]     [Linux Rockchip Development]     [Linux USB Development]     [Video for Linux]     [Linux Audio Users]     [Linux SCSI]     [Yosemite News]

  Powered by Linux