lkml.org 
[lkml]   [2014]   [Feb]   [22]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    /
    Date
    From
    SubjectRe: [PATCH 08/10] spi: sh-msiof: Move clock management to (un)prepare_message()
    On Thu, Feb 20, 2014 at 03:43:07PM +0100, Geert Uytterhoeven wrote:

    > + if (!test_and_set_bit(0, &p->flags)) {
    > + pm_runtime_get_sync(&p->pdev->dev);
    > + clk_enable(p->clk);
    > + }

    That test_and_set_bit() is a bit odd - what's going on there, perhaps a
    comment is in order? I'd also like to see return value checks, though
    the original didn't have them so it's not a blocker, and ideally that
    should be clk_prepare_enable(). I guess the clock stuff could even be
    moved inside the runtime PM callbacks? Again not a blocker if the
    existing code doesn't have things but it'd be nice to do.

    There's also auto_runtime_pm in the SPI core which will do the runtime
    PM for you if you can do it unconditionally.
    [unhandled content-type:application/pgp-signature]
    \
     
     \ /
      Last update: 2014-02-23 01:21    [W:3.970 / U:0.156 seconds]
    ©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site