lkml.org 
[lkml]   [2017]   [Oct]   [19]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    Patch in this message
    /
    From
    Subject[PATCH 4.9 34/51] i2c: at91: ensure state is restored after suspending
    Date
    4.9-stable review patch.  If anyone has any objections, please let me know.

    ------------------

    From: Alexandre Belloni <alexandre.belloni@free-electrons.com>


    [ Upstream commit e3ccc921b7d8fd1fcd10a00720e09823d8078666 ]

    When going to suspend, the I2C registers may be lost because the power to
    VDDcore is cut. Restore them when resuming.

    Signed-off-by: Alexandre Belloni <alexandre.belloni@free-electrons.com>
    Acked-by: Ludovic Desroches <ludovic.desroches@microchip.com>
    Signed-off-by: Wolfram Sang <wsa@the-dreams.de>
    Signed-off-by: Sasha Levin <alexander.levin@verizon.com>
    Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
    ---
    drivers/i2c/busses/i2c-at91.c | 3 +++
    1 file changed, 3 insertions(+)

    --- a/drivers/i2c/busses/i2c-at91.c
    +++ b/drivers/i2c/busses/i2c-at91.c
    @@ -1180,6 +1180,7 @@ static int at91_twi_suspend_noirq(struct

    static int at91_twi_resume_noirq(struct device *dev)
    {
    + struct at91_twi_dev *twi_dev = dev_get_drvdata(dev);
    int ret;

    if (!pm_runtime_status_suspended(dev)) {
    @@ -1191,6 +1192,8 @@ static int at91_twi_resume_noirq(struct
    pm_runtime_mark_last_busy(dev);
    pm_request_autosuspend(dev);

    + at91_init_twi_bus(twi_dev);
    +
    return 0;
    }


    \
     
     \ /
      Last update: 2017-10-22 17:26    [W:4.122 / U:0.056 seconds]
    ©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site