25 Aug, 2017

1 commit


09 Jan, 2017

1 commit


13 Sep, 2016

1 commit

  • 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 pattern

    Signed-off-by: Chanwoo Choi
    Acked-by: Charles Keepax
    Acked-by: Roger Quadros

    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

    Chanwoo Choi
     

15 Dec, 2015

1 commit


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

    Chanwoo Choi
     

17 Jul, 2015

3 commits


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.h

    Fixes: 2a9de9c0f08d ("extcon: Use the unique id for external connector instead of string")
    Signed-off-by: Chanwoo Choi
    Signed-off-by: Greg Kroah-Hartman

    Chanwoo Choi
     

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

    Chanwoo Choi
     

19 May, 2015

4 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

    Chanwoo Choi
     
  • This patch alters the MHL-TA cable name to TA cable name because MHL-TA is not
    standard name. The MHL-TA is MHL cable with charger cable (TA or USB). So, this
    patch use the TA cable instead of MHL-TA to inform the charger cable state.
    - MHL-TA -> TA

    Signed-off-by: Chanwoo Choi
    Reviewed-by: Krzysztof Kozlowski

    Chanwoo Choi
     
  • This patch change the name of various dock devices as 'DOCK' because the name of
    various dock devices have not the standard naming rules. The name of dock devices
    include the differenct word but it is ambiguous and never important information
    on user-space aspect. This patch unifies the name of dock devices as following:
    - Dock-Smart -->|--> DOCK
    - Dock-Desk -->|
    - Dock-Audio -->|
    - Dock-Card -->|

    Signed-off-by: Chanwoo Choi
    Reviewed-by: Krzysztof Kozlowski

    Chanwoo Choi
     
  • 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

    Chanwoo Choi
     

07 Mar, 2015

1 commit


24 Feb, 2015

2 commits


26 Jan, 2015

1 commit


15 Dec, 2014

1 commit

  • Pull char/misc driver updates from Greg KH:
    "Here's the big char/misc driver update for 3.19-rc1

    Lots 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
    ...

    Linus Torvalds
     

24 Nov, 2014

