From: Todd Poynor <toddpoynor@google.com>
To: Moiz Sonasath <m-sonasath@ti.com>
Cc: linux-usb@vger.kernel.org, linux-omap@vger.kernel.org,
balbi@ti.com, gregkh@suse.de
Subject: Re: [PATCH] USB: OTG: Use work_queue in set_vbus for TWL6030 transciever
Date: Fri, 24 Jun 2011 23:31:16 -0700 [thread overview]
Message-ID: <20110625063116.GA14681@google.com> (raw)
In-Reply-To: <1308928443-15352-1-git-send-email-m-sonasath@ti.com>
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).
next prev parent reply other threads:[~2011-06-25 6:31 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-06-24 15:14 [PATCH] USB: OTG: Use work_queue in set_vbus for TWL6030 transciever Moiz Sonasath
2011-06-25 6:31 ` Todd Poynor [this message]
[not found] ` <20110625063116.GA14681-hpIqsD4AKlfQT0dZR+AlfA@public.gmane.org>
2011-06-27 15:06 ` Sonasath, Moiz
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20110625063116.GA14681@google.com \
--to=toddpoynor@google.com \
--cc=balbi@ti.com \
--cc=gregkh@suse.de \
--cc=linux-omap@vger.kernel.org \
--cc=linux-usb@vger.kernel.org \
--cc=m-sonasath@ti.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox