Re: [PATCH] USB: OTG: Use work_queue in set_vbus for TWL6030 transciever

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

 



Todd,

On Sat, Jun 25, 2011 at 1:31 AM, Todd Poynor <toddpoynor@xxxxxxxxxx> wrote:
> On Fri, Jun 24, 2011 at 10:14:03AM -0500, Moiz Sonasath wrote:
> ...
>> +     if (enabled)
>> +             twl->vbus_enable = 1;
>> +     else
>> +             twl->vbus_enable = 0;
>> +
>
> Suggest twl->vbus_enable = enabled;
>
>>       /*
>>        * Start driving VBUS. Set OPA_MODE bit in CHARGERUSB_CTRL1
>>        * register. This enables boost mode.
>>        */
>> -     if (enabled)
>> -             twl6030_writeb(twl, TWL_MODULE_MAIN_CHARGE , 0x40,
>> -                                             CHARGERUSB_CTRL1);
>> -      else
>> -             twl6030_writeb(twl, TWL_MODULE_MAIN_CHARGE , 0x00,
>> -                                             CHARGERUSB_CTRL1);
>> +
>> +     schedule_work(&twl->set_vbus_work);
>> +
>
> Suggest also moving the comments together with the new location of
> the code to write CHARGERUSB_CTRL1.
>
> Add a cancel_work_sync(&twl->set_vbus_work) at twl6030_usb_remove(),
> prior to kfree(twl).
>

Thank you for the feedback, have posted a V2 of the patch.


-- 
Regards
Moiz Sonasath
Android Kernel Team
--
To unsubscribe from this list: send the line "unsubscribe linux-usb" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [Linux Media]     [Linux Input]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [Old Linux USB Devel Archive]

  Powered by Linux