08 May, 2019

1 commit

  • …/git/gregkh/char-misc

    Pull char/misc update part 2 from Greg KH:
    "Here is the "real" big set of char/misc driver patches for 5.2-rc1

    Loads of different driver subsystem stuff in here, all over the places:
    - thunderbolt driver updates
    - habanalabs driver updates
    - nvmem driver updates
    - extcon driver updates
    - intel_th driver updates
    - mei driver updates
    - coresight driver updates
    - soundwire driver cleanups and updates
    - fastrpc driver updates
    - other minor driver updates
    - chardev minor fixups

    Feels like this tree is getting to be a dumping ground of "small
    driver subsystems" these days. Which is fine with me, if it makes
    things easier for those subsystem maintainers.

    All of these have been in linux-next for a while with no reported
    issues"

    * tag 'char-misc-5.2-rc1-part2' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/char-misc: (255 commits)
    intel_th: msu: Add current window tracking
    intel_th: msu: Add a sysfs attribute to trigger window switch
    intel_th: msu: Correct the block wrap detection
    intel_th: Add switch triggering support
    intel_th: gth: Factor out trace start/stop
    intel_th: msu: Factor out pipeline draining
    intel_th: msu: Switch over to scatterlist
    intel_th: msu: Replace open-coded list_{first,last,next}_entry variants
    intel_th: Only report useful IRQs to subdevices
    intel_th: msu: Start handling IRQs
    intel_th: pci: Use MSI interrupt signalling
    intel_th: Communicate IRQ via resource
    intel_th: Add "rtit" source device
    intel_th: Skip subdevices if their MMIO is missing
    intel_th: Rework resource passing between glue layers and core
    intel_th: SPDX-ify the documentation
    intel_th: msu: Fix single mode with IOMMU
    coresight: funnel: Support static funnel
    dt-bindings: arm: coresight: Unify funnel DT binding
    coresight: replicator: Add new device id for static replicator
    ...

    Linus Torvalds
     

06 May, 2019

1 commit

  • * acpi-utils:
    gpio: merrifield: Fix build err without CONFIG_ACPI
    ACPI / utils: Remove deprecated function since no user left
    ASoC: Intel: cht_bsw_rt5672: Convert to use acpi_dev_get_first_match_dev()
    ASoC: Intel: cht_bsw_rt5645: Convert to use acpi_dev_get_first_match_dev()
    ASoC: Intel: bytcr_rt5651: Convert to use acpi_dev_get_first_match_dev()
    ASoC: Intel: bytcr_rt5640: Convert to use acpi_dev_get_first_match_dev()
    ASoC: Intel: bytcht_es8316: Convert to use acpi_dev_get_first_match_dev()
    ASoC: Intel: bytcht_da7213: Convert to use acpi_dev_get_first_match_dev()
    gpio: merrifield: Convert to use acpi_dev_get_first_match_dev()
    extcon: axp288: Convert to use acpi_dev_get_first_match_dev()
    ACPI / utils: Introduce acpi_dev_get_first_match_dev() helper

    * acpi-video:
    ACPI: video: Use vendor backlight on Sony VPCEH3U1E

    * acpi-soc:
    ACPI / LPSS: Use acpi_lpss_* instead of acpi_subsys_* functions for hibernate

    * acpi-button:
    ACPI: button: reinitialize button state upon resume

    Rafael J. Wysocki
     

12 Apr, 2019

