18 May, 2015
1 commit
-
Some palmas based chip variants do not have OTG based ID logic.
For these variants we rely on GPIO based USB ID detection.These chips do have VBUS comparator for VBUS detection so we
continue to use the old way of detecting VBUS.Signed-off-by: Roger Quadros
Signed-off-by: Sekhar Nori
05 May, 2015
16 commits
-
DRD mode is a reduced functionality OTG mode. In this mode
we don't support SRP, HNP and dynamic role-swap.In DRD operation, the controller mode (Host or Peripheral)
is decided based on the ID pin status. Once a cable plug (Type-A
or Type-B) is attached the controller selects the state
and doesn't change till the cable in unplugged and a different
cable type is inserted.As we don't need most of the complex OTG states and OTG timers
we implement a lean DRD state machine in usb-otg.c.
The DRD state machine is only interested in 2 hardware inputs
'id' and 'vbus; that are still passed via the origintal struct otg_fsm.Most of the usb-otg.c functionality remains the same except
adding a new parameter to usb_otg_register() to indicate that
the OTG controller needs to operate in DRD mode.Signed-off-by: Roger Quadros
Signed-off-by: Sekhar Nori -
The OTG core instantiates the OTG Finite State Machine
per OTG controller and manages starting/stopping the
host and gadget controllers based on the bus state.It provides APIs for the following tasks
- Registering an OTG capable controller
- Registering Host and Gadget controllers to OTG core
- Providing inputs to and kicking the OTG state machineTODO:
- sysfs interface to allow application inputs to OTG state machine
- otg class?Signed-off-by: Roger Quadros
[nsekhar@ti.com: remove unused if() block in usb_otg_work() and sparse fixes]
Signed-off-by: Sekhar Nori -
The OTG core will use struct otg_gadget_ops to
start/stop the gadget controller.The main purpose of this interface is to avoid directly
calling usb_gadget_start/stop() from the OTG core as they
wouldn't be defined in the built-in symbol table if
CONFIG_USB_GADGET is m.Signed-off-by: Roger Quadros
Signed-off-by: Sekhar Nori -
The OTG core will use struct otg_hcd_ops to
add/remove the HCD controller.The main purpose of this interface is to avoid directly
calling usb_add/remove_hcd() from the OTG core as they
wouldn't be defined in the built-in symbol table if
CONFIG_USB is m.Signed-off-by: Roger Quadros
Signed-off-by: Sekhar Nori -
This is to prevent missing symbol build error if OTG is
enabled (built-in) and HCD core (CONFIG_USB) is module.Signed-off-by: Roger Quadros
Signed-off-by: Sekhar Nori -
If usb/otg-fsm.h and usb/composite.h are included together
then it results in the build warning [1].Prevent that by moving the VDBG defination into the
usb-otg-fsm.c file where it is used.Also get rid of MPC_LOC which doesn't seem to be used
by anyone.[1] - warning fixed by this patch:
In file included from drivers/usb/dwc3/core.h:33,
from drivers/usb/dwc3/ep0.c:33:
include/linux/usb/otg-fsm.h:30:1: warning: "VDBG" redefined
In file included from drivers/usb/dwc3/ep0.c:31:
include/linux/usb/composite.h:615:1: warning: this is the location of the previous definitionSigned-off-by: Roger Quadros
Signed-off-by: Sekhar Nori -
Move the state_changed variable into struct otg_fsm
so that we can support multiple instances.Signed-off-by: Roger Quadros
Signed-off-by: Sekhar Nori -
struct otg_fsm is the interface to the OTG state machine.
Document the input, output and internal state variables.
Definations are taken from Table 7-2 and Table 7-4 of
the USB OTG & EH Specification Rev.2.0Re-arrange some of the members as per use case for more
clarity.Signed-off-by: Roger Quadros
[nsekhar@ti.com: fix > 80 char line warnings in comments]
Signed-off-by: Sekhar Nori -
[ upstream commit 80b2502cea34a965a6b3390691854e753945ca5f ]
Whether the gadget is selfpowerwed or not can be determined by composite
core, so we can use a common entry to indicate if the self-powered
is supported by gadget, and the related private variable at individual
udc driver can be deleted.Signed-off-by: Peter Chen
Signed-off-by: Felipe Balbi
Signed-off-by: Roger Quadros
Signed-off-by: Sekhar Nori -
[ upstream commit 02e8c966274f1049cca8d3f17092f8275979b8eb ]
No functional changes, just adding a prefix
which should have been there from the start.Signed-off-by: Felipe Balbi
Signed-off-by: Roger Quadros
Signed-off-by: Sekhar Nori -
[ Upstream commit 22835b807e7ca946a4d1fbd4c7af56aa09cd273e ]
now that no UDC driver relies on the extra
'driver' argument to ->udc_stop(), we can
safely remove it.This commit is based on previous work by
Robert Baldyga which
can be found at [1]; however that patch turned
out to have a high probability of regressing
many UDC drivers because of a blind search & replace
s/driver/$udc->driver/ which caused the 'driver'
argument to stop_activity() to be a valid non-NULL
pointer when it should be NULL, thus causing UDCs
to mistakenly call gadget driver's ->disconnect()
callback.[1] http://markmail.org/message/x5zneg4xea4zntab
Acked-by: Peter Chen
Signed-off-by: Felipe Balbi
Signed-off-by: Roger Quadros
Signed-off-by: Sekhar Nori -
[ upstream commit 0cfbd328d60f85b0dcf66df61a3615e9a8e5d4e4 ]
With this patch, USB activity can be signaled by blinking a LED. There
are two triggers, one for activity on USB host and one for USB gadget.Both triggers should work with all host/device controllers. Tested only
with musb.Performace: I measured performance overheads on ARM Cortex-A8 (TI
AM335x) running on 600 MHz.Duration of usb_led_activity():
- with no LED attached to the trigger: 2 ± 1 µs
- with one GPIO LED attached to the trigger: 2 ± 1 µs or 8 ± 2 µs (two peaks in histogram)Duration of functions calling usb_led_activity() (with this patch
applied and no LED attached to the trigger):
- __usb_hcd_giveback_urb(): 10 - 25 µs
- usb_gadget_giveback_request(): 2 - 6 µsSigned-off-by: Michal Sojka
Acked-by: Felipe Balbi
Tested-by: Felipe Balbi
Signed-off-by: Greg Kroah-Hartman
Signed-off-by: Roger Quadros
Signed-off-by: Sekhar Nori -
[ upstream commit 3fc2aa5522ab958374d93ef5d2e12df7ee233c91 ]
All USB peripheral controller drivers call completion routines directly.
This patch adds usb_gadget_giveback_request() which will be used instead
of direct invocation in the next patch. The goal here is to have a place
where common functionality can be added.Signed-off-by: Michal Sojka
Acked-by: Felipe Balbi
Tested-by: Felipe Balbi
Signed-off-by: Greg Kroah-Hartman
Signed-off-by: Roger Quadros
Signed-off-by: Sekhar Nori -
[ upstream commit 974a70bdecea5296db1b643e4046ef208e99c592 ]
The udc driver can notify the udc core that bus reset occurs by
calling this utility, the core will notify gadget driver this
information and update gadget state accordingly.Signed-off-by: Peter Chen
Signed-off-by: Felipe Balbi
Signed-off-by: Roger Quadros
Signed-off-by: Sekhar Nori -
[ upstream commit ef979a26e3d521d51dbd9950e46a69e303073171 ]
Adding reset API for UDC bus reset handler is useful for below
two issues.Current disconnect API at usb_gadget_driver is also invoked at
udc's bus reset handler, but the document says it is invoked when
the host is disconnected.Besides, we may expect the gadget_driver to do different things
for host sends bus reset and host disconnects gadget, eg, we may not
want to flush dirty page for mass storage at bus reset, and want to
do it at disconnection.Acked-by: Alan Stern
Signed-off-by: Peter Chen
Signed-off-by: Felipe Balbi
Signed-off-by: Roger Quadros
Signed-off-by: Sekhar Nori -
[ Upstream commit e47d92545c2972bcf3711e7db80f481e402163c7 ]
Before using the PHY framework instead of the USB PHY one, we need to
move the OTG state into another place, since it won't be available when
USB PHY isn't used. This patch moves the OTG state into the OTG
structure, and makes all the needed modifications in the drivers
using the OTG state.[ balbi@ti.com : fix build regressions with phy-tahvo.c, musb_dsps.c,
phy-isp1301-omap, and chipidea's debug.c ][nsekhar@ti.com: fix build regressions with phy-twl4030-usb.c ]
Acked-by: Kishon Vijay Abraham I
Acked-by: Peter Chen
Signed-off-by: Antoine Tenart
Signed-off-by: Felipe Balbi
Signed-off-by: Sekhar Nori
04 May, 2015
10 commits
-
[ upstream commit 05f8b35a62efb8e70ebcd78e9c957324e9caddad ]
The TPL (Targeted Peripheral List) is used for targeted hosts
(non-PC hosts), and it can be used at USB OTG & EH certification
and some specific products which need white list.Signed-off-by: Peter Chen
Signed-off-by: Greg Kroah-Hartman
Signed-off-by: Roger Quadros
Signed-off-by: Sekhar Nori -
[ upstream commit 3d46e73dfdb840f460e5b06416965d132570ec33 ]
The USB PHY member of the HCD structure is renamed to 'usb_phy' and
modifications are done in all drivers accessing it.
This is in preparation to adding the generic PHY support.Signed-off-by: Antoine Tenart
[Sergei: added missing 'drivers/usb/misc/lvstest.c' file, resolved rejects,
updated changelog.]
Signed-off-by: Sergei Shtylyov
Acked-by: Alan Stern
Acked-by: Felipe Balbi
Signed-off-by: Greg Kroah-Hartman
Signed-off-by: Roger Quadros
Signed-off-by: Sekhar Nori -
[upstream commit 3f79a3fb5f41e8f2229e5bf8aa725eaa79686f14 ]
This patch use devm_extcon_dev_allocate() to simplify the memory control
of extcon device.Cc: Graeme Gregory
Cc: Kishon Vijay Abraham I
Cc: Felipe Balbi
Cc: Samuel Ortiz
Cc: Lee Jones
Signed-off-by: Chanwoo Choi
Acked-by: Lee Jones
Acked-by: Felipe Balbi
Tested-by: Felipe Balbi
Signed-off-by: Roger Quadros
Signed-off-by: Sekhar Nori -
[ upstream commit 739ba1bfdb15e773999aafddbd6c59b5737797a0 ]
This patch add device managed devm_extcon_dev_{allocate,free} to automatically
free the memory of extcon_dev structure without handling free operation.Signed-off-by: Chanwoo Choi
Reviewed-by: Felipe Balbi
Signed-off-by: Roger Quadros
Signed-off-by: Sekhar Nori -
[ upstream commit a9af65223b41cec60cd44fa95a93d10149deb143 ]
This patch add APIs to control the extcon device on extcon provider driver.
The extcon_dev_allocate() allocates the memory of extcon device and initializes
supported cables. And then extcon_dev_free() decrement the reference of the
device of extcon device and free the memory of the extcon device. This APIs
must need to implement devm_extcon_dev_allocate()/free() APIs.Signed-off-by: Chanwoo Choi
Reviewed-by: Felipe Balbi
Signed-off-by: Roger Quadros
Signed-off-by: Sekhar Nori -
[ upstream commit 1111244ff4493448c0ee66e814e20c6e81d3b93d ]
Add resource-managed extcon device register function for convenience.
For example, if a extcon device is attached with new
devm_extcon_dev_register(), that extcon device is automatically
unregistered on driver detach.Signed-off-by: Sangjung Woo
[Fix bug about devm_extcon_dev_match/release() and code clean by Chanwoo Choi]
Signed-off-by: Chanwoo Choi
Signed-off-by: Roger Quadros
Signed-off-by: Sekhar Nori -
This reverts commit 1fb86ee64cb516a43277c7029e3f1ba0499f434e.
Signed-off-by: Roger Quadros
Signed-off-by: Sekhar Nori -
This reverts commit 81f2f9d2369e0ac80cbf07aadba325df56e14bfa.
Signed-off-by: Roger Quadros
Signed-off-by: Sekhar Nori -
This reverts commit 1abfd914678f485511b68df6f1556ad1c461a746.
Signed-off-by: Roger Quadros
Signed-off-by: Sekhar Nori -
This reverts commit f49a8f271b4a2335af302a491afd6da370dea2e0.
Signed-off-by: Roger Quadros
Signed-off-by: Sekhar Nori
15 Apr, 2015
1 commit
-
With the recent pinctrl-single changes, SoCs such as Texas
Instrument's OMAP processors can treat wake-up events from deeper idle
states as interrupts.This adds support for the optional second interrupt for wake-up
events to the pixcir_i2c_ts driver.This is similar in approach to commit 05bed213b91f ("drivers/rtc/
rtc-ds1307.c: Support optional wakeup interrupt source"), but we create
a second ISR only to acknowledge the wake interrupt.Signed-off-by: Dave Gerlach
Acked-by: Roger Quadros
Signed-off-by: Sekhar Nori
12 Mar, 2015
1 commit
-
The controller has a RESET pin which is usually controlled over
a GPIO line. If such a GPIO is provided, perform a RESET
during probe.Signed-off-by: Roger Quadros
Signed-off-by: Sekhar Nori
07 Mar, 2015
3 commits
-
…nux-stable into ti-linux-3.14.y
This is the 3.14.35 stable release
* tag 'v3.14.35' of http://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-stable: (77 commits)
Linux 3.14.35
x86, mm/ASLR: Fix stack randomization on 64-bit systems
blk-throttle: check stats_cpu before reading it from sysfs
btrfs: fix leak of path in btrfs_find_item
btrfs: set proper message level for skinny metadata
jffs2: fix handling of corrupted summary length
EDAC, amd64_edac: Prevent OOPS with >16 memory controllers
md/raid1: fix read balance when a drive is write-mostly.
md/raid5: Fix livelock when array is both resyncing and degraded.
metag: Fix KSTK_EIP() and KSTK_ESP() macros
xfs: Fix quota type in quota structures when reusing quota file
gpio: tps65912: fix wrong container_of arguments
gpiolib: of: allow of_gpiochip_find_and_xlate to find more than one chip per node
arm64: compat Fix siginfo_t -> compat_siginfo_t conversion on big endian
hx4700: regulator: declare full constraints
KVM: x86: update masterclock values on TSC writes
KVM: MIPS: Don't leak FPU/DSP to guest
ARC: fix page address calculation if PAGE_OFFSET != LINUX_LINK_BASE
ntp: Fixup adjtimex freq validation on 32-bit systems
kdb: fix incorrect counts in KDB summary command output
...Signed-off-by: Texas Instruments Auto Merger <lcpd_integration@list.ti.com>
-
commit 5efd2ea8c9f4f12916ffc8ba636792ce052f6911 upstream.
the following error pops up during "testusb -a -t 10"
| musb-hdrc musb-hdrc.1.auto: dma_pool_free buffer-128, f134e000/be842000 (bad dma)
hcd_buffer_create() creates a few buffers, the smallest has 32 bytes of
size. ARCH_KMALLOC_MINALIGN is set to 64 bytes. This combo results in
hcd_buffer_alloc() returning memory which is 32 bytes aligned and it
might by identified by buffer_offset() as another buffer. This means the
buffer which is on a 32 byte boundary will not get freed, instead it
tries to free another buffer with the error message.This patch fixes the issue by creating the smallest DMA buffer with the
size of ARCH_KMALLOC_MINALIGN (or 32 in case ARCH_KMALLOC_MINALIGN is
smaller). This might be 32, 64 or even 128 bytes. The next three pools
will have the size 128, 512 and 2048.
In case the smallest pool is 128 bytes then we have only three pools
instead of four (and zero the first entry in the array).
The last pool size is always 2048 bytes which is the assumed PAGE_SIZE /
2 of 4096. I doubt it makes sense to continue using PAGE_SIZE / 2 where
we would end up with 8KiB buffer in case we have 16KiB pages.
Instead I think it makes sense to have a common size(s) and extend them
if there is need to.
There is a BUILD_BUG_ON() now in case someone has a minalign of more than
128 bytes.Signed-off-by: Sebastian Andrzej Siewior
Acked-by: Alan Stern
Signed-off-by: Greg Kroah-Hartman -
commit 6ee8e25fc3e916193bce4ebb43d5439e1e2144ab upstream.
Commit e9fd702a58c4 ("audit: convert audit watches to use fsnotify
instead of inotify") broke handling of renames in audit. Audit code
wants to update inode number of an inode corresponding to watched name
in a directory. When something gets renamed into a directory to a
watched name, inotify previously passed moved inode to audit code
however new fsnotify code passes directory inode where the change
happened. That confuses audit and it starts watching parent directory
instead of a file in a directory.This can be observed for example by doing:
cd /tmp
touch foo bar
auditctl -w /tmp/foo
touch foo
mv bar foo
touch fooIn audit log we see events like:
type=CONFIG_CHANGE msg=audit(1423563584.155:90): auid=1000 ses=2 op="updated rules" path="/tmp/foo" key=(null) list=4 res=1
...
type=PATH msg=audit(1423563584.155:91): item=2 name="bar" inode=1046884 dev=08:0 2 mode=0100644 ouid=0 ogid=0 rdev=00:00 nametype=DELETE
type=PATH msg=audit(1423563584.155:91): item=3 name="foo" inode=1046842 dev=08:0 2 mode=0100644 ouid=0 ogid=0 rdev=00:00 nametype=DELETE
type=PATH msg=audit(1423563584.155:91): item=4 name="foo" inode=1046884 dev=08:0 2 mode=0100644 ouid=0 ogid=0 rdev=00:00 nametype=CREATE
...and that's it - we see event for the first touch after creating the
audit rule, we see events for rename but we don't see any event for the
last touch. However we start seeing events for unrelated stuff
happening in /tmp.Fix the problem by passing moved inode as data in the FS_MOVED_FROM and
FS_MOVED_TO events instead of the directory where the change happens.
This doesn't introduce any new problems because noone besides
audit_watch.c cares about the passed value:fs/notify/fanotify/fanotify.c cares only about FSNOTIFY_EVENT_PATH events.
fs/notify/dnotify/dnotify.c doesn't care about passed 'data' value at all.
fs/notify/inotify/inotify_fsnotify.c uses 'data' only for FSNOTIFY_EVENT_PATH.
kernel/audit_tree.c doesn't care about passed 'data' at all.
kernel/audit_watch.c expects moved inode as 'data'.Fixes: e9fd702a58c49db ("audit: convert audit watches to use fsnotify instead of inotify")
Signed-off-by: Jan Kara
Cc: Paul Moore
Cc: Eric Paris
Signed-off-by: Andrew Morton
Signed-off-by: Linus Torvalds
Signed-off-by: Greg Kroah-Hartman
06 Mar, 2015
1 commit
-
…ux-kernel/audio-display-linux-feature-tree into ti-linux-3.14.y
TI-Feature: audio-display
TI-Tree: git://git.ti.com/~darrene/ti-linux-kernel/audio-display-linux-feature-tree.git
TI-Branch: audio-display-ti-linux-3.14.y* 'audio-display-ti-linux-3.14.y' of git://git.ti.com/~darrene/ti-linux-kernel/audio-display-linux-feature-tree:
OMAPDSS ASoC: omap-hdmi-audio: Forbid audio playback if display is offSigned-off-by: Dan Murphy <DMurphy@ti.com>
05 Mar, 2015
4 commits
-
…rnel/platform-linux-feature-tree into ti-linux-3.14.y
TI-Feature: platform_base
TI-Tree: git://git.ti.com/~rrnayak/ti-linux-kernel/platform-linux-feature-tree.git
TI-Branch: platform-ti-linux-3.14.y* 'platform-ti-linux-3.14.y' of git://git.ti.com/~rrnayak/ti-linux-kernel/platform-linux-feature-tree:
pinctrl: am43xx: dt-bindings: fix SLEWCTRL_FAST binding
pinctrl: am33xx: dt-bindings: fix SLEWCTRL_FAST bindingConflicts:
include/dt-bindings/pinctrl/am43xx.hSigned-off-by: Dan Murphy <DMurphy@ti.com>
-
Abort any ongoing audio playback if display is turned off and do not
allow new audio streams until the display is turned on again. This is
the way the mainline implementation works.Signed-off-by: Jyri Sarha
-
According to AM437x TRM, Document SPRUHL7B, Revised December 2014,
Section 7.2.1 Pad Control Registers, setting bit 19 of the pad control
registers actually sets the SLEWCTRL value to slow rather than fast as
the current macro indicates. Introduce a new macro, SLEWCTRL_SLOW, that
sets the bit, and modify SLEWCTRL_FAST to 0 but keep it for
completeness.Current users of the macro (i2c, mdio, and uart) are left unmodified as
SLEWCTRL_FAST was the macro used and actual desired state. Tested on
am437x-gp-evm with no difference in software performance seen.Signed-off-by: Lokesh Vutla
Signed-off-by: Dave Gerlach -
According to AM335x TRM, Document spruh73l, Revised February 2015,
Section 9.2.2 Pad Control Registers, setting bit 6 of the pad control
registers actually sets the SLEWCTRL value to slow rather than fast as
the current macro indicates. Introduce a new macro, SLEWCTRL_SLOW, that
sets the bit, and modify SLEWCTRL_FAST to 0 but keep it for
completeness.Current users of the macro (i2c and mdio) are left unmodified as
SLEWCTRL_FAST was the macro used and actual desired state. Tested on
am335x-gp-evm with no difference in software performance seen.Signed-off-by: Lokesh Vutla
Signed-off-by: Dave Gerlach
02 Mar, 2015
2 commits
-
…egration-tree/connectivity-ti-linux-kernel into ti-linux-3.14.y
TI-Feature: connectivity
TI-Tree: git://git.ti.com/connectivity-integration-tree/connectivity-ti-linux-kernel.git
TI-Branch: connectivity-ti-linux-3.14.y* 'connectivity-ti-linux-3.14.y' of git://git.ti.com/connectivity-integration-tree/connectivity-ti-linux-kernel:
ARM: dts: am57xx-beagle-x15: Add regulator information to USB2 PHYs
ARM: dts: dra72-evm: Add regulator information to USB2 PHYs
ARM: dts: dra7-evm: Add regulator information to USB2 PHYs
phy: core: Support regulator supply for PHY power
ARM: dts: am57xx-beagle-x15: Add pinmux configuration for MMC1 and MMC2
ARM: dts: dra7-evm: Add pinmux configuration for MMC1 and MMC2
ARM: dts: DRA7: use the new compatible string added for dra7 and dra72
mmc: host: omap_hsmmc: Set appropriate IODELAY values for various MMC modes
input: ti_am335x_tsc: Ignore previous pen down event when pen up event occurs
ARM: dts: DRA7: add DT entries for PWMSS
PWM: Kconfig: Enable PWM on DRA7Signed-off-by: Dan Murphy <DMurphy@ti.com>
-
[ upstream commit 3be88125d85df587085b0be0a5c0e9953eb5ed6b ]
Some PHYs can be powered by an external power regulator.
e.g. USB_HS PHY on DRA7 SoC. Make the PHY core support a
power regulator.Signed-off-by: Roger Quadros
Signed-off-by: Kishon Vijay Abraham I
27 Feb, 2015
1 commit
-
…nux-stable into ti-linux-3.14.y
This is the 3.14.34 stable release
* tag 'v3.14.34' of http://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-stable:
Linux 3.14.34
media/rc: Send sync space information on the lirc device
net: sctp: fix passing wrong parameter header to param_type2af in sctp_process_param
ppp: deflate: never return len larger than output buffer
ipv4: tcp: get rid of ugly unicast_sock
tcp: ipv4: initialize unicast_sock sk_pacing_rate
bridge: dont send notification when skb->len == 0 in rtnl_bridge_notify
net: don't OOPS on socket aio
bnx2x: fix napi poll return value for repoll
ipv6: replacing a rt6_info needs to purge possible propagated rt6_infos too
ping: Fix race in free in receive path
udp_diag: Fix socket skipping within chain
ipv4: try to cache dst_entries which would cause a redirect
net: sctp: fix slab corruption from use after free on INIT collisions
netxen: fix netxen_nic_poll() logic
ipv6: stop sending PTB packets for MTU < 1280
net: rps: fix cpu unplug
ip: zero sockaddr returned on error queueSigned-off-by: Texas Instruments Auto Merger <lcpd_integration@list.ti.com>