Array of struct of_device_id may be be const as expected by
of_match_table field.
Signed-off-by: Krzysztof Kozlowski <[email protected]>
Cc: Graeme Gregory <[email protected]>
Signed-off-by: Chanwoo Choi <[email protected]>
Use the resource-managed extcon device register function (i.e.
devm_extcon_dev_register()) instead of extcon_dev_register(). If extcon device
is attached with this function, that extcon device is automatically unregistered
on driver detach. That reduces tiresome managing code.
Signed-off-by: Sangjung Woo <[email protected]>
Signed-off-by: Chanwoo Choi <[email protected]>
commit ca488 (extcon: of: Remove unnecessary function call by using the
name of device_node) started using node name instead of device name
to get the extcon device. This breaks dwc3-omap since it's not able to
get the extcon device anymore. Fixed it by setting edev name of
palmas to be the same as its node name.
Signed-off-by: Kishon Vijay Abraham I <[email protected]>
Reported-by: Felipe Balbi <[email protected]>
Reviewed-by: Felipe Balbi <[email protected]>
Signed-off-by: Chanwoo Choi <[email protected]>
Use SIMPLE_DEV_PM_OPS macro in order to make the code simpler.
Signed-off-by: Jingoo Han <[email protected]>
Signed-off-by: Chanwoo Choi <[email protected]>
Always cross check with the ID state and the source of interrupt.
Also add a case in which ID Source is ID_GND but LATCH state is set
wrongly. This uses the previous Link stat to determine the new state.
Signed-off-by: George Cherian <[email protected]>
Acked-by: Laxman Dewangan <[email protected]>
Signed-off-by: Chanwoo Choi <[email protected]>
The Palmas device contains only a USB VBUS-ID detector, so added a
compatible type *ti,palmas-usb-vid*. Didn't remove the existing compatible
types for backward compatibility.
Signed-off-by: Kishon Vijay Abraham I <[email protected]>
Signed-off-by: Chanwoo Choi <[email protected]>
This patch remove extcon_dev_register()'s second parameter which means
the pointer of parent device to simplify prototype of this function.
So, if extcon device has the parent device, it should set the pointer of
parent device to edev.dev.parent in extcon device driver instead of in
extcon_dev_register().
Cc: Graeme Gregory <[email protected]>
Cc: Kishon Vijay Abraham I <[email protected]>
Cc: Charles Keepax <[email protected]>
Cc: Mark Brown <[email protected]>
Signed-off-by: Chanwoo Choi <[email protected]>
Signed-off-by: Myungjoo Ham <[email protected]>
Use the wrapper function for retrieving the platform data instead of
accessing dev->platform_data directly. This is a cosmetic change
to make the code simpler and enhance the readability.
Signed-off-by: Jingoo Han <[email protected]>
Signed-off-by: Chanwoo Choi <[email protected]>
Based on system design, platform needs to detect the VBUS or ID or
both. Provide option to select this through platform data to
disable part of cable detection through palmas-usb.
Signed-off-by: Laxman Dewangan <[email protected]>
Acked-by: Graeme Gregory <[email protected]>
Signed-off-by: Chanwoo Choi <[email protected]>
Signed-off-by: Myungjoo Ham <[email protected]>
Add suspend/resume callbacks and support for wakeup from
suspend on USB HOST or USB Device cable insertion or removal.
Signed-off-by: Laxman Dewangan <[email protected]>
Acked-by: Graeme Gregory <[email protected]>
Signed-off-by: Chanwoo Choi <[email protected]>
Signed-off-by: Myungjoo Ham <[email protected]>
When integrating driver with Tegra platform, it is found that
the ID pins get detected only once after booting system and
further removal and re-insert does not detect the ID pin.
Fixing this issue with enabling interrupt on ID_GND and ID_FLOAT
always and clearing the status on LATCH register which actually
occurred.
Also if interrupt occurs with line status as zero then based on
previous status, set the cable state.
Add debug prints to display the cable state when any cable
insertion/removal happen.
Signed-off-by: Laxman Dewangan <[email protected]>
Acked-by: Graeme Gregory <[email protected]>
Signed-off-by: Chanwoo Choi <[email protected]>
Signed-off-by: Myungjoo Ham <[email protected]>
of_extcon_get_extcon_dev() uses dev_name for getting the reference
to the extcon device. If the extcon driver assigns a different
name other than dev_name, of_extcon_get_extcon_dev() wouldn't
be able to find the reference to the extcon device. Since the
client drivers of extcon-palmas would be using
of_extcon_get_extcon_dev(), removed assigning edev.name
in extcon-palmas.
Signed-off-by: Kishon Vijay Abraham I <[email protected]>
Signed-off-by: Chanwoo Choi <[email protected]>
Signed-off-by: Myungjoo Ham <[email protected]>
This is the driver for the USB comparator built into the palmas chip. It
handles the various USB OTG events that can be generated by cable
insertion/removal.
Signed-off-by: Graeme Gregory <[email protected]>
Signed-off-by: Moiz Sonasath <[email protected]>
Signed-off-by: Ruchika Kharwar <[email protected]>
Signed-off-by: Kishon Vijay Abraham I <[email protected]>
Signed-off-by: George Cherian <[email protected]>
[[email protected]: adapted palmas usb driver to use the extcon framework]
Signed-off-by: Sebastien Guiriec <[email protected]>
Signed-off-by: Chanwoo Choi <[email protected]>
Signed-off-by: Myungjoo Ham <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>