12 Feb, 2019

1 commit


10 Sep, 2018

1 commit

  • commit 8a9dbb779fe882325b9a0238494a7afaff2eb444 upstream.

    Previously, extcon used the spinlock before calling the notifier_call_chain
    to prevent the scheduled out of task and to prevent the notification delay.
    When spinlock is locked for sending the notification, deadlock issue
    occured on the side of extcon consumer device. To fix this issue,
    extcon consumer device should always use the work. it is always not
    reasonable to use work.

    To fix this issue on extcon consumer device, release locking when sending
    the notification of connector state.

    Fixes: ab11af049f88 ("extcon: Add the synchronization extcon APIs to support the notification")
    Cc: stable@vger.kernel.org
    Cc: Roger Quadros
    Cc: Kishon Vijay Abraham I
    Signed-off-by: Chanwoo Choi
    Signed-off-by: Greg Kroah-Hartman

    Chanwoo Choi
     

24 Apr, 2018

1 commit

  • commit ad49aee401dd1997ec71360df6e51a91ad3cf516 upstream.

    Sometimes (firmware bug?) the V5 boost GPIO is not configured as output
    by the BIOS, leading to the 5V boost convertor being permanently on,

    Explicitly set the direction and drv flags rather then inheriting them
    from the firmware to fix this.

    Fixes: 585cb239f4de ("extcon: intel-cht-wc: Disable external 5v boost ...")
    Cc: stable@vger.kernel.org
    Reviewed-by: Andy Shevchenko
    Signed-off-by: Hans de Goede
    Signed-off-by: Chanwoo Choi
    Signed-off-by: Greg Kroah-Hartman

    Hans de Goede
     

28 Feb, 2018

1 commit

  • commit 0434352d3d2e950cf5e743f6062abd87de22f960 upstream.

    Some other drivers may be waiting for our extcon to show-up, exiting their
    probe methods with -EPROBE_DEFER until we show up.

    These drivers will typically get the cable state directly after getting
    the extcon, this commit changes the int3496 code to wait for the initial
    processing of the id-pin to complete before exiting probe() with 0, which
    will cause devices waiting on the defered probe to get reprobed.

    This fixes a race where the initial work might still be running while other
    drivers were already calling extcon_get_state().

    Fixes: 2f556bdb9f2e ("extcon: int3496: Add Intel INT3496 ACPI ... driver")
    Cc: stable@vger.kernel.org
    Signed-off-by: Hans de Goede
    Signed-off-by: Chanwoo Choi
    Signed-off-by: Greg Kroah-Hartman

    Hans de Goede
     

02 Nov, 2017

