Re: [PATCH v3] USB: PHY: Palmas USB Transceiver Driver

From: Felipe Balbi
Date: Tue Mar 26 2013 - 06:20:35 EST


Hi,

On Tue, Mar 26, 2013 at 11:33:44AM +0530, Kishon Vijay Abraham I wrote:
> >>+static int palmas_usb_write(struct palmas *palmas, unsigned int reg,
> >>+ unsigned int data)
> >>+{
> >>+ unsigned int addr;
> >>+ int slave;
> >>+
> >>+ slave = PALMAS_BASE_TO_SLAVE(PALMAS_USB_OTG_BASE);
> >>+ addr = PALMAS_BASE_TO_REG(PALMAS_USB_OTG_BASE, reg);
> >>+
> >>+ return regmap_write(palmas->regmap[slave], addr, data);
> >
> >Same as above.
> >
> >
> >
> >>+
> >>+ if (status != OMAP_DWC3_UNKNOWN) {
> >>+ palmas_usb->linkstat = status;
> >>+ palmas_usb->mailboxstat = dwc3_omap_mailbox(status);
> >Omap specific call, why? This is generic palma driver.
>
> hmm.. I think we should either fall-back to the notification
> mechanism or have the client drivers pass function pointer here.
> Felipe?

hmmm, if palmas is being used outside of OMAP world, then I guess extcon
is the way to go... too bad

--
balbi

Attachment: signature.asc
Description: Digital signature