summaryrefslogtreecommitdiffstats
path: root/drivers/usb
Commit message (Collapse)AuthorAgeFilesLines
* usb: gadget: add 'quirk_zlp_not_supp' to usb_gadgetRobert Baldyga2015-07-301-0/+1
| | | | | | | | | | | | | | | Due to some UDC controllers may not support zlp, usb gadget layer needs to provide a generic way to inform gadget functions about non-standard hardware limitations. This patch adds 'quirk_zlp_not_supp' field to struct usb_gadget and helper function gadget_is_zlp_supported(). It also sets 'quirk_zlp_not_supp' to 1 in musb UDC driver, which has such limitation. [ balbi@ti.com : make it build ] Signed-off-by: Robert Baldyga <r.baldyga@samsung.com> Signed-off-by: Felipe Balbi <balbi@ti.com>
* usb: gadget: add 'quirk_stall_not_supp' to usb_gadgetRobert Baldyga2015-07-301-0/+1
| | | | | | | | | | | | | Due to some UDC controllers may not support stalling, usb gadget layer needs to provide a generic way to inform gadget functions about non-standard hardware limitations. This patch adds 'quirk_stall_not_supp' field to struct usb_gadget and helper function gadget_is_stall_supported(). It also sets 'quirk_stall_not_supp' to 1 in at91_udc driver, which has such limitation. Signed-off-by: Robert Baldyga <r.baldyga@samsung.com> Signed-off-by: Felipe Balbi <balbi@ti.com>
* usb: gadget: add 'quirk_altset_not_supp' to usb_gadgetRobert Baldyga2015-07-302-0/+2
| | | | | | | | | | | | | Due to some UDC controllers may not support altsettings, usb gadget layer needs to provide a generic way to inform gadget functions about non-standard hardware limitations. This patch adds 'quirk_altset_not_supp' field to struct usb_gadget and helper function gadget_is_altset_supported(). It also sets 'quirk_altset_not_supp' to 1 in pxa25x_udc and pxa27x_udc drivers, which have such limitation. Signed-off-by: Robert Baldyga <r.baldyga@samsung.com> Signed-off-by: Felipe Balbi <balbi@ti.com>
* usb: dwc3: ep0: handle non maxpacket aligned transfers > 512Kishon Vijay Abraham I2015-07-301-14/+28
| | | | | | | | | | Use chained TRB mechanism to handle non maxpacket aligned transfers greater than bounce buffer size. With this the first TRB will be programmed to receive 'ALIGN(ur->length - maxp, maxp)' data and the second TRB will be programmed to receive the remaining data using bounce buffer. Signed-off-by: Kishon Vijay Abraham I <kishon@ti.com> Signed-off-by: Felipe Balbi <balbi@ti.com>
* usb: dwc3: ep0: Add chained TRB supportKishon Vijay Abraham I2015-07-302-4/+14
| | | | | | | | Add chained TRB support to ep0. Now TRB's can be chained just by invoking _dwc3_ep0_start_trans_ with 'chain' parameter set to true. Signed-off-by: Kishon Vijay Abraham I <kishon@ti.com> Signed-off-by: Felipe Balbi <balbi@ti.com>
* usb: dwc3; ep0: Modify _dwc3_ep0_start_trans_ API to take 'chain' parameterKishon Vijay Abraham I2015-07-301-7/+8
| | | | | | | | | No functional change. Added a new parameter in _dwc3_ep0_start_trans_ to indicate whether the TRB is a chained TRB or last TRB. This is in preparation for adding chained TRB support for ep0. Signed-off-by: Kishon Vijay Abraham I <kishon@ti.com> Signed-off-by: Felipe Balbi <balbi@ti.com>
* usb: dwc3: ep0: preparation for handling non maxpacket aligned transfers > 512Kishon Vijay Abraham I2015-07-301-8/+17
| | | | | | | | | | No functional change. This is in preparation for handling non maxpacket aligned transfers greater than bounce buffer size. This is basically to avoid code duplication when using chained TRB transfers to handle non maxpacket aligned transfers greater than bounce buffer size. Signed-off-by: Kishon Vijay Abraham I <kishon@ti.com> Signed-off-by: Felipe Balbi <balbi@ti.com>
* usb: dwc3: ep0: use _roundup_ to calculate the transfer sizeKishon Vijay Abraham I2015-07-301-3/+1
| | | | | | | | | No functional change. Used _roundup_ macro to calculate the transfer size aligned to maxpacket in dwc3_ep0_complete_data. It also makes it similar to how transfer size is calculated in __dwc3_ep0_do_control_data. Signed-off-by: Kishon Vijay Abraham I <kishon@ti.com> Signed-off-by: Felipe Balbi <balbi@ti.com>
* usb: dwc3: ep0: Fix mem corruption on OUT transfers of more than 512 bytesKishon Vijay Abraham I2015-07-301-2/+10
| | | | | | | | | | | | | | | | DWC3 uses bounce buffer to handle non max packet aligned OUT transfers and the size of bounce buffer is 512 bytes. However if the host initiates OUT transfers of size more than 512 bytes (and non max packet aligned), the driver throws a WARN dump but still programs the TRB to receive more than 512 bytes. This will cause bounce buffer to overflow and corrupt the adjacent memory locations which can be fatal. Fix it by programming the TRB to receive a maximum of DWC3_EP0_BOUNCE_SIZE (512) bytes. Cc: <stable@vger.kernel.org> # 3.4+ Signed-off-by: Kishon Vijay Abraham I <kishon@ti.com> Signed-off-by: Felipe Balbi <balbi@ti.com>
* usb: renesas_usbhs: Allow an OTG PHY driver to provide VBUSPhil Edworthy2015-07-291-0/+62
| | | | | | | | | These changes allow a PHY driver to trigger a VBUS interrupt and to provide the value of VBUS. Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Signed-off-by: Phil Edworthy <phil.edworthy@renesas.com> Signed-off-by: Felipe Balbi <balbi@ti.com>
* usb: gadget: zero: allocate and init otg descriptor by otg capabilitiesLi Jun2015-07-291-20/+21
| | | | | | | | | | Allocate and initialize usb otg descriptor according to gadget otg capabilities, add it for each usb configurations. If otg capability is not defined, keep its original otg descriptor unchanged. Reviewed-by: Roger Quadros <rogerq@ti.com> Signed-off-by: Li Jun <jun.li@freescale.com> Signed-off-by: Felipe Balbi <balbi@ti.com>
* usb: gadget: serial: allocate and init otg descriptor by otg capabilitiesLi Jun2015-07-291-16/+21
| | | | | | | | | | Allocate and initialize usb otg descriptor according to gadget otg capabilities, add it for each usb configurations. If otg capability is not defined, keep its original otg descriptor unchanged. Reviewed-by: Roger Quadros <rogerq@ti.com> Signed-off-by: Li Jun <jun.li@freescale.com> Signed-off-by: Felipe Balbi <balbi@ti.com>
* usb: gadget: printer: allocate and init otg descriptor by otg capabilitiesLi Jun2015-07-291-19/+30
| | | | | | | | | | Allocate and initialize usb otg descriptor according to gadget otg capabilities, add it for each usb configurations. If otg capability is not defined, keep its original otg descriptor unchanged. Reviewed-by: Roger Quadros <rogerq@ti.com> Signed-off-by: Li Jun <jun.li@freescale.com> Signed-off-by: Felipe Balbi <balbi@ti.com>
* usb: gadget: ncm: allocate and init otg descriptor by otg capabilitiesLi Jun2015-07-291-15/+19
| | | | | | | | | | Allocate and initialize usb otg descriptor according to gadget otg capabilities, add it for each usb configurations. If otg capability is not defined, keep its original otg descriptor unchanged. Signed-off-by: Li Jun <jun.li@freescale.com> Reviewed-by: Roger Quadros <rogerq@ti.com> Signed-off-by: Felipe Balbi <balbi@ti.com>
* usb: gadget: multi: allocate and init otg descriptor by otg capabilitiesLi Jun2015-07-291-17/+20
| | | | | | | | | | Allocate and initialize usb otg descriptor according to gadget otg capabilities, add it for each usb configurations. If otg capability is not defined, keep its original otg descriptor unchanged. Signed-off-by: Li Jun <jun.li@freescale.com> Reviewed-by: Roger Quadros <rogerq@ti.com> Signed-off-by: Felipe Balbi <balbi@ti.com>
* usb: gadget: mass_storage: allocate and init otg descriptor by otg capabilitiesLi Jun2015-07-291-16/+19
| | | | | | | | | | Allocate and initialize usb otg descriptor according to gadget otg capabilities, add it for each usb configurations. If otg capability is not defined, keep its original otg descriptor unchanged. Signed-off-by: Li Jun <jun.li@freescale.com> Reviewed-by: Roger Quadros <rogerq@ti.com> Signed-off-by: Felipe Balbi <balbi@ti.com>
* usb: gadget: hid: allocate and init otg descriptor by otg capabilitiesLi Jun2015-07-291-16/+20
| | | | | | | | | | Allocate and initialize usb otg descriptor according to gadget otg capabilities, add it for each usb configurations. If otg capability is not defined, keep its original otg descriptor unchanged. Signed-off-by: Li Jun <jun.li@freescale.com> Reviewed-by: Roger Quadros <rogerq@ti.com> Signed-off-by: Felipe Balbi <balbi@ti.com>
* usb: gadget: g_ffs: allocate and init otg descriptor by otg capabilitiesLi Jun2015-07-291-15/+17
| | | | | | | | | | Allocate and initialize usb otg descriptor according to gadget otg capabilities, add it for each usb configurations. If otg capability is not defined, keep its original otg descriptor unchanged. Signed-off-by: Li Jun <jun.li@freescale.com> Reviewed-by: Roger Quadros <rogerq@ti.com> Signed-off-by: Felipe Balbi <balbi@ti.com>
* usb: gadget: cdc2: allocate and init otg descriptor by otg capabilitiesLi Jun2015-07-291-16/+19
| | | | | | | | | | Allocate and initialize usb otg descriptor according to gadget otg capabilities, add it for each usb configurations. If otg capability is not defined, keep its original otg descriptor unchanged. Signed-off-by: Li Jun <jun.li@freescale.com> Reviewed-by: Roger Quadros <rogerq@ti.com> Signed-off-by: Felipe Balbi <balbi@ti.com>
* usb: gadget: audio: allocate and init otg descriptor by otg capabilitiesLi Jun2015-07-291-15/+19
| | | | | | | | | | Allocate and initialize usb otg descriptor according to gadget otg capabilities, add it for each usb configurations. If otg capability is not defined, keep its original otg descriptor unchanged. Signed-off-by: Li Jun <jun.li@freescale.com> Reviewed-by: Roger Quadros <rogerq@ti.com> Signed-off-by: Felipe Balbi <balbi@ti.com>
* usb: gadget: acm_ms: allocate and init otg descriptor by otg capabilitiesLi Jun2015-07-291-16/+19
| | | | | | | | | | Allocate and initialize usb otg descriptor according to gadget otg capabilities, add it for each usb configurations. If otg capability is not defined, keep its original otg descriptor unchanged. Signed-off-by: Li Jun <jun.li@freescale.com> Reviewed-by: Roger Quadros <rogerq@ti.com> Signed-off-by: Felipe Balbi <balbi@ti.com>
* usb: gadget: ether: allocate and init otg descriptor by otg capabilitiesLi Jun2015-07-291-16/+20
| | | | | | | | | | | Allocate and initialize usb otg descriptor according to gadget otg capabilities, add it for each usb configurations, free it while ether unbind. If otg capability is not defined, keep its otg descriptor unchanged. Signed-off-by: Li Jun <jun.li@freescale.com> Reviewed-by: Roger Quadros <rogerq@ti.com> Signed-off-by: Felipe Balbi <balbi@ti.com>
* usb: gadget: configfs: allocate and init otg descriptor by otg capabilitiesLi Jun2015-07-291-9/+20
| | | | | | | | | | | Allocate and initialize usb otg descriptor according to gadget otg capabilities, add it for each usb configurations, free it while composite unbind. If otg capability is not defined, keep its otg descriptor unchanged. Signed-off-by: Li Jun <jun.li@freescale.com> Reviewed-by: Roger Quadros <rogerq@ti.com> Signed-off-by: Felipe Balbi <balbi@ti.com>
* usb: gadget: add usb otg descriptor allocate and init interfaceLi Jun2015-07-291-0/+56
| | | | | | | | | | | | | Allocate usb otg descriptor and initialize it according to gadget's otg capabilities, if usb_otg_caps is not set, keep settings as current gadget drivers. With this 2 new interfaces, gadget can use usb_otg_descriptor for OTG 1.x, and usb_otg20_descriptor for OTG 2.0 or above, and otg features can be decided by the combination of usb hardware property and driver config. Signed-off-by: Li Jun <jun.li@freescale.com> Reviewed-by: Roger Quadros <rogerq@ti.com> Signed-off-by: Felipe Balbi <balbi@ti.com>
* usb: chipidea: update ci_otg_is_fsm_mode conditionsLi Jun2015-07-292-1/+5
| | | | | | | | | | After introduce usb otg properties, update ci_otg_is_fsm_mode conditions to be depending on both usb hardware properties and usb driver config, also resolve a compile issue in debug.c after the API change. Acked-by: Peter Chen <peter.chen@freescale.com> Signed-off-by: Li Jun <jun.li@freescale.com> Signed-off-by: Felipe Balbi <balbi@ti.com>
* usb: chipidea: set usb otg capabilitiesLi Jun2015-07-292-1/+21
| | | | | | | | | | Init and update otg capabilities by DT, set gadget's otg capabilities accordingly. Acked-by: Peter Chen <peter.chen@freescale.com> Reviewed-by: Roger Quadros <rogerq@ti.com> Signed-off-by: Li Jun <jun.li@freescale.com> Signed-off-by: Felipe Balbi <balbi@ti.com>
* usb: common: add API to update usb otg capabilities by device treeLi Jun2015-07-291-0/+56
| | | | | | | | | Check property of usb hardware to update otg version and disable SRP, HNP and ADP if its disable flag is present. Reviewed-by: Roger Quadros <rogerq@ti.com> Signed-off-by: Li Jun <jun.li@freescale.com> Signed-off-by: Felipe Balbi <balbi@ti.com>
* usb: gadget: composite: add USB_DT_OTG request handlingMacpaul Lin2015-07-291-0/+27
| | | | | | | | | | Copy usb_otg_descriptor from config's descriptor if host requests USB_DT_OTG. Signed-off-by: Macpaul Lin <macpaul@gmail.com> Signed-off-by: Li Jun <jun.li@freescale.com> Reviewed-by: Roger Quadros <rogerq@ti.com> Signed-off-by: Felipe Balbi <balbi@ti.com>
* usb: musb: sunxi: Add support for musb controller in A33 SoCHans de Goede2015-07-291-0/+15
| | | | | | | | | The A33 SoC uses the same musb controller as found on the A31 and later, but allwinner has removed the configdata register, this commit adds special handling for this. Signed-off-by: Hans de Goede <hdegoede@redhat.com> Signed-off-by: Felipe Balbi <balbi@ti.com>
* usb: musb: sunxi: Add support for musb controller in A31 SoCHans de Goede2015-07-291-6/+44
| | | | | | | | | | The A31 SoC uses the same musb controller as found in earlier SoCs, but it is hooked up slightly different. Its SRAM is private and no longer controlled through the SRAM controller, and its reset is controlled via a separate reset controller. This commit adds support for this setup. Signed-off-by: Hans de Goede <hdegoede@redhat.com> Signed-off-by: Felipe Balbi <balbi@ti.com>
* usb: musb: sunxi: Add support for the Allwinner sunxi musb controllerHans de Goede2015-07-293-1/+716
| | | | | | | | | | | | | | | | This is based on initial code to get the Allwinner sunxi musb controller supported by Chen-Yu Tsai and Roman Byshko. This adds support for the Allwinner sunxi musb controller in both host only and otg mode. Peripheral only mode is not supported, as no boards use that. This has been tested on a cubietruck (A20 SoC) and an UTOO P66 tablet (A13 SoC) with a variety of devices in host mode and with the g_serial gadget driver in peripheral mode, plugging otg / host cables in/out a lot of times in all possible imaginable plug orders. Signed-off-by: Hans de Goede <hdegoede@redhat.com> Signed-off-by: Felipe Balbi <balbi@ti.com>
* usb: gadget: f_obex: use bind_deactivated flagRobert Baldyga2015-07-291-18/+1
| | | | | | | | | | Use bind_deactivated flag instead of calling usb_function_deactivate() in function bind(). Field 'can_activate' in struct f_obex is no longer needed as setting 'bind_deactivated' flag makes us sure, that the function will be binded only if deactivation can be performed successfully. Signed-off-by: Robert Baldyga <r.baldyga@samsung.com> Signed-off-by: Felipe Balbi <balbi@ti.com>
* usb: gadget: f_uvc: use bind_deactivated flagRobert Baldyga2015-07-291-6/+1
| | | | | | | | Use bind_deactivated flag instead of calling usb_function_deactivate() in function bind(). Signed-off-by: Robert Baldyga <r.baldyga@samsung.com> Signed-off-by: Felipe Balbi <balbi@ti.com>
* usb: composite: add bind_deactivated flag to usb_functionRobert Baldyga2015-07-291-0/+6
| | | | | | | | | | | | | | This patch introduces 'bind_deactivated' flag in struct usb_function. Functions which don't want to be activated automatically after bind should set this flag, and when they start to be ready to work they should call usb_function_activate(). When USB function sets 'bind_deactivated' flag, initial deactivation counter is incremented automatically, so there is no need to call usb_function_deactivate() in function bind. Signed-off-by: Robert Baldyga <r.baldyga@samsung.com> Signed-off-by: Felipe Balbi <balbi@ti.com>
* usb: composite: fix usb_function_activate/deactivate functionsRobert Baldyga2015-07-291-2/+2
| | | | | | | | | | | | Using usb_gadget_disconnect to make gadget temporarily invisible to host doesn't provide desired result, because gadget is connected immediately after binding regardless to previous usb_gadget_disconnect() calls. For this reason we use usb_gadget_deactivate() instead of usb_gadget_disconnect() to make it working as expected. Signed-off-by: Robert Baldyga <r.baldyga@samsung.com> Signed-off-by: Felipe Balbi <balbi@ti.com>
* usb: phy: qcom: New APQ8016/MSM8916 USB transceiver driverIvan T. Ivanov2015-07-293-0/+451
| | | | | | | | Driver handles PHY initialization, clock management, power management and workarounds required after resetting the hardware. Signed-off-by: Ivan T. Ivanov <ivan.ivanov@linaro.org> Signed-off-by: Felipe Balbi <balbi@ti.com>
* usb: gadget: storage-common: Set FSG_MAX_LUNS to 16Krzysztof Opasiak2015-07-292-2/+2
| | | | | | | | | Mass storage spec allows up to 16 LUNs, so let's not add some more restrictive limits. Signed-off-by: Krzysztof Opasiak <k.opasiak@samsung.com> Acked-by: Michal Nazarewicz <mina86@mina86.com> Signed-off-by: Felipe Balbi <balbi@ti.com>
* usb: gadget: mass_storage: Place EXPORT_SYMBOL_GPL() after func definitionKrzysztof Opasiak2015-07-291-1/+1
| | | | | | | | | EXPORT_SYMBOL_GPL() is usually placed after function definition not before. Signed-off-by: Krzysztof Opasiak <k.opasiak@samsung.com> Acked-by: Michal Nazarewicz <mina86@mina86.com> Signed-off-by: Felipe Balbi <balbi@ti.com>
* usb: gadget: mass_storage: Free buffers if create lun failsKrzysztof Opasiak2015-07-291-0/+5
| | | | | | | | | | Creation of LUN 0 may fail (for example due to ENOMEM). As fsg_common_set_num_buffers() does some memory allocation we should free it before it becomes unavailable. Signed-off-by: Krzysztof Opasiak <k.opasiak@samsung.com> Acked-by: Michal Nazarewicz <mina86@mina86.com> Signed-off-by: Felipe Balbi <balbi@ti.com>
* usb: dwc3: gadget: defer endpoint name changeFelipe Balbi2015-07-291-21/+21
| | | | | | | We should only change endpoint names when we actually manage to enable/disable it. Signed-off-by: Felipe Balbi <balbi@ti.com>
* usb: dwc3: gadget: add a trace when disabling EPsFelipe Balbi2015-07-291-0/+2
| | | | | | | | We have a "Enabling %s" trace when enabling an endpoint but that message felt lonely without a matching "Disabling %s". Add it. Signed-off-by: Felipe Balbi <balbi@ti.com>
* usb: dwc3: core: remove unnecessary dev_warn()Felipe Balbi2015-07-291-2/+0
| | | | | | | | | | | | | | | | When a SoC supports both PHY interfaces but doesn't define HSPHY in DT/pdata, we will get an unnecessary dev_warn() which can mislead users into thinking that they're missing something. Instead, let's just silently rely on a correct default. If the HW default is wrong, then HSPHY is required and USB won't work, this will be motivation enough for engineers to patch their way into a working setup. Reported-by: Murali Karicheri <m-karicheri2@ti.com> Signed-off-by: Felipe Balbi <balbi@ti.com>
* usb: pass flags parameter to gpiod_get functionsUwe Kleine-König2015-07-292-3/+5
| | | | | | | | | | | | | | | Since 39b2bbe3d715 (gpio: add flags argument to gpiod_get*() functions) which appeared in v3.17-rc1, the gpiod_get* functions take an additional parameter that allows to specify direction and initial value for output. Currently this parameter is made optional with the help of a cpp trick. To allow dropping this hack convert callers to explictly pass a value for flags. Acked-by: Felipe Balbi <balbi@ti.com> Acked-by: Robert Jarzmik <robert.jarzmik@free.fr> Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de> Signed-off-by: Felipe Balbi <balbi@ti.com>
* usb: dwc3: pci: make better use of gpiod APIUwe Kleine-König2015-07-291-10/+16
| | | | | | | | | | | | | | | | | | Since 39b2bbe3d715 (gpio: add flags argument to gpiod_get*() functions) which appeared in v3.17-rc1, the gpiod_get* functions take an additional parameter that allows to specify direction and initial value for output. Use this additional parameter and the _optional variant to simplify the driver and improve error handling. Also expand the comment to explain why it's not sensible to switch to devm_gpiod_get and why the gpiod_put is also necessary. Furthermore this is one caller less that stops us making the flags argument to gpiod_get*() mandatory. Tested-by: Heikki Krogerus <heikki.krogerus@linux.intel.com> Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de> Signed-off-by: Felipe Balbi <balbi@ti.com>
* usb: phy: msm-usb: Replace deprecated API of extconChanwoo Choi2015-07-291-10/+10
| | | | | | | | | | | | | | | This patch removes the deprecated notifier API of extcon framwork and then use the new extcon API with the unique id to indicate the each external connector (USB, USB-HOST). Alter deprecated API as following: - extcon_register_interest() -> extcon_register_notifier() - extcon_get_cable_state(*edev, char *) -> extcon_get_cable_state_(*edev, id) Cc: Felipe Balbi <balbi@ti.com> Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org> Signed-off-by: Chanwoo Choi <cw00.choi@samsung.com> Signed-off-by: Felipe Balbi <balbi@ti.com>
* usb: renesas_usbhs: Replace deprecated API of extconChanwoo Choi2015-07-291-1/+1
| | | | | | | | | | | | | | | | | This patch removes the deprecated API of extcon and then use the new extcon API with the unique id to indicate the each external connector (USB-HOST). - extcon_get_cable_state(*edev, char *) -> extcon_get_cable_state_(*edev, id) Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org> Cc: Felipe Balbi <balbi@ti.com> Cc: Yoshihiro Shimoda <yoshihiro.shimoda.uh@renesas.com> Cc: Sergei Shtylyov <sergei.shtylyov@cogentembedded.com> Cc: Yoshihiro Shimoda <yoshihiro.shimoda.uh@renesas.com> Cc: Peter Chen <peter.chen@freescale.com> Cc: Varka Bhadram <varkab@cdac.in> Cc: Takeshi Kihara <takeshi.kihara.df@renesas.com> Signed-off-by: Chanwoo Choi <cw00.choi@samsung.com> Signed-off-by: Felipe Balbi <balbi@ti.com>
* usb: phy: tahvo: Use devm_extcon_dev_[allocate|register]() and replace ↵Chanwoo Choi2015-07-291-14/+13
| | | | | | | | | | | | | deprecated API This patch uses the devm_extcon_dev_[allocate|register]() to manage the resource automatically and replace deprecated API as following: - extcon_[set|get]_cable_state(*edev, char *) -> extcon_[set|get]_cable_state_(*edev, id) Cc: Felipe Balbi <balbi@ti.com> Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org> Signed-off-by: Chanwoo Choi <cw00.choi@samsung.com> Signed-off-by: Felipe Balbi <balbi@ti.com>
* usb: phy: omap-otg: Replace deprecated API of extconChanwoo Choi2015-07-291-11/+11
| | | | | | | | | | | | | | | | This patch removes the deprecated notifier API of extcon framwork and then use the new extcon API with the unique id to indicate the each external connector (USB, USB-HOST). Alter deprecated API as following: - extcon_register_interest() -> extcon_register_notifier() - extcon_get_cable_state(*edev, char *) -> extcon_get_cable_state_(*edev, id) [ balbi@ti.com : fix build break ] Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org> Signed-off-by: Chanwoo Choi <cw00.choi@samsung.com> Signed-off-by: Felipe Balbi <balbi@ti.com>
* usb: dwc3: omap: Replace deprecated API of extconChanwoo Choi2015-07-291-19/+13
| | | | | | | | | | | | | | | This patch removes the deprecated notifier API of extcon framwork and then use the new extcon API with the unique id to indicate the each external connector (USB, USB-HOST). Alter deprecated API as following: - extcon_register_interest() -> extcon_register_notifier() - extcon_get_cable_state(*edev, char *) -> extcon_get_cable_state_(*edev, id) Cc: Felipe Balbi <balbi@ti.com> Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org> Signed-off-by: Chanwoo Choi <cw00.choi@samsung.com> Signed-off-by: Felipe Balbi <balbi@ti.com>
* usb: udc: Convert use of __constant_cpu_to_leXX to cpu_to_leXXVaishali Thakkar2015-07-292-3/+3
| | | | | | | | | | | | | | | | | | | | | | | | In big endian cases, the macro cpu_to_le{16,32} unfolds to __swab{16,32} which provides special case for constants. In little endian cases, __constant_cpu_to_le{16,32} and cpu_to_le{16,32} expand directly to the same expression. So, replace __constant_cpu_to_le{16,32} with cpu_to_le{16,32} with the goal of getting rid of the definition of __constant_cpu_to_le{16,32} completely. The semantic patch that performs this transformation is as follows: @@expression x;@@ ( - __constant_cpu_to_le16(x) + cpu_to_le16(x) | - __constant_cpu_to_le32(x) + cpu_to_le32(x) ) Signed-off-by: Vaishali Thakkar <vthakkar1994@gmail.com> Signed-off-by: Felipe Balbi <balbi@ti.com>
OpenPOWER on IntegriCloud