The new helper returns index of the matching string in an array.
We are going to use it here.
Signed-off-by: Andy Shevchenko <[email protected]>
Acked-by: Thierry Reding <[email protected]>
Signed-off-by: Kishon Vijay Abraham I <[email protected]>
The reason why this was originally commented out is no longer clear. The
UPHY driver for SATA works fine with or without this change. The reset
value of the XDIGCLK_EN bit is 0, so unless programmed by the bootloader
this shouldn't make a difference anyway.
Define a macro for this bit and uncomment the code. This also fixes a
coverity issue brought to my attention by Rohith because not only is the
XDIGCLK_EN field modification commented out, but also the register write
which causes none of the earlier modifications of the register value to
be written to the register and the value being overwritten.
Reported-by: Rohith Seelaboyina <[email protected]>
Signed-off-by: Thierry Reding <[email protected]>
Signed-off-by: Kishon Vijay Abraham I <[email protected]>
The assignment of map to itself is redundant and can be removed.
Detected with Coccinelle.
Signed-off-by: Colin Ian King <[email protected]>
Signed-off-by: Kishon Vijay Abraham I <[email protected]>
Fix child-node lookups during probe, which ended up searching the whole
device tree depth-first starting at the parents rather than just
matching on their children.
To make things worse, some parent nodes could end up being being
prematurely freed (by tegra_xusb_pad_register()) as
of_find_node_by_name() drops a reference to its first argument.
Fixes: 53d2a715c2 ("phy: Add Tegra XUSB pad controller support")
Cc: stable <[email protected]> # 4.7
Cc: Thierry Reding <[email protected]>
Signed-off-by: Johan Hovold <[email protected]>
Signed-off-by: Kishon Vijay Abraham I <[email protected]>
kasprintf() can fail and it's return value must be checked.
Signed-off-by: Arvind Yadav <[email protected]>
Signed-off-by: Kishon Vijay Abraham I <[email protected]>
Remove unneeded variables when "0" can be returned.
Generated by: scripts/coccinelle/misc/returnvar.cocci
Signed-off-by: Vivek Gautam <[email protected]>
Cc: Kishon Vijay Abraham I <[email protected]>
Signed-off-by: Kishon Vijay Abraham I <[email protected]>
Use PTR_ERR_OR_ZERO rather than if(IS_ERR(...)) + PTR_ERR.
Generated by: scripts/coccinelle/api/ptr_ret.cocci
Signed-off-by: Vivek Gautam <[email protected]>
Cc: Kishon Vijay Abraham I <[email protected]>
Signed-off-by: Kishon Vijay Abraham I <[email protected]>
We get 1 warning when building kernel with W=1:
drivers/phy/tegra/xusb.c:104:5: warning: no previous prototype for 'tegra_xusb_lane_lookup_function' [-Wmissing-prototypes]
In fact, this function is only used in the file in which it is
declared and don't need a declaration, but can be made static.
So this patch marks it 'static'.
Signed-off-by: Baoyou Xie <[email protected]>
Acked-by: Arnd Bergmann <[email protected]>
Acked-by: Thierry Reding <[email protected]>
Signed-off-by: Kishon Vijay Abraham I <[email protected]>
We get 5 warnings when building kernel with W=1:
drivers/phy/tegra/xusb.c:948:27: warning: no previous prototype for 'tegra_xusb_padctl_get' [-Wmissing-prototypes]
drivers/phy/tegra/xusb.c:981:6: warning: no previous prototype for 'tegra_xusb_padctl_put' [-Wmissing-prototypes]
drivers/phy/tegra/xusb.c:988:5: warning: no previous prototype for 'tegra_xusb_padctl_usb3_save_context' [-Wmissing-prototypes]
drivers/phy/tegra/xusb.c:998:5: warning: no previous prototype for 'tegra_xusb_padctl_hsic_set_idle' [-Wmissing-prototypes]
drivers/phy/tegra/xusb.c:1008:5: warning: no previous prototype for 'tegra_xusb_padctl_usb3_set_lfps_detect' [-Wmissing-prototypes]
In fact, these functions are declared in linux/phy/tegra/xusb.h,
so this patch adds missing header dependencies.
Signed-off-by: Baoyou Xie <[email protected]>
Acked-by: Arnd Bergmann <[email protected]>
Acked-by: Thierry Reding <[email protected]>
Signed-off-by: Kishon Vijay Abraham I <[email protected]>
Add support for the XUSB pad controller found on Tegra210 SoCs. The
hardware is roughly the same, but some of the registers have been moved
around and the number and type of supported pads has changed.
Signed-off-by: Thierry Reding <[email protected]>
Add a new driver for the XUSB pad controller found on NVIDIA Tegra SoCs.
This hardware block used to be exposed as a pin controller, but it turns
out that this isn't a good fit. The new driver and DT binding much more
accurately describe the hardware and are more flexible in supporting new
SoC generations.
Acked-by: Kishon Vijay Abraham I <[email protected]>
Signed-off-by: Thierry Reding <[email protected]>