1
0
Fork 0
Commit Graph

17 Commits (redonkable)

Author SHA1 Message Date
Hans de Goede e30a21c6fe platform/x86: intel_int0002_vgpio: Use acpi_register_wakeup_handler()
commit 767191db82 upstream.

The Power Management Events (PMEs) the INT0002 driver listens for get
signalled by the Power Management Controller (PMC) using the same IRQ
as used for the ACPI SCI.

Since commit fdde0ff859 ("ACPI: PM: s2idle: Prevent spurious SCIs from
waking up the system") the SCI triggering, without there being a wakeup
cause recognized by the ACPI sleep code, will no longer wakeup the system.

This breaks PMEs / wakeups signalled to the INT0002 driver, the system
never leaves the s2idle_loop() now.

Use acpi_register_wakeup_handler() to register a function which checks
the GPE0a_STS register for a PME and trigger a wakeup when a PME has
been signalled.

Fixes: fdde0ff859 ("ACPI: PM: s2idle: Prevent spurious SCIs from waking up the system")
Cc: 5.4+ <stable@vger.kernel.org> # 5.4+
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Acked-by: Andy Shevchenko <andy.shevchenko@gmail.com>
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2020-04-13 10:48:09 +02:00
Linus Torvalds ad06219573 platform-drivers-x86 for v5.4-1
* ASUS WMI driver got couple of worth to mention updates, i.e. support of
   FAN is fixed for recent products and the charge threshold support has been
   added.
 
 * Two uknown key events for Dell laptops are being ignored now to avoid spam
   user with harmless messages.
 
 * HP ZBook 17 G5 and ASUS Zenbook UX430UNR have got accelerometer support.
 
 * Intel CherryTrail platforms got a regression with wake up. Now it's fixed.
 
 * Intel PMC driver got fixed in order to work nicely in Xen environment.
 
 * Intel Speed Select driver provides bucket vs core count relationship.
   Besides that the tools has been updated for better output.
 
 * The PrivacyGuard is enabled on Lenovo ThinkPad laptops.
 
 * Three tablets, i.e. Trekstor Primebook C11B 2-in-1, Irbis TW90 and
   Chuwi Surbook Mini, have got touchscreen support.
 
 The following is an automated git shortlog grouped by driver:
 
 acer-wmi:
  -  Switch to acpi_dev_get_first_match_dev()
 
 asus-nb-wmi:
  -  Support ALS on the Zenbook UX430UNR
 
 asus-wmi:
  -  Refactor charge threshold to use the battery hooking API
  -  Rename CHARGE_THRESHOLD to RSOC
  -  Reorder ASUS_WMI_CHARGE_THRESHOLD
  -  Fix condition in charge_threshold_store()
  -  Remove unnecessary blank lines
  -  Drop indentation level by inverting conditionals
  -  Use clamp_val() instead of open coded variant
  -  Replace sscanf() with kstrtoint()
  -  Refactor charge_threshold_store()
  -  Add support for charge threshold
  -  fix CPU fan control on recent products
  -  add a helper for device presence
  -  cleanup AGFN fan handling
  -  Use kmemdup rather than duplicating its implementation
 
 compal-laptop:
  -  Initialize "value" in ec_read_u8()
 
 dell-wmi:
  -  Use existing defined KBD_LED_* magic values
  -  Ignore keyboard backlight change KBD_LED_AUTO_TOKEN
  -  Ignore keyboard backlight change KBD_LED_ON_TOKEN
 
 hp_accel:
  -  Add support for HP ZBook 17 G5
 
 i2c-multi-instantiate:
  -  Use struct_size() helper
 
 intel_bxtwc_tmu:
  -  Remove dev_err() usage after platform_get_irq()
 
 intel_int0002_vgpio:
  -  Use device_init_wakeup
  -  Fix wakeups not working on Cherry Trail
  -  Remove dev_err() usage after platform_get_irq()
 
 intel_pmc_core:
  -  Do not ioremap RAM
 
 intel_pmc_core_pltdrv:
  -  Module removal warning fix
 
 intel_pmc_ipc:
  -  Remove dev_err() usage after platform_get_irq()
 
 ISST:
  -  Allow additional TRL MSRs
  -  Use dev_get_drvdata
 
 MAINTAINERS:
  -  Switch PDx86 subsystem status to Odd Fixes
 
 pcengines-apuv2:
  -  wire up simswitch gpio as led
  -  add mpcie reset gpio export
 
 platform/mellanox:
  -  mlxreg-hotplug: Remove dev_err() usage after platform_get_irq()
 
 pmc_atom:
  -  Add Siemens SIMATIC IPC227E to critclk_systems DMI table
 
 thinkpad_acpi:
  -  Add ThinkPad PrivacyGuard
  -  Use kmemdup rather than duplicating its implementation
 
 tools/power/x86/intel-speed-select:
  -  Display core count for bucket
  -  Fix memory leak
  -  Output success/failed for command output
  -  Output human readable CPU list
  -  Change turbo ratio output to maximum turbo frequency
  -  Switch output to MHz
  -  Simplify output for turbo-freq and base-freq
  -  Fix cpu-count output
  -  Fix help option typo
  -  Fix package typo
  -  Fix a read overflow in isst_set_tdp_level_msr()
 
 touchscreen_dmi:
  -  Add info for the Trekstor Primebook C11B 2-in-1
  -  Add info for the Irbis TW90 tablet
  -  Add info for the Chuwi Surbook Mini tablet
 
 wmi:
  -  Remove acpi_has_method() call
 -----BEGIN PGP SIGNATURE-----
 
 iQIzBAABCgAdFiEEqaflIX74DDDzMJJtb7wzTHR8rCgFAl17y/4ACgkQb7wzTHR8
 rCjMyA//Zgv//XuQUqAPon/UAxu2FhDC40VBicm4AuNUtkqbN2cE04ZosyVQWLr9
 ZNVgTu5CU2HR5HIuA6Xn3+FIadLYe/qpXhOvCTKQa/SrbvZLKxeoEBzoqIOgxvpN
 90xkoKIp6GB+N2zjeKAhyuiJ2wce2RKok3mWOEdaEBqsrTT3LFToCpF+crpbKv81
 UECMUet7ymdq+ryNYjCW4O2YmQYUpI3aGvv0MRJ9uQJrUfdN0Pa/lsXqmd5/agyi
 6J5RP0LDSUJat8lOzxzWWF7pHa7dbVuDVzKlfKt6yIOmK4YqiwE9OLoVEDmpyCNx
 22/pIDsJcPcdeUaAzwNEO7ao+UKQ2jXmh0IhkO9DkFziJfLz73Ucv47ZJzdPYhEo
 bQtr9FlcttJ5Xxw/j6tQTSGasmSZCXElfiVJObujxRu47bSqlH/846PRK3kcWrga
 AgFlIpvqO5J+ZkEZTohQltRPEfnJC4GbpjHnNOFvk0bowBc7KWk3EzDsJ6GvyIIX
 z9pKpQ6OmjmiVZmA+aIxMbxYvgYobNGjCeUH20duqgLaMtzqZ3MgU4NXnuSbzX5t
 8AL9irGE4JclJ7gkOh7SGIKdibXTjeUC9bPV0efqHn2P8sEigsYtDfaUA67XMDZ/
 xYvKxC4XR/msJMkz4hRk9WyTEFAXbLW/teLE9nLBEBTguWemDuk=
 =HItn
 -----END PGP SIGNATURE-----

Merge tag 'platform-drivers-x86-v5.4-1' of git://git.infradead.org/linux-platform-drivers-x86

Pull x86 platform-drivers updates from Andy Shevchenko:

 - ASUS WMI driver got a couple of updates, i.e. support of FAN is fixed
   for recent products and the charge threshold support has been added

 - Two uknown key events for Dell laptops are being ignored now to avoid
   spamming users with harmless messages

 - HP ZBook 17 G5 and ASUS Zenbook UX430UNR got accelerometer support.

 - Intel CherryTrail platforms had a regression with wake up. Now it's
   fixed

 - Intel PMC driver got fixed in order to work nicely in Xen
   environment

 - Intel Speed Select driver provides bucket vs core count relationship.
   Besides that the tools has been updated for better output

 - The PrivacyGuard is enabled on Lenovo ThinkPad laptops

 - Three tablets - Trekstor Primebook C11B 2-in-1, Irbis TW90 and Chuwi
   Surbook Mini - got touchscreen support

* tag 'platform-drivers-x86-v5.4-1' of git://git.infradead.org/linux-platform-drivers-x86: (53 commits)
  MAINTAINERS: Switch PDx86 subsystem status to Odd Fixes
  platform/x86: asus-wmi: Refactor charge threshold to use the battery hooking API
  platform/x86: asus-wmi: Rename CHARGE_THRESHOLD to RSOC
  platform/x86: asus-wmi: Reorder ASUS_WMI_CHARGE_THRESHOLD
  tools/power/x86/intel-speed-select: Display core count for bucket
  platform/x86: ISST: Allow additional TRL MSRs
  tools/power/x86/intel-speed-select: Fix memory leak
  tools/power/x86/intel-speed-select: Output success/failed for command output
  tools/power/x86/intel-speed-select: Output human readable CPU list
  tools/power/x86/intel-speed-select: Change turbo ratio output to maximum turbo frequency
  tools/power/x86/intel-speed-select: Switch output to MHz
  tools/power/x86/intel-speed-select: Simplify output for turbo-freq and base-freq
  tools/power/x86/intel-speed-select: Fix cpu-count output
  tools/power/x86/intel-speed-select: Fix help option typo
  tools/power/x86/intel-speed-select: Fix package typo
  tools/power/x86/intel-speed-select: Fix a read overflow in isst_set_tdp_level_msr()
  platform/x86: intel_int0002_vgpio: Use device_init_wakeup
  platform/x86: intel_int0002_vgpio: Fix wakeups not working on Cherry Trail
  platform/x86: compal-laptop: Initialize "value" in ec_read_u8()
  platform/x86: touchscreen_dmi: Add info for the Trekstor Primebook C11B 2-in-1
  ...
2019-09-16 19:59:10 -07:00
Linus Walleij 5fbe5b5883 gpio: Initialize the irqchip valid_mask with a callback
After changing the valid_mask for the struct gpio_chip
to detect the need and presence of a valid mask with the
presence of a .init_valid_mask() callback to fill it in,
we augment the gpio_irq_chip to use the same logic.

Switch all driver using the gpio_irq_chio valid_mask
over to this new method.

This makes sure the valid_mask for the gpio_irq_chip gets
filled in when we add the gpio_chip, which makes it a
little easier to switch over drivers using the old
way of setting up gpio_irq_chip over to the new method
of passing the gpio_irq_chip along with the gpio_chip.
(See drivers/gpio/TODO for details.)

Cc: Joel Stanley <joel@jms.id.au>
Cc: Thierry Reding <treding@nvidia.com>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Tested-by: Hans de Goede <hdegoede@redhat.com>
Reviewed-by: Andrew Jeffery <andrew@aj.id.au>
Acked-by: Mika Westerberg <mika.westerberg@linux.intel.com>
Reviewed-by: Andrew Lunn <andrew@lunn.ch>
Reviewed-by: Patrice Chotard <patrice.chotard@st.com>
Link: https://lore.kernel.org/r/20190904140104.32426-1-linus.walleij@linaro.org
2019-09-11 01:09:37 +01:00
Hans de Goede 0ecee9e3d4 platform/x86: intel_int0002_vgpio: Use device_init_wakeup
Use device_init_wakeup and pm_wakeup_hard_event instead of directly
calling pm_system_wakeup(). This is the preferred way to do this and
this will allow the user to disable wakeup through INT0002 events
through sysfs.

Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
2019-09-07 21:16:09 +03:00
Hans de Goede 1bd43d0077 platform/x86: intel_int0002_vgpio: Fix wakeups not working on Cherry Trail
Commit 871f1f2bcb ("platform/x86: intel_int0002_vgpio: Only implement
irq_set_wake on Bay Trail") removed the irq_set_wake method from the
struct irq_chip used on Cherry Trail, but it did not set
IRQCHIP_SKIP_SET_WAKE causing  kernel/irq/manage.c: set_irq_wake_real()
to return -ENXIO.

This causes the kernel to no longer see PME events reported through the
INT0002 device as wakeup events. Which e.g. breaks wakeup by the (USB)
keyboard on many Cherry Trail 2-in-1 devices.

Cc: stable@vger.kernel.org
Fixes: 871f1f2bcb ("platform/x86: intel_int0002_vgpio: Only implement irq_set_wake on Bay Trail")
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
2019-09-07 21:16:09 +03:00
Stephen Boyd f839b4b549 platform/x86: intel_int0002_vgpio: Remove dev_err() usage after platform_get_irq()
We don't need dev_err() messages when platform_get_irq() fails now that
platform_get_irq() prints an error message itself when something goes
wrong. Let's remove these prints with a simple semantic patch.

// <smpl>
@@
expression ret;
struct platform_device *E;
@@

ret =
(
platform_get_irq(E, ...)
|
platform_get_irq_byname(E, ...)
);

if ( \( ret < 0 \| ret <= 0 \) )
{
(
-if (ret != -EPROBE_DEFER)
-{ ...
-dev_err(...);
-... }
|
...
-dev_err(...);
)
...
}
// </smpl>

While we're here, remove braces on if statements that only have one
statement (manually).

Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Cc: Enric Balletbo i Serra <enric.balletbo@collabora.com>
Cc: Hans de Goede <hdegoede@redhat.com>
Cc: "Darren Hart (VMware)" <dvhart@infradead.org>
Cc: Roman Kiryanov <rkir@google.com>
Cc: Vadim Pasternak <vadimp@mellanox.com>
Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Stephen Boyd <swboyd@chromium.org>
Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
2019-08-01 18:03:02 +03:00
Andy Shevchenko 568aeeeb69 platform/x86: intel_int0002_vgpio: Get rid of custom ICPU() macro
Replace custom grown macro with generic INTEL_CPU_FAM6() one.

No functional change intended.

Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Reviewed-by: Hans de Goede <hdegoede@redhat.com>
2019-06-29 17:15:22 +03:00
Hans de Goede 871f1f2bcb platform/x86: intel_int0002_vgpio: Only implement irq_set_wake on Bay Trail
Commit c3b8e884de ("platform/x86: intel_int0002_vgpio: Implement irq_set_wake"),
was written to fix some wakeup issues on Bay Trail (BYT) devices.

We've received a bug report that this causes a suspend regression on some
Cherry Trail (CHT) based devices.

To fix the issues this causes on CHT devices, this commit modifies the
irq_set_wake support so that we only implement irq_set_wake on BYT devices,

Fixes: c3b8e884de ("platform/x86: intel_int0002_vgpio: ... irq_set_wake")
Reported-and-tested-by: Maxim Mikityanskiy <maxtram95@gmail.com>
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
2019-02-05 20:28:54 +02:00
Linus Torvalds eb7046e9bf platform-drivers-x86 for v4.20-1
Move the Dell dcdbas and dell_rbu drivers into platform/drivers/x86 as
 they are closely coupled with other drivers in this location.
 
 Improve _init* usage for acerhdf and fix some usage issues with messages
 and module parameters.
 
 Simplify asus-wmi by calling ACPI/WMI methods directly, eliminating
 workqueue overhead, eliminate double reporting of keyboard backlight.
 
 Fix wake from USB failure on Bay Trail devices (intel_int0002_vgpio).
 
 Notify intel_telemetry users when IPC1 device is not enabled.
 
 Update various drivers with new laptop model IDs.
 
 Update several intel drivers to use SPDX identifers and order headers
 alphabetically.
 
 The following is an automated git shortlog grouped by driver:
 
 Add Intel AtomISP2 dummy / power-management driver:
  - Add Intel AtomISP2 dummy / power-management driver
 
 lg-laptop:
  - Add LG Gram laptop special features driver
 
 HID:
  -  asus: only support backlight when it's not driven by WMI
 
 MAINTAINERS:
  -  intel_telemetry: Update maintainers info
  -  intel_pmc_core: Update MAINTAINERS
  -  Update maintainer for dcdbas and dell_rbu
  -  Use my infradead account exclusively for PDx86 work
 
 acerhdf:
  -  restructure to allow large BIOS table be __initconst
  -  mark appropriate content with __init prefix
  -  Add BIOS entry for Gateway LT31 v1.3307
  -  Remove cut-and-paste trap from instructions
  -  Enable ability to list supported systems
  -  clarify modinfo messages for BIOS override
 
 asus-wmi:
  -  export function for evaluating WMI methods
  -  Only notify kbd LED hw_change by fn-key pressed
  -  Simplify the keyboard brightness updating process
 
 firmware:
  -  dcdbas: include linux/io.h
  -  dcdbas: Move dcdbas to drivers/platform/x86
  -  dell_rbu: Move dell_rbu to drivers/platform/x86
  -  dcdbas: Add support for WSMT ACPI table
  -  dell_rbu: Make payload memory uncachable
 
 ideapad-laptop:
  -  Add Y530-15ICH to no_hw_rfkill
  -  Use __func__ instead of read_ec_cmd in pr_err
 
 intel-hid:
  -  Convert to use SPDX identifier
 
 intel-ips:
  -  Convert to use SPDX identifier
 
 intel-rst:
  -  Convert to use SPDX identifier
  -  Sort headers alphabetically
 
 intel-smartconnect:
  -  Convert to use SPDX identifier
  -  Sort headers alphabetically
 
 intel-wmi-thunderbolt:
  -  Add dynamic debugging
  -  Convert to use SPDX identifier
 
 intel_bxtwc_tmu:
  -  Convert to use SPDX identifier
 
 intel_cht_int33fe:
  -  Convert to use SPDX identifier
 
 intel_chtdc_ti_pwrbtn:
  -  Add SPDX identifier
 
 intel_int0002_vgpio:
  -  Convert to use SPDX identifier
  -  Implement irq_set_wake
  -  Enable the driver on Bay Trail platforms
 
 intel_menlow:
  -  Convert to use SPDX identifier
  -  Sort headers alphabetically
 
 intel_mid_powerbtn:
  -  Convert to use SPDX identifier
  -  Remove unnecessary init.h inclusion
  -  Get rid of custom ICPU() macro
 
 intel_mid_thermal:
  -  Convert to use SPDX identifier
  -  Sort headers alphabetically
 
 intel_oaktrail:
  -  Convert to use SPDX identifier
  -  Sort headers alphabetically
 
 intel_pmc:
  -  Convert to use SPDX identifier
  -  Sort headers alphabetically
 
 intel_punit_ipc:
  -  Convert to use SPDX identifier
  -  Sort headers alphabetically
 
 intel_scu_ipc:
  -  Convert to use SPDX identifier
  -  Sort headers alphabetically
 
 intel_telemetry:
  -  Get rid of custom macro
  -  report debugfs failure
  -  Convert to use SPDX identifier
 
 intel_turbo_max_3:
  -  Convert to use SPDX identifier
  -  Sort headers alphabetically
 
 mlx-platform:
  -  Properly use mlxplat_mlxcpld_msn201x_items
 
 touchscreen_dmi:
  -  Add min-x and min-y settings for various models
  -  Add info for the Onda V80 Plus v3 tablet
  -  Add info for the Trekstor Primetab T13B tablet
  -  Add info for the Trekstor Primebook C11 convertible
 
 tracing:
  -  Trivia spelling fix containerof() -> container_of()
 
 wmi:
  -  declare device_type structure as constant
 -----BEGIN PGP SIGNATURE-----
 
 iQEcBAABAgAGBQJb2mDCAAoJEKbMaAwKp364KdkH/Rar8cenw7uFeVzT5o4fGzTn
 0Oo1Pnwh+hPgmQwmf8O/mHsa/1Zb9nX4nNLU/ysDUjAAZ9wZLoB57HlImQquPA74
 c8lXTz5MVF140WB1f1Ck5PmeonJR2Xve7HTYCoBmGo71jOxHxCgJbp1Giiho0Imd
 3NXzzahEnAiy/L5PhqqYTmIfTeAHQ2Fo7GkHCjMnS20FP2fBtvPrc7db03F+FZ4y
 QTfbT0oR42NdeW21AbCRGY3P47axB3xDJX4LOYrb4uo4CIzd1yatlHk407NRRyv8
 pab6aeJR23FouA/tcvv+T36D3vqRw78e6BWdoyowWOd7CUOgjtSC3lKGzfT6hSY=
 =0BDZ
 -----END PGP SIGNATURE-----

Merge tag 'platform-drivers-x86-v4.20-1' of git://git.infradead.org/linux-platform-drivers-x86

Pull x86 platform driver updates from Darren Hart:

 - Move the Dell dcdbas and dell_rbu drivers into platform/drivers/x86
   as they are closely coupled with other drivers in this location.

 - Improve _init* usage for acerhdf and fix some usage issues with
   messages and module parameters.

 - Simplify asus-wmi by calling ACPI/WMI methods directly, eliminating
   workqueue overhead, eliminate double reporting of keyboard backlight.

 - Fix wake from USB failure on Bay Trail devices (intel_int0002_vgpio).

 - Notify intel_telemetry users when IPC1 device is not enabled.

 - Update various drivers with new laptop model IDs.

 - Update several intel drivers to use SPDX identifers and order headers
   alphabetically.

* tag 'platform-drivers-x86-v4.20-1' of git://git.infradead.org/linux-platform-drivers-x86: (64 commits)
  HID: asus: only support backlight when it's not driven by WMI
  platform/x86: asus-wmi: export function for evaluating WMI methods
  platform/x86: asus-wmi: Only notify kbd LED hw_change by fn-key pressed
  platform/x86: wmi: declare device_type structure as constant
  platform/x86: ideapad: Add Y530-15ICH to no_hw_rfkill
  platform/x86: Add Intel AtomISP2 dummy / power-management driver
  platform/x86: touchscreen_dmi: Add min-x and min-y settings for various models
  platform/x86: touchscreen_dmi: Add info for the Onda V80 Plus v3 tablet
  platform/x86: touchscreen_dmi: Add info for the Trekstor Primetab T13B tablet
  platform/x86: intel_telemetry: Get rid of custom macro
  platform/x86: intel_telemetry: report debugfs failure
  MAINTAINERS: intel_telemetry: Update maintainers info
  platform/x86: Add LG Gram laptop special features driver
  platform/x86: asus-wmi: Simplify the keyboard brightness updating process
  platform/x86: touchscreen_dmi: Add info for the Trekstor Primebook C11 convertible
  platform/x86: mlx-platform: Properly use mlxplat_mlxcpld_msn201x_items
  MAINTAINERS: intel_pmc_core: Update MAINTAINERS
  firmware: dcdbas: include linux/io.h
  platform/x86: intel-wmi-thunderbolt: Add dynamic debugging
  platform/x86: intel-wmi-thunderbolt: Convert to use SPDX identifier
  ...
2018-11-01 08:42:21 -07:00
Peter Zijlstra f2c4db1bd8 x86/cpu: Sanitize FAM6_ATOM naming
Going primarily by:

  https://en.wikipedia.org/wiki/List_of_Intel_Atom_microprocessors

with additional information gleaned from other related pages; notably:

 - Bonnell shrink was called Saltwell
 - Moorefield is the Merriefield refresh which makes it Airmont

The general naming scheme is: FAM6_ATOM_UARCH_SOCTYPE

  for i in `git grep -l FAM6_ATOM` ; do
	sed -i  -e 's/ATOM_PINEVIEW/ATOM_BONNELL/g'		\
		-e 's/ATOM_LINCROFT/ATOM_BONNELL_MID/'		\
		-e 's/ATOM_PENWELL/ATOM_SALTWELL_MID/g'		\
		-e 's/ATOM_CLOVERVIEW/ATOM_SALTWELL_TABLET/g'	\
		-e 's/ATOM_CEDARVIEW/ATOM_SALTWELL/g'		\
		-e 's/ATOM_SILVERMONT1/ATOM_SILVERMONT/g'	\
		-e 's/ATOM_SILVERMONT2/ATOM_SILVERMONT_X/g'	\
		-e 's/ATOM_MERRIFIELD/ATOM_SILVERMONT_MID/g'	\
		-e 's/ATOM_MOOREFIELD/ATOM_AIRMONT_MID/g'	\
		-e 's/ATOM_DENVERTON/ATOM_GOLDMONT_X/g'		\
		-e 's/ATOM_GEMINI_LAKE/ATOM_GOLDMONT_PLUS/g' ${i}
  done

Signed-off-by: Peter Zijlstra (Intel) <peterz@infradead.org>
Cc: Alexander Shishkin <alexander.shishkin@linux.intel.com>
Cc: Arnaldo Carvalho de Melo <acme@redhat.com>
Cc: Jiri Olsa <jolsa@redhat.com>
Cc: Linus Torvalds <torvalds@linux-foundation.org>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Stephane Eranian <eranian@google.com>
Cc: Thomas Gleixner <tglx@linutronix.de>
Cc: Vince Weaver <vincent.weaver@maine.edu>
Cc: dave.hansen@linux.intel.com
Cc: len.brown@intel.com
Signed-off-by: Ingo Molnar <mingo@kernel.org>
2018-10-02 10:14:32 +02:00
Andy Shevchenko 79c24dbdcb platform/x86: intel_int0002_vgpio: Convert to use SPDX identifier
Reduce size of duplicated comments by switching to use SPDX identifier.

No functional change.

While here, correct MODULE_LICENSE() string to be aligned with license text.

Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
2018-09-27 12:18:16 +03:00
Hans de Goede c3b8e884de platform/x86: intel_int0002_vgpio: Implement irq_set_wake
We were relying on the interrupt being shared with the ACPI SCI and the
ACPI core calling irq_set_wake. But that does not always happen on
Bay Trail devices, so we should do it ourselves.

This fixes wake from USB not working on various Bay Trail devices.

Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
2018-09-27 11:45:29 +03:00
Hans de Goede 96402de65a platform/x86: intel_int0002_vgpio: Enable the driver on Bay Trail platforms
The intel_int0002_vgpio driver was added to avoid an IRQ 9 storm on Cherry
Trail platforms.

When originally merged the CPU ID for Bay Trail SoCs was commented out
of the list of valid CPU IDs because we did not have any reports of the
IRQ storm on Bay Trail platforms.

We now have a report of the IRQ 9 storm on the Bay Trail based Thinkpad
Tablet 10 which is fixed by enabling this driver, so lets enable it on
Bay Trail too.

I've tested various other Bay Trail device with this driver enabled
without adverse side-effects.

BugLink: https://www.dpin.de/nf/finally-s0i3-is-there-thinkpad-tablet-10-sleeps-deeply-with-linux-kernel-4-15rc/#comments
Reported-and-tested-by: Nicole Faerber <nicole@id3p.de>
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
2018-09-27 11:45:29 +03:00
Hans de Goede 2448f44f31 platform/x86: intel_int0002_vgpio: Remove IRQF_NO_THREAD irq flag
Remove the IRQF_NO_THREAD irq flag, there is no need for it and it breaks
irq-sharing with the "acpi" irq when passing "threadirqs" on the kernel
cmdline, as the acpi/osl.c code does not pass IRQF_NO_THREAD.

Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Reported-by: Oleksandr Natalenko <oleksandr@natalenko.name>
Tested-by: Oleksandr Natalenko <oleksandr@natalenko.name>
Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
2017-11-27 13:39:11 +02:00
Thierry Reding dc7b0387ee gpio: Move irq_valid_mask into struct gpio_irq_chip
In order to consolidate the multiple ways to associate an IRQ chip with
a GPIO chip, move more fields into the new struct gpio_irq_chip.

Signed-off-by: Thierry Reding <treding@nvidia.com>
Acked-by: Grygorii Strashko <grygorii.strashko@ti.com>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
2017-11-08 14:10:18 +01:00
Thierry Reding f0fbe7bce7 gpio: Move irqdomain into struct gpio_irq_chip
In order to consolidate the multiple ways to associate an IRQ chip with
a GPIO chip, move more fields into the new struct gpio_irq_chip.

Signed-off-by: Thierry Reding <treding@nvidia.com>
Acked-by: Grygorii Strashko <grygorii.strashko@ti.com>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
2017-11-08 14:06:21 +01:00
Hans de Goede 63dada87f7 platform/x86: Add driver for ACPI INT0002 Virtual GPIO device
Some peripherals on Bay Trail and Cherry Trail platforms signal a
Power Management Event (PME) to the Power Management Controller (PMC)
to wakeup the system. When this happens software needs to explicitly
clear the PME bus 0 status bit in the GPE0a_STS register to avoid an
IRQ storm on IRQ 9.

This is modelled in ACPI through the INT0002 ACPI device, which is
called a "Virtual GPIO controller" in ACPI because it defines the
event handler to call when the PME triggers through _AEI and _L02
methods as would be done for a real GPIO interrupt in ACPI.

This commit adds a driver which registers the Virtual GPIOs expected
by the DSDT on these devices, letting gpiolib-acpi claim the
virtual GPIO and install a GPIO-interrupt handler which call the _L02
handler as it would for a real GPIO controller.

Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Reviewed-by: Linus Walleij <linus.walleij@linaro.org>
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
2017-06-15 00:55:44 +02:00