* [PATCH] usb: twl6030-usb: make driver DT only @ 2016-11-12 10:47 Nicolae Rosia [not found] ` <1478947663-19539-1-git-send-email-Nicolae_Rosia-nmGgyN9QBj3QT0dZR+AlfA@public.gmane.org> 0 siblings, 1 reply; 3+ messages in thread From: Nicolae Rosia @ 2016-11-12 10:47 UTC (permalink / raw) To: Felipe Balbi Cc: linux-usb-u79uwXL29TY76Z2rM5mHXA, Greg Kroah-Hartman, linux-omap-u79uwXL29TY76Z2rM5mHXA, Tony Lindgren, Nicolae Rosia All users are DT-only and it makes no sense to keep unused code Signed-off-by: Nicolae Rosia <Nicolae_Rosia-nmGgyN9QBj3QT0dZR+AlfA@public.gmane.org> --- drivers/usb/phy/Kconfig | 1 + drivers/usb/phy/phy-twl6030-usb.c | 23 ++++++----------------- 2 files changed, 7 insertions(+), 17 deletions(-) diff --git a/drivers/usb/phy/Kconfig b/drivers/usb/phy/Kconfig index b9c409a..61cef75 100644 --- a/drivers/usb/phy/Kconfig +++ b/drivers/usb/phy/Kconfig @@ -84,6 +84,7 @@ config SAMSUNG_USBPHY config TWL6030_USB tristate "TWL6030 USB Transceiver Driver" depends on TWL4030_CORE && OMAP_USB2 && USB_MUSB_OMAP2PLUS + depends on OF help Enable this to support the USB OTG transceiver on TWL6030 family chips. This TWL6030 transceiver has the VBUS and ID GND diff --git a/drivers/usb/phy/phy-twl6030-usb.c b/drivers/usb/phy/phy-twl6030-usb.c index a72e8d6..628b600 100644 --- a/drivers/usb/phy/phy-twl6030-usb.c +++ b/drivers/usb/phy/phy-twl6030-usb.c @@ -108,7 +108,6 @@ struct twl6030_usb { enum musb_vbus_id_status linkstat; u8 asleep; bool vbus_enable; - const char *regulator; }; #define comparator_to_twl(x) container_of((x), struct twl6030_usb, comparator) @@ -166,7 +165,7 @@ static int twl6030_usb_ldo_init(struct twl6030_usb *twl) /* Program MISC2 register and set bit VUSB_IN_VBAT */ twl6030_writeb(twl, TWL6030_MODULE_ID0, 0x10, TWL6030_MISC2); - twl->usb3v3 = regulator_get(twl->dev, twl->regulator); + twl->usb3v3 = regulator_get(twl->dev, "usb"); if (IS_ERR(twl->usb3v3)) return -ENODEV; @@ -341,7 +340,11 @@ static int twl6030_usb_probe(struct platform_device *pdev) int status, err; struct device_node *np = pdev->dev.of_node; struct device *dev = &pdev->dev; - struct twl4030_usb_data *pdata = dev_get_platdata(dev); + + if (!np) { + dev_err(dev, "no DT info\n"); + return -EINVAL; + } twl = devm_kzalloc(dev, sizeof(*twl), GFP_KERNEL); if (!twl) @@ -361,18 +364,6 @@ static int twl6030_usb_probe(struct platform_device *pdev) return -EPROBE_DEFER; } - if (np) { - twl->regulator = "usb"; - } else if (pdata) { - if (pdata->features & TWL6032_SUBCLASS) - twl->regulator = "ldousb"; - else - twl->regulator = "vusb"; - } else { - dev_err(&pdev->dev, "twl6030 initialized without pdata\n"); - return -EINVAL; - } ^ permalink raw reply related [flat|nested] 3+ messages in thread
[parent not found: <1478947663-19539-1-git-send-email-Nicolae_Rosia-nmGgyN9QBj3QT0dZR+AlfA@public.gmane.org>]
* Re: [PATCH] usb: twl6030-usb: make driver DT only [not found] ` <1478947663-19539-1-git-send-email-Nicolae_Rosia-nmGgyN9QBj3QT0dZR+AlfA@public.gmane.org> @ 2016-11-14 8:50 ` Felipe Balbi [not found] ` <87wpg6wim4.fsf-VuQAYsv1563Yd54FQh9/CA@public.gmane.org> 0 siblings, 1 reply; 3+ messages in thread From: Felipe Balbi @ 2016-11-14 8:50 UTC (permalink / raw) To: Bin Liu, Roger Quadros Cc: linux-usb-u79uwXL29TY76Z2rM5mHXA, Greg Kroah-Hartman, linux-omap-u79uwXL29TY76Z2rM5mHXA, Tony Lindgren, Nicolae Rosia [-- Attachment #1: Type: text/plain, Size: 3418 bytes --] Hi, Nicolae Rosia <Nicolae_Rosia-nmGgyN9QBj3QT0dZR+AlfA@public.gmane.org> writes: > All users are DT-only and it makes no sense to keep > unused code > > Signed-off-by: Nicolae Rosia <Nicolae_Rosia-nmGgyN9QBj3QT0dZR+AlfA@public.gmane.org> I need an Acked-by from either Tony, Roger or Bin > --- > drivers/usb/phy/Kconfig | 1 + > drivers/usb/phy/phy-twl6030-usb.c | 23 ++++++----------------- > 2 files changed, 7 insertions(+), 17 deletions(-) > > diff --git a/drivers/usb/phy/Kconfig b/drivers/usb/phy/Kconfig > index b9c409a..61cef75 100644 > --- a/drivers/usb/phy/Kconfig > +++ b/drivers/usb/phy/Kconfig > @@ -84,6 +84,7 @@ config SAMSUNG_USBPHY > config TWL6030_USB > tristate "TWL6030 USB Transceiver Driver" > depends on TWL4030_CORE && OMAP_USB2 && USB_MUSB_OMAP2PLUS > + depends on OF > help > Enable this to support the USB OTG transceiver on TWL6030 > family chips. This TWL6030 transceiver has the VBUS and ID GND > diff --git a/drivers/usb/phy/phy-twl6030-usb.c b/drivers/usb/phy/phy-twl6030-usb.c > index a72e8d6..628b600 100644 > --- a/drivers/usb/phy/phy-twl6030-usb.c > +++ b/drivers/usb/phy/phy-twl6030-usb.c > @@ -108,7 +108,6 @@ struct twl6030_usb { > enum musb_vbus_id_status linkstat; > u8 asleep; > bool vbus_enable; > - const char *regulator; > }; > > #define comparator_to_twl(x) container_of((x), struct twl6030_usb, comparator) > @@ -166,7 +165,7 @@ static int twl6030_usb_ldo_init(struct twl6030_usb *twl) > /* Program MISC2 register and set bit VUSB_IN_VBAT */ > twl6030_writeb(twl, TWL6030_MODULE_ID0, 0x10, TWL6030_MISC2); > > - twl->usb3v3 = regulator_get(twl->dev, twl->regulator); > + twl->usb3v3 = regulator_get(twl->dev, "usb"); > if (IS_ERR(twl->usb3v3)) > return -ENODEV; > > @@ -341,7 +340,11 @@ static int twl6030_usb_probe(struct platform_device *pdev) > int status, err; > struct device_node *np = pdev->dev.of_node; > struct device *dev = &pdev->dev; > - struct twl4030_usb_data *pdata = dev_get_platdata(dev); > + > + if (!np) { > + dev_err(dev, "no DT info\n"); > + return -EINVAL; > + } > > twl = devm_kzalloc(dev, sizeof(*twl), GFP_KERNEL); > if (!twl) > @@ -361,18 +364,6 @@ static int twl6030_usb_probe(struct platform_device *pdev) > return -EPROBE_DEFER; > } > > - if (np) { > - twl->regulator = "usb"; > - } else if (pdata) { > - if (pdata->features & TWL6032_SUBCLASS) > - twl->regulator = "ldousb"; > - else > - twl->regulator = "vusb"; > - } else { > - dev_err(&pdev->dev, "twl6030 initialized without pdata\n"); > - return -EINVAL; > - } > - > /* init spinlock for workqueue */ > spin_lock_init(&twl->lock); > > @@ -436,13 +427,11 @@ static int twl6030_usb_remove(struct platform_device *pdev) > return 0; > } > > -#ifdef CONFIG_OF > static const struct of_device_id twl6030_usb_id_table[] = { > { .compatible = "ti,twl6030-usb" }, > {} > }; > MODULE_DEVICE_TABLE(of, twl6030_usb_id_table); > -#endif > > static struct platform_driver twl6030_usb_driver = { > .probe = twl6030_usb_probe, > -- > 2.5.5 > > -- > To unsubscribe from this list: send the line "unsubscribe linux-usb" in > the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org > More majordomo info at http://vger.kernel.org/majordomo-info.html -- balbi [-- Attachment #2: signature.asc --] [-- Type: application/pgp-signature, Size: 832 bytes --] ^ permalink raw reply [flat|nested] 3+ messages in thread
[parent not found: <87wpg6wim4.fsf-VuQAYsv1563Yd54FQh9/CA@public.gmane.org>]
* Re: [PATCH] usb: twl6030-usb: make driver DT only [not found] ` <87wpg6wim4.fsf-VuQAYsv1563Yd54FQh9/CA@public.gmane.org> @ 2016-11-14 19:03 ` Tony Lindgren 0 siblings, 0 replies; 3+ messages in thread From: Tony Lindgren @ 2016-11-14 19:03 UTC (permalink / raw) To: Felipe Balbi Cc: Nicolae Rosia, Bin Liu, Roger Quadros, linux-usb-u79uwXL29TY76Z2rM5mHXA, Greg Kroah-Hartman, linux-omap-u79uwXL29TY76Z2rM5mHXA * Felipe Balbi <balbi-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org> [161114 00:51]: > > Hi, > > Nicolae Rosia <Nicolae_Rosia-nmGgyN9QBj3QT0dZR+AlfA@public.gmane.org> writes: > > All users are DT-only and it makes no sense to keep > > unused code > > > > Signed-off-by: Nicolae Rosia <Nicolae_Rosia-nmGgyN9QBj3QT0dZR+AlfA@public.gmane.org> > > I need an Acked-by from either Tony, Roger or Bin We've had omap4 booting in device tree only mode for years now, so: Acked-by: Tony Lindgren <tony-4v6yS6AI5VpBDgjK7y7TUQ@public.gmane.org> -- To unsubscribe from this list: send the line "unsubscribe linux-usb" in the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org More majordomo info at http://vger.kernel.org/majordomo-info.html ^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2016-11-14 19:03 UTC | newest] Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed) -- links below jump to the message on this page -- 2016-11-12 10:47 [PATCH] usb: twl6030-usb: make driver DT only Nicolae Rosia [not found] ` <1478947663-19539-1-git-send-email-Nicolae_Rosia-nmGgyN9QBj3QT0dZR+AlfA@public.gmane.org> 2016-11-14 8:50 ` Felipe Balbi [not found] ` <87wpg6wim4.fsf-VuQAYsv1563Yd54FQh9/CA@public.gmane.org> 2016-11-14 19:03 ` Tony Lindgren
This is an external index of several public inboxes, see mirroring instructions on how to clone and mirror all data and code used by this external index.