1 commit

  • Many source files in the tree are missing licensing information, which
    makes it harder for compliance tools to determine the correct license.

    By default all files without license information are under the default
    license of the kernel, which is GPL version 2.

    Update the files which contain no license information with the 'GPL-2.0'
    SPDX license identifier. The SPDX identifier is a legally binding
    shorthand, which can be used instead of the full boiler plate text.

    This patch is based on work done by Thomas Gleixner and Kate Stewart and
    Philippe Ombredanne.

    How this work was done:

    Patches were generated and checked against linux-4.14-rc6 for a subset of
    the use cases:
    - file had no licensing information it it.
    - file was a */uapi/* one with no licensing information in it,
    - file was a */uapi/* one with existing licensing information,

    Further patches will be generated in subsequent months to fix up cases
    where non-standard license headers were used, and references to license
    had to be inferred by heuristics based on keywords.

    The analysis to determine which SPDX License Identifier to be applied to
    a file was done in a spreadsheet of side by side results from of the
    output of two independent scanners (ScanCode & Windriver) producing SPDX
    tag:value files created by Philippe Ombredanne. Philippe prepared the
    base worksheet, and did an initial spot review of a few 1000 files.

    The 4.13 kernel was the starting point of the analysis with 60,537 files
    assessed. Kate Stewart did a file by file comparison of the scanner
    results in the spreadsheet to determine which SPDX license identifier(s)
    to be applied to the file. She confirmed any determination that was not
    immediately clear with lawyers working with the Linux Foundation.

    Criteria used to select files for SPDX license identifier tagging was:
    - Files considered eligible had to be source code files.
    - Make and config files were included as candidates if they contained >5
    lines of source
    - File already had some variant of a license header in it (even if
    Reviewed-by: Philippe Ombredanne
    Reviewed-by: Thomas Gleixner
    Signed-off-by: Greg Kroah-Hartman

    Greg Kroah-Hartman
     

25 Aug, 2017

1 commit


16 Aug, 2017

2 commits


07 Aug, 2017

1 commit


19 Jul, 2017

1 commit


17 Jul, 2017

2 commits


16 Jul, 2017

1 commit

  • acpi_device_id are not supposed to change at runtime. All functions
    working with acpi_device_id provided by work with
    const acpi_device_id. So mark the non-const structs as const.

    File size before:
    text data bss dec hex filename
    1733 352 0 2085 825 drivers/extcon/extcon-intel-int3496.o

    File size After adding 'const':
    text data bss dec hex filename
    1797 272 0 2069 815 drivers/extcon/extcon-intel-int3496.o

    Signed-off-by: Arvind Yadav
    Signed-off-by: Chanwoo Choi

    Arvind Yadav
     

12 Jun, 2017

1 commit


23 May, 2017

4 commits


06 Apr, 2017

10 commits


04 Apr, 2017

1 commit

  • The extcon core already provides the extcon_register_notifier() function
    in order to register the notifier block which is used to monitor
    the state change for the specific external connector such as EXTCON_USB,
    EXTCON_USB_HOST and so on. The extcon consumer uses the this function.

    The extcon consumer might need to monitor the all supported external
    connectors from the extcon device. In this case, The extcon consumer
    should have each notifier_block structure for each external connector.

    This patch adds the new extcon_register_notifier_all() function
    that extcon consumer is able to monitor the state change of all
    supported external connectors by using only one notifier_block structure.

    - List of new added functions:
    int extcon_register_notifier_all(struct extcon_dev *edev,
    struct notifier_block *nb);
    int extcon_unregister_notifier_all(struct extcon_dev *edev,
    struct notifier_block *nb);
    int devm_extcon_register_notifier_all(struct device *dev,
    struct extcon_dev *edev, struct notifier_block *nb);
    void devm_extcon_unregister_notifier_all(struct device *dev,
    struct extcon_dev *edev, struct notifier_block *nb);

    Suggested-by: Hans de Goede
    Signed-off-by: Chanwoo Choi
    Tested-by: Hans de Goede
    Acked-by: Hans de Goede

    Chanwoo Choi
     

27 Mar, 2017

1 commit

  • The commit 942c7924a51e introduced a check for ACPI handle for the
    device that never appears on any ACPI-enabled platform so far. It seems
    a confusion with extcon-intel-int3496 which does support ACPI-enabled
    platforms.

    Revert commit 942c7924a51e to avoid any confusion in the future.

    Signed-off-by: Andy Shevchenko
    Signed-off-by: Chanwoo Choi

    Andy Shevchenko
     

22 Mar, 2017

5 commits

  • With the new more strict ACPI gpio code the dsdt's IoRestriction
    flags are honored on gpiod_get, but in some dsdt's it is wrong,
    so explicitly call gpiod_direction_input on the id gpio if
    necessary.

    This fixes the following errors when the int3496 code is used
    together with the new more strict ACPI gpio code:

    [ 2382.484415] gpio gpiochip1: (INT33FF:01): gpiochip_lock_as_irq: tried to flag a GPIO set as output for IRQ
    [ 2382.484425] gpio gpiochip1: (INT33FF:01): unable to lock HW IRQ 3 for IRQ
    [ 2382.484429] genirq: Failed to request resources for INT3496:00 (irq 174) on irqchip chv-gpio
    [ 2382.484518] intel-int3496 INT3496:00: can't request IRQ for USB ID GPIO: -22
    [ 2382.500359] intel-int3496: probe of INT3496:00 failed with error -22

    Signed-off-by: Hans de Goede
    Reviewed-by: Andy Shevchenko
    Signed-off-by: Chanwoo Choi

    Hans de Goede
     
  • Now that we've an acpi mapping table we should be using gpiod_get
    instead of gpiod_get_index.

    Signed-off-by: Hans de Goede
    Reviewed-by: Andy Shevchenko
    Signed-off-by: Chanwoo Choi

    Hans de Goede
     
  • Add dependency on X86 so it doesn't show up on other arches and
    add a option for compile test so it still gets build coverage.

    Signed-off-by: Peter Robinson
    Signed-off-by: Chanwoo Choi

    Peter Robinson
     
  • In order to make GPIO ACPI library stricter prepare users of
    gpiod_get_index() to correctly behave when there no mapping is
    provided by firmware.

    Here we add explicit mapping between _CRS GpioIo() resources and
    their names used in the driver.

    Signed-off-by: Andy Shevchenko
    Signed-off-by: Chanwoo Choi

    Andy Shevchenko
     
  • Update GPIO pin names in extcon-intel-int3496.c driver to follow
    the existing extcon binding.

    Signed-off-by: Andy Shevchenko
    Signed-off-by: Chanwoo Choi

    Andy Shevchenko
     

13 Mar, 2017

1 commit


28 Feb, 2017

1 commit


25 Jan, 2017

1 commit


09 Jan, 2017

2 commits