Some module names are not up to date in Kconfig help texts. Fix that.
Signed-off-by: Aaro Koskinen <[email protected]>
Signed-off-by: Felipe Balbi <[email protected]>
phy-isp1301-omap produces the following smatch warnings:
drivers/usb/phy/phy-isp1301-omap.c:1280 isp1301_set_host() warn: variable dereferenced before check 'otg' (see line 1278)
drivers/usb/phy/phy-isp1301-omap.c:1336 isp1301_set_peripheral() warn: variable dereferenced before check 'otg' (see line 1334)
drivers/usb/phy/phy-isp1301-omap.c:1417 isp1301_start_srp() warn: variable dereferenced before check 'otg' (see line 1414)
drivers/usb/phy/phy-isp1301-omap.c:1445 isp1301_start_hnp() warn: variable dereferenced before check 'otg' (see line 1442)
Fix by deleting bogus NULL pointer checks. The USB framework will always
call us with a valid OTG pointer.
Signed-off-by: Aaro Koskinen <[email protected]>
Signed-off-by: Felipe Balbi <[email protected]>
phy-tahvo introduced the following smatch warnings:
drivers/usb/phy/phy-tahvo.c:203 tahvo_usb_set_host() warn: variable dereferenced before check 'otg' (see line 199)
drivers/usb/phy/phy-tahvo.c:235 tahvo_usb_set_peripheral() warn: variable dereferenced before check 'otg' (see line 231)
Fix by deleting bogus NULL pointer checks. The USB framework will always
call us with a valid OTG pointer.
Reported-by: Dan Carpenter <[email protected]>
Signed-off-by: Aaro Koskinen <[email protected]>
Signed-off-by: Felipe Balbi <[email protected]>
Silences the below warning:
WARNING: sizeof *twl should be sizeof(*twl)
Signed-off-by: Sachin Kamat <[email protected]>
Signed-off-by: Felipe Balbi <[email protected]>
Local symbols appearing only in this file are made static.
Signed-off-by: Sachin Kamat <[email protected]>
Signed-off-by: Felipe Balbi <[email protected]>
'keystone_usbphy_ids' is always compiled in. Hence the
helper macro is not needed.
Signed-off-by: Sachin Kamat <[email protected]>
Cc: WingMan Kwok <[email protected]>
Signed-off-by: Felipe Balbi <[email protected]>
Mutex obtained at the beginning of the function should
be released at the end to avoid double locking.
Signed-off-by: Anton Tikhomirov <[email protected]>
Signed-off-by: Felipe Balbi <[email protected]>
This adds omap control module support for USBSS in AM437x SoC.
Update DT binding information to reflect these changes.
Acked-by: Roger Quadros <[email protected]>
Signed-off-by: George Cherian <[email protected]>
Signed-off-by: Felipe Balbi <[email protected]>
Include header file drivers/usb/phy/am35x-phy-control.h in
phy/phy-am335x-control.c because function am335x_get_phy_control() has
its prototype declaration in drivers/usb/phy/am35x-phy-control.h.
Also, remove definition of structure phy_control because it is already
defined in the included header.
This eliminates the following warning in phy/phy-am335x-control.c:
drivers/usb/phy/phy-am335x-control.c:114:21: warning: no previous prototype for ‘am335x_get_phy_control’ [-Wmissing-prototypes]
Signed-off-by: Rashika Kheria <[email protected]>
Reviewed-by: Josh Triplett <[email protected]>
Signed-off-by: Felipe Balbi <[email protected]>
USB remote wakeup using PHY wakeup is supported only in standby mode.
Enabling the PHY_WKUP will break DS0 mode of system suspend.
If the same is enabled while entering DS0, AM33xx never stays in DS0,
it returns immediately from DS0. By default make the PHY wakeup
disabled, using sysfs entry enable the same manually to get
the remote wakeup working from standby.
echo enabled > /sys/bus/platform/device/<usb phy id>/power/wakeup
This will enable the PHY wakeup while going to standby.
PHY wakeup feature is required to wakeup the system from standby
state. Since AM33xx has a bug in which PHY wakeup should not
be enabled while entering DS0, disable the same by default.
A user wishing to use USB wakeup from standby mode need to enable
the same using the sysfs entries.
Also remove am335x_phy_runtime_(suspend/resume) this driver doesnot really
enable/disable the clocks to the PHY.
Add am335x_phy_(suspend/resume) and use the same for enabling the PHY_WKUP.
Signed-off-by: George Cherian <[email protected]>
Signed-off-by: Felipe Balbi <[email protected]>
Linux 3.13-rc4
* tag 'v3.13-rc4': (1001 commits)
Linux 3.13-rc4
null_blk: mem garbage on NUMA systems during init
radeon_pm: fix oops in hwmon_attributes_visible() and radeon_hwmon_show_temp_thresh()
Revert "selinux: consider filesystem subtype in policies"
igb: Fix for issue where values could be too high for udelay function.
i40e: fix null dereference
ARM: fix asm/memory.h build error
dm array: fix a reference counting bug in shadow_ablock
dm space map: disallow decrementing a reference count below zero
mm: memcg: do not allow task about to OOM kill to bypass the limit
mm: memcg: fix race condition between memcg teardown and swapin
thp: move preallocated PTE page table on move_huge_pmd()
mfd/rtc: s5m: fix register updating by adding regmap for RTC
rtc: s5m: enable IRQ wake during suspend
rtc: s5m: limit endless loop waiting for register update
rtc: s5m: fix unsuccesful IRQ request during probe
drivers/rtc/rtc-s5m.c: fix info->rtc assignment
include/linux/kernel.h: make might_fault() a nop for !MMU
drivers/rtc/rtc-at91rm9200.c: correct alarm over day/month wrap
procfs: also fix proc_reg_get_unmapped_area() for !MMU case
...
Signed-off-by: Felipe Balbi <[email protected]>
both isp1301-omap and fsl_usb2_otg drivers
depend on usb_bus_start_enum() which is only
defined if CONFIG_USB != n. There is a problem,
however, where both those drivers could be
statically linked, while CONFIG_USB=m.
Fix the problem by fixing driver dependency.
Signed-off-by: Felipe Balbi <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
We need to initialize the notifer before use it.
So lets initialize it when add a new phy device to
reduce the code redundancy.
Signed-off-by: Neil Zhang <[email protected]>
Signed-off-by: Felipe Balbi <[email protected]>
Add Keystone platform USB PHY driver support. Current main purpose
of this driver is to enable the PHY reference clock gate on the
Keystone SoC. Otherwise it is a nop PHY.
[ [email protected] : add COMPILE_TEST as a possible dependency
make sure drvdata is initialized before adding PHY ]
Cc: Greg Kroah-Hartman <[email protected]>
Acked-by: Santosh Shilimkar <[email protected]>
Signed-off-by: WingMan Kwok <[email protected]>
Signed-off-by: Felipe Balbi <[email protected]>
Use usb_add_phy_dev instead of usb_add_phy, so that devices can
be bound to the phy. This is needed to set up USB phy for
some internal PCI USB host controllers on R-Car Gen2.
Signed-off-by: Valentine Barshak <[email protected]>
Signed-off-by: Felipe Balbi <[email protected]>
Individual controller driver has different requirement for wakeup
setting, so move it from core to itself. In order to align with
current etting the default wakeup setting is enabled (except for
chipidea host).
Pass compile test with below commands:
make O=outout/all allmodconfig
make -j$CPU_NUM O=outout/all drivers/usb
Signed-off-by: Peter Chen <[email protected]>
Acked-by: Alan Stern <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
Add Tahvo USB transceiver driver.
Based on old code from linux-omap tree. The original driver was written
by Juha Yrjölä, Tony Lindgren, and Timo Teräs.
Signed-off-by: Aaro Koskinen <[email protected]>
Signed-off-by: Felipe Balbi <[email protected]>
Transceivers need to manage OTG controller state on OMAP1 to enable
switching between peripheral and host modes. Provide a driver for that.
Signed-off-by: Aaro Koskinen <[email protected]>
Signed-off-by: Felipe Balbi <[email protected]>
usb: phy-tegra-usb.c: wrong pointer check for remap UTMI
A wrong pointer was used to test the result of devm_ioremap()
Acked-by: Stephen Warren <[email protected]>
Reviewed-by: Thierry Reding <[email protected]>
Signed-off-by: Chris Ruehl <[email protected]>
Acked-by: Venu Byravarasu <[email protected]>
Signed-off-by: Felipe Balbi <[email protected]>
clk_prepare_enable() may fail, so let's check its return value and propagate it
in the case of error.
Acked-by: Peter Chen <[email protected]>
Signed-off-by: Fabio Estevam <[email protected]>
Signed-off-by: Felipe Balbi <[email protected]>
This patch removes dependency on Freescale USB UTG Transceiver
driver and makes OTG FSM implementation selectable.
Signed-off-by: Anton Tikhomirov <[email protected]>
Signed-off-by: Felipe Balbi <[email protected]>
Other USB drivers may want to use OTG final state machine
implementation, so make this header available for them.
Signed-off-by: Anton Tikhomirov <[email protected]>
Signed-off-by: Felipe Balbi <[email protected]>
OTG Final State Machine calls functions which may sleep.
For example, start_gadget callback implementation can use
usb_gadget_vbus_connect(), whose context: can sleep.
If so, mutex should be used instead of spinlock.
Signed-off-by: Anton Tikhomirov <[email protected]>
Signed-off-by: Felipe Balbi <[email protected]>
if this header is included twice, we would have
redefinition build errors. Fix this.
Signed-off-by: Anton Tikhomirov <[email protected]>
Signed-off-by: Felipe Balbi <[email protected]>
this header uses spinlocks and errno values, so
we must include <linux/spinlock.h> and <linux/errno.h>
to avoid build errors.
Signed-off-by: Felipe Balbi <[email protected]>
"ret" needs to be signed for the error handling to work.
Signed-off-by: Dan Carpenter <[email protected]>
Signed-off-by: Felipe Balbi <[email protected]>
In case of error, the function platform_device_register_simple() returns
ERR_PTR() and never returns NULL. The NULL test in the return value check
should be replaced with IS_ERR().
Signed-off-by: Wei Yongjun <[email protected]>
Signed-off-by: Felipe Balbi <[email protected]>
We need to set mxs_phy rather as the platform drvdata so that we can get
the correct mxs_phy in mxs_phy_remove().
Signed-off-by: Jisheng Zhang <[email protected]>
Acked-by: Peter Chen <[email protected]>
Signed-off-by: Felipe Balbi <[email protected]>
Commit bd27fa44e1 (usb: phy: generic:
Don't use regulator framework for RESET line) introduced regression: All
users of usb_nop_xceiv_register() will fail because there is no platform
data and the default reset GPIO is 0 which is a valid GPIO. Fix that.
Signed-off-by: Aaro Koskinen <[email protected]>
Acked-by: Roger Quadros <[email protected]>
Signed-off-by: Felipe Balbi <[email protected]>
instead of having each user of generic phy find
out about its own resources and pass it to the
core layer, have th core layer itself figure that
out. It's as simple as moving a piece of code
around. This fixes a big regression caused during
the merge window where am335x-based platforms
wouldn't be able to probe their PHY driver.
Signed-off-by: Felipe Balbi <[email protected]>
Commit [4d175f34: usb: phy: nop: Defer clock prepare until PHY init]
removed a goto reaching behind a “return ret” at the end of the function
thus removing the only possible way that statement could be reached, and
so rendering it a dead code. This commit cleans it up by removing said
dead code.
Signed-off-by: Michal Nazarewicz <[email protected]>
Signed-off-by: Felipe Balbi <[email protected]>
This patch removes limitation when only one PHY of specific type
could be used.
Signed-off-by: Anton Tikhomirov <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
Felipe writes:
usb: patches for v3.13
Final conversions to configfs for mass storage, acm_ms, and
multi gadgets.
MUSB should now work out of the box on AM335x-based boards
(beagle bone white and black) with DMA thanks to Sebastian's
work.
We can now enable VERBOSE_DEBUG on builds of drivers/usb/gadget/
by selecting CONFIG_USB_GADGET_VERBOSE.
s3c-hsotg got quite a few non-critical fixes but also learned
a few new tricks (isochronous transfers, multi count support).
The Marvel USB3 Controller driver got a memory leak fix.
devm_usb_get_phy() learned not to return NULL, ever.
Other than these patches, we have the usual set of cleanups
ranging from removal of unnecessary *_set_drvdata() to using
SIMPLE_DEV_PM_OPS.
Signed-of-by: Felipe Balbi <[email protected]>
'of_match_ptr' is defined in linux/of.h. Include it explicitly to
avoid build breakage in the future.
Signed-off-by: Sachin Kamat <[email protected]>
Signed-off-by: Felipe Balbi <[email protected]>
These aren't necessary after switch and if blocks.
Signed-off-by: Joe Perches <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
The callers are expecting an ERR_PTR value in case
of an error. Change he code to return with an encoded
-ENOMEM value in the case of a failed devres_alloc call.
Signed-off-by: Gabor Juhos <[email protected]>
Signed-off-by: Felipe Balbi <[email protected]>
This adds RCAR Gen2 USB phy support. The driver configures
USB channels 0/2 which are shared between PCI USB hosts and
USBHS/USBSS devices. It also controls internal USBHS phy.
Signed-off-by: Valentine Barshak <[email protected]>
Signed-off-by: Felipe Balbi <[email protected]>
Reorder variables in struct otg_fsm as they appear in OTG and EH
supplement to USB2.0.
Signed-off-by: Anton Tikhomirov <[email protected]>
Signed-off-by: Felipe Balbi <[email protected]>
Several input/output variables missed in current FSM implementation.
This patch adds and makes use of them as specified in OTG and EH
supplement to USB2.0.
Signed-off-by: Anton Tikhomirov <[email protected]>
Signed-off-by: Felipe Balbi <[email protected]>
In accordance with OTG and EH supplement, the correct name
of the FSM input is b_ssend_srp.
Signed-off-by: Anton Tikhomirov <[email protected]>
Signed-off-by: Felipe Balbi <[email protected]>
Mark informative variables with suffix '_inf' to distinguish
them from other non-informative variables with the same name.
If such non-informative varialbes were missed, they are created.
Signed-off-by: Anton Tikhomirov <[email protected]>
Signed-off-by: Felipe Balbi <[email protected]>
a_bidl_adis_tmr and a_wait_vfall_tmr OTG timers missed in
current FSM implementation. This patch adds and makes use
of the timers as speicfied in OTG and EH supplement to USB2.0.
Signed-off-by: Anton Tikhomirov <[email protected]>
Signed-off-by: Felipe Balbi <[email protected]>
Get rid of using OTG driver specific timers by passing timer
type to corresponding callbacks.
Signed-off-by: Anton Tikhomirov <[email protected]>
Signed-off-by: Felipe Balbi <[email protected]>
This patch implements missed helper functions for start_gadget() and
start_host() OTG FSM callbacks.
Signed-off-by: Anton Tikhomirov <[email protected]>
Signed-off-by: Felipe Balbi <[email protected]>
Existence of callback must be checked to avoid NULL pointer
dereferncing.
Signed-off-by: Anton Tikhomirov <[email protected]>
Signed-off-by: Felipe Balbi <[email protected]>