1 commit

  • When JIG was set to "boot on" mode, the UART connection did not work
    because it was assigned to Dock-Car cable (path: audio), not JIG-UART-ON
    cable.

    This was introduced in 39bf369e4ed3 ("extcon: max77693: Add support dock
    device and buttons") while adding dock features.

    Assign the JIG-UART-ON back to UART path.

    Signed-off-by: Krzysztof Kozlowski
    [cw00.choi: Modify the patch name to remove specific board name]
    Signed-off-by: Chanwoo Choi

    Krzysztof Kozlowski
     

20 Oct, 2014

1 commit


22 Sep, 2014

2 commits


23 Jul, 2014

2 commits


17 Jun, 2014

2 commits

  • This patch modifies mfd driver to use regmap for handling interrupts.
    It allows to simplify irq handling process. This modifications needed
    to make small changes in function drivers, which use interrupts.

    Signed-off-by: Robert Baldyga
    Reviewed-by: Krzysztof Kozlowski
    Acked-by: Chanwoo Choi
    Signed-off-by: Lee Jones

    Robert Baldyga
     
  • This patch removes wrapper functions used to access regmap, and
    make driver using regmap_*() functions instead.

    Signed-off-by: Robert Baldyga
    Reviewed-by: Krzysztof Kozlowski
    Acked-by: Mark Brown
    Acked-by: Chanwoo Choi
    Signed-off-by: Lee Jones

    Robert Baldyga
     

16 Jun, 2014

1 commit


29 Apr, 2014

1 commit


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

    Sangjung Woo
     
  • Schedule delayed cable detection work on power efficient workqueue
    so the scheduler won't wake up idle core for that work.
    This extends the idle time for CPU cores and conserves power.

    Signed-off-by: Krzysztof Kozlowski
    Signed-off-by: Chanwoo Choi

    Krzysztof Kozlowski
     
  • Fix NULL pointer exceptions when platform data is not supplied.

    Trace of one exception:
    Unable to handle kernel NULL pointer dereference at virtual address 00000008
    pgd = c0004000
    [00000008] *pgd=00000000
    Internal error: Oops: 5 [#1] PREEMPT SMP ARM
    Modules linked in:
    CPU: 2 PID: 1 Comm: swapper/0 Not tainted 3.14.0-12045-gead5dd4687a6-dirty #1628
    task: eea80000 ti: eea88000 task.ti: eea88000
    PC is at max77693_muic_probe+0x27c/0x528
    LR is at regmap_write+0x50/0x60
    pc : [] lr : [] psr: 20000113
    sp : eea89e38 ip : 00000000 fp : c098a834
    r10: ee1a5a10 r9 : 00000005 r8 : c098a83c
    r7 : 0000000a r6 : c098a774 r5 : 00000005 r4 : eeb006d0
    r3 : c0697bd8 r2 : 00000000 r1 : 00000001 r0 : 00000000
    Flags: nzCv IRQs on FIQs on Mode SVC_32 ISA ARM Segment kernel
    Control: 10c5387d Table: 4000404a DAC: 00000015
    Process swapper/0 (pid: 1, stack limit = 0xeea88240)
    Stack: (0xeea89e38 to 0xeea8a000)
    9e20: c08499fc eeb006d0
    9e40: 00000000 00000000 c0915f98 00000001 00000000 ee1a5a10 c098a730 c09a88b8
    9e60: 00000000 c098a730 c0915f98 00000000 00000000 c02d6aa0 c02d6a88 ee1a5a10
    9e80: c0a712c8 c02d54e4 00001204 c0628b00 ee1a5a10 c098a730 ee1a5a44 00000000
    9ea0: eea88000 c02d57b4 00000000 c098a730 c02d5728 c02d3a24 ee813e5c eeb9d534
    9ec0: c098a730 ee22f700 c097c720 c02d4b14 c08174ec c098a730 00000006 c098a730
    9ee0: 00000006 c092fd30 c09b8500 c02d5df8 00000000 c093cbb8 00000006 c0008928
    9f00: 000000c3 ef7fc785 00000000 ef7fc794 00000000 c08af968 00000072 eea89f30
    9f20: ef7fc85e c065f198 000000c3 c003e87c 00000003 00000000 c092fd3c 00000000
    9f40: c08af618 c0826d58 00000006 00000006 c0956f58 c093cbb8 00000006 c092fd30
    9f60: c09b8500 000000c3 c092fd3c c08e8510 00000000 c08e8bb0 00000006 00000006
    9f80: c08e8510 c0c0c0c0 00000000 c0628fac 00000000 00000000 00000000 00000000
    9fa0: 00000000 c0628fb4 00000000 c000f038 00000000 00000000 00000000 00000000
    9fc0: 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000
    9fe0: 00000000 00000000 00000000 00000000 00000013 00000000 c0c0c0c0 c0c0c0c0
    [] (max77693_muic_probe) from [] (platform_drv_probe+0x18/0x48)
    [] (platform_drv_probe) from [] (driver_probe_device+0x140/0x384)
    [] (driver_probe_device) from [] (__driver_attach+0x8c/0x90)
    [] (__driver_attach) from [] (bus_for_each_dev+0x54/0x88)
    [] (bus_for_each_dev) from [] (bus_add_driver+0xe8/0x204)
    [] (bus_add_driver) from [] (driver_register+0x78/0xf4)
    [] (driver_register) from [] (do_one_initcall+0xc4/0x174)
    [] (do_one_initcall) from [] (kernel_init_freeable+0xfc/0x1c8)
    [] (kernel_init_freeable) from [] (kernel_init+0x8/0xec)
    [] (kernel_init) from [] (ret_from_fork+0x14/0x3c)
    Code: caffffe7 e59d200c e3550001 b3a05001 (e5923008)
    ---[ end trace 85db969ce011bde7 ]---

    Signed-off-by: Krzysztof Kozlowski
    Cc:
    Fixes: 190d7cfc8632
    Signed-off-by: Chanwoo Choi

    Krzysztof Kozlowski
     

27 Sep, 2013

4 commits

  • …t/chanwoo/extcon into char-misc-next

    Chanwoo writes:

    Update extcon for 3.13

    This patchset modify extcon core to remove unnecessary allocation sequence for
    'dev' instance and change extcon_dev_register() interface. extcon-gpio use
    gpiolib API to get debounce time and include small fix of extcon core/device
    driver.

    Detailed description for patchset:
    1. Modify extcon core driver
    - The extcon-gpio driver use gpio_set_debounce() API provided from gpiolib
    if gpio driver for SoC support gpio_set_debounce() function and support 'gpio_
    activ_low' filed to check whether gpio active state is 1(high) or 0(low).
    - Change field type of 'dev' in structure extcon_dev and remove the sequence
    of allocating memory of 'struct dev' on extcon_dev_register() function because
    extcon device must need 'struct device.
    - Change extcon_dev_register() prototype to simplify it and remove unnecessary
    parameter as below:

    2. Fix coding style and typo
    - extcon core : Fix indentation coding style and remove unnecessary casting
    - extcon-max8997 : Fix checkpatch warning
    - extcon-max77693 : Fix checkpatch warning
    - extcon-arizona : Fix typo of comment and modify minor issue
    - extcon-palmas : Use dev_get_platdata()

    3. Modify extcon-arizona driver
    - Modify minor issue about micbias and comparision statement

    Greg Kroah-Hartman
     
  • 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
    Cc: Kishon Vijay Abraham I
    Cc: Charles Keepax
    Cc: Mark Brown
    Signed-off-by: Chanwoo Choi
    Signed-off-by: Myungjoo Ham

    Chanwoo Choi
     
  • Fixes the following warning:
    WARNING: space prohibited before semicolon

    Signed-off-by: Sachin Kamat
    Signed-off-by: Chanwoo Choi

    Sachin Kamat
     
  • This patch fix 80 column coding sytle issues by using checkpatch script.

    Cc: Charles Keepax
    Cc: Mark Brown
    Signed-off-by: Chanwoo Choi
    Signed-off-by: Myungjoo Ham
    Signed-off-by: Greg Kroah-Hartman

    Chanwoo Choi
     

09 Apr, 2013

2 commits

  • Return the value obtained from the function instead of hardcoding.
    Silences the following warnings:
    drivers/extcon/extcon-max77693.c:297 max77693_muic_set_path()
    info: why not propagate 'ret' from max77693_update_reg() instead of (-11)?
    drivers/extcon/extcon-max77693.c:310 max77693_muic_set_path()
    info: why not propagate 'ret' from max77693_update_reg() instead of (-11)?

    Signed-off-by: Sachin Kamat
    Signed-off-by: Chanwoo Choi
    Signed-off-by: Myungjoo Ham

    Sachin Kamat
     
  • Commit 0ec83bd246 ("extcon: max77693: Initialize register of MUIC
    device to bring up it without platform data") added this structure
    but forgot to make it static. Without this patch we get the following
    warning:
    drivers/extcon/extcon-max77693.c:41:26: warning:
    symbol 'default_init_data' was not declared. Should it be static?

    Signed-off-by: Sachin Kamat
    Signed-off-by: Chanwoo Choi
    Signed-off-by: Myungjoo Ham

    Sachin Kamat
     

13 Mar, 2013

1 commit