2 commits

  • Microphone detection provides the button detection features on the
    Arizona CODECs as such it will be running if the jack is currently
    inserted. If the driver is unbound whilst the jack is still inserted
    this will cause warnings from the regulator framework as the MICVDD
    regulator is put but was never disabled.

    Correct this by disabling microphone detection on driver removal and if
    the microphone detection was running disable the regulator and put the
    runtime reference that was currently held.

    Signed-off-by: Charles Keepax
    Signed-off-by: Chanwoo Choi

    Charles Keepax
     
  • As Hans de Goede pointed, using this driver without ACPI
    makes little sense, so add ACPI dependency to Kconfig entry
    to fix a build error while CONFIG_ACPI is not set.

    drivers/extcon/extcon-axp288.c: In function 'axp288_extcon_probe':
    drivers/extcon/extcon-axp288.c:363:20: error: dereferencing pointer to incomplete type
    put_device(&adev->dev);

    Fixes: 0cf064db948a ("extcon: axp288: Convert to use acpi_dev_get_first_match_dev()")
    Reported-by: Hulk Robot
    Suggested-by: Hans de Goede
    Signed-off-by: YueHaibing
    Reviewed-by: Hans de Goede
    Reviewed-by: Mukesh Ojha
    Signed-off-by: Chanwoo Choi

    YueHaibing
     

05 Apr, 2019

6 commits

  • On Intel Merrifield the Basin Cove PMIC provides a feature to detect
    the USB connection type. This driver utilizes the feature in order
    to support the USB dual role detection.

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

    Andy Shevchenko
     
  • We are going to use some definitions in the other Intel extcon drivers,
    thus, split out them to a common header file.

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

    Andy Shevchenko
     
  • Give the line the asterisk it wanted to fix the build warning.

    [Build warning message]
    Building with W=1 reports:

    CC drivers/extcon/devres.o
    drivers/extcon/devres.c:208: warning: bad line:
    - Resource-managed extcon_unregister_notifier()

    Signed-off-by: Valdis Kletnieks
    [cw00.choi: Edit the patch subject and description]
    Signed-off-by: Chanwoo Choi

    Valdis Klētnieks
     
  • In some configuration external charger "#charge enable" signal is
    connected to PMIC. Enable it at device probing to allow charging.

    Save CHGRCTRL0 and CHGDISCTR registers at driver probing and restore
    them at driver unbind to re-enable hardware charging control if it was
    enabled before.

    Tested at Lenovo Yoga Book (YB1-X91L).

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

    Yauhen Kharuzhy
     
  • Whiskey Cove Cherry Trail PMIC requires disabling OTG host mode before
    of charger detection procedure. Do this by manipulationg of CHGRCTRL1
    register.

    Source: APCI DSDT code of Lenovo Yoga Book YB1-X91L and open-sourced
    Intel's drivers.

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

    Yauhen Kharuzhy
     
  • The PTN5150 dependencies look like they were meant to do the
    right thing, but they actually should not allow building without
    I2C for compile testing, as that results in a Kconfig warning
    and subsequent build failure:

    WARNING: unmet direct dependencies detected for REGMAP_I2C
    Depends on [m]: I2C [=m]
    Selected by [y]:
    - EXTCON_PTN5150 [=y] && EXTCON [=y] && (I2C [=m] && GPIOLIB [=y] || COMPILE_TEST [=y])
    Selected by [m]:
    - EEPROM_AT24 [=m] && I2C [=m] && SYSFS [=y]
    - KEYBOARD_CAP11XX [=m] && !UML && INPUT [=y] && INPUT_KEYBOARD [=y] && OF [=y] && I2C [=m]
    - INPUT_DRV260X_HAPTICS [=m] && !UML && INPUT_MISC [=y] && INPUT [=y] && I2C [=m] && (GPIOLIB [=y] || COMPILE_TEST [=y])
    - ... [many others]

    Add parentheses around the expression so we can compile-test
    without GPIOLIB but not without I2C.

    Fixes: 4ed754de2d66 ("extcon: Add support for ptn5150 extcon driver")
    Signed-off-by: Arnd Bergmann
    Signed-off-by: Chanwoo Choi

    Arnd Bergmann
     

01 Apr, 2019

1 commit


11 Feb, 2019

2 commits


14 Nov, 2018

1 commit

  • MAX8997 driver disables automatic path selection from MicroUSB connector
    and manually sets path to either UART or USB lines. However the code for
    setting USB path worked only for USB host mode (when ID pin is set
    to ground). When standard USB cable (USB device mode) is connected, path
    registers are not touched. This means that once the non-USB accessory is
    connected to MAX8997-operated micro USB port, the path is no longer set
    to USB and USB device mode doesn't work. This patch fixes it by setting
    USB path both for USB and USB host modes.

    Signed-off-by: Marek Szyprowski
    Signed-off-by: Chanwoo Choi

    Marek Szyprowski
     

12 Nov, 2018

4 commits

  • 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

    Marek Szyprowski
     
  • 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

    Marek Szyprowski
     
  • 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

    Marek Szyprowski
     
  • 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

    Marek Szyprowski
     

28 Aug, 2018

8 commits


21 Jul, 2018

1 commit

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

    Chanwoo writes:

    Update extcon for 4.19

    Detailed description for this pull request:
    1. Release locking when sending the connector state in extcon_sync()
    - 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 on extcon
    consumer device, release locking when sending the connector state.

    2. Fix minor issues of extcon provider driver
    - extcon-intel-int3496.c uses 'linux/gpio/consumer.h' instead of 'linux/gpio.h'
    - extcon-usbc-cors-ec.c adds SPDX license and fix the wrong license information

    Greg Kroah-Hartman
     

12 Jul, 2018

5 commits

  • 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

    Chanwoo Choi
     
  • Adopt the SPDX license identifier headers to ease license compliance
    management.

    Signed-off-by: Enric Balletbo i Serra
    Signed-off-by: Chanwoo Choi

    Enric Balletbo i Serra
     
  • The license text is specifying "GPLv2" but the MODULE_LICENSE is set to
    GPL which means GNU Public License v2 or later. When MODULE_LICENSE and
    boiler plate does not match, go for boiler plate license.

    Signed-off-by: Enric Balletbo i Serra
    Signed-off-by: Chanwoo Choi

    Enric Balletbo i Serra
     
  • Since commit eca0f13c836a ("extcon: int3496: Ignore incorrect
    IoRestriction for ID pin"), the driver doesn't use GPIOF_* flags
    anymore. We can thus now drop the deprecated include file for GPIO and
    use the new one.

    Signed-off-by: Wolfram Sang
    Signed-off-by: Chanwoo Choi

    Wolfram Sang
     
  • Another driver turned up that is missing linux/mod_devicetable.h after
    the device IDs are split out from linux/platform_device.h:

    drivers/extcon/extcon-max3355.c:127:34: error: array type has incomplete element type 'struct of_device_id'
    static const struct of_device_id max3355_match_table[] = {

    Fixes: ac3167257b9f ("headers: separate linux/mod_devicetable.h from linux/platform_device.h")
    Signed-off-by: Arnd Bergmann
    Signed-off-by: Greg Kroah-Hartman

    Arnd Bergmann
     

07 Jul, 2018

1 commit

  • At over 4000 #includes, is the 9th most
    #included header file in the Linux kernel. It does not need
    , so drop that header and explicitly add
    to source files that need it.

    4146 #include

    After this patch, there are 225 files that use ,
    for a reduction of around 3900 times that
    does not have to be read & parsed.

    225 #include

    This patch was build-tested on 20 different arch-es.

    It also makes these drivers SubmitChecklist#1 compliant.

    Signed-off-by: Randy Dunlap
    Reported-by: kbuild test robot # drivers/media/platform/vimc/
    Reported-by: kbuild test robot # drivers/pinctrl/pinctrl-u300.c
    Signed-off-by: Greg Kroah-Hartman

    Randy Dunlap
     

13 Jun, 2018

1 commit

  • The kzalloc() function has a 2-factor argument form, kcalloc(). This
    patch replaces cases of:

    kzalloc(a * b, gfp)

    with:
    kcalloc(a * b, gfp)

    as well as handling cases of:

    kzalloc(a * b * c, gfp)

    with:

    kzalloc(array3_size(a, b, c), gfp)

    as it's slightly less ugly than:

    kzalloc_array(array_size(a, b), c, gfp)

    This does, however, attempt to ignore constant size factors like:

    kzalloc(4 * 1024, gfp)

    though any constants defined via macros get caught up in the conversion.

    Any factors with a sizeof() of "unsigned char", "char", and "u8" were
    dropped, since they're redundant.

    The Coccinelle script used for this was:

    // Fix redundant parens around sizeof().
    @@
    type TYPE;
    expression THING, E;
    @@

    (
    kzalloc(
    - (sizeof(TYPE)) * E
    + sizeof(TYPE) * E
    , ...)
    |
    kzalloc(
    - (sizeof(THING)) * E
    + sizeof(THING) * E
    , ...)
    )

    // Drop single-byte sizes and redundant parens.
    @@
    expression COUNT;
    typedef u8;
    typedef __u8;
    @@

    (
    kzalloc(
    - sizeof(u8) * (COUNT)
    + COUNT
    , ...)
    |
    kzalloc(
    - sizeof(__u8) * (COUNT)
    + COUNT
    , ...)
    |
    kzalloc(
    - sizeof(char) * (COUNT)
    + COUNT
    , ...)
    |
    kzalloc(
    - sizeof(unsigned char) * (COUNT)
    + COUNT
    , ...)
    |
    kzalloc(
    - sizeof(u8) * COUNT
    + COUNT
    , ...)
    |
    kzalloc(
    - sizeof(__u8) * COUNT
    + COUNT
    , ...)
    |
    kzalloc(
    - sizeof(char) * COUNT
    + COUNT
    , ...)
    |
    kzalloc(
    - sizeof(unsigned char) * COUNT
    + COUNT
    , ...)
    )

    // 2-factor product with sizeof(type/expression) and identifier or constant.
    @@
    type TYPE;
    expression THING;
    identifier COUNT_ID;
    constant COUNT_CONST;
    @@

    (
    - kzalloc
    + kcalloc
    (
    - sizeof(TYPE) * (COUNT_ID)
    + COUNT_ID, sizeof(TYPE)
    , ...)
    |
    - kzalloc
    + kcalloc
    (
    - sizeof(TYPE) * COUNT_ID
    + COUNT_ID, sizeof(TYPE)
    , ...)
    |
    - kzalloc
    + kcalloc
    (
    - sizeof(TYPE) * (COUNT_CONST)
    + COUNT_CONST, sizeof(TYPE)
    , ...)
    |
    - kzalloc
    + kcalloc
    (
    - sizeof(TYPE) * COUNT_CONST
    + COUNT_CONST, sizeof(TYPE)
    , ...)
    |
    - kzalloc
    + kcalloc
    (
    - sizeof(THING) * (COUNT_ID)
    + COUNT_ID, sizeof(THING)
    , ...)
    |
    - kzalloc
    + kcalloc
    (
    - sizeof(THING) * COUNT_ID
    + COUNT_ID, sizeof(THING)
    , ...)
    |
    - kzalloc
    + kcalloc
    (
    - sizeof(THING) * (COUNT_CONST)
    + COUNT_CONST, sizeof(THING)
    , ...)
    |
    - kzalloc
    + kcalloc
    (
    - sizeof(THING) * COUNT_CONST
    + COUNT_CONST, sizeof(THING)
    , ...)
    )

    // 2-factor product, only identifiers.
    @@
    identifier SIZE, COUNT;
    @@

    - kzalloc
    + kcalloc
    (
    - SIZE * COUNT
    + COUNT, SIZE
    , ...)

    // 3-factor product with 1 sizeof(type) or sizeof(expression), with
    // redundant parens removed.
    @@
    expression THING;
    identifier STRIDE, COUNT;
    type TYPE;
    @@

    (
    kzalloc(
    - sizeof(TYPE) * (COUNT) * (STRIDE)
    + array3_size(COUNT, STRIDE, sizeof(TYPE))
    , ...)
    |
    kzalloc(
    - sizeof(TYPE) * (COUNT) * STRIDE
    + array3_size(COUNT, STRIDE, sizeof(TYPE))
    , ...)
    |
    kzalloc(
    - sizeof(TYPE) * COUNT * (STRIDE)
    + array3_size(COUNT, STRIDE, sizeof(TYPE))
    , ...)
    |
    kzalloc(
    - sizeof(TYPE) * COUNT * STRIDE
    + array3_size(COUNT, STRIDE, sizeof(TYPE))
    , ...)
    |
    kzalloc(
    - sizeof(THING) * (COUNT) * (STRIDE)
    + array3_size(COUNT, STRIDE, sizeof(THING))
    , ...)
    |
    kzalloc(
    - sizeof(THING) * (COUNT) * STRIDE
    + array3_size(COUNT, STRIDE, sizeof(THING))
    , ...)
    |
    kzalloc(
    - sizeof(THING) * COUNT * (STRIDE)
    + array3_size(COUNT, STRIDE, sizeof(THING))
    , ...)
    |
    kzalloc(
    - sizeof(THING) * COUNT * STRIDE
    + array3_size(COUNT, STRIDE, sizeof(THING))
    , ...)
    )

    // 3-factor product with 2 sizeof(variable), with redundant parens removed.
    @@
    expression THING1, THING2;
    identifier COUNT;
    type TYPE1, TYPE2;
    @@

    (
    kzalloc(
    - sizeof(TYPE1) * sizeof(TYPE2) * COUNT
    + array3_size(COUNT, sizeof(TYPE1), sizeof(TYPE2))
    , ...)
    |
    kzalloc(
    - sizeof(TYPE1) * sizeof(THING2) * (COUNT)
    + array3_size(COUNT, sizeof(TYPE1), sizeof(TYPE2))
    , ...)
    |
    kzalloc(
    - sizeof(THING1) * sizeof(THING2) * COUNT
    + array3_size(COUNT, sizeof(THING1), sizeof(THING2))
    , ...)
    |
    kzalloc(
    - sizeof(THING1) * sizeof(THING2) * (COUNT)
    + array3_size(COUNT, sizeof(THING1), sizeof(THING2))
    , ...)
    |
    kzalloc(
    - sizeof(TYPE1) * sizeof(THING2) * COUNT
    + array3_size(COUNT, sizeof(TYPE1), sizeof(THING2))
    , ...)
    |
    kzalloc(
    - sizeof(TYPE1) * sizeof(THING2) * (COUNT)
    + array3_size(COUNT, sizeof(TYPE1), sizeof(THING2))
    , ...)
    )

    // 3-factor product, only identifiers, with redundant parens removed.
    @@
    identifier STRIDE, SIZE, COUNT;
    @@

    (
    kzalloc(
    - (COUNT) * STRIDE * SIZE
    + array3_size(COUNT, STRIDE, SIZE)
    , ...)
    |
    kzalloc(
    - COUNT * (STRIDE) * SIZE
    + array3_size(COUNT, STRIDE, SIZE)
    , ...)
    |
    kzalloc(
    - COUNT * STRIDE * (SIZE)
    + array3_size(COUNT, STRIDE, SIZE)
    , ...)
    |
    kzalloc(
    - (COUNT) * (STRIDE) * SIZE
    + array3_size(COUNT, STRIDE, SIZE)
    , ...)
    |
    kzalloc(
    - COUNT * (STRIDE) * (SIZE)
    + array3_size(COUNT, STRIDE, SIZE)
    , ...)
    |
    kzalloc(
    - (COUNT) * STRIDE * (SIZE)
    + array3_size(COUNT, STRIDE, SIZE)
    , ...)
    |
    kzalloc(
    - (COUNT) * (STRIDE) * (SIZE)
    + array3_size(COUNT, STRIDE, SIZE)
    , ...)
    |
    kzalloc(
    - COUNT * STRIDE * SIZE
    + array3_size(COUNT, STRIDE, SIZE)
    , ...)
    )

    // Any remaining multi-factor products, first at least 3-factor products,
    // when they're not all constants...
    @@
    expression E1, E2, E3;
    constant C1, C2, C3;
    @@

    (
    kzalloc(C1 * C2 * C3, ...)
    |
    kzalloc(
    - (E1) * E2 * E3
    + array3_size(E1, E2, E3)
    , ...)
    |
    kzalloc(
    - (E1) * (E2) * E3
    + array3_size(E1, E2, E3)
    , ...)
    |
    kzalloc(
    - (E1) * (E2) * (E3)
    + array3_size(E1, E2, E3)
    , ...)
    |
    kzalloc(
    - E1 * E2 * E3
    + array3_size(E1, E2, E3)
    , ...)
    )

    // And then all remaining 2 factors products when they're not all constants,
    // keeping sizeof() as the second factor argument.
    @@
    expression THING, E1, E2;
    type TYPE;
    constant C1, C2, C3;
    @@

    (
    kzalloc(sizeof(THING) * C2, ...)
    |
    kzalloc(sizeof(TYPE) * C2, ...)
    |
    kzalloc(C1 * C2 * C3, ...)
    |
    kzalloc(C1 * C2, ...)
    |
    - kzalloc
    + kcalloc
    (
    - sizeof(TYPE) * (E2)
    + E2, sizeof(TYPE)
    , ...)
    |
    - kzalloc
    + kcalloc
    (
    - sizeof(TYPE) * E2
    + E2, sizeof(TYPE)
    , ...)
    |
    - kzalloc
    + kcalloc
    (
    - sizeof(THING) * (E2)
    + E2, sizeof(THING)
    , ...)
    |
    - kzalloc
    + kcalloc
    (
    - sizeof(THING) * E2
    + E2, sizeof(THING)
    , ...)
    |
    - kzalloc
    + kcalloc
    (
    - (E1) * E2
    + E1, E2
    , ...)
    |
    - kzalloc
    + kcalloc
    (
    - (E1) * (E2)
    + E1, E2
    , ...)
    |
    - kzalloc
    + kcalloc
    (
    - E1 * E2
    + E1, E2
    , ...)
    )

    Signed-off-by: Kees Cook

    Kees Cook
     

05 Apr, 2018

1 commit

  • Pull char/misc updates from Greg KH:
    "Here is the big set of char/misc driver patches for 4.17-rc1.

    There are a lot of little things in here, nothing huge, but all
    important to the different hardware types involved:

    - thunderbolt driver updates

    - parport updates (people still care...)

    - nvmem driver updates

    - mei updates (as always)

    - hwtracing driver updates

    - hyperv driver updates

    - extcon driver updates

    - ... and a handful of even smaller driver subsystem and individual
    driver updates

    All of these have been in linux-next with no reported issues"

    * tag 'char-misc-4.17-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/char-misc: (149 commits)
    hwtracing: Add HW tracing support menu
    intel_th: Add ACPI glue layer
    intel_th: Allow forcing host mode through drvdata
    intel_th: Pick up irq number from resources
    intel_th: Don't touch switch routing in host mode
    intel_th: Use correct method of finding hub
    intel_th: Add SPDX GPL-2.0 header to replace GPLv2 boilerplate
    stm class: Make dummy's master/channel ranges configurable
    stm class: Add SPDX GPL-2.0 header to replace GPLv2 boilerplate
    MAINTAINERS: Bestow upon myself the care for drivers/hwtracing
    hv: add SPDX license id to Kconfig
    hv: add SPDX license to trace
    Drivers: hv: vmbus: do not mark HV_PCIE as perf_device
    Drivers: hv: vmbus: respect what we get from hv_get_synint_state()
    /dev/mem: Avoid overwriting "err" in read_mem()
    eeprom: at24: use SPDX identifier instead of GPL boiler-plate
    eeprom: at24: simplify the i2c functionality checking
    eeprom: at24: fix a line break
    eeprom: at24: tweak newlines
    eeprom: at24: refactor at24_probe()
    ...

    Linus Torvalds
     

22 Mar, 2018

1 commit

  • 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
    Reviewed-by: Andy Shevchenko
    Signed-off-by: Heikki Krogerus
    Signed-off-by: Greg Kroah-Hartman

    Hans de Goede
     

21 Mar, 2018

4 commits