lkml.org 
[lkml]   [2023]   [Sep]   [17]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    Patch in this message
    /
    From
    Subject[PATCH v5 07/15] USB: typec: Apply patch again after power resume
    Date
    From: Abdel Alkuor <abdelalkuor@geotab.com>

    TPS25750 PD controller might be powered off externally at power suspend,
    after resuming PD controller power back, apply the patch again.

    Signed-off-by: Abdel Alkuor <abdelalkuor@geotab.com>
    ---
    drivers/usb/typec/tipd/core.c | 12 ++++++++++++
    1 file changed, 12 insertions(+)

    diff --git a/drivers/usb/typec/tipd/core.c b/drivers/usb/typec/tipd/core.c
    index 3ad8112c78b6..bd5436fd88fd 100644
    --- a/drivers/usb/typec/tipd/core.c
    +++ b/drivers/usb/typec/tipd/core.c
    @@ -1189,6 +1189,18 @@ static int __maybe_unused tps6598x_resume(struct device *dev)
    {
    struct i2c_client *client = to_i2c_client(dev);
    struct tps6598x *tps = i2c_get_clientdata(client);
    + u8 mode;
    + int ret;
    +
    + ret = tps6598x_check_mode(tps, &mode);
    + if (ret)
    + return ret;
    +
    + if (mode == TPS_MODE_PTCH) {
    + ret = tps25750_apply_patch(tps);
    + if (ret)
    + return ret;
    + }

    if (tps->wakeup) {
    disable_irq_wake(client->irq);
    --
    2.34.1
    \
     
     \ /
      Last update: 2023-09-17 17:29    [W:7.591 / U:0.012 seconds]
    ©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site