06 Apr, 2019

4 commits

  • [ Upstream commit e97a34563d18606ee5db93e495382a967f999cd4 ]

    Power button suspend for some Dell models was added in:

    commit 821b85366284 ("platform/x86: intel-hid: Power button suspend on Dell Latitude 7275")

    by checking against the power button press notification (0xCE) to report
    the power button press event. The corresponding power button release
    notification (0xCF) was caught and ignored to stop it from being reported
    as an "unknown event" in the logs.

    The missing button release event is creating issues on Android-x86, as
    reported on the project mailing list for a Dell Latitude 5175 model, since
    the events are expected in down/up pairs.

    Report the power button release event to fix this issue.

    Link: https://groups.google.com/forum/#!topic/android-x86/aSwZK9Nf9Ro
    Tested-by: Tristian Celestin
    Tested-by: Jérôme de Bretagne
    Signed-off-by: Jérôme de Bretagne
    Reviewed-by: Mario Limonciello
    [dvhart: corrected commit reference format per checkpatch]
    Signed-off-by: Darren Hart (VMware)
    Signed-off-by: Sasha Levin

    Jérôme de Bretagne
     
  • [ Upstream commit 0e68eeea9894feeba2edf7ec63e4551b87f39621 ]

    A previous commit "platform/x86: intel_pmc_core: Make the driver PCH
    family agnostic " provided
    better abstraction to this driver but has some fundamental issues.

    e.g. the following condition

    for (index = 0; index < pmcdev->map->ppfear_buckets &&
    index < PPFEAR_MAX_NUM_ENTRIES; index++, iter++)

    is wrong because for CNL, PPFEAR_MAX_NUM_ENTRIES is hardcoded as 5 which
    is _wrong_ and even though ppfear_buckets is 8, the loop fails to read
    all eight registers needed for CNL PCH i.e. PPFEAR0 and PPFEAR1. This
    patch refactors the pfear show logic to correctly read PCH IP power
    gating status for Cannonlake and beyond.

    Cc: "David E. Box"
    Cc: Srinivas Pandruvada
    Fixes: c977b98bbef5 ("platform/x86: intel_pmc_core: Make the driver PCH family agnostic")
    Signed-off-by: Rajneesh Bhardwaj
    Signed-off-by: Andy Shevchenko
    Signed-off-by: Sasha Levin

    Rajneesh Bhardwaj
     
  • [ Upstream commit e4c275f77624961b56cce397814d9d770a45ac59 ]

    Fix the following KASAN warning produced when booting a 64-bit kernel:
    [ 13.334750] BUG: KASAN: stack-out-of-bounds in find_first_bit+0x19/0x70
    [ 13.342166] Read of size 8 at addr ffff880235067178 by task kworker/2:1/42
    [ 13.342176] CPU: 2 PID: 42 Comm: kworker/2:1 Not tainted 4.20.0-rc1+ #106
    [ 13.342179] Hardware name: Mellanox Technologies Ltd. MSN2740/Mellanox x86 SFF board, BIOS 5.6.5 06/07/2016
    [ 13.342190] Workqueue: events deferred_probe_work_func
    [ 13.342194] Call Trace:
    [ 13.342206] dump_stack+0xc7/0x15b
    [ 13.342214] ? show_regs_print_info+0x5/0x5
    [ 13.342220] ? kmsg_dump_rewind_nolock+0x59/0x59
    [ 13.342234] ? _raw_write_lock_irqsave+0x100/0x100
    [ 13.351593] print_address_description+0x73/0x260
    [ 13.351603] kasan_report+0x260/0x380
    [ 13.351611] ? find_first_bit+0x19/0x70
    [ 13.351619] find_first_bit+0x19/0x70
    [ 13.351630] mlxreg_hotplug_work_handler+0x73c/0x920 [mlxreg_hotplug]
    [ 13.351639] ? __lock_text_start+0x8/0x8
    [ 13.351646] ? _raw_write_lock_irqsave+0x80/0x100
    [ 13.351656] ? mlxreg_hotplug_remove+0x1e0/0x1e0 [mlxreg_hotplug]
    [ 13.351663] ? regmap_volatile+0x40/0xb0
    [ 13.351668] ? regcache_write+0x4c/0x90
    [ 13.351676] ? mlxplat_mlxcpld_reg_write+0x24/0x30 [mlx_platform]
    [ 13.351681] ? _regmap_write+0xea/0x220
    [ 13.351688] ? __mutex_lock_slowpath+0x10/0x10
    [ 13.351696] ? devm_add_action+0x70/0x70
    [ 13.351701] ? mutex_unlock+0x1d/0x40
    [ 13.351710] mlxreg_hotplug_probe+0x82e/0x989 [mlxreg_hotplug]
    [ 13.351723] ? mlxreg_hotplug_work_handler+0x920/0x920 [mlxreg_hotplug]
    [ 13.351731] ? sysfs_do_create_link_sd.isra.2+0xf4/0x190
    [ 13.351737] ? sysfs_rename_link_ns+0xf0/0xf0
    [ 13.351743] ? devres_close_group+0x2b0/0x2b0
    [ 13.351749] ? pinctrl_put+0x20/0x20
    [ 13.351755] ? acpi_dev_pm_attach+0x2c/0xd0
    [ 13.351763] platform_drv_probe+0x70/0xd0
    [ 13.351771] really_probe+0x480/0x6e0
    [ 13.351778] ? device_attach+0x10/0x10
    [ 13.351784] ? __lock_text_start+0x8/0x8
    [ 13.351790] ? _raw_write_lock_irqsave+0x80/0x100
    [ 13.351797] ? _raw_write_lock_irqsave+0x80/0x100
    [ 13.351806] ? __driver_attach+0x190/0x190
    [ 13.351812] driver_probe_device+0x17d/0x1a0
    [ 13.351819] ? __driver_attach+0x190/0x190
    [ 13.351825] bus_for_each_drv+0xd6/0x130
    [ 13.351831] ? bus_rescan_devices+0x20/0x20
    [ 13.351837] ? __mutex_lock_slowpath+0x10/0x10
    [ 13.351845] __device_attach+0x18c/0x230
    [ 13.351852] ? device_bind_driver+0x70/0x70
    [ 13.351859] ? __mutex_lock_slowpath+0x10/0x10
    [ 13.351866] bus_probe_device+0xea/0x110
    [ 13.351874] deferred_probe_work_func+0x1c9/0x290
    [ 13.351882] ? driver_deferred_probe_add+0x1d0/0x1d0
    [ 13.351889] ? preempt_notifier_dec+0x20/0x20
    [ 13.351897] ? read_word_at_a_time+0xe/0x20
    [ 13.351904] ? strscpy+0x151/0x290
    [ 13.351912] ? set_work_pool_and_clear_pending+0x9c/0xf0
    [ 13.351918] ? __switch_to_asm+0x34/0x70
    [ 13.351924] ? __switch_to_asm+0x40/0x70
    [ 13.351929] ? __switch_to_asm+0x34/0x70
    [ 13.351935] ? __switch_to_asm+0x40/0x70
    [ 13.351942] process_one_work+0x5cc/0xa00
    [ 13.351952] ? pwq_dec_nr_in_flight+0x1e0/0x1e0
    [ 13.351960] ? pci_mmcfg_check_reserved+0x80/0xb8
    [ 13.351967] ? run_rebalance_domains+0x250/0x250
    [ 13.351980] ? stack_access_ok+0x35/0x80
    [ 13.351986] ? deref_stack_reg+0xa1/0xe0
    [ 13.351994] ? schedule+0xcd/0x250
    [ 13.352000] ? worker_enter_idle+0x2d6/0x330
    [ 13.352006] ? __schedule+0xeb0/0xeb0
    [ 13.352014] ? fork_usermode_blob+0x130/0x130
    [ 13.352019] ? mutex_lock+0xa7/0x100
    [ 13.352026] ? _raw_spin_lock_irq+0x98/0xf0
    [ 13.352032] ? _raw_read_unlock_irqrestore+0x30/0x30
    [ 13.352037] i2c i2c-2: Added multiplexed i2c bus 11
    [ 13.352043] worker_thread+0x181/0xa80
    [ 13.352052] ? __switch_to_asm+0x34/0x70
    [ 13.352058] ? __switch_to_asm+0x40/0x70
    [ 13.352064] ? process_one_work+0xa00/0xa00
    [ 13.352070] ? __switch_to_asm+0x34/0x70
    [ 13.352076] ? __switch_to_asm+0x40/0x70
    [ 13.352081] ? __switch_to_asm+0x34/0x70
    [ 13.352086] ? __switch_to_asm+0x40/0x70
    [ 13.352092] ? __switch_to_asm+0x34/0x70
    [ 13.352097] ? __switch_to_asm+0x40/0x70
    [ 13.352105] ? __schedule+0x3d6/0xeb0
    [ 13.352112] ? migrate_swap_stop+0x470/0x470
    [ 13.352119] ? save_stack+0x89/0xb0
    [ 13.352127] ? kmem_cache_alloc_trace+0xe5/0x570
    [ 13.352132] ? kthread+0x59/0x1d0
    [ 13.352138] ? ret_from_fork+0x35/0x40
    [ 13.352154] ? __schedule+0xeb0/0xeb0
    [ 13.352161] ? remove_wait_queue+0x150/0x150
    [ 13.352169] ? _raw_write_lock_irqsave+0x80/0x100
    [ 13.352175] ? __lock_text_start+0x8/0x8
    [ 13.352183] ? process_one_work+0xa00/0xa00
    [ 13.352188] kthread+0x1a4/0x1d0
    [ 13.352195] ? kthread_create_worker_on_cpu+0xc0/0xc0
    [ 13.352202] ret_from_fork+0x35/0x40

    [ 13.353879] The buggy address belongs to the page:
    [ 13.353885] page:ffffea0008d419c0 count:0 mapcount:0 mapping:0000000000000000 index:0x0
    [ 13.353890] flags: 0x2ffff8000000000()
    [ 13.353897] raw: 02ffff8000000000 ffffea0008d419c8 ffffea0008d419c8 0000000000000000
    [ 13.353903] raw: 0000000000000000 0000000000000000 00000000ffffffff 0000000000000000
    [ 13.353905] page dumped because: kasan: bad access detected

    [ 13.353908] Memory state around the buggy address:
    [ 13.353912] ffff880235067000: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
    [ 13.353917] ffff880235067080: 00 00 00 00 00 00 00 00 00 00 00 f1 f1 f1 f1 04
    [ 13.353921] >ffff880235067100: f2 f2 f2 f2 f2 f2 f2 04 f2 f2 f2 f2 f2 f2 f2 04
    [ 13.353923] ^
    [ 13.353927] ffff880235067180: f2 f2 f2 f2 f2 f2 f2 04 f2 f2 f2 00 00 00 00 00
    [ 13.353931] ffff880235067200: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
    [ 13.353933] ==================================================================

    The warning is caused by the below loop:
    for_each_set_bit(bit, (unsigned long *)&asserted, 8) {
    while "asserted" is declared as 'unsigned'.

    The casting of 32-bit unsigned integer pointer to a 64-bit unsigned long
    pointer. There are two problems here.
    It causes the access of four extra byte, which can corrupt memory
    The 32-bit pointer address may not be 64-bit aligned.

    The fix changes variable "asserted" to "unsigned long".

    Fixes: 1f976f6978bf ("platform/x86: Move Mellanox platform hotplug driver to platform/mellanox")
    Signed-off-by: Vadim Pasternak
    Signed-off-by: Darren Hart (VMware)
    Signed-off-by: Sasha Levin

    Vadim Pasternak
     
  • [ Upstream commit 4d9b2864a415fec39150bc13efc730c7eb88711e ]

    Commit ae7c8cba3221 ("platform/x86: ideapad-laptop: add lenovo RESCUER
    R720-15IKBN to no_hw_rfkill_list") added
    DMI_MATCH(DMI_BOARD_NAME, "80WW")
    for Lenovo RESCUER R720-15IKBN.

    But DMI_BOARD_NAME does not match 80WW on Lenovo RESCUER R720-15IKBN,
    thus cause Wireless LAN still be hard blocked.

    On Lenovo RESCUER R720-15IKBN:
    ~$ cat /sys/class/dmi/id/sys_vendor
    LENOVO
    ~$ cat /sys/class/dmi/id/board_name
    Provence-5R3
    ~$ cat /sys/class/dmi/id/product_name
    80WW
    ~$ cat /sys/class/dmi/id/product_version
    Lenovo R720-15IKBN

    So on Lenovo RESCUER R720-15IKBN:
    DMI_SYS_VENDOR should match "LENOVO",
    DMI_BOARD_NAME should match "Provence-5R3",
    DMI_PRODUCT_NAME should match "80WW",
    DMI_PRODUCT_VERSION should match "Lenovo R720-15IKBN".

    Fix it, and in according with other entries in no_hw_rfkill_list,
    use DMI_PRODUCT_VERSION instead of DMI_BOARD_NAME.

    Fixes: ae7c8cba3221 ("platform/x86: ideapad-laptop: add lenovo RESCUER R720-15IKBN to no_hw_rfkill_list")
    Signed-off-by: Yang Fan
    Signed-off-by: Darren Hart (VMware)
    Signed-off-by: Sasha Levin

    Yang Fan
     

03 Apr, 2019

4 commits

  • commit 148b0aa78e4e1077e38f928124bbc9c2d2d24006 upstream.

    USB Type-C class driver now expects the muxes to be always
    assigned to the ports and not controllers, so the
    connections for the mux and fusb302 can be removed.

    Acked-by: Andy Shevchenko
    Acked-by: Hans de Goede
    Tested-by: Hans de Goede
    Signed-off-by: Heikki Krogerus
    Signed-off-by: Greg Kroah-Hartman

    Heikki Krogerus
     
  • commit 495965a1002a0b301bf4fbfd1aed3233f3e7db1b upstream.

    Assigning the mux to the USB Type-C port on top of fusb302.
    That will prepare this driver for the change in the USB
    Type-C class code, where the class driver will assume the
    muxes to be always assigned to the ports and not the
    controllers.

    Once the USB Type-C class driver has been updated, the
    connections between the mux and fusb302 can be dropped.

    Acked-by: Andy Shevchenko
    Acked-by: Hans de Goede
    Tested-by: Hans de Goede
    Signed-off-by: Heikki Krogerus
    Signed-off-by: Greg Kroah-Hartman

    Heikki Krogerus
     
  • commit 78d2b54b134ea6059e2b1554ad53fab2300a4cc6 upstream.

    Adding a connection for the DisplayPort alternate mode.
    PI3USB30532 is used for muxing the port to DisplayPort on
    CHT platforms. The connection allows the alternate mode
    device to get handle to the mux, and therefore make it
    possible to use the USB Type-C connector as DisplayPort.

    Acked-by: Andy Shevchenko
    Acked-by: Hans de Goede
    Tested-by: Hans de Goede
    Signed-off-by: Heikki Krogerus
    Signed-off-by: Greg Kroah-Hartman

    Heikki Krogerus
     
  • commit 140a4ec4adddda615b4e8e8055ca37a30c7fe5e8 upstream.

    We can register all device connection descriptors with a
    single call to device_connections_add().

    Acked-by: Andy Shevchenko
    Acked-by: Hans de Goede
    Tested-by: Hans de Goede
    Signed-off-by: Heikki Krogerus
    Signed-off-by: Greg Kroah-Hartman

    Heikki Krogerus
     

14 Mar, 2019

2 commits

  • [ Upstream commit 0ee4b5f801b73b83a9fb3921d725f2162fd4a2e5 ]

    Add BACKLIGHT_LCD_SUPPORT for SAMSUNG_Q10 to fix the
    warning: unmet direct dependencies detected for BACKLIGHT_CLASS_DEVICE.

    SAMSUNG_Q10 selects BACKLIGHT_CLASS_DEVICE but BACKLIGHT_CLASS_DEVICE
    depends on BACKLIGHT_LCD_SUPPORT.

    Copy BACKLIGHT_LCD_SUPPORT dependency into SAMSUNG_Q10 to fix:

    WARNING: unmet direct dependencies detected for BACKLIGHT_CLASS_DEVICE
    Depends on [n]: HAS_IOMEM [=y] && BACKLIGHT_LCD_SUPPORT [=n]
    Selected by [y]:
    - SAMSUNG_Q10 [=y] && X86 [=y] && X86_PLATFORM_DEVICES [=y] && ACPI [=y]

    Signed-off-by: Sinan Kaya
    Acked-by: Andy Shevchenko
    Signed-off-by: Rafael J. Wysocki
    Signed-off-by: Sasha Levin

    Sinan Kaya
     
  • [ Upstream commit d58bf90a32a33becec78c3034e781735049fcd25 ]

    Add BACKLIGHT_LCD_SUPPORT for ACPI_CMPC to fix the
    warning: unmet direct dependencies detected for BACKLIGHT_CLASS_DEVICE.

    ACPI_CMPC selects BACKLIGHT_CLASS_DEVICE but BACKLIGHT_CLASS_DEVICE
    depends on BACKLIGHT_LCD_SUPPORT.

    Copy BACKLIGHT_LCD_SUPPORT dependency into ACPI_CMPC to fix

    WARNING: unmet direct dependencies detected for BACKLIGHT_CLASS_DEVICE
    Depends on [n]: HAS_IOMEM [=y] && BACKLIGHT_LCD_SUPPORT [=n]
    Selected by [y]:
    - ACPI_CMPC [=y] && X86 [=y] && X86_PLATFORM_DEVICES [=y] && ACPI [=y] && INPUT [=y] && (RFKILL [=n] || RFKILL [=n]=n)

    Signed-off-by: Sinan Kaya
    Acked-by: Andy Shevchenko
    Signed-off-by: Rafael J. Wysocki
    Signed-off-by: Sasha Levin

    Sinan Kaya
     

13 Feb, 2019

2 commits

  • [ Upstream commit edd45cba5ed7f53974475ddc9a1453c2c87b3328 ]

    Shift by one the registers for tachometers (7 - 12).

    This fix is relevant for the same new systems MQMB7, MSN37, MSN34,
    which are about to be released to the customers.
    At the moment, none of them is at customers sites. The customers will
    not suffer from this change.
    This fix is necessary, because register used before for tachometer 7
    has been than reserved for the second PWM for newer systems, which are
    not supported yet in mlx-platform driver. So registers of tachometers
    7-12 have been shifted by one.

    Fixes: 0378123c5800 ("platform/x86: mlx-platform: Add mlxreg-fan platform driver activation")
    Signed-off-by: Vadim Pasternak
    Signed-off-by: Darren Hart (VMware)
    Signed-off-by: Sasha Levin

    Vadim Pasternak
     
  • [ Upstream commit 6ad16b78a039b45294b1ad5d69c14ac57b2fe706 ]

    EC_MKBP_EVENT_SENSOR_FIFO events can be triggered for a variety of
    reasons, and there are very few cases in which they should be treated as
    wakeup interrupts (particularly, when a certain
    MOTIONSENSE_MODULE_FLAG_* is set, but this is not even supported in the
    mainline cros_ec_sensor driver yet). Most of the time, they are benign
    sensor readings. In any case, the top-level cros_ec device doesn't know
    enough to determine that they should wake the system, and so it should
    not report the event. This would be the job of the cros_ec_sensors
    driver to parse.

    This patch adds checks to cros_ec_get_next_event() such that it doesn't
    signal 'wakeup' for events of type EC_MKBP_EVENT_SENSOR_FIFO.

    This patch is particularly relevant on devices like Scarlet (Rockchip
    RK3399 tablet, known as Acer Chromebook Tab 10), where the EC firmware
    reports sensor events much more frequently. This was causing
    /sys/power/wakeup_count to increase very frequently, often needlessly
    interrupting our ability to suspend the system.

    Signed-off-by: Brian Norris
    Signed-off-by: Benson Leung
    Signed-off-by: Sasha Levin

    Brian Norris
     

07 Feb, 2019

2 commits

  • [ Upstream commit 71b12beaf12f21a53bfe100795d0797f1035b570 ]

    According to Asus firmware engineers, the meaning of these codes is only
    to notify the OS that the screen brightness has been turned on/off by
    the EC. This does not match the meaning of KEY_DISPLAYTOGGLE /
    KEY_DISPLAY_OFF, where userspace is expected to change the display
    brightness.

    Signed-off-by: João Paulo Rechi Vita
    Signed-off-by: Andy Shevchenko
    Signed-off-by: Sasha Levin

    João Paulo Rechi Vita
     
  • [ Upstream commit b3f2f3799a972d3863d0fdc2ab6287aef6ca631f ]

    When the OS registers to handle events from the display off hotkey the
    EC will send a notification with 0x35 for every key press, independent
    of the backlight state.

    The behavior of this key on Windows, with the ATKACPI driver from Asus
    installed, is turning off the backlight of all connected displays with a
    fading effect, and any cursor input or key press turning the backlight
    back on. The key press or cursor input that wakes up the display is also
    passed through to the application under the cursor or under focus.

    The key that matches this behavior the closest is KEY_SCREENLOCK.

    Signed-off-by: João Paulo Rechi Vita
    Signed-off-by: Andy Shevchenko
    Signed-off-by: Sasha Levin

    João Paulo Rechi Vita
     

26 Jan, 2019

1 commit

  • [ Upstream commit 78f3ac76d9e5219589718b9e4733bee21627b3f5 ]

    In the past, Asus firmwares would change the panel backlight directly
    through the EC when the display off hotkey (Fn+F7) was pressed, and
    only notify the OS of such change, with 0x33 when the LCD was ON and
    0x34 when the LCD was OFF. These are currently mapped to
    KEY_DISPLAYTOGGLE and KEY_DISPLAY_OFF, respectively.

    Most recently the EC on Asus most machines lost ability to toggle the
    LCD backlight directly, but unless the OS informs the firmware it is
    going to handle the display toggle hotkey events, the firmware still
    tries change the brightness through the EC, to no effect. The end result
    is a long list (at Endless we counted 11) of Asus laptop models where
    the display toggle hotkey does not perform any action. Our firmware
    engineers contacts at Asus were surprised that there were still machines
    out there with the old behavior.

    Calling WMNB(ASUS_WMI_DEVID_BACKLIGHT==0x00050011, 2) on the _WDG device
    tells the firmware that it should let the OS handle the display toggle
    event, in which case it will simply notify the OS of a key press with
    0x35, as shown by the DSDT excerpts bellow.

    Scope (_SB)
    {
    (...)

    Device (ATKD)
    {
    (...)

    Name (_WDG, Buffer (0x28)
    {
    /* 0000 */ 0xD0, 0x5E, 0x84, 0x97, 0x6D, 0x4E, 0xDE, 0x11,
    /* 0008 */ 0x8A, 0x39, 0x08, 0x00, 0x20, 0x0C, 0x9A, 0x66,
    /* 0010 */ 0x4E, 0x42, 0x01, 0x02, 0x35, 0xBB, 0x3C, 0x0B,
    /* 0018 */ 0xC2, 0xE3, 0xED, 0x45, 0x91, 0xC2, 0x4C, 0x5A,
    /* 0020 */ 0x6D, 0x19, 0x5D, 0x1C, 0xFF, 0x00, 0x01, 0x08
    })
    Method (WMNB, 3, Serialized)
    {
    CreateDWordField (Arg2, Zero, IIA0)
    CreateDWordField (Arg2, 0x04, IIA1)
    Local0 = (Arg1 & 0xFFFFFFFF)

    (...)

    If ((Local0 == 0x53564544))
    {
    (...)

    If ((IIA0 == 0x00050011))
    {
    If ((IIA1 == 0x02))
    {
    ^^PCI0.SBRG.EC0.SPIN (0x72, One)
    ^^PCI0.SBRG.EC0.BLCT = One
    }

    Return (One)
    }
    }
    (...)
    }
    (...)
    }
    (...)
    }
    (...)

    Scope (_SB.PCI0.SBRG.EC0)
    {
    (...)

    Name (BLCT, Zero)

    (...)

    Method (_Q10, 0, NotSerialized) // _Qxx: EC Query
    {
    If ((BLCT == Zero))
    {
    Local0 = One
    Local0 = RPIN (0x72)
    Local0 ^= One
    SPIN (0x72, Local0)
    If (ATKP)
    {
    Local0 = (0x34 - Local0)
    ^^^^ATKD.IANE (Local0)
    }
    }
    ElseIf ((BLCT == One))
    {
    If (ATKP)
    {
    ^^^^ATKD.IANE (0x35)
    }
    }
    }
    (...)
    }

    Signed-off-by: João Paulo Rechi Vita
    Signed-off-by: Andy Shevchenko
    Signed-off-by: Sasha Levin

    João Paulo Rechi Vita
     

27 Nov, 2018

2 commits

  • [ Upstream commit 684238d79ad85c5e19a71bb5818e77e329912fbc ]

    To fix:

    acerhdf: unknown (unsupported) BIOS version Gateway /LT31 /v1.3307 , please report, aborting!

    As can be seen in the context, the BIOS registers haven't changed in
    the previous versions, so the assumption is they won't have changed
    in this last update for this somewhat older platform either.

    Cc: Peter Feuerer
    Cc: Darren Hart
    Cc: Andy Shevchenko
    Signed-off-by: Paul Gortmaker
    Signed-off-by: Andy Shevchenko
    Reviewed-by: Peter Feuerer
    Signed-off-by: Sasha Levin

    Paul Gortmaker
     
  • [ Upstream commit 8d98b1ef368feeb7720b8b9b6f3bd93f2ad892bc ]

    On some Goldmont based systems such as ASRock J3455M the BIOS may not
    enable the IPC1 device that provides access to the PMC and PUNIT. In
    such scenarios, the IOSS and PSS resources from the platform device can
    not be obtained and result in a invalid telemetry_plt_config which is an
    internal data structure that holds platform config and is maintained by
    the telemetry platform driver.

    This is also applicable to the platforms where the BIOS supports IPC1
    device under debug configurations but IPC1 is disabled by user or the
    policy.

    This change allows user to know the reason for not seeing entries under
    /sys/kernel/debug/telemetry/* when there is no apparent failure at boot.

    Cc: Matt Turner
    Cc: Len Brown
    Cc: Souvik Kumar Chakravarty
    Cc: Kuppuswamy Sathyanarayanan

    Bugzilla: https://bugzilla.kernel.org/show_bug.cgi?id=198779
    Acked-by: Matt Turner
    Signed-off-by: Rajneesh Bhardwaj
    Signed-off-by: Andy Shevchenko
    Signed-off-by: Sasha Levin

    Rajneesh Bhardwaj
     

10 Oct, 2018

1 commit

  • Commit 57e94c8b974db2d83c60e1139c89a70806abbea0 caused cros-ec keyboard events
    be truncated on many chromebooks so that Left and Right keys on Column 12 were
    always 0. Use ret as memcpy len to fix this.

    The old code was using ec_dev->event_size, which is the event payload/data size
    excluding event_type header, for the length of the memcpy operation. Use ret
    as memcpy length to avoid the off by one and copy the whole msg->data.

    Fixes: 57e94c8b974d ("mfd: cros-ec: Increase maximum mkbp event size")

    Acked-by: Enric Balletbo i Serra
    Tested-by: Emil Renner Berthing
    Signed-off-by: Emil Karlson
    Signed-off-by: Benson Leung

    Emil Karlson
     

11 Sep, 2018

2 commits


23 Aug, 2018

1 commit

  • Pull x86 platform driver updates from Andy Shevchenko:

    - The driver for Silead touchscreen configurations has been renamed
    from silead_dmi to touchscreen_dmi since it starts supporting other
    touchscreens which require some DMI quirks

    It also gets expanded to cover cases for Chuwi Vi10, ONDA V891W,
    Connect Tablet 9, Onda V820w, and Cube KNote i1101 tablets.

    - Another bunch of changes is related to Mellanox platform code to
    allow user space to communicate with Mellanox for system control and
    monitoring purposes. The driver notifies user on hotplug device
    signal receiving.

    - ASUS WMI drivers recognize lid flip action on UX360, and correctly
    toggles airplane mode LED. In addition the keyboard backlight toggle
    gets support.

    - ThinkPad ACPI driver enables support for calculator key (on at least
    P52). It also has been fixed to support three characters model
    designators, which are used for modern laptops. Earlier the battery,
    marked as BAT1, on ThinkPad laptops has not been configured properly,
    which is fixed. On the opposite the multi-battery configurations now
    probed correctly.

    - Dell SMBIOS driver starts working on some Dell servers which do not
    support token interface. The regression with backlight detection has
    also been fixed. In order to support dock mode on some laptops, Intel
    virtual button driver has been fixed. The last but not least is the
    fix to Intel HID driver due to changes in Dell systems that prevented
    to use power button.

    * tag 'platform-drivers-x86-v4.19-1' of git://git.infradead.org/linux-platform-drivers-x86: (47 commits)
    platform/x86: acer-wmi: Silence "unsupported" message a bit
    platform/x86: intel_punit_ipc: fix build errors
    platform/x86: ideapad: Add Y520-15IKBM and Y720-15IKBM to no_hw_rfkill
    platform/x86: asus-nb-wmi: Add keymap entry for lid flip action on UX360
    platform/x86: acer-wmi: refactor function has_cap
    platform/x86: thinkpad_acpi: Fix multi-battery bug
    platform/x86: thinkpad_acpi: extend battery quirk coverage
    platform/x86: touchscreen_dmi: Add info for the Cube KNote i1101 tablet
    platform/x86: mlx-platform: Fix copy-paste error in mlxplat_init()
    platform/x86: mlx-platform: Remove unused define
    platform/x86: mlx-platform: Change mlxreg-io configuration for MSN274x systems
    Documentation/ABI: Add new attribute for mlxreg-io sysfs interfaces
    platform/x86: mlx-platform: Allow mlxreg-io driver activation for more systems
    platform/x86: mlx-platform: Add ASIC hotplug device configuration
    platform/mellanox: mlxreg-hotplug: Add hotplug hwmon uevent notification
    platform/mellanox: mlxreg-hotplug: Improve mechanism of ASIC health discovery
    platform/x86: mlx-platform: Add mlxreg-fan platform driver activation
    platform/x86: dell-laptop: Fix backlight detection
    platform/x86: toshiba_acpi: Fix defined but not used build warnings
    platform/x86: thinkpad_acpi: Support battery quirk
    ...

    Linus Torvalds
     

22 Aug, 2018

3 commits

  • This driver prints that "Unsupported machine..." message on every boot on
    ThinkPad X1 Carbon laptops (and I assume a number of other systems), which
    causes graphical boots to "glitch" a bit and is rather annoying ...

    Make it a pr_debug instead.

    Signed-off-by: Benjamin Herrenschmidt
    Signed-off-by: Andy Shevchenko

    Benjamin Herrenschmidt
     
  • …iederm/user-namespace

    Pull core signal handling updates from Eric Biederman:
    "It was observed that a periodic timer in combination with a
    sufficiently expensive fork could prevent fork from every completing.
    This contains the changes to remove the need for that restart.

    This set of changes is split into several parts:

    - The first part makes PIDTYPE_TGID a proper pid type instead
    something only for very special cases. The part starts using
    PIDTYPE_TGID enough so that in __send_signal where signals are
    actually delivered we know if the signal is being sent to a a group
    of processes or just a single process.

    - With that prep work out of the way the logic in fork is modified so
    that fork logically makes signals received while it is running
    appear to be received after the fork completes"

    * 'siginfo-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/ebiederm/user-namespace: (22 commits)
    signal: Don't send signals to tasks that don't exist
    signal: Don't restart fork when signals come in.
    fork: Have new threads join on-going signal group stops
    fork: Skip setting TIF_SIGPENDING in ptrace_init_task
    signal: Add calculate_sigpending()
    fork: Unconditionally exit if a fatal signal is pending
    fork: Move and describe why the code examines PIDNS_ADDING
    signal: Push pid type down into complete_signal.
    signal: Push pid type down into __send_signal
    signal: Push pid type down into send_signal
    signal: Pass pid type into do_send_sig_info
    signal: Pass pid type into send_sigio_to_task & send_sigurg_to_task
    signal: Pass pid type into group_send_sig_info
    signal: Pass pid and pid type into send_sigqueue
    posix-timers: Noralize good_sigevent
    signal: Use PIDTYPE_TGID to clearly store where file signals will be sent
    pid: Implement PIDTYPE_TGID
    pids: Move the pgrp and session pid pointers from task_struct to signal_struct
    kvm: Don't open code task_pid in kvm_vcpu_ioctl
    pids: Compute task_tgid using signal->leader_pid
    ...

    Linus Torvalds
     
  • …/kernel/git/bleung/chrome-platform

    Pull chrome platform updates from Benson Leung.

    Everything but the SPDX identifier updates actually came in earlier
    through the MFD merge.

    * tag 'chrome-platform-for-linus-4.19' of git://git.kernel.org/pub/scm/linux/kernel/git/bleung/chrome-platform:
    platform/chrome: chromeos_tbmc - fix SPDX identifier

    Linus Torvalds
     

21 Aug, 2018

1 commit

  • Pull MFD updates from Lee Jones:
    "New Drivers:
    - Add Cirrus Logic Madera Codec (CS47L35, CS47L85 and CS47L90/91) driver
    - Add ChromeOS EC CEC driver
    - Add ROHM BD71837 PMIC driver

    New Device Support:
    - Add support for Dialog Semi DA9063L PMIC variant to DA9063
    - Add support for Intel Ice Lake to Intel-PLSS-PCI
    - Add support for X-Powers AXP806 to AXP20x

    New Functionality:
    - Add support for USB Charging to the ChromeOS Embedded Controller
    - Add support for HDMI CEC to the ChromeOS Embedded Controller
    - Add support for HDMI CEC to Intel HDMI
    - Add support for accessory detection to Madera devices
    - Allow individual pins to be configured via DT' wlf,csnaddr-pd
    - Provide legacy platform specific EEPROM/Watchdog commands; rave-sp

    Fix-upsL
    - Trivial renaming/spelling fixes; cros_ec, da9063-*
    - Convert to Managed Resources (devm_*); da9063-*, ti_am335x_tscadc
    - Transition to helper macros/functions; da9063-*
    - Constify; kempld-core
    - Improve error path/messages; wm8994-core
    - Disable IRQs locally instead of relying on USB subsystem; dln2
    - Remove unused code; rave-sp
    - New exports; sec-core

    Bug Fixes:
    - Fix possible false I2C transaction error; arizona-core
    - Fix declared memory area size; hi655x-pmic
    - Fix checksum type; rave-sp
    - Fix incorrect default serial port configuration: rave-sp
    - Fix incorrect coherent DMA mask for sub-devices; sm501"

    * tag 'mfd-next-4.19' of git://git.kernel.org/pub/scm/linux/kernel/git/lee/mfd: (60 commits)
    mfd: madera: Add register definitions for accessory detect
    mfd: sm501: Set coherent_dma_mask when creating subdevices
    mfd: bd71837: Devicetree bindings for ROHM BD71837 PMIC
    mfd: bd71837: Core driver for ROHM BD71837 PMIC
    media: platform: cros-ec-cec: Fix dependency on MFD_CROS_EC
    mfd: sec-core: Export OF module alias table
    mfd: as3722: Disable auto-power-on when AC OK
    mfd: axp20x: Support AXP806 in I2C mode
    mfd: axp20x: Add self-working mode support for AXP806
    dt-bindings: mfd: axp20x: Add "self-working" mode for AXP806
    mfd: wm8994: Allow to configure CS/ADDR Pulldown from dts
    mfd: wm8994: Allow to configure Speaker Mode Pullup from dts
    mfd: rave-sp: Emulate CMD_GET_STATUS on device that don't support it
    mfd: rave-sp: Add legacy watchdog ping command translation
    mfd: rave-sp: Add legacy EEPROM access command translation
    mfd: rave-sp: Initialize flow control and parity of the port
    mfd: rave-sp: Fix incorrectly specified checksum type
    mfd: rave-sp: Remove unused defines
    mfd: hi655x: Fix regmap area declared size for hi655x
    mfd: ti_am335x_tscadc: Fix struct clk memory leak
    ...

    Linus Torvalds
     

19 Aug, 2018

1 commit

  • Pull char/misc driver updates from Greg KH:
    "Here is the bit set of char/misc drivers for 4.19-rc1

    There is a lot here, much more than normal, seems like everyone is
    writing new driver subsystems these days... Anyway, major things here
    are:

    - new FSI driver subsystem, yet-another-powerpc low-level hardware
    bus

    - gnss, finally an in-kernel GPS subsystem to try to tame all of the
    crazy out-of-tree drivers that have been floating around for years,
    combined with some really hacky userspace implementations. This is
    only for GNSS receivers, but you have to start somewhere, and this
    is great to see.

    Other than that, there are new slimbus drivers, new coresight drivers,
    new fpga drivers, and loads of DT bindings for all of these and
    existing drivers.

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

    * tag 'char-misc-4.19-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/char-misc: (255 commits)
    android: binder: Rate-limit debug and userspace triggered err msgs
    fsi: sbefifo: Bump max command length
    fsi: scom: Fix NULL dereference
    misc: mic: SCIF Fix scif_get_new_port() error handling
    misc: cxl: changed asterisk position
    genwqe: card_base: Use true and false for boolean values
    misc: eeprom: assignment outside the if statement
    uio: potential double frees if __uio_register_device() fails
    eeprom: idt_89hpesx: clean up an error pointer vs NULL inconsistency
    misc: ti-st: Fix memory leak in the error path of probe()
    android: binder: Show extra_buffers_size in trace
    firmware: vpd: Fix section enabled flag on vpd_section_destroy
    platform: goldfish: Retire pdev_bus
    goldfish: Use dedicated macros instead of manual bit shifting
    goldfish: Add missing includes to goldfish.h
    mux: adgs1408: new driver for Analog Devices ADGS1408/1409 mux
    dt-bindings: mux: add adi,adgs1408
    Drivers: hv: vmbus: Cleanup synic memory free path
    Drivers: hv: vmbus: Remove use of slow_virt_to_phys()
    Drivers: hv: vmbus: Reset the channel callback in vmbus_onoffer_rescind()
    ...

    Linus Torvalds
     

17 Aug, 2018

2 commits

  • Fix build errors by #including .

    ../drivers/platform/x86/intel_punit_ipc.c: In function 'ipc_read_status':
    ../drivers/platform/x86/intel_punit_ipc.c:55:2: error: implicit declaration of function 'readl' [-Werror=implicit-function-declaration]
    return readl(ipcdev->base[type][BASE_IFACE]);
    ../drivers/platform/x86/intel_punit_ipc.c: In function 'ipc_write_cmd':
    ../drivers/platform/x86/intel_punit_ipc.c:60:2: error: implicit declaration of function 'writel' [-Werror=implicit-function-declaration]
    writel(cmd, ipcdev->base[type][BASE_IFACE]);

    Fixes: 447ae3166702 ("x86: Don't include linux/irq.h from asm/hardirq.h")
    Signed-off-by: Randy Dunlap
    Cc: Zha Qipeng
    Cc: platform-driver-x86@vger.kernel.org
    Signed-off-by: Andy Shevchenko

    Randy Dunlap
     
  • Pull pci updates from Bjorn Helgaas:

    - Decode AER errors with names similar to "lspci" (Tyler Baicar)

    - Expose AER statistics in sysfs (Rajat Jain)

    - Clear AER status bits selectively based on the type of recovery (Oza
    Pawandeep)

    - Honor "pcie_ports=native" even if HEST sets FIRMWARE_FIRST (Alexandru
    Gagniuc)

    - Don't clear AER status bits if we're using the "Firmware-First"
    strategy where firmware owns the registers (Alexandru Gagniuc)

    - Use sysfs_match_string() to simplify ASPM sysfs parsing (Andy
    Shevchenko)

    - Remove unnecessary includes of (Bjorn Helgaas)

    - Defer DPC event handling to work queue (Keith Busch)

    - Use threaded IRQ for DPC bottom half (Keith Busch)

    - Print AER status while handling DPC events (Keith Busch)

    - Work around IDT switch ACS Source Validation erratum (James
    Puthukattukaran)

    - Emit diagnostics for all cases of PCIe Link downtraining (Links
    operating slower than they're capable of) (Alexandru Gagniuc)

    - Skip VFs when configuring Max Payload Size (Myron Stowe)

    - Reduce Root Port Max Payload Size if necessary when hot-adding a
    device below it (Myron Stowe)

    - Simplify SHPC existence/permission checks (Bjorn Helgaas)

    - Remove hotplug sample skeleton driver (Lukas Wunner)

    - Convert pciehp to threaded IRQ handling (Lukas Wunner)

    - Improve pciehp tolerance of missed events and initially unstable
    links (Lukas Wunner)

    - Clear spurious pciehp events on resume (Lukas Wunner)

    - Add pciehp runtime PM support, including for Thunderbolt controllers
    (Lukas Wunner)

    - Support interrupts from pciehp bridges in D3hot (Lukas Wunner)

    - Mark fall-through switch cases before enabling -Wimplicit-fallthrough
    (Gustavo A. R. Silva)

    - Move DMA-debug PCI init from arch code to PCI core (Christoph
    Hellwig)

    - Fix pci_request_irq() usage of IRQF_ONESHOT when no handler is
    supplied (Heiner Kallweit)

    - Unify PCI and DMA direction #defines (Shunyong Yang)

    - Add PCI_DEVICE_DATA() macro (Andy Shevchenko)

    - Check for VPD completion before checking for timeout (Bert Kenward)

    - Limit Netronome NFP5000 config space size to work around erratum
    (Jakub Kicinski)

    - Set IRQCHIP_ONESHOT_SAFE for PCI MSI irqchips (Heiner Kallweit)

    - Document ACPI description of PCI host bridges (Bjorn Helgaas)

    - Add "pci=disable_acs_redir=" parameter to disable ACS redirection for
    peer-to-peer DMA support (we don't have the peer-to-peer support yet;
    this is just one piece) (Logan Gunthorpe)

    - Clean up devm_of_pci_get_host_bridge_resources() resource allocation
    (Jan Kiszka)

    - Fixup resizable BARs after suspend/resume (Christian König)

    - Make "pci=earlydump" generic (Sinan Kaya)

    - Fix ROM BAR access routines to stay in bounds and check for signature
    correctly (Rex Zhu)

    - Add DMA alias quirk for Microsemi Switchtec NTB (Doug Meyer)

    - Expand documentation for pci_add_dma_alias() (Logan Gunthorpe)

    - To avoid bus errors, enable PASID only if entire path supports
    End-End TLP prefixes (Sinan Kaya)

    - Unify slot and bus reset functions and remove hotplug knowledge from
    callers (Sinan Kaya)

    - Add Function-Level Reset quirks for Intel and Samsung NVMe devices to
    fix guest reboot issues (Alex Williamson)

    - Add function 1 DMA alias quirk for Marvell 88SS9183 PCIe SSD
    Controller (Bjorn Helgaas)

    - Remove Xilinx AXI-PCIe host bridge arch dependency (Palmer Dabbelt)

    - Remove Aardvark outbound window configuration (Evan Wang)

    - Fix Aardvark bridge window sizing issue (Zachary Zhang)

    - Convert Aardvark to use pci_host_probe() to reduce code duplication
    (Thomas Petazzoni)

    - Correct the Cadence cdns_pcie_writel() signature (Alan Douglas)

    - Add Cadence support for optional generic PHYs (Alan Douglas)

    - Add Cadence power management ops (Alan Douglas)

    - Remove redundant variable from Cadence driver (Colin Ian King)

    - Add Kirin MSI support (Xiaowei Song)

    - Drop unnecessary root_bus_nr setting from exynos, imx6, keystone,
    armada8k, artpec6, designware-plat, histb, qcom, spear13xx (Shawn
    Guo)

    - Move link notification settings from DesignWare core to individual
    drivers (Gustavo Pimentel)

    - Add endpoint library MSI-X interfaces (Gustavo Pimentel)

    - Correct signature of endpoint library IRQ interfaces (Gustavo
    Pimentel)

    - Add DesignWare endpoint library MSI-X callbacks (Gustavo Pimentel)

    - Add endpoint library MSI-X test support (Gustavo Pimentel)

    - Remove unnecessary GFP_ATOMIC from Hyper-V "new child" allocation
    (Jia-Ju Bai)

    - Add more devices to Broadcom PAXC quirk (Ray Jui)

    - Work around corrupted Broadcom PAXC config space to enable SMMU and
    GICv3 ITS (Ray Jui)

    - Disable MSI parsing to work around broken Broadcom PAXC logic in some
    devices (Ray Jui)

    - Hide unconfigured functions to work around a Broadcom PAXC defect
    (Ray Jui)

    - Lower iproc log level to reduce console output during boot (Ray Jui)

    - Fix mobiveil iomem/phys_addr_t type usage (Lorenzo Pieralisi)

    - Fix mobiveil missing include file (Lorenzo Pieralisi)

    - Add mobiveil Kconfig/Makefile support (Lorenzo Pieralisi)

    - Fix mvebu I/O space remapping issues (Thomas Petazzoni)

    - Use generic pci_host_bridge in mvebu instead of ARM-specific API
    (Thomas Petazzoni)

    - Whitelist VMD devices with fast interrupt handlers to avoid sharing
    vectors with slow handlers (Keith Busch)

    * tag 'pci-v4.19-changes' of git://git.kernel.org/pub/scm/linux/kernel/git/helgaas/pci: (153 commits)
    PCI/AER: Don't clear AER bits if error handling is Firmware-First
    PCI: Limit config space size for Netronome NFP5000
    PCI/MSI: Set IRQCHIP_ONESHOT_SAFE for PCI-MSI irqchips
    PCI/VPD: Check for VPD access completion before checking for timeout
    PCI: Add PCI_DEVICE_DATA() macro to fully describe device ID entry
    PCI: Match Root Port's MPS to endpoint's MPSS as necessary
    PCI: Skip MPS logic for Virtual Functions (VFs)
    PCI: Add function 1 DMA alias quirk for Marvell 88SS9183
    PCI: Check for PCIe Link downtraining
    PCI: Add ACS Redirect disable quirk for Intel Sunrise Point
    PCI: Add device-specific ACS Redirect disable infrastructure
    PCI: Convert device-specific ACS quirks from NULL termination to ARRAY_SIZE
    PCI: Add "pci=disable_acs_redir=" parameter for peer-to-peer support
    PCI: Allow specifying devices using a base bus and path of devfns
    PCI: Make specifying PCI devices in kernel parameters reusable
    PCI: Hide ACS quirk declarations inside PCI core
    PCI: Delay after FLR of Intel DC P3700 NVMe
    PCI: Disable Samsung SM961/PM961 NVMe before FLR
    PCI: Export pcie_has_flr()
    PCI: mvebu: Drop bogus comment above mvebu_pcie_map_registers()
    ...

    Linus Torvalds
     

16 Aug, 2018

1 commit

  • Pull media updates from Mauro Carvalho Chehab:

    - new Socionext MN88443x ISDB-S/T demodulator driver: mn88443x

    - new sensor drivers: ak7375, ov2680 and rj54n1cb0c

    - an old soc-camera sensor driver converted to the V4L2 framework:
    mt9v111

    - a new Voice-Coil Motor (VCM) driver: dw9807-vcm

    - some cleanups at cx25821, removing legacy unused code

    - some improvements at ddbridge driver

    - new platform driver: vicodec

    - some DVB API cleanups, removing ioctls and compat code for old
    out-of-tree drivers that were never merged upstream

    - improvements at DVB core to support frontents that support both
    Satellite and non-satellite delivery systems

    - got rid of the unused VIDIOC_RESERVED V4L2 ioctl

    - some cleanups/improvements at gl861 ISDB driver

    - several improvements on ov772x, ov7670 and ov5640, imx274, ov5645,
    and smiapp sensor drivers

    - fixes at em28xx to support dual TS devices

    - some cleanups at V4L2/VB2 locking logic

    - some API improvements at media controller

    - some cec core and drivers improvements

    - some uvcvideo improvements

    - some improvements at platform drivers: stm32-dcmi, rcar-vin, coda,
    reneseas-ceu, imx, vsp1, venus, camss

    - lots of other cleanups and fixes

    * tag 'media/v4.19-1' of git://git.kernel.org/pub/scm/linux/kernel/git/mchehab/linux-media: (406 commits)
    Revert "media: vivid: shut up warnings due to a non-trivial logic"
    siano: get rid of an unused return code for debugfs register
    media: isp: fix a warning about a wrong struct initializer
    media: radio-wl1273: fix return code for the polling routine
    media: s3c-camif: fix return code for the polling routine
    media: saa7164: fix return codes for the polling routine
    media: exynos-gsc: fix return code if mutex was interrupted
    media: mt9v111: Fix build error with no VIDEO_V4L2_SUBDEV_API
    media: xc4000: get rid of uneeded casts
    media: drxj: get rid of uneeded casts
    media: tuner-xc2028: don't use casts for printing sizes
    media: cleanup fall-through comments
    media: vivid: shut up warnings due to a non-trivial logic
    media: rtl28xxu: be sure that it won't go past the array size
    media: mt9v111: avoid going past the buffer
    media: vsp1_dl: add a description for cmdpool field
    media: sta2x11: add a missing parameter description
    media: v4l2-mem2mem: add descriptions to MC fields
    media: i2c: fix warning in Aptina MT9V111
    media: imx: shut up a false positive warning
    ...

    Linus Torvalds
     

15 Aug, 2018

8 commits

  • Lenovo Y520-15IKBM and Y720-15IKBM are another Lenovo models
    without physical radio switch and ideapad-laptop reports it
    is hard blocked. Add them into no_hw_rfkill to unlock wireless.

    BugLink: https://bugs.launchpad.net/bugs/1723612
    Signed-off-by: Ike Panhc
    Signed-off-by: Andy Shevchenko

    Ike Panhc
     
  • Add entry to WMI keymap for lid flip event on Asus UX360.

    On Asus Zenbook ux360 flipping lid from/to tablet mode triggers
    keyscan code 0xfa which cannot be handled and results in kernel
    log message "Unknown key fa pressed".

    Signed-off-by: Aleh Filipovich
    Signed-off-by: Andy Shevchenko

    Aleh Filipovich
     
  • Refactor function has_cap in order to avoid returning integer
    values, when instead it should return booleans.

    This code was detected with the help of Coccinelle.

    Signed-off-by: Gustavo A. R. Silva
    Reviewed-by: "Lee, Chun-Yi"
    Signed-off-by: Andy Shevchenko

    Gustavo A. R. Silva
     
  • The struct containing the supported operations for all batteries is
    being zeroed on each battery probe. This prevents all other batteries
    except the lastly probed one from being configured.

    Signed-off-by: Thomas Weißschuh
    Signed-off-by: Andy Shevchenko

    Thomas Weißschuh
     
  • Based on bug reports and a web search for
    "Thinkpad_acpi: Error probing battery 2"
    four more models were found that require the battery quirk:
    Lenovo B5400, Thinkpad 11e, Thinkpad 11e gen 3, Thinkpad 13 gen 3.

    Signed-off-by: Jouke Witteveen
    Tested-by: James Cheshire
    Acked-by: Henrique de Moraes Holschuh
    Signed-off-by: Andy Shevchenko

    Jouke Witteveen
     
  • Add touchscreen info for the Cube KNote i1101 tablet.

    Reported-and-tested-by: lkongl
    Signed-off-by: Hans de Goede
    Signed-off-by: Andy Shevchenko

    youling257
     
  • The return value from platform_device_register_resndata() is not checked
    correctly. The test is done against a wrong variable. This patch fix it.

    Fixes: 0378123c5800 ("platform/x86: mlx-platform: Add mlxreg-fan platform driver activation")
    Signed-off-by: Wei Yongjun
    Acked-by: Vadim Pasternak
    Signed-off-by: Andy Shevchenko

    Wei Yongjun
     
  • Pull ACPI updates from Rafael Wysocki:
    "These revert two ACPICA commits that are not needed any more, rework
    the property graphs support in ACPI to be more aligned with the
    analogous DT code, add some new quirks and remove one that isn't
    needed any more, add a special platform driver to enumerate multiple
    I2C devices hooked up to the same device object in the ACPI tables and
    update the battery and button drivers.

    Specifics:

    - Revert two ACPICA commits that are not needed any more (Erik
    Schmauss).

    - Rework property graph support in the ACPI device properties
    framework to make it behave more like the analogous DT code and
    update the documentation of it (Sakari Ailus).

    - Change the default ACPI device status after initialization to
    ACPI_STA_DEFAULT instead of 0 (Hans de Goede).

    - Add a special platform driver for enumerating multiple I2C devices
    hooked up to the same object in the ACPI tables (Hans de Goede).

    - Fix the ACPI battery driver to avoid reporting full capacity on
    systems without support for that and clean it up (Hans de Goede,
    Dmitry Rozhkov, Lucas Rangit Magasweran).

    - Add two system wakeup quirks to the ACPI EC driver (Aaron Ma, Mika
    Westerberg).

    - Add the touchscreen on Dell Venue Pro 7139 to the list of "always
    present" devices to make it work (Tristian Celestin).

    - Revert a special tables handling quirk for Dell XPS 9570 and
    Precision M5530 which is not needed any more (Kai Heng Feng).

    - Add support for a new OEM _OSI string to allow system vendors to
    work around issues with NVidia HDMI audio (Alex Hung).

    - Prevent the ACPI button driver from reporting excessive system
    wakeup events and clean it up (Ravi Chandra Sadineni, Randy
    Dunlap).

    - Clean up two minor code style issues in the ACPI core and GHES
    handling on ARM64 (Dongjiu Geng, John Garry, Tom Todd)"

    * tag 'acpi-4.19-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm: (34 commits)
    platform/x86: Add ACPI i2c-multi-instantiate pseudo driver
    ACPI / x86: utils: Remove status workaround from acpi_device_always_present()
    ACPI / scan: Create platform device for fwnodes with multiple i2c devices
    ACPI / scan: Initialize status to ACPI_STA_DEFAULT
    ACPI / EC: Add another entry for Thinkpad X1 Carbon 6th
    ACPI: bus: Fix a pointer coding style issue
    arm64 / ACPI: clean the additional checks before calling ghes_notify_sea()
    ACPI / scan: Add static attribute to indirect_io_hosts[]
    ACPI / battery: Do not export energy_full[_design] on devices without full_charge_capacity
    ACPI / EC: Use ec_no_wakeup on ThinkPad X1 Yoga 3rd
    ACPI / battery: get rid of negations in conditions
    ACPI / battery: use specialized print macros
    ACPI / battery: reorder headers alphabetically
    ACPI / battery: drop inclusion of init.h
    ACPI: battery: remove redundant old_present check on insertion
    ACPI: property: graph: Update graph documentation to use generic references
    ACPI: property: graph: Improve graph documentation for port/ep numbering
    ACPI: property: graph: Fix graph documentation
    ACPI: property: Update documentation for hierarchical data extension 1.1
    ACPI: property: Document key numbering for hierarchical data extension refs
    ...

    Linus Torvalds
     

14 Aug, 2018

1 commit

  • Pull MIPS updates from Paul Burton:
    "Here are the main MIPS changes for 4.19.

    An overview of the general architecture changes:

    - Massive DMA ops refactoring from Christoph Hellwig (huzzah for
    deleting crufty code!).

    - We introduce NT_MIPS_DSP & NT_MIPS_FP_MODE ELF notes &
    corresponding regsets to expose DSP ASE & floating point mode state
    respectively, both for live debugging & core dumps.

    - We better optimize our code by hard-coding cpu_has_* macros at
    compile time where their values are known due to the ISA revision
    that the kernel build is targeting.

    - The EJTAG exception handler now better handles SMP systems, where
    it was previously possible for CPUs to clobber a register value
    saved by another CPU.

    - Our implementation of memset() gained a couple of fixes for MIPSr6
    systems to return correct values in some cases where stores fault.

    - We now implement ioremap_wc() using the uncached-accelerated cache
    coherency attribute where supported, which is detected during boot,
    and fall back to plain uncached access where necessary. The
    MIPS-specific (and unused in tree) ioremap_uncached_accelerated() &
    ioremap_cacheable_cow() are removed.

    - The prctl(PR_SET_FP_MODE, ...) syscall is better supported for SMP
    systems by reworking the way we ensure remote CPUs that may be
    running threads within the affected process switch mode.

    - Systems using the MIPS Coherence Manager will now set the
    MIPS_IC_SNOOPS_REMOTE flag to avoid some unnecessary cache
    maintenance overhead when flushing the icache.

    - A few fixes were made for building with clang/LLVM, which now
    sucessfully builds kernels for many of our platforms.

    - Miscellaneous cleanups all over.

    And some platform-specific changes:

    - ar7 gained stubs for a few clock API functions to fix build
    failures for some drivers.

    - ath79 gained support for a few new SoCs, a few fixes & better
    gpio-keys support.

    - Ci20 now exposes its SPI bus using the spi-gpio driver.

    - The generic platform can now auto-detect a suitable value for
    PHYS_OFFSET based upon the memory map described by the device tree,
    allowing us to avoid wasting memory on page book-keeping for
    systems where RAM starts at a non-zero physical address.

    - Ingenic systems using the jz4740 platform code now link their
    vmlinuz higher to allow for kernels of a realistic size.

    - Loongson32 now builds the kernel targeting MIPSr1 rather than
    MIPSr2 to avoid CPU errata.

    - Loongson64 gains a couple of fixes, a workaround for a write
    buffering issue & support for the Loongson 3A R3.1 CPU.

    - Malta now uses the piix4-poweroff driver to handle powering down.

    - Microsemi Ocelot gained support for its SPI bus & NOR flash, its
    second MDIO bus and can now be supported by a FIT/.itb image.

    - Octeon saw a bunch of header cleanups which remove a lot of
    duplicate or unused code"

    * tag 'mips_4.19' of git://git.kernel.org/pub/scm/linux/kernel/git/mips/linux: (123 commits)
    MIPS: Remove remnants of UASM_ISA
    MIPS: netlogic: xlr: Remove erroneous check in nlm_fmn_send()
    MIPS: VDSO: Force link endianness
    MIPS: Always specify -EB or -EL when using clang
    MIPS: Use dins to simplify __write_64bit_c0_split()
    MIPS: Use read-write output operand in __write_64bit_c0_split()
    MIPS: Avoid using array as parameter to write_c0_kpgd()
    MIPS: vdso: Allow clang's --target flag in VDSO cflags
    MIPS: genvdso: Remove GOT checks
    MIPS: Remove obsolete MIPS checks for DST node "chosen@0"
    MIPS: generic: Remove input symbols from defconfig
    MIPS: Delete unused code in linux32.c
    MIPS: Remove unused sys_32_mmap2
    MIPS: Remove nabi_no_regargs
    mips: dts: mscc: enable spi and NOR flash support on ocelot PCB123
    mips: dts: mscc: Add spi on Ocelot
    MIPS: Loongson: Merge load addresses
    MIPS: Loongson: Set Loongson32 to MIPS32R1
    MIPS: mscc: ocelot: add interrupt controller properties to GPIO controller
    MIPS: generic: Select MIPS_AUTO_PFN_OFFSET
    ...

    Linus Torvalds
     

09 Aug, 2018

1 commit

  • On systems with ACPI instantiated i2c-clients, normally there is 1 fw_node
    per i2c-device and that fw-node contains 1 I2cSerialBus resource for that 1
    i2c-device.

    But in some rare cases the manufacturer has decided to describe multiple
    i2c-devices in a single ACPI fwnode with multiple I2cSerialBus resources.

    An earlier attempt to fix this in the i2c-core resulted in a lot of extra
    code to support this corner-case.

    This commit introduces a new i2c-multi-instantiate driver which fixes this
    in a different way. This new driver can be built as a module which will
    only loaded on affected systems.

    This driver will instantiate a new i2c-client per I2cSerialBus resource,
    using the driver_data from the acpi_device_id it is binding to to tell it
    which chip-type (and optional irq-resource) to use when instantiating.

    Note this driver depends on a platform device being instantiated for the
    ACPI fwnode, see the i2c_multi_instantiate_ids list of ACPI device-ids in
    drivers/acpi/scan.c: acpi_device_enumeration_by_parent().

    Acked-by: Andy Shevchenko
    Acked-by: Wolfram Sang
    Signed-off-by: Hans de Goede
    Signed-off-by: Rafael J. Wysocki

    Hans de Goede
     

03 Aug, 2018

1 commit

  • A couple of drivers produced build errors after the mod_devicetable.h
    header was split out from the platform_device one, e.g.

    drivers/media/platform/davinci/vpbe_osd.c:42:40: error: array type has incomplete element type 'struct platform_device_id'
    drivers/media/platform/davinci/vpbe_venc.c:42:40: error: array type has incomplete element type 'struct platform_device_id'

    This adds the inclusion where needed.

    Fixes: ac3167257b9f ("headers: separate linux/mod_devicetable.h from linux/platform_device.h")

    Signed-off-by: Arnd Bergmann
    Acked-by: Michael S. Tsirkin
    Acked-by: Randy Dunlap
    Acked-by: Lad, Prabhakar
    Acked-by: Andy Shevchenko
    Signed-off-by: Mauro Carvalho Chehab

    Arnd Bergmann