kernel-hacking-2024-linux-s.../drivers
Hans de Goede d54f063cdb extcon: axp288: Set USB role where necessary
The AXP288 BC1.2 charger detection / extcon code may seem like a strange
place to add code to control the USB role-switch on devices with an AXP288,
but there are 2 reasons to do this inside the axp288 extcon code:

1) On many devices the USB role is controlled by ACPI AML code, but the AML
   code only switches between the host and none roles, because of Windows
   not really using device mode. To make device mode work we need to toggle
   between the none/device roles based on Vbus presence, and the axp288
   extcon gets interrupts on Vbus insertion / removal.

2) In order for our BC1.2 charger detection to work properly the role
   mux must be properly set to device mode before we do the detection.

Also note the Kconfig help-text / obsolete depends on USB_PHY which are
remnants from older never upstreamed code also controlling the mux from
the axp288 extcon code.

This commit also adds code to get notifications from the INT3496 extcon
device, which is used on some devices to notify the kernel about id-pin
changes instead of them being handled through AML code.

This fixes:
-Device mode not working on most CHT devices with an AXP288
-Host mode not working on devices with an INT3496 ACPI device
-Charger-type misdetection (always SDP) on devices with an INT3496 when the
 USB role (always) gets initialized as host

Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Reviewed-by: Andy Shevchenko <andy.shevchenko@gmail.com>
Signed-off-by: Heikki Krogerus <heikki.krogerus@linux.intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2018-03-22 13:49:28 +01:00
..
accessibility
acpi Merge branches 'acpi-ec', 'acpi-tables' and 'acpi-doc' 2018-02-15 12:02:42 +01:00
amba
android ANDROID: binder: synchronize_rcu() when using POLLFREE. 2018-02-16 11:16:38 +01:00
ata
atm atm: he: use 64-bit arithmetic instead of 32-bit 2018-02-08 15:05:16 -05:00
auxdisplay auxdisplay: img-ascii-lcd: Silence 2 uninitialized warnings 2018-03-13 18:16:38 +01:00
base drivers: base: Unified device connection lookup 2018-03-22 13:10:29 +01:00
bcma
block loop: Fix lost writes caused by missing flag 2018-03-09 08:36:36 -07:00
bluetooth Bluetooth: hci_bcm: Make shutdown and device wake GPIO optional 2018-02-25 21:08:28 +01:00
bus bus: ti-sysc: Fix checking of no-reset-on-init quirk 2018-02-15 09:18:55 -08:00
cdrom
char tpm: fix potential buffer overruns caused by bit glitches on the bus 2018-02-26 15:43:46 -08:00
clk MIPS changes for 4.16 2018-02-07 11:22:44 -08:00
clocksource clocksource/atmel-st: Add 'depends on HAS_IOMEM' to fix unmet dependency 2018-03-09 11:11:58 +01:00
connector
cpufreq Merge branch 'cpufreq-scpi' 2018-03-02 10:44:44 +01:00
cpuidle
crypto s390: 2018-02-26 09:28:35 -08:00
dax dax: ->direct_access does not sleep anymore 2018-02-26 12:32:29 -08:00
dca
devfreq
dio
dma dmaengine: mv_xor_v2: Fix clock resource by adding a register clock 2018-03-11 20:33:27 +05:30
dma-buf vfs: do bulk POLL* -> EPOLL* replacement 2018-02-11 14:34:03 -08:00
edac EDAC, sb_edac: Fix out of bound writes during DIMM configuration on KNL 2018-02-23 12:05:37 +01:00
eisa
extcon extcon: axp288: Set USB role where necessary 2018-03-22 13:49:28 +01:00
firewire vfs: do bulk POLL* -> EPOLL* replacement 2018-02-11 14:34:03 -08:00
firmware Merge branch 'efi-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip 2018-03-18 11:56:53 -07:00
fmc
fpga
fsi
gpio gpio: rcar: Use wakeup_path i.s.o. explicit clock handling 2018-03-05 09:01:21 +01:00
gpu Only GVT fixes: 2018-03-16 12:51:35 +10:00
hid usb: ldusb: add PIDs for new CASSY devices supported by this driver 2018-02-15 18:44:03 +01:00
hsi vfs: do bulk POLL* -> EPOLL* replacement 2018-02-11 14:34:03 -08:00
hv vfs: do bulk POLL* -> EPOLL* replacement 2018-02-11 14:34:03 -08:00
hwmon Fix bad temperature display on Ryzen/Threadripper 2018-02-15 14:31:28 -08:00
hwspinlock
hwtracing
i2c i2c: octeon: Prevent error message on bus error 2018-03-02 11:11:15 +01:00
ide genhd: Rename get_disk() to get_disk_and_module() 2018-02-26 09:48:42 -07:00
idle
iio First round of IIO fixes for the 4.16 cycle. 2018-02-20 10:03:22 +01:00
infiniband RDMAVT: Fix synchronization around percpu_ref 2018-03-14 12:10:18 -07:00
input Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/dtor/input 2018-03-07 17:37:32 -08:00
iommu treewide/trivial: Remove ';;$' typo noise 2018-02-22 10:59:33 +01:00
ipack
irqchip irqchip/irq-imx-gpcv2: Remove unused function 2018-03-11 13:27:12 +00:00
isdn vfs: do bulk POLL* -> EPOLL* replacement 2018-02-11 14:34:03 -08:00
leds vfs: do bulk POLL* -> EPOLL* replacement 2018-02-11 14:34:03 -08:00
lightnvm
macintosh powerpc/macio: set a proper dma_coherent_mask 2018-02-13 08:58:53 -08:00
mailbox vfs: do bulk POLL* -> EPOLL* replacement 2018-02-11 14:34:03 -08:00
mcb
md dm mpath: fix passing integrity data 2018-03-14 15:39:33 -04:00
media media: vb2: Makefile: place vb2-trace together with vb2-core 2018-02-26 11:39:04 -05:00
memory memory: brcmstb: dpfe: support new way of passing data from the DCPU 2018-02-23 10:56:59 -08:00
memstick
message
mfd vfs: do bulk POLL* -> EPOLL* replacement 2018-02-11 14:34:03 -08:00
misc powerpc fixes for 4.16 #5 2018-03-09 09:33:48 -08:00
mmc mmc: core: Avoid hanging to claim host for mmc via some nested calls 2018-02-27 15:12:37 +01:00
mtd mtd: nand: MTD_NAND_MARVELL should depend on HAS_DMA 2018-02-12 10:57:20 +01:00
mux
net Second pull request for 4.16-rc 2018-03-10 08:38:01 -08:00
nfc
ntb
nubus
nvdimm libnvdimm: re-enable deep flush for pmem devices via fsync() 2018-03-02 19:31:40 -08:00
nvme nvme_fc: rework sqsize handling 2018-03-08 10:39:58 -07:00
nvmem
of device property: Constify device_get_match_data() 2018-02-12 10:41:11 +01:00
opp opp: cpu: Replace GFP_ATOMIC with GFP_KERNEL in dev_pm_opp_init_cpufreq_table 2018-02-12 15:07:46 +05:30
oprofile
parisc
parport
pci pci-v4.16-fixes-3 2018-03-09 13:31:08 -08:00
pcmcia Merge branch 'pcmcia' of git://git.kernel.org/pub/scm/linux/kernel/git/brodo/pcmcia 2018-02-08 11:48:49 -08:00
perf arm_pmu: Use disable_irq_nosync when disabling SPI in CPU teardown hook 2018-02-28 14:59:47 +00:00
phy phy: for 4.17 2018-03-20 10:10:46 +01:00
pinctrl pinctrl: meson-axg: adjust uart_ao_b pin group naming 2018-02-12 10:47:36 +01:00
platform platform/x86: intel_cht_int33fe: Add device connections for the Type-C port 2018-03-22 13:49:28 +01:00
pnp
power
powercap
pps vfs: do bulk POLL* -> EPOLL* replacement 2018-02-11 14:34:03 -08:00
ps3
ptp vfs: do bulk POLL* -> EPOLL* replacement 2018-02-11 14:34:03 -08:00
pwm
rapidio vfs: do bulk POLL* -> EPOLL* replacement 2018-02-11 14:34:03 -08:00
ras
regulator Merge remote-tracking branches 'regulator/fix/resume' and 'regulator/fix/stm32-vfrefbuf' into regulator-linus 2018-03-07 14:39:07 +00:00
remoteproc
reset
rpmsg vfs: do bulk POLL* -> EPOLL* replacement 2018-02-11 14:34:03 -08:00
rtc vfs: do bulk POLL* -> EPOLL* replacement 2018-02-11 14:34:03 -08:00
s390 Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/s390/linux 2018-03-07 10:59:23 -08:00
sbus
scsi SCSI fixes on 20180314 2018-03-14 17:02:49 -07:00
sfi
sh cpufreq: Add and use cpufreq_for_each_{valid_,}entry_idx() 2018-02-08 10:21:39 +01:00
siox
slimbus
sn
soc ARM: SoC fixes for 4.16 2018-02-28 16:11:04 -08:00
soundwire
spi
spmi
ssb
staging Merge branch 4.16-rc6 into usb-next 2018-03-20 09:56:08 +01:00
target Merge branch 'for-next' of git://git.kernel.org/pub/scm/linux/kernel/git/nab/target-pending 2018-02-09 14:49:46 -08:00
tc
tee
thermal Merge branch 'next' of git://git.kernel.org/pub/scm/linux/kernel/git/rzhang/linux 2018-02-06 15:04:58 -08:00
thunderbolt
tty serial: imx: fix bogus dev_err 2018-02-28 13:48:21 +01:00
uio vfs: do bulk POLL* -> EPOLL* replacement 2018-02-11 14:34:03 -08:00
usb usb: typec: driver for Pericom PI3USB30532 Type-C cross switch 2018-03-22 13:49:28 +01:00
uwb uwb: Re-use DEFINE_SHOW_ATTRIBUTE() macro 2018-03-09 09:31:26 -08:00
vfio vfio: disable filesystem-dax page pinning 2018-03-02 18:00:04 -08:00
vhost vfs: do bulk POLL* -> EPOLL* replacement 2018-02-11 14:34:03 -08:00
video fbdev: Fixing arbitrary kernel leak in case FBIOGETCMAP_SPARC in sbusfb_ioctl_helper(). 2018-03-07 14:00:34 +01:00
virt vfs: do bulk POLL* -> EPOLL* replacement 2018-02-11 14:34:03 -08:00
virtio virtio_ring: fix num_free handling in error case 2018-03-01 18:53:38 +02:00
visorbus
vlynq
vme
w1
watchdog watchdog: hpwdt: Remove legacy NMI sourcing. 2018-03-03 15:52:33 +01:00
xen xen: fix for V4.16-rc5 2018-03-09 16:54:18 -08:00
zorro
Kconfig
Makefile