[PATCH 2/2] arm: mach-imx: anatop: add two APIs for USB driver

Shawn Guo shawn.guo at linaro.org
Wed Aug 14 02:32:38 EDT 2013


On Wed, Aug 14, 2013 at 11:50:07AM +0800, Peter Chen wrote:
> > > +void imx_anatop_usb1_disconnect_line(bool enable)
> > > +{
> > > +	if (enable)
> > > +		regmap_write(anatop, ANADIG_USB1_LOOPBACK,
> > > +			BM_ANADIG_USB1_LOOPBACK_UTMI_DIG_TST1 |
> > > +				BM_ANADIG_USB1_LOOPBACK_TSTI_TX_EN);
> > > +	else
> > > +		regmap_write(anatop, ANADIG_USB1_LOOPBACK, 0);
> > > +}
> > > +EXPORT_SYMBOL(imx_anatop_usb1_disconnect_line);
> > > +
> > > +void imx_anatop_set_stop_mode_config(bool enable)
> > > +{
> > > +	regmap_write(anatop, ANADIG_ANA_MISC0 +
> > > +		(enable ? REG_SET : REG_CLR),
> > > +			BM_ANADIG_ANA_MISC0_STOP_MODE_CONFIG);
> > > +}
> > > +EXPORT_SYMBOL(imx_anatop_set_stop_mode_config);
> > > +
> > 
> > Where do you want to call these two functions from?
> > 
> 
> From USB driver, the usb driver is possible built as module.

I do not think it's appropriate have device driver directly call into
platform level functions.

Shawn




More information about the linux-arm-kernel mailing list