12 Nov, 2018
1 commit
-
Driver unconditionally forces UART path during probe, probably to ensure
that one can get kernel serial log as soon as possible.This approach causes some issues, especially when board is booted with
non-UART cable connected to micro-USB port. For example, when USB cable is
connected, UART TX/RX lines are unconditionally short-circuited to USB
D+/D- lines. This is in turn recognized by a series of serial BREAK
signals and some random characters when USB host tries to perform
enumeration procedure.To solve the above issue and keep UART console operational as early as
possible, set UART path only when USB ID reports UART capable cable.Signed-off-by: Marek Szyprowski
Signed-off-by: Chanwoo Choi
28 Aug, 2018
1 commit
-
Replace GPL v2.0+ license statements with SPDX license identifiers.
Signed-off-by: Krzysztof Kozlowski
Signed-off-by: Chanwoo Choi
23 Oct, 2017
2 commits
-
The variable "ret" is immediately reassigned by a following statement.
Thus omit the explicit initialisation at the beginning.Signed-off-by: Markus Elfring
Reviewed-by: Krzysztof Kozlowski
Signed-off-by: Chanwoo Choi -
The extcon has two type of extcon devices as following.
- 'extcon provider deivce' adds new extcon device and detect the
state/properties of external connector. Also, it notifies the
state/properties to the extcon consumer device.
- 'extcon consumer device' gets the change state/properties
from extcon provider device.
Prior to that, include/linux/extcon.h contains all exported API for
both provider and consumer device driver. To clarify the meaning of
header file and to remove the wrong use-case on consumer device,
this patch separates into extcon.h and extcon-provider.h.[Description for include/linux/{extcon.h|extcon-provider.h}]
- extcon.h includes the extcon API and data structure for extcon consumer
device driver. This header file contains the following APIs:
: Register/unregister the notifier to catch the change of extcon device
: Get the extcon device instance
: Get the extcon device name
: Get the state of each external connector
: Get the property value of each external connector
: Get the property capability of each external connector- extcon-provider.h includes the extcon API and data structure for extcon
provider device driver. This header file contains the following APIs:
: Include 'include/linux/extcon.h'
: Allocate the memory for extcon device instance
: Register/unregister extcon device
: Set the state of each external connector
: Set the property value of each external connector
: Set the property capability of each external connectorSigned-off-by: Chanwoo Choi
Acked-by: Sebastian Reichel
Acked-by: Chen-Yu Tsai
Acked-by: Charles Keepax
Acked-by: Lee Jones
Acked-by: Felipe Balbi
Acked-by: Yoshihiro Shimoda
Acked-by: Kishon Vijay Abraham I
09 Jan, 2017
1 commit
-
Aligning all block comments in extcon subsystem as per linux coding style.
Found using checkpatch.pl script.Signed-off-by: Srikant Ritolia
Signed-off-by: Chanwoo Choi
13 Sep, 2016
2 commits
-
This patch alters the renamed extcon API to set the state of the external
connectors instead of deprecated extcon_set_cable_state_().Because the patch[1] modifies the function name to maintain the function
naming pattern.
- extcon_set_cable_state_() -> extcon_set_state_sync()
- extcon_get_cable_state_() -> extcon_get_state()[1] https://lkml.org/lkml/2016/8/4/729
- extcon: Rename the extcon_set/get_state() to maintain the function naming patternSigned-off-by: Chanwoo Choi
Acked-by: Charles Keepax
Acked-by: Roger Quadros -
Change my email address to kernel.org instead of Samsung one for the
purpose of any future contact. The copyrights remain untouched and are
attributed to Samsung.Signed-off-by: Krzysztof Kozlowski
Signed-off-by: Chanwoo Choi
25 Jan, 2016
1 commit
-
This patch adds the new EXTCON_CHG_USB_SDP connector to support SDP (Standard
Downstream Port) USB charging port. The commit 11eecf910bd8 ("extcon: Modify
the id and name of external connector") add the new EXTCON_CHG_USB_SDP
connector which support the both data transfer and usb charging at the same
time.Signed-off-by: Chanwoo Choi
Reviewed-by: Krzysztof Kozlowski
15 Dec, 2015
1 commit
-
The function can return negative values, so its result should
be assigned to signed variable.The problem has been detected using proposed semantic patch
scripts/coccinelle/tests/assign_signed_to_unsigned.cocci [1].[1]: http://permalink.gmane.org/gmane.linux.kernel/2046107
Signed-off-by: Andrzej Hajda
Reviewed-by: Krzysztof Kozlowski
Signed-off-by: Chanwoo Choi
16 Oct, 2015
1 commit
-
This patch modifies the id and name of external connector with the
additional prefix to clarify both attribute and meaning of external
connector as following:
- EXTCON_CHG_* mean the charger connector.
- EXTCON_JACK_* mean the jack connector.
- EXTCON_DISP_* mean the display port connector.Following table show the new name of external connector with old name:
--------------------------------------------------
Old extcon name | New extcon name |
--------------------------------------------------
EXTCON_TA | EXTCON_CHG_USB_DCP |
EXTCON_CHARGE_DOWNSTREAM| EXTCON_CHG_USB_CDP |
EXTCON_FAST_CHARGER | EXTCON_CHG_USB_FAST |
EXTCON_SLOW_CHARGER | EXTCON_CHG_USB_SLOW |
--------------------------------------------------
EXTCON_MICROPHONE | EXTCON_JACK_MICROPHONE |
EXTCON_HEADPHONE | EXTCON_JACK_HEADPHONE |
EXTCON_LINE_IN | EXTCON_JACK_LINE_IN |
EXTCON_LINE_OUT | EXTCON_JACK_LINE_OUT |
EXTCON_VIDEO_IN | EXTCON_JACK_VIDEO_IN |
EXTCON_VIDEO_OUT | EXTCON_JACK_VIDEO_OUT |
EXTCON_SPDIF_IN | EXTCON_JACK_SPDIF_IN |
EXTCON_SPDIF_OUT | EXTCON_JACK_SPDIF_OUT |
--------------------------------------------------
EXTCON_HMDI | EXTCON_DISP_HDMI |
EXTCON_MHL | EXTCON_DISP_MHL |
EXTCON_DVI | EXTCON_DISP_DVI |
EXTCON_VGA | EXTCON_DISP_VGA |
--------------------------------------------------And, when altering the name of USB charger connector, EXTCON refers to the
"Battery Charging v1.2 Spec and Adopters Agreement"[1] to use the standard
name of USB charging port as following. Following name of USB charging port
are already used in power_supply subsystem. We chan check it on patch[2].
- EXTCON_CHG_USB_SDP /* Standard Downstream Port */
- EXTCON_CHG_USB_DCP /* Dedicated Charging Port */
- EXTCON_CHG_USB_CDP /* Charging Downstream Port */
- EXTCON_CHG_USB_ACA /* Accessory Charger Adapter */[1] www.usb.org/developers/docs/devclass_docs/BCv1.2_070312.zip
[2] commit 85efc8a18ced ("power_supply: Add types for USB chargers")Signed-off-by: Chanwoo Choi
[ckeepax: For the Arizona changes]
Acked-by: Charles Keepax
Reviewed-by: Roger Quadros
13 Jun, 2015
1 commit
-
This patch just redefine the unique id of supported external connectors without
'enum extcon' type. Because unique id would be used on devictree file(*.dts) to
indicate the specific external connectors like key number of input framework.
So, I have the plan to move this definitions to following header file which
includes the unique id of supported external connectors.
- include/dt-bindings/extcon/extcon.hFixes: 2a9de9c0f08d ("extcon: Use the unique id for external connector instead of string")
Signed-off-by: Chanwoo Choi
Signed-off-by: Greg Kroah-Hartman
22 May, 2015
1 commit
-
This patch uses the unique id to identify the type of external connector instead
of string name. The string name have the many potential issues. So, this patch
defines the 'extcon' enumeration which includes all supported external connector
on EXTCON subsystem. If new external connector is necessary, the unique id of
new connector have to be added in 'extcon' enumeration. There are current
supported external connector in 'enum extcon' as following:enum extcon {
EXTCON_NONE = 0x0,/* USB external connector */
EXTCON_USB = 0x1,
EXTCON_USB_HOST = 0x2,/* Charger external connector */
EXTCON_TA = 0x10,
EXTCON_FAST_CHARGER = 0x11,
EXTCON_SLOW_CHARGER = 0x12,
EXTCON_CHARGE_DOWNSTREAM = 0x13,/* Audio and video external connector */
EXTCON_LINE_IN = 0x20,
EXTCON_LINE_OUT = 0x21,
EXTCON_MICROPHONE = 0x22,
EXTCON_HEADPHONE = 0x23,EXTCON_HDMI = 0x30,
EXTCON_MHL = 0x31,
EXTCON_DVI = 0x32,
EXTCON_VGA = 0x33,
EXTCON_SPDIF_IN = 0x34,
EXTCON_SPDIF_OUT = 0x35,
EXTCON_VIDEO_IN = 0x36,
EXTCON_VIDEO_OUT = 0x37,/* Miscellaneous external connector */
EXTCON_DOCK = 0x50,
EXTCON_JIG = 0x51,
EXTCON_MECHANICAL = 0x52,EXTCON_END,
};For example in extcon-arizona.c:
To use unique id removes the potential issue about handling
the inconsistent name of external connector with string.
- Previously, use the string to register the type of arizona jack connector
static const char *arizona_cable[] = {
"Mechanical",
"Microphone",
"Headphone",
"Line-out",
};
- Newly, use the unique id to register the type of arizona jack connector
static const enum extcon arizona_cable[] = {
EXTCON_MECHANICAL,
EXTCON_MICROPHONE,
EXTCON_HEADPHONE,
EXTCON_LINE_OUT,EXTCON_NONE,
};And this patch modify the prototype of extcon_{get|set}_cable_state_() which
uses the 'enum extcon id' instead of 'cable_index'. Because although one more
extcon drivers support USB cable, each extcon driver might has the differnt
'cable_index' for USB cable. All extcon drivers can use the unique id number
for same external connector with modified extcon_{get|set}_cable_state_().- Previously, use 'cable_index' on these functions:
extcon_get_cable_state_(struct extcon_dev*, int cable_index)
extcon_set_cable_state_(struct extcon_dev*, int cable_index, bool state)-Newly, use 'enum extcon id' on these functions:
extcon_get_cable_state_(struct extcon_dev*, enum extcon id)
extcon_set_cable_state_(struct extcon_dev*, enum extcon id, bool state)Cc: Arnd Bergmann
Cc: Felipe Balbi
Signed-off-by: Chanwoo Choi
Acked-by: Roger Quadros
Acked-by: Charles Keepax
Acked-by: Ramakrishna Pallala
Reviewed-by: Krzysztof Kozlowski
[arnd: Report the build break about drivers/usb/phy/phy-tahvo.c after using the
unique id for external connector insteadf of string]
Reported-by: Arnd Bergmann
[dan.carpenter: Report the build warning of extcon_{set|get}_cable_state_()]
Reported-by: Dan Carpenter
19 May, 2015
2 commits
-
This patch removes the optional name of extcon device. Instead,
extcon_dev_register() set the device name as 'extcon[number]' naming pattern.
- /sys/class/extcon/[hardcoded device name] -> /sys/class/extcon/extcon[number]Signed-off-by: Chanwoo Choi
Acked-by: Krzysztof Kozlowski
Cc: MyungJoo Ham
Cc: Charles Keepax
Cc: Graeme Gregory
Cc: Kishon Vijay Abraham I
Cc: Krzysztof Kozlowski
Cc: Jaewon Kim -
This patch change the name of various jig cables as 'JIG' because the name of
various jig cables are strange and ambiguous on user-space aspect. They include
the different information of either USB and UART state. It is never important
for user-space process. This patch unifies the name of jig cables as following:
- JIG-USB-ON -->|--> JIG
- JIG-USB-OFF -->|
- JIG-UART-ON -->|
- JIG-UART-OFF -->|Signed-off-by: Chanwoo Choi
07 Mar, 2015
1 commit
-
This patch fixes the checkpatch warning about coding style.
Signed-off-by: Chanwoo Choi
15 Dec, 2014
1 commit
-
Pull char/misc driver updates from Greg KH:
"Here's the big char/misc driver update for 3.19-rc1Lots of little things all over the place in different drivers, and a
new subsystem, "coresight" has been added. Full details are in the
shortlog"* tag 'char-misc-3.19-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/char-misc: (73 commits)
parport: parport_pc, do not remove parent devices early
spmi: Remove shutdown/suspend/resume kernel-doc
carma-fpga-program: drop videobuf dependency
carma-fpga: drop videobuf dependency
carma-fpga-program.c: fix compile errors
i8k: Fix temperature bug handling in i8k_get_temp()
cxl: Name interrupts in /proc/interrupt
CXL: Return error to PSL if IRQ demultiplexing fails & print clearer warning
coresight-replicator: remove .owner field for driver
coresight: fixed comments in coresight.h
coresight: fix typo in comment in coresight-priv.h
coresight: bindings for coresight drivers
coresight: Adding ABI documentation
w1: support auto-load of w1_bq27000 module.
w1: avoid potential u16 overflow
cn: verify msg->len before making callback
mei: export fw status registers through sysfs
mei: read and print all six FW status registers
mei: txe: add cherrytrail device id
mei: kill cached host and me csr values
...
24 Nov, 2014
1 commit
-
Fix a typo in name of company in copyright comment.
Signed-off-by: Krzysztof Kozlowski
Signed-off-by: Chanwoo Choi
20 Oct, 2014
1 commit
-
A platform_driver does not need to set an owner, it will be populated by the
driver core.Signed-off-by: Wolfram Sang
23 Jul, 2014
1 commit
-
The site-specific OOM messages are unnecessary, because they
duplicate the MM subsystem generic OOM message. The following
checkpatch warning is also removed.WARNING: Possible unnecessary 'out of memory' message
Signed-off-by: Jingoo Han
[Acked by Charles Keepax for arizona part]
Acked-by: Charles Keepax
Signed-off-by: Chanwoo Choi
29 Apr, 2014
1 commit
-
This patch use devm_extcon_dev_allocate() to simplify the memory control
of extcon device.Cc: Krzysztof Kozlowski
Signed-off-by: Chanwoo Choi
Reviewed-by: Krzysztof Kozlowski
Reviewed-by: Felipe Balbi
24 Apr, 2014
3 commits
-
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
Reviewed-by: Krzysztof Kozlowski
Signed-off-by: Chanwoo Choi -
The regmap_irq_get_virq may return 0 or -EINVAL on error. Fail the probe
in both situations.Signed-off-by: Krzysztof Kozlowski
Cc:
Signed-off-by: Chanwoo Choi -
In probe the driver queued delayed work for cable detection and
returned the result of queue_delayed_work() call. However the return
value of queue_delayed_work() does not indicate an error and in normal
condition it returns true which means successful work queue.
This effectively resulted in probe failure:
[ 2.088204] max14577-muic: probe of max77836-muic failed with error 1Signed-off-by: Krzysztof Kozlowski
Cc:
Fixes: 962e56bfcf0b ("extcon: max14577: Add extcon-max14577 driver...")
Signed-off-by: Chanwoo Choi
23 Apr, 2014
4 commits
-
Add support for MAX77836 chipset to the max14577 extcon driver. The
MAX77836 MUIC has additional interrupts (VIDRM, ADC1K) so IRQ handling
is split up into two functions: max14577_parse_irq() and
max77836_parse_irq().Signed-off-by: Krzysztof Kozlowski
Acked-by: Chanwoo Choi
Tested-by: Chanwoo Choi
Signed-off-by: Lee Jones -
This patch continues the preparation for adding support for max77836
device to existing max14577 driver.During probe choose muic_irqs according to device type. Currently there
are only "max14577_muic_irqs" but later patch will add max77836
interrupts.Signed-off-by: Krzysztof Kozlowski
Acked-by: Chanwoo Choi
Tested-by: Chanwoo Choi
Signed-off-by: Lee Jones -
Add max14577 prefix to muic_irqs array. This prepares for max77836
support in this extcon driver.Signed-off-by: Krzysztof Kozlowski
Acked-by: Chanwoo Choi
Tested-by: Chanwoo Choi
Signed-off-by: Lee Jones -
This patch use device name to make sysfs path according to device type:
max14577-muic
- /sys/class/extcon/max14577-muic/
max77836-muic
- /sys/class/extcon/max77836-muic/Signed-off-by: Krzysztof Kozlowski
Acked-by: Chanwoo Choi
Tested-by: Chanwoo Choi
Signed-off-by: Lee Jones
07 Jan, 2014
1 commit
-
This patch supports Maxim MAX14577 MUIC(Micro USB Interface Controller)
device by using EXTCON subsystem to handle various external connectors.
The max14577 device uses regmap method for i2c communication and
supports irq domain.Signed-off-by: Chanwoo Choi
Signed-off-by: Krzysztof Kozlowski
Signed-off-by: Kyungmin Park