Commit graph

4798 commits

Author SHA1 Message Date
Muchun Song
359745d783 proc: remove PDE_DATA() completely
Remove PDE_DATA() completely and replace it with pde_data().

[akpm@linux-foundation.org: fix naming clash in drivers/nubus/proc.c]
[akpm@linux-foundation.org: now fix it properly]

Link: https://lkml.kernel.org/r/20211124081956.87711-2-songmuchun@bytedance.com
Signed-off-by: Muchun Song <songmuchun@bytedance.com>
Acked-by: Christian Brauner <christian.brauner@ubuntu.com>
Cc: Alexey Dobriyan <adobriyan@gmail.com>
Cc: Alexey Gladkov <gladkov.alexey@gmail.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2022-01-22 08:33:37 +02:00
Linus Torvalds
3fb561b1e0 - added support for more BCM47XX based devices
- added MIPS support for brcmstb PCIe controller
 - added Loongson 2K1000 reset driver
 - removed board support for rbtx4938/rbtx4939
 - removed support for TX4939 SoCs
 - fixes and cleanups
 -----BEGIN PGP SIGNATURE-----
 
 iQJOBAABCAA4FiEEbt46xwy6kEcDOXoUeZbBVTGwZHAFAmHhNi8aHHRzYm9nZW5k
 QGFscGhhLmZyYW5rZW4uZGUACgkQeZbBVTGwZHDjGBAAogFGgNYUSzLUHQfGdBcx
 fk/Lo+psvZ03cz5i9L4+7D0N3/K55/GXhSvDIHMhbYX41qklCy/ie+hxp3rwbjD3
 RTLV3D4YdoJkcn+lPcKgtvGxKXjLE0A2ho/TmrAce2mvrei3BWu7dDmJC0WFjmt7
 SZeg3ALjEdYVObO3vaN3pBMuuUuNvYS8DlLadzGwx1rDPHxGOZBri025bl9g6I+m
 rQHSTa3p5DY4VsqEOXy1fUZchys1pZC6D7Ja4FPracnxYF0F4jLoWVhN+xt4QpcW
 Q6o4+ykIDuL6kEKOwfTB094CeumIZSpcEwIKRYorIHeApG/XdgVBxJfcsaxBxI7V
 4KYBkxG93AWwsp9CtxGEfOADoX3XnRbMZk58d6pVW7KUPXNin73jghxkc4vmaK1R
 9lDyiq8RC8sh+HA5jkksCmf4otXstVlZGxNMKG3/qJy62pqEuFOIoB1Q8hN15c7w
 HlFM7ZFf/6ZWVWm3dSKdB+hZNWTBVL2ucH9bf4s6f408Mj2sMMRIuFUKH/zJzVZZ
 SeXy+tv5BcWbU+1EdaHzQJWM69iBCxasNyhPJkk3Hq+vqZdjkdPruzD3pVxdm169
 E6cBUSWjwrJTt8EsBWKb1+hzjZk56Brff+9AlhbLWSChto/4SJmT/wZWGvTC2hqS
 GBIIDNnd2G5k5xhuVs6qQIM=
 =wsIG
 -----END PGP SIGNATURE-----

Merge tag 'mips_5.17' of git://git.kernel.org/pub/scm/linux/kernel/git/mips/linux

Pull MIPS updates from Thomas Bogendoerfer:

 - add support for more BCM47XX based devices

 - add MIPS support for brcmstb PCIe controller

 - add Loongson 2K1000 reset driver

 - remove board support for rbtx4938/rbtx4939

 - remove support for TX4939 SoCs

 - fixes and cleanups

* tag 'mips_5.17' of git://git.kernel.org/pub/scm/linux/kernel/git/mips/linux: (59 commits)
  MIPS: ath79: drop _machine_restart again
  PCI: brcmstb: Augment driver for MIPs SOCs
  MIPS: bmips: Remove obsolete DMA mapping support
  MIPS: bmips: Add support PCIe controller device nodes
  dt-bindings: PCI: Add compatible string for Brcmstb 74[23]5 MIPs SOCs
  MIPS: compressed: Fix build with ZSTD compression
  MIPS: BCM47XX: Add support for Netgear WN2500RP v1 & v2
  MIPS: BCM47XX: Add support for Netgear R6300 v1
  MIPS: BCM47XX: Add LEDs and buttons for Asus RTN-10U
  MIPS: BCM47XX: Add board entry for Linksys WRT320N v1
  MIPS: BCM47XX: Define Linksys WRT310N V2 buttons
  MIPS: Remove duplicated include in local.h
  MIPS: retire "asm/llsc.h"
  MIPS: rework local_t operation on MIPS64
  MIPS: fix local_{add,sub}_return on MIPS64
  mips/pci: remove redundant ret variable
  MIPS: Loongson64: Add missing of_node_put() in ls2k_reset_init()
  MIPS: new Kconfig option ZBOOT_LOAD_ADDRESS
  MIPS: enable both vmlinux.gz.itb and vmlinuz for generic
  MIPS: signal: Return immediately if call fails
  ...
2022-01-14 15:08:36 +01:00
Linus Torvalds
6dc69d3d0d driver core changes for 5.17-rc1
Here is the set of changes for the driver core for 5.17-rc1.
 
 Lots of little things here, including:
 	- kobj_type cleanups
 	- auxiliary_bus documentation updates
 	- auxiliary_device conversions for some drivers (relevant
 	  subsystems all have provided acks for these)
 	- kernfs lock contention reduction for some workloads
 	- other tiny cleanups and changes.
 
 All of these have been in linux-next for a while with no reported
 issues.
 
 Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
 -----BEGIN PGP SIGNATURE-----
 
 iG0EABECAC0WIQT0tgzFv3jCIUoxPcsxR9QN2y37KQUCYd7deA8cZ3JlZ0Brcm9h
 aC5jb20ACgkQMUfUDdst+ym8ngCgw0ANwrRPE5b1dthEmfU2f8Knk5kAn0pHQv6R
 VRZJypgNfU/Pt0ykstZD
 =CO9J
 -----END PGP SIGNATURE-----

Merge tag 'driver-core-5.17-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/driver-core

Pull driver core updates from Greg KH:
 "Here is the set of changes for the driver core for 5.17-rc1.

  Lots of little things here, including:

   - kobj_type cleanups

   - auxiliary_bus documentation updates

   - auxiliary_device conversions for some drivers (relevant subsystems
     all have provided acks for these)

   - kernfs lock contention reduction for some workloads

   - other tiny cleanups and changes.

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

* tag 'driver-core-5.17-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/driver-core: (43 commits)
  kobject documentation: remove default_attrs information
  drivers/firmware: Add missing platform_device_put() in sysfb_create_simplefb
  debugfs: lockdown: Allow reading debugfs files that are not world readable
  driver core: Make bus notifiers in right order in really_probe()
  driver core: Move driver_sysfs_remove() after driver_sysfs_add()
  firmware: edd: remove empty default_attrs array
  firmware: dmi-sysfs: use default_groups in kobj_type
  qemu_fw_cfg: use default_groups in kobj_type
  firmware: memmap: use default_groups in kobj_type
  sh: sq: use default_groups in kobj_type
  headers/uninline: Uninline single-use function: kobject_has_children()
  devtmpfs: mount with noexec and nosuid
  driver core: Simplify async probe test code by using ktime_ms_delta()
  nilfs2: use default_groups in kobj_type
  kobject: remove kset from struct kset_uevent_ops callbacks
  driver core: make kobj_type constant.
  driver core: platform: document registration-failure requirement
  vdpa/mlx5: Use auxiliary_device driver data helpers
  net/mlx5e: Use auxiliary_device driver data helpers
  soundwire: intel: Use auxiliary_device driver data helpers
  ...
2022-01-12 11:11:34 -08:00
Linus Torvalds
347708875a platform-drivers-x86 for v5.17-1
Highlights:
  - new drivers:
    - asus-tf103c-dock
    - intel_crystal_cove_charger
    - lenovo-yogabook-wmi
    - simatic-ipc platform-code + led driver + watchdog driver
    - x86-android-tablets (kernel module to workaround DSDT bugs on these)
  - amd-pmc:
    - bug-fixes
    - smar trace buffer support
  - asus-wmi: support for custom fan curves
  - int3472 (camera info ACPI object for Intel IPU3/SkyCam cameras):
    - ACPI core + int3472 changes to delay enumeration of camera sensor I2C
      clients until the PMIC for the sensor has been fully probed
    - Add support for board data (DSDT info is incomplete) for setting up
      the tps68470 PMIC used on some boards with these cameras
    - Add board data for the Microsoft Surface Go (original, v2 and v3)
  - thinkpad_acpi:
    - various cleanups
    - support for forced battery discharging (for battery calibration)
    - support to inhibit battery charging
    - this includes power_supply core changes to add new APIs for this
  - think_lmi: enhanced BIOS password support
  - various other small fixes and hardware-id additions
 
 The following is an automated git shortlog grouped by driver:
 
 ACPI:
  -  delay enumeration of devices with a _DEP pointing to an INT3472 device
 
 Add Asus TF103C dock driver:
  - Add Asus TF103C dock driver
 
 Add intel_crystal_cove_charger driver:
  - Add intel_crystal_cove_charger driver
 
 Documentation:
  -  syfs-class-firmware-attributes: Lenovo Opcode support
 
 Merge tag 'platform-drivers-x86-int3472-1' into review-hans:
  - Merge tag 'platform-drivers-x86-int3472-1' into review-hans
 
 amd-pmc:
  -  only use callbacks for suspend
  -  Add support for AMD Smart Trace Buffer
  -  Simplify error handling and store the pci_dev in amd_pmc_dev structure
  -  Fix s2idle failures on certain AMD laptops
  -  Make CONFIG_AMD_PMC depend on RTC_CLASS
 
 apple-gmux:
  -  use resource_size() with res
 
 asus-wmi:
  -  Reshuffle headers for better maintenance
  -  Split MODULE_AUTHOR() on per author basis
  -  Join string literals back
  -  remove unneeded semicolon
  -  Add support for custom fan curves
 
 dell-wmi-descriptor:
  -  disable by default
 
 hp_accel:
  -  Use SIMPLE_DEV_PM_OPS() for PM ops
  -  Fix an error handling path in 'lis3lv02d_probe()'
 
 i2c:
  -  acpi: Add i2c_acpi_new_device_by_fwnode() function
  -  acpi: Use acpi_dev_ready_for_enumeration() helper
 
 int3472:
  -  Add board data for Surface Go 3
  -  Deal with probe ordering issues
  -  Pass tps68470_regulator_platform_data to the tps68470-regulator MFD-cell
  -  Pass tps68470_clk_platform_data to the tps68470-regulator MFD-cell
  -  Add get_sensor_adev_and_name() helper
  -  Split into 2 drivers
 
 intel-uncore-frequency:
  -  use default_groups in kobj_type
 
 intel_pmc_core:
  -  fix memleak on registration failure
 
 leds:
  -  simatic-ipc-leds: add new driver for Siemens Industial PCs
 
 lenovo-yogabook-wmi:
  -  Add support for hall sensor on the back
  -  Add driver for Lenovo Yoga Book
 
 lg-laptop:
  -  Recognize more models
 
 platform:
  -  surface: Propagate ACPI Dependency
 
 platform/mellanox:
  -  mlxbf-pmc: Fix an IS_ERR() vs NULL bug in mlxbf_pmc_map_counters
  -  mlxreg-lc: fix error code in mlxreg_lc_create_static_devices()
 
 platform/surface:
  -  aggregator_registry: Rename device registration function
  -  aggregator_registry: Use generic client removal function
  -  aggregator: Make client device removal more generic
 
 platform/x86/intel:
  -  Remove X86_PLATFORM_DRIVERS_INTEL
  -  hid: add quirk to support Surface Go 3
 
 platform_data:
  -  Add linux/platform_data/tps68470.h file
 
 pmc_atom:
  -  improve critclk_systems matching for Siemens PCs
 
 power:
  -  supply: Provide stubs for charge_behaviour helpers
  -  supply: fix charge_behaviour attribute initialization
  -  supply: add helpers for charge_behaviour sysfs
  -  supply: add charge_behaviour attributes
 
 samsung-laptop:
  -  Fix typo in a comment
 
 simatic-ipc:
  -  add main driver for Siemens devices
 
 system76_acpi:
  -  Guard System76 EC specific functionality
 
 think-lmi:
  -  Prevent underflow in index_store()
  -  Simplify tlmi_analyze() error handling a bit
  -  Move kobject_init() call into tlmi_create_auth()
  -  Opcode support
  -  Abort probe on analyze failure
 
 thinkpad_acpi:
  -  support inhibit-charge
  -  support force-discharge
  -  Add lid_logo_dot to the list of safe LEDs
  -  Add LED_RETAIN_AT_SHUTDOWN to led_class_devs
  -  Remove unused sensors_pdev_attrs_registered flag
  -  Fix the hwmon sysfs-attr showing up in the wrong place
  -  tpacpi_attr_group contains driver attributes not device attrs
  -  Register tpacpi_pdriver after subdriver init
  -  Restore missing hotkey_tablet_mode and hotkey_radio_sw sysfs-attr
  -  Fix thermal_temp_input_attr sorting
  -  Remove "goto err_exit" from hotkey_init()
  -  Properly indent code in tpacpi_dytc_profile_init()
  -  Cleanup dytc_profile_available
  -  Simplify dytc_version handling
  -  Make *_init() functions return -ENODEV instead of 1
  -  Accept ibm_init_struct.init() returning -ENODEV
  -  Convert platform driver to use dev_groups
  -  fix documentation for adaptive keyboard
  -  Fix WWAN device disabled issue after S3 deep
  -  Add support for dual fan control
 
 tools/power/x86/intel-speed-select:
  -  v1.11 release
  -  Update max frequency
 
 touchscreen_dmi:
  -  Remove the Glavey TM800A550L entry
  -  Enable pen support on the Chuwi Hi10 Plus and Pro
  -  Correct min/max values for Chuwi Hi10 Pro (CWI529) tablet
  -  Add TrekStor SurfTab duo W1 touchscreen info
 
 watchdog:
  -  simatic-ipc-wdt: add new driver for Siemens Industrial PCs
 
 wmi:
  -  Add no_notify_data flag to struct wmi_driver
  -  Fix driver->notify() vs ->probe() race
  -  Replace read_takes_no_args with a flags field
 
 x86-android-tablets:
  -  Fix GPIO lookup leak on error-exit
  -  Add TM800A550L data
  -  Add Asus MeMO Pad 7 ME176C data
  -  Add Asus TF103C data
  -  Add support for preloading modules
  -  Add support for registering GPIO lookup tables
  -  Add support for instantiating serdevs
  -  Add support for instantiating platform-devs
  -  Add support for PMIC interrupts
  -  Don't return -EPROBE_DEFER from a non probe() function
  -  New driver for x86 Android tablets
 
 x86/platform/uv:
  -  use default_groups in kobj_type
 -----BEGIN PGP SIGNATURE-----
 
 iQFIBAABCAAyFiEEuvA7XScYQRpenhd+kuxHeUQDJ9wFAmHcCbkUHGhkZWdvZWRl
 QHJlZGhhdC5jb20ACgkQkuxHeUQDJ9y3yAf/Xo8TWsnF7XoS3pNCqRcObIulHy6u
 9AOD4gTb0p9LiAd8WN75UsQDew0Rib+UDTS3s6g9l71fMzpTFOD4IaBPrVAmIxpu
 Qs9raFTH67CFid/V3DCwAjPQYxxp5LBGvYJ4oy3OmaYHieV9jdsvNLISlpi/V8wR
 PmbmYtiK5TPZwRT+mknq89D+LynP2NYkvoqRitmB7MrAvxY3c0ssrex6dXMrdgqK
 ehRtfz/ER8xQ03APIzHG+ec73LZsHCMDDG7teas4tiMlMaWGgRO2I8GAudjuPEoy
 mBTSb3ABuEud8LTMgjB+trM2w9IAoFE0L6/OrKE5dK1tPdaLxvCuuSVheQ==
 =tmPR
 -----END PGP SIGNATURE-----

Merge tag 'platform-drivers-x86-v5.17-1' of git://git.kernel.org/pub/scm/linux/kernel/git/pdx86/platform-drivers-x86

Pull x86 platform driver updates from Hans de Goede:
 "Highlights:

  New drivers:
   - asus-tf103c-dock
   - intel_crystal_cove_charger
   - lenovo-yogabook-wmi
   - simatic-ipc platform-code + led driver + watchdog driver
   - x86-android-tablets (kernel module to workaround DSDT bugs on
     these)

  amd-pmc:
   - bug-fixes
   - smar trace buffer support

  asus-wmi:
   - support for custom fan curves

  int3472 (camera info ACPI object for Intel IPU3/SkyCam cameras):
   - ACPI core + int3472 changes to delay enumeration of camera sensor
     I2C clients until the PMIC for the sensor has been fully probed
   - Add support for board data (DSDT info is incomplete) for setting up
     the tps68470 PMIC used on some boards with these cameras
   - Add board data for the Microsoft Surface Go (original, v2 and v3)

  thinkpad_acpi:
   - various cleanups
   - support for forced battery discharging (for battery calibration)
   - support to inhibit battery charging
   - this includes power_supply core changes to add new APIs for this

  think_lmi:
   - enhanced BIOS password support

  various other small fixes and hardware-id additions"

* tag 'platform-drivers-x86-v5.17-1' of git://git.kernel.org/pub/scm/linux/kernel/git/pdx86/platform-drivers-x86: (78 commits)
  power: supply: Provide stubs for charge_behaviour helpers
  platform/x86: x86-android-tablets: Fix GPIO lookup leak on error-exit
  platform/x86: int3472: Add board data for Surface Go 3
  platform/x86: Add Asus TF103C dock driver
  platform/x86: x86-android-tablets: Add TM800A550L data
  platform/x86: x86-android-tablets: Add Asus MeMO Pad 7 ME176C data
  platform/x86: x86-android-tablets: Add Asus TF103C data
  platform/x86: x86-android-tablets: Add support for preloading modules
  platform/x86: x86-android-tablets: Add support for registering GPIO lookup tables
  platform/x86: x86-android-tablets: Add support for instantiating serdevs
  platform/x86: x86-android-tablets: Add support for instantiating platform-devs
  platform/x86: x86-android-tablets: Add support for PMIC interrupts
  platform/x86: x86-android-tablets: Don't return -EPROBE_DEFER from a non probe() function
  platform/x86: touchscreen_dmi: Remove the Glavey TM800A550L entry
  platform/x86: touchscreen_dmi: Enable pen support on the Chuwi Hi10 Plus and Pro
  platform/x86: touchscreen_dmi: Correct min/max values for Chuwi Hi10 Pro (CWI529) tablet
  platform/x86: Add intel_crystal_cove_charger driver
  power: supply: fix charge_behaviour attribute initialization
  platform/x86: intel-uncore-frequency: use default_groups in kobj_type
  x86/platform/uv: use default_groups in kobj_type
  ...
2022-01-11 11:26:57 -08:00
Linus Torvalds
9bcbf894b6 media updates for v5.17-rc1
-----BEGIN PGP SIGNATURE-----
 
 iQIzBAABCAAdFiEE+QmuaPwR3wnBdVwACF8+vY7k4RUFAmHPqrMACgkQCF8+vY7k
 4RUM2g//VzdGU6kq19k7++N7ewGV1VhTnwAXCzdjjMuigdYpTnH/i2fIN/3BS2Mw
 RQVTc3Ys26SGdaKCPsMONKjNwQk62hiaQGW4gwnCZ9Me+hgR3e6z67rJa6XWpKuw
 aH81Z+XFfyn3Oo8qu7jqCABRCWXfKuxs8Vmc8XdcjvrqlREpiQ0c10oXiboeOoWE
 RmVPrnJ94pK8J859dO01cRkDCCo2G9AL9vnBHVA5050VEskSb20+8EmJQDfmkgsO
 Itd6JpCK97QTH5gtF44iO3CDWi5f3x9ODWJkQXJEZRAiKORZkcQUpCOXafQjb2vN
 YgxO86F/sD7XlhZ3V5AjvztZuQPTmnLNcgnrIVUa7iCAWDft1xBIsjQ+BxV9uROe
 g3/Yl6J+Y2Qi+wfAVhCJ94pfA2ZCIoN/+loVi9TQ22X4+tbr6+K4qWu3y1eu9bTW
 TYVD//nUMZz/ljFBAgj4OM6RhtMCqI6c2IB3weOEey5wcR641M0mVHPmzgNo5VMQ
 mFYkRXwrHrbsWWXxRB9yEJKK6P0MsDWAvoD8QBFvaOmqEBr7gG4ET44G76lcFoyD
 Tks4+MZQFQvzas/Xd/GndFlD/T4Cyn+CoPLP1SaP3R01mldoSA39o/cVZlHbZgjI
 8zFnPCAsE2C/w+Oko/vGLQZyyetJ8PzohPmlMy8XPaejYulHQqA=
 =cCwW
 -----END PGP SIGNATURE-----

Merge tag 'media/v5.17-1' of git://git.kernel.org/pub/scm/linux/kernel/git/mchehab/linux-media

Pull media updates from Mauro Carvalho Chehab:

 - New sensor driver: ov5693

 - A new driver for STM32 Chrom-ART Accelerator

 - Added V4L2 core helper functions for VP9 codec

 - Hantro driver has gained support for VP9 codecs

 - Added support for Maxim MAX96712 Quad GMSL2 Deserializer

 - The staging atomisp driver has gained lots of improvements, fixes and
   cleanups. It now works with userptr

 - Lots of random driver improvements as usual

* tag 'media/v5.17-1' of git://git.kernel.org/pub/scm/linux/kernel/git/mchehab/linux-media: (397 commits)
  media: ipu3-cio2: Add support for instantiating i2c-clients for VCMs
  media: ipu3-cio2: Call cio2_bridge_init() before anything else
  media: ipu3-cio2: Defer probing until the PMIC is fully setup
  media: hantro: Add support for Allwinner H6
  media: dt-bindings: allwinner: document H6 Hantro G2 binding
  media: hantro: Convert imx8m_vpu_g2_irq to helper
  media: hantro: move postproc enablement for old cores
  media: hantro: vp9: add support for legacy register set
  media: hantro: vp9: use double buffering if needed
  media: hantro: add support for reset lines
  media: hantro: Fix probe func error path
  media: i2c: hi846: use pm_runtime_force_suspend/resume for system suspend
  media: i2c: hi846: check return value of regulator_bulk_disable()
  media: hi556: Support device probe in non-zero ACPI D state
  media: ov5675: Support device probe in non-zero ACPI D state
  media: imx208: Support device probe in non-zero ACPI D state
  media: ov2740: support device probe in non-zero ACPI D state
  media: ov5670: Support device probe in non-zero ACPI D state
  media: ov8856: support device probe in non-zero ACPI D state
  media: ov8865: Disable only enabled regulators on error path
  ...
2022-01-10 18:55:43 -08:00
Linus Torvalds
8d0749b4f8 drm for 5.17-rc1
core:
 - add privacy screen support
 - move nomodeset option into drm subsystem
 - clean up nomodeset handling in drivers
 - make drm_irq.c legacy
 - fix stack_depot name conflicts
 - remove DMA_BUF_SET_NAME ioctl restrictions
 - sysfs: send hotplug event
 - replace several DRM_* logging macros with drm_*
 - move hashtable to legacy code
 - add error return from gem_create_object
 - cma-helper: improve interfaces, drop CONFIG_DRM_KMS_CMA_HELPER
 - kernel.h related include cleanups
 - support XRGB2101010 source buffers
 
 ttm:
 - don't include drm hashtable
 - stop pruning fences after wait
 - documentation updates
 
 dma-buf:
 - add dma_resv selftest
 - add debugfs helpers
 - remove dma_resv_get_excl_unlocked
 - documentation
 - make fences mandatory in dma_resv_add_excl_fence
 
 dp:
 - add link training delay helpers
 
 gem:
 - link shmem/cma helpers into separate modules
 - use dma_resv iteratior
 - import dma-buf namespace into gem helper modules
 
 scheduler:
 - fence grab fix
 - lockdep fixes
 
 bridge:
 - switch to managed MIPI DSI helpers
 - register and attach during probe fixes
 - convert to YAML in several places.
 
 panel:
 - add bunch of new panesl
 
 simpledrm:
 - support FB_DAMAGE_CLIPS
 - support virtual screen sizes
 - add Apple M1 support
 
 amdgpu:
 - enable seamless boot for DCN 3.01
 - runtime PM fixes
 - use drm_kms_helper_connector_hotplug_event
 - get all fences at once
 - use generic drm fb helpers
 - PSR/DPCD/LTTPR/DSC/PM/RAS/OLED/SRIOV fixes
 - add smart trace buffer (STB) for supported GPUs
 - display debugfs entries
 - new SMU debug option
 - Documentation update
 
 amdkfd:
 - IP discovery enumeration refactor
 - interface between driver fixes
 - SVM fixes
 - kfd uapi header to define some sysfs bitfields.
 
 i915:
 - support VESA panel backlights
 - enable ADL-P by default
 - add eDP privacy screen support
 - add Raptor Lake S (RPL-S) support
 - DG2 page table support
 - lots of GuC/HuC fw refactoring
 - refactored i915->gt interfaces
 - CD clock squashing support
 - enable 10-bit gamma support
 - update ADL-P DMC fw to v2.14
 - enable runtime PM autosuspend by default
 - ADL-P DSI support
 - per-lane DP drive settings for ICL+
 - add support for pipe C/D DMC firmware
 - Atomic gamma LUT updates
 - remove CCS FB stride restrictions on ADL-P
 - VRR platform support for display 11
 - add support for display audio codec keepalive
 - lots of display refactoring
 - fix runtime PM handling during PXP suspend
 - improved eviction performance with async TTM moves
 - async VMA unbinding improvements
 - VMA locking refactoring
 - improved error capture robustness
 - use per device iommu checks
 - drop bits stealing from i915_sw_fence function ptr
 - remove dma_resv_prune
 - add IC cache invalidation on DG2
 
 nouveau:
 - crc fixes
 - validate LUTs in atomic check
 - set HDMI AVI RGB quant to full
 
 tegra:
 - buffer objects reworks for dma-buf compat
 - NVDEC driver uAPI support
 - power management improvements
 
 etnaviv:
 - IOMMU enabled system support
 - fix > 4GB command buffer mapping
 - close a DoS vector
 - fix spurious GPU resets
 
 ast:
 - fix i2c initialization
 
 rcar-du:
 - DSI output support
 
 exynos:
 - replace legacy gpio interface
 - implement generic GEM object mmap
 
 msm:
 - dpu plane state cleanup in prep for multirect
 - dpu debugfs cleanups
 - dp support for sc7280
 - a506 support
 - removal of struct_mutex
 - remove old eDP sub-driver
 
 anx7625:
 - support MIPI DSI input
 - support HDMI audio
 - fix reading EDID
 
 lvds:
 - fix bridge DT bindings
 
 megachips:
 - probe both bridges before registering
 
 dw-hdmi:
 - allow interlace on bridge
 
 ps8640:
 - enable runtime PM
 - support aux-bus
 
 tx358768:
 - enable reference clock
 - add pulse mode support
 
 ti-sn65dsi86:
 - use regmap bulk write
 - add PWM support
 
 etnaviv:
 - get all fences at once
 
 gma500:
 - gem object cleanups
 
 kmb:
 - enable fb console
 
 radeon:
 - use dma_resv_wait_timeout
 
 rockchip:
 - add DSP hold timeout
 - suspend/resume fixes
 - PLL clock fixes
 - implement mmap in GEM object functions
 - use generic fbdev emulation
 
 sun4i:
 - use CMA helpers without vmap support
 
 vc4:
 - fix HDMI-CEC hang with display is off
 - power on HDMI controller while disabling
 - support 4K@60Hz modes
 - support 10-bit YUV 4:2:0 output
 
 vmwgfx:
 - fix leak on probe errors
 - fail probing on broken hosts
 - new placement for MOB page tables
 - hide internal BOs from userspace
 - implement GEM support
 - implement GL 4.3 support
 
 virtio:
 - overflow fixes
 
 xen:
 - implement mmap as GEM object function
 
 omapdrm:
 - fix scatterlist export
 - support virtual planes
 
 mediatek:
 - MT8192 support
 - CMDQ refinement
 -----BEGIN PGP SIGNATURE-----
 
 iQIzBAABCAAdFiEEEKbZHaGwW9KfbeusDHTzWXnEhr4FAmHX1vMACgkQDHTzWXnE
 hr6rAw/9ES5RO5N3Ku9foFk1CI9bqy1Kh663KLkkEc+rDdhKpiZbBnAsrKkZ9sGu
 fNuHmWNN5nWXtDSOqHWuslt3F7Gh+qEBQtlkqC9mZsBm3bWB0aJK6E4QaJxfeSaK
 ta6AmyGx8DaV+C69i86dnemQurYSDVjROd7LDPKnCU0Fye/JxiXSXQmXksKMFVxd
 x5vmO9yfeDSg3EF+u1yB6nJNUYZBV0vhrAfjPqxPCRBXuQc7akuaglE/SFwlGnEk
 vn0GjVHEQcRTqYKrHr64xvQxIoKXcJP0pkDUyT7KYCsyj8GJkvxkb7/ls5pp5DvL
 SwyNg3J3vwUVP6w6GEvzf3ffG720qqUZvCbvLmE+A/t2DhGILiAm+HXSo43PTOW8
 uagT7Gxma8dy8EovjSxioS9HPX8Gcu+S+XYavgOsevOZ7oeEt4f4TLW7LXsw9d6y
 75FrMhiUpreab5hAh8Le0swuLYZHjdnJRdjSTqZJ/T6VdTdVftLT6IfwvSDx5CHy
 cWuufgcAjd7xVTXFquHWYXWLTQkiSMGf1M02jx9IWolTd4Cm41LNBhqMEDHZLHJD
 7ngGgoaREVDQ+MqjG90yfIwJFIpJPI3YOaHLi/Kznga+iDzFY6cyOQWW2vX7ZdY5
 7+LJWsgGT8Feb7/bzD5hX1mYqJLxh1pWUIaqIKMl+7LJL7gTVU8=
 =MByd
 -----END PGP SIGNATURE-----

Merge tag 'drm-next-2022-01-07' of git://anongit.freedesktop.org/drm/drm

Pull drm updates from Dave Airlie:
 "Highlights are support for privacy screens found in new laptops, a
  bunch of nomodeset refactoring, and i915 enables ADL-P systems by
  default, while starting to add RPL-S support.

  vmwgfx adds GEM and support for OpenGL 4.3 features in userspace.

  Lots of internal refactorings around dma reservations, and lots of
  driver refactoring as well.

  Summary:

  core:
   - add privacy screen support
   - move nomodeset option into drm subsystem
   - clean up nomodeset handling in drivers
   - make drm_irq.c legacy
   - fix stack_depot name conflicts
   - remove DMA_BUF_SET_NAME ioctl restrictions
   - sysfs: send hotplug event
   - replace several DRM_* logging macros with drm_*
   - move hashtable to legacy code
   - add error return from gem_create_object
   - cma-helper: improve interfaces, drop CONFIG_DRM_KMS_CMA_HELPER
   - kernel.h related include cleanups
   - support XRGB2101010 source buffers

  ttm:
   - don't include drm hashtable
   - stop pruning fences after wait
   - documentation updates

  dma-buf:
   - add dma_resv selftest
   - add debugfs helpers
   - remove dma_resv_get_excl_unlocked
   - documentation
   - make fences mandatory in dma_resv_add_excl_fence

  dp:
   - add link training delay helpers

  gem:
   - link shmem/cma helpers into separate modules
   - use dma_resv iteratior
   - import dma-buf namespace into gem helper modules

  scheduler:
   - fence grab fix
   - lockdep fixes

  bridge:
   - switch to managed MIPI DSI helpers
   - register and attach during probe fixes
   - convert to YAML in several places.

  panel:
   - add bunch of new panesl

  simpledrm:
   - support FB_DAMAGE_CLIPS
   - support virtual screen sizes
   - add Apple M1 support

  amdgpu:
   - enable seamless boot for DCN 3.01
   - runtime PM fixes
   - use drm_kms_helper_connector_hotplug_event
   - get all fences at once
   - use generic drm fb helpers
   - PSR/DPCD/LTTPR/DSC/PM/RAS/OLED/SRIOV fixes
   - add smart trace buffer (STB) for supported GPUs
   - display debugfs entries
   - new SMU debug option
   - Documentation update

  amdkfd:
   - IP discovery enumeration refactor
   - interface between driver fixes
   - SVM fixes
   - kfd uapi header to define some sysfs bitfields.

  i915:
   - support VESA panel backlights
   - enable ADL-P by default
   - add eDP privacy screen support
   - add Raptor Lake S (RPL-S) support
   - DG2 page table support
   - lots of GuC/HuC fw refactoring
   - refactored i915->gt interfaces
   - CD clock squashing support
   - enable 10-bit gamma support
   - update ADL-P DMC fw to v2.14
   - enable runtime PM autosuspend by default
   - ADL-P DSI support
   - per-lane DP drive settings for ICL+
   - add support for pipe C/D DMC firmware
   - Atomic gamma LUT updates
   - remove CCS FB stride restrictions on ADL-P
   - VRR platform support for display 11
   - add support for display audio codec keepalive
   - lots of display refactoring
   - fix runtime PM handling during PXP suspend
   - improved eviction performance with async TTM moves
   - async VMA unbinding improvements
   - VMA locking refactoring
   - improved error capture robustness
   - use per device iommu checks
   - drop bits stealing from i915_sw_fence function ptr
   - remove dma_resv_prune
   - add IC cache invalidation on DG2

  nouveau:
   - crc fixes
   - validate LUTs in atomic check
   - set HDMI AVI RGB quant to full

  tegra:
   - buffer objects reworks for dma-buf compat
   - NVDEC driver uAPI support
   - power management improvements

  etnaviv:
   - IOMMU enabled system support
   - fix > 4GB command buffer mapping
   - close a DoS vector
   - fix spurious GPU resets

  ast:
   - fix i2c initialization

  rcar-du:
   - DSI output support

  exynos:
   - replace legacy gpio interface
   - implement generic GEM object mmap

  msm:
   - dpu plane state cleanup in prep for multirect
   - dpu debugfs cleanups
   - dp support for sc7280
   - a506 support
   - removal of struct_mutex
   - remove old eDP sub-driver

  anx7625:
   - support MIPI DSI input
   - support HDMI audio
   - fix reading EDID

  lvds:
   - fix bridge DT bindings

  megachips:
   - probe both bridges before registering

  dw-hdmi:
   - allow interlace on bridge

  ps8640:
   - enable runtime PM
   - support aux-bus

  tx358768:
   - enable reference clock
   - add pulse mode support

  ti-sn65dsi86:
   - use regmap bulk write
   - add PWM support

  etnaviv:
   - get all fences at once

  gma500:
   - gem object cleanups

  kmb:
   - enable fb console

  radeon:
   - use dma_resv_wait_timeout

  rockchip:
   - add DSP hold timeout
   - suspend/resume fixes
   - PLL clock fixes
   - implement mmap in GEM object functions
   - use generic fbdev emulation

  sun4i:
   - use CMA helpers without vmap support

  vc4:
   - fix HDMI-CEC hang with display is off
   - power on HDMI controller while disabling
   - support 4K@60Hz modes
   - support 10-bit YUV 4:2:0 output

  vmwgfx:
   - fix leak on probe errors
   - fail probing on broken hosts
   - new placement for MOB page tables
   - hide internal BOs from userspace
   - implement GEM support
   - implement GL 4.3 support

  virtio:
   - overflow fixes

  xen:
   - implement mmap as GEM object function

  omapdrm:
   - fix scatterlist export
   - support virtual planes

  mediatek:
   - MT8192 support
   - CMDQ refinement"

* tag 'drm-next-2022-01-07' of git://anongit.freedesktop.org/drm/drm: (1241 commits)
  drm/amdgpu: no DC support for headless chips
  drm/amd/display: fix dereference before NULL check
  drm/amdgpu: always reset the asic in suspend (v2)
  drm/amdgpu: put SMU into proper state on runpm suspending for BOCO capable platform
  drm/amd/display: Fix the uninitialized variable in enable_stream_features()
  drm/amdgpu: fix runpm documentation
  amdgpu/pm: Make sysfs pm attributes as read-only for VFs
  drm/amdgpu: save error count in RAS poison handler
  drm/amdgpu: drop redundant semicolon
  drm/amd/display: get and restore link res map
  drm/amd/display: support dynamic HPO DP link encoder allocation
  drm/amd/display: access hpo dp link encoder only through link resource
  drm/amd/display: populate link res in both detection and validation
  drm/amd/display: define link res and make it accessible to all link interfaces
  drm/amd/display: 3.2.167
  drm/amd/display: [FW Promotion] Release 0.0.98
  drm/amd/display: Undo ODM combine
  drm/amd/display: Add reg defs for DCN303
  drm/amd/display: Changed pipe split policy to allow for multi-display pipe split
  drm/amd/display: Set optimize_pwr_state for DCN31
  ...
2022-01-10 12:58:46 -08:00
Hans de Goede
02fb094594 platform/x86: x86-android-tablets: Fix GPIO lookup leak on error-exit
Fix leaking the registered gpiod_lookup tables when the kcalloc() for the
i2c_clients array fails.

Fixes: ef2ac11493 ("platform/x86: x86-android-tablets: Add support for registering GPIO lookup tables")
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Link: https://lore.kernel.org/r/20220108154947.136593-1-hdegoede@redhat.com
2022-01-08 16:56:01 +01:00
Daniel Scally
62ac88a7b4 platform/x86: int3472: Add board data for Surface Go 3
The Surface Go 3 needs some board data in order to configure the
TPS68470 PMIC - add entries to the tables in tps68470_board_data.c
that define the configuration that's needed.

Signed-off-by: Daniel Scally <djrscally@gmail.com>
Link: https://lore.kernel.org/r/20220106232045.41291-1-djrscally@gmail.com
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
2022-01-08 16:55:21 +01:00
Hans de Goede
0a6509b092 platform/x86: Add Asus TF103C dock driver
Add a driver for the keyboard, touchpad and USB port of
the keyboard dock for the Asus TF103C 2-in-1 tablet.

This keyboard dock has its own I2C attached embedded controller
and the keyboard and touchpad are also connected over I2C,
instead of using the usual USB connection. This means that the
keyboard dock requires this special driver to function.

Cc: Michał Mirosław <mirq-linux@rere.qmqm.pl>
Cc: Ion Agorria <ion@agorria.com>
Cc: Svyatoslav Ryhel <clamor95@gmail.com>
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Link: https://lore.kernel.org/r/20211226141849.156407-1-hdegoede@redhat.com
2022-01-05 12:06:19 +01:00
Hans de Goede
b40082d0b0 platform/x86: x86-android-tablets: Add TM800A550L data
The whitelabel (sold as various brands) TM800A550L tablets's DSDT contains
a whole bunch of bogus ACPI I2C devices and the ACPI node describing
the touchscreen is bad (the IRQ is missing). Enumeration of these is
skipped through the acpi_quirk_skip_i2c_client_enumeration().

Add support for manually instantiating the (now) missing I2C devices by
adding the necessary device info to the x86-android-tablets module,
including instantiating an actually working i2c-client for
the touchscreen.

Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Link: https://lore.kernel.org/r/20211229231431.437982-13-hdegoede@redhat.com
2022-01-05 11:31:19 +01:00
Hans de Goede
f359c40bf8 platform/x86: x86-android-tablets: Add Asus MeMO Pad 7 ME176C data
Asus MeMO Pad 7 ME176C tablets have an Android factory img with everything
hardcoded in the kernel instead of properly described in the DSDT.

Add support for manually instantiating all the missing I2C devices by
adding the necessary device info to the x86-android-tablets module.

Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Link: https://lore.kernel.org/r/20211229231431.437982-12-hdegoede@redhat.com
2022-01-05 11:31:19 +01:00
Hans de Goede
29272d6424 platform/x86: x86-android-tablets: Add Asus TF103C data
Asus TF103C tablets have an Android factory img with everything hardcoded
in the kernel instead of properly described in the DSDT.

Add support for manually instantiating all the missing I2C devices by
adding the necessary device info to the x86-android-tablets module.

Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Link: https://lore.kernel.org/r/20211229231431.437982-11-hdegoede@redhat.com
2022-01-05 11:31:19 +01:00
Hans de Goede
f08aebe9af platform/x86: x86-android-tablets: Add support for preloading modules
Since the x86-android-tablets code does all it work from module_init() it
cannot use -EPROBE_DEFER to wait for e.g. interrupt providing GPIO-chips
or PMIC-cells to show up.

To make sure things will still work when some necessary resource providers
are build as module allow the per board info to specify a list of modules
to pre-load before instantiating the I2C clients.

Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Link: https://lore.kernel.org/r/20211229231431.437982-10-hdegoede@redhat.com
2022-01-05 11:31:19 +01:00
Hans de Goede
ef2ac11493 platform/x86: x86-android-tablets: Add support for registering GPIO lookup tables
Add support for registering GPIO lookup tables.

Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Link: https://lore.kernel.org/r/20211229231431.437982-9-hdegoede@redhat.com
2022-01-05 11:31:19 +01:00
Hans de Goede
c2138b25d5 platform/x86: x86-android-tablets: Add support for instantiating serdevs
Add support for instantiating serdevs, this is necessary on some boards
where the serdev info in the DSDT has issues.

Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Link: https://lore.kernel.org/r/20211229231431.437982-8-hdegoede@redhat.com
2022-01-05 11:31:19 +01:00
Hans de Goede
5eba014120 platform/x86: x86-android-tablets: Add support for instantiating platform-devs
Add support for instantiating platform-devs, note this also makes some
small changes to the i2c_client instantiating code to make the 2 flows
identical.

Specifically for the pdevs flow pdev_count must only be set after
allocating the pdevs array, to avoid a NULL ptr deref in
x86_android_tablet_cleanup() and the i2c_clients flow is updated
to work the same way.

Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Link: https://lore.kernel.org/r/20211229231431.437982-7-hdegoede@redhat.com
2022-01-05 11:31:18 +01:00
Hans de Goede
cd26465fbc platform/x86: x86-android-tablets: Add support for PMIC interrupts
The Crystal Cove PMIC has a pin which can be used to connect the IRQ of
an external charger IC. On some boards this is used so we need a way to
look this up.

Note that the Intel PMICs have 2 levels of interrupts and thus
2 levels of IRQ domains all tied to a single fwnode.

Level 1 is the irqchip which demultiplexes the actual PMIC interrupt into
interrupts for the various MFD cells. Level 2 are the irqchips used in the
cell drivers which themselves export IRQs, such as the crystal_cove_gpio
driver, which de-multiplexes the level 2 interrupts for the GPIOs into
individual per GPIO IRQs.

The crystal_cove_charger driver registers an irqchip with a single IRQ for
the charger driver to consume. Note the MFD cell IRQ cannot be consumed
directly because the level 2 interrupts must be explicitly acked.

To allow finding the right IRQ domain when looking up the IRQ for
the charger, the crystal_cove_charger driver sets a DOMAIN_BUS_WIRED token
on its IRQ domain.

Add support for looking up the IRQ from the crystal_cove_charger driver.

Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Link: https://lore.kernel.org/r/20211229231431.437982-6-hdegoede@redhat.com
2022-01-05 11:31:18 +01:00
Hans de Goede
fc64a2b216 platform/x86: x86-android-tablets: Don't return -EPROBE_DEFER from a non probe() function
The x86-android-tablets code all runs from module_init, so returning
-EPROBE_DEFER is not appropriate. Instead log an error and bail.

This path should never get hit since PINCTRL_BAYTRAIL is a bool.

Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Link: https://lore.kernel.org/r/20211229231431.437982-5-hdegoede@redhat.com
2022-01-05 11:31:18 +01:00
Hans de Goede
7a4af4b891 platform/x86: touchscreen_dmi: Remove the Glavey TM800A550L entry
The Glavey TM800A550L tablet is a tablet which ships with Android as
factory OS. As such it has the typical broken DSDT which x86 Android
tablets tend to have.

Specifically the touchscreen ACPI device node is missing the IRQ for
the touchscreen. So far users were expected to fix this with a DSDT
overlay, but support for the TM800A550L has been added to the new
x86-android-modules kernel-module and that will now automatically
instantiate a proper i2c-client with the IRQ set for the touchscreen,
including the necessary device-properties for the firmware loading.

This means that the touchscreen_dmi entry for the TM800A550L is
no longer necessary (and it no longer matches either since the
touchscreen is no longer enumerated through ACPI), remove it.

Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Link: https://lore.kernel.org/r/20220103112700.111414-1-hdegoede@redhat.com
2022-01-05 11:31:18 +01:00
Hans de Goede
bfe92170c9 platform/x86: touchscreen_dmi: Enable pen support on the Chuwi Hi10 Plus and Pro
Both the Chuwi Hi10 Plus (CWI527) and the Chuwi Hi10 Pro (CWI529) tablets
support being used together with the Hi H2 pen.

Add the necessary properties to enable the new support for this in the
silead touchscreen driver.

Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Link: https://lore.kernel.org/r/20211225120247.95380-2-hdegoede@redhat.com
2022-01-05 11:31:18 +01:00
Hans de Goede
16bbe382bb platform/x86: touchscreen_dmi: Correct min/max values for Chuwi Hi10 Pro (CWI529) tablet
The firmware distributed as part of the Windows and Android drivers uses
significantly different min and max values for the x- and y-axis,
compared to the EFI's embedded touchscreen firmware.

The difference is large enough that e.g. typing on an onscreen keyboard
results in the wrong "keys" getting pressed.

Adjust the values to match those of the firmware distributed with the
Windows and Android drivers (which is necessary for pen support) and
put the EFI-fw version's min/max values in the new "silead,efi-fw-min-max"
property. The silead driver will use these when it is using the
EFI embedded firmware, so as to not regress functionality in that case.

Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Link: https://lore.kernel.org/r/20211225120247.95380-1-hdegoede@redhat.com
2022-01-05 11:31:18 +01:00
Hans de Goede
761db353d9 platform/x86: Add intel_crystal_cove_charger driver
Driver for the external-charger IRQ pass-through function of the
Intel Bay Trail Crystal Cove PMIC.

Note this is NOT a power_supply class driver, it just deals with IRQ
pass-through, this requires this separate driver because the PMIC's
level 2 interrupt for this must be explicitly acked.

This new driver gets enabled by the existing X86_ANDROID_TABLETS Kconfig
option because the x86-android-tablets module is the only consumer of the
exported external-charger IRQ.

Reviewed-by: Andy Shevchenko <andy.shevchenko@gmail.com>
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Link: https://lore.kernel.org/r/20211225115509.94891-5-hdegoede@redhat.com
2022-01-05 11:31:18 +01:00
Yang Yingliang
a029ccc810 MIPS: Loongson64: Add missing of_node_put() in ls2k_reset_init()
This node pointer is returned by of_find_compatible_node() with
refcount incremented in ls2k_reset_init(). Calling of_node_put()
to aovid the refcount leak.

Fixes: 7eb7819a2e ("MIPS: Loongson64: Add Loongson-2K1000 reset platform driver")
Reported-by: Hulk Robot <hulkci@huawei.com>
Signed-off-by: Yang Yingliang <yangyingliang@huawei.com>
Signed-off-by: Thomas Bogendoerfer <tsbogend@alpha.franken.de>
2022-01-05 09:53:45 +01:00
Qing Zhang
7eb7819a2e MIPS: Loongson64: Add Loongson-2K1000 reset platform driver
Add power management register operations to support reboot and poweroff.

Signed-off-by: Qing Zhang <zhangqing@loongson.cn>
Signed-off-by: Thomas Bogendoerfer <tsbogend@alpha.franken.de>
2022-01-02 14:13:09 +01:00
Greg Kroah-Hartman
998e7ea8c6 platform/x86: intel-uncore-frequency: use default_groups in kobj_type
There are currently 2 ways to create a set of sysfs files for a
kobj_type, through the default_attrs field, and the default_groups
field.  Move the uncore-frequency sysfs code to use default_groups field
which has been the preferred way since aa30f47cf6 ("kobject: Add
support for default attribute groups to kobj_type") so that we can soon
get rid of the obsolete default_attrs field.

Cc: Srinivas Pandruvada <srinivas.pandruvada@linux.intel.com>
Cc: Hans de Goede <hdegoede@redhat.com>
Cc: Mark Gross <markgross@kernel.org>
Cc: platform-driver-x86@vger.kernel.org
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Link: https://lore.kernel.org/r/20211229141454.2552950-1-gregkh@linuxfoundation.org
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
2021-12-30 19:32:24 +01:00
Greg Kroah-Hartman
afca4cbe3a x86/platform/uv: use default_groups in kobj_type
There are currently 2 ways to create a set of sysfs files for a
kobj_type, through the default_attrs field, and the default_groups
field.  Move the uv sysfs code to use default_groups field which has
been the preferred way since aa30f47cf6 ("kobject: Add support for
default attribute groups to kobj_type") so that we can soon get rid of
the obsolete default_attrs field.

Cc: Justin Ernst <justin.ernst@hpe.com>
Cc: Hans de Goede <hdegoede@redhat.com>
Cc: Mark Gross <markgross@kernel.org>
Cc: platform-driver-x86@vger.kernel.org
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Link: https://lore.kernel.org/r/20211229141332.2552428-1-gregkh@linuxfoundation.org
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
2021-12-30 19:32:23 +01:00
Hans de Goede
55fa3c9665 platform/x86: x86-android-tablets: New driver for x86 Android tablets
x86 tablets which ship with Android as (part of) the factory image
typically have various problems with their DSDTs. The factory kernels
shipped on these devices typically have device addresses and GPIOs
hardcoded in the kernel, rather then specified in their DSDT.

With the DSDT containing a random collection of devices which may or
may not actually be present as well as missing devices which are
actually present.

This driver, which loads only on affected models based on DMI matching,
adds DMI based instantiating of kernel devices for devices which are
missing from the DSDT, fixing e.g. battery monitoring, touchpads and/or
accelerometers not working.

Note the Kconfig help text also refers to "various fixes" ATM there are
no such fixes, but there are also known cases where entries are present
in the DSDT but they contain bugs, such as missing/wrong GPIOs. The plan
is to also add fixes for things like this here in the future.

This is the least ugly option to get these devices to fully work and to
do so without adding any extra code to the main kernel image (vmlinuz)
when built as a module.

Link: https://lore.kernel.org/platform-driver-x86/20211031162428.22368-1-hdegoede@redhat.com/
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Link: https://lore.kernel.org/r/20211223190750.397487-1-hdegoede@redhat.com
2021-12-25 12:41:06 +01:00
Linus Torvalds
c8831184c5 platform-drivers-x86 for v5.16-4
Various bug-fixes.
 
 The following is an automated git shortlog grouped by driver:
 
 amd-pmc:
  -  only use callbacks for suspend
 
 apple-gmux:
  -  use resource_size() with res
 
 intel_pmc_core:
  -  fix memleak on registration failure
 
 platform/mellanox:
  -  mlxbf-pmc: Fix an IS_ERR() vs NULL bug in mlxbf_pmc_map_counters
 
 platform/x86/intel:
  -  Remove X86_PLATFORM_DRIVERS_INTEL
 
 system76_acpi:
  -  Guard System76 EC specific functionality
 -----BEGIN PGP SIGNATURE-----
 
 iQFIBAABCAAyFiEEuvA7XScYQRpenhd+kuxHeUQDJ9wFAmHFrasUHGhkZWdvZWRl
 QHJlZGhhdC5jb20ACgkQkuxHeUQDJ9xjFwf+JXu2sjXMSa8u789EVr1bba7ZcuSm
 PHnEDLrCyOOMsvEMNQ2p0OQt0kVvMrRwMt5K1q7MKCUsLZVif9Sey6UoQ/jlOKNK
 pfwaodIkB32XVBVW5Wl+moiscO1btsaJ4an8giZ1ksmKZ5+w15FccJO9GfQHnc6c
 ugIUBXAdgGMoB9bIUuMoSOFtvPJa9i2d2ltEKYI7xsUsmizbBRfNkbij8F/pcHrk
 NMzk6ea6neTv3J+xPtweofxpMe+L243JpWJfJfE+xUrAix1lmc955uVUwalscq2g
 s6kRsK19vcgVoKjiNsnEDYEBnVJvh0+IFEFwntPw42p37kOVX9t/nON3sg==
 =8LDR
 -----END PGP SIGNATURE-----

Merge tag 'platform-drivers-x86-v5.16-4' of git://git.kernel.org/pub/scm/linux/kernel/git/pdx86/platform-drivers-x86

Pull x86 platform driver fixes from Hans de Goede:
 "Various bug-fixes"

* tag 'platform-drivers-x86-v5.16-4' of git://git.kernel.org/pub/scm/linux/kernel/git/pdx86/platform-drivers-x86:
  platform/x86: intel_pmc_core: fix memleak on registration failure
  platform/x86/intel: Remove X86_PLATFORM_DRIVERS_INTEL
  platform/x86: system76_acpi: Guard System76 EC specific functionality
  platform/x86: apple-gmux: use resource_size() with res
  platform/x86: amd-pmc: only use callbacks for suspend
  platform/mellanox: mlxbf-pmc: Fix an IS_ERR() vs NULL bug in mlxbf_pmc_map_counters
2021-12-24 08:58:23 -08:00
Johan Hovold
26a8b09437 platform/x86: intel_pmc_core: fix memleak on registration failure
In case device registration fails during module initialisation, the
platform device structure needs to be freed using platform_device_put()
to properly free all resources (e.g. the device name).

Fixes: 938835aa90 ("platform/x86: intel_pmc_core: do not create a static struct device")
Cc: stable@vger.kernel.org      # 5.9
Signed-off-by: Johan Hovold <johan@kernel.org>
Reviewed-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Link: https://lore.kernel.org/r/20211222105023.6205-1-johan@kernel.org
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
2021-12-23 19:30:32 +01:00
Johan Hovold
7c4f5cd18c platform/x86: intel_pmc_core: fix memleak on registration failure
In case device registration fails during module initialisation, the
platform device structure needs to be freed using platform_device_put()
to properly free all resources (e.g. the device name).

Fixes: 938835aa90 ("platform/x86: intel_pmc_core: do not create a static struct device")
Cc: stable@vger.kernel.org      # 5.9
Signed-off-by: Johan Hovold <johan@kernel.org>
Reviewed-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Link: https://lore.kernel.org/r/20211222105023.6205-1-johan@kernel.org
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
2021-12-23 19:29:18 +01:00
Henning Schild
4ba0b8187d platform/x86: pmc_atom: improve critclk_systems matching for Siemens PCs
Siemens industrial PCs unfortunately can not always be properly
identified the way we used to. An earlier commit introduced code that
allows proper identification without looking at DMI strings that could
differ based on product branding.
Switch over to that proper way and revert commits that used to collect
the machines based on unstable strings.

Fixes: 648e921888 ("clk: x86: Stop marking clocks as CLK_IS_CRITICAL")
Fixes: e8796c6c69 ("platform/x86: pmc_atom: Add Siemens CONNECT ...")
Fixes: f110d252ae ("platform/x86: pmc_atom: Add Siemens SIMATIC ...")
Fixes: ad0d315b4d ("platform/x86: pmc_atom: Add Siemens SIMATIC ...")
Tested-by: Michael Haener <michael.haener@siemens.com>
Signed-off-by: Henning Schild <henning.schild@siemens.com>
Link: https://lore.kernel.org/r/20211213120502.20661-5-henning.schild@siemens.com
Reviewed-by: Hans de Goede <hdegoede@redhat.com>
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
2021-12-23 18:09:41 +01:00
Henning Schild
dd123e62bd platform/x86: simatic-ipc: add main driver for Siemens devices
This mainly implements detection of these devices and will allow
secondary drivers to work on such machines.

The identification is DMI-based with a vendor specific way to tell them
apart in a reliable way.

Drivers for LEDs and Watchdogs will follow to make use of that platform
detection.

There is also some code to allow secondary drivers to find GPIO memory,
that needs to be in place because the pinctrl drivers do not come up.

Signed-off-by: Henning Schild <henning.schild@siemens.com>
Link: https://lore.kernel.org/r/20211213120502.20661-2-henning.schild@siemens.com
Reviewed-by: Hans de Goede <hdegoede@redhat.com>
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
2021-12-23 18:09:06 +01:00
Andy Shevchenko
4f6c131c3c platform/x86/intel: Remove X86_PLATFORM_DRIVERS_INTEL
While introduction of this menu brings a nice view in the configuration tools,
it brought more issues than solves, i.e. it prevents to locate files in the
intel/ subfolder without touching non-related Kconfig dependencies elsewhere.
Drop X86_PLATFORM_DRIVERS_INTEL altogether.

Note, on x86 it's enabled by default and it's quite unlikely anybody wants to
disable all of the modules in this submenu.

Fixes: 8bd836feb6 ("platform/x86: intel_skl_int3472: Move to intel/ subfolder")
Suggested-by: Hans de Goede <hdegoede@redhat.com>
Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Link: https://lore.kernel.org/r/20211222194941.76054-1-andriy.shevchenko@linux.intel.com
Reviewed-by: Hans de Goede <hdegoede@redhat.com>
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
2021-12-23 17:26:34 +01:00
Tim Crawford
c449927256 platform/x86: system76_acpi: Guard System76 EC specific functionality
Certain functionality or its implementation in System76 EC firmware may
be different to the proprietary ODM EC firmware. Introduce a new bool,
`has_open_ec`, to guard our specific logic. Detect the use of this by
looking for a custom ACPI method name used in System76 firmware.

Signed-off-by: Tim Crawford <tcrawford@system76.com>
Link: https://lore.kernel.org/r/20211222185154.4560-1-tcrawford@system76.com
Reviewed-by: Hans de Goede <hdegoede@redhat.com>
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
2021-12-23 17:26:28 +01:00
Andy Shevchenko
c0518b21fb platform/x86/intel: Remove X86_PLATFORM_DRIVERS_INTEL
While introduction of this menu brings a nice view in the configuration tools,
it brought more issues than solves, i.e. it prevents to locate files in the
intel/ subfolder without touching non-related Kconfig dependencies elsewhere.
Drop X86_PLATFORM_DRIVERS_INTEL altogether.

Note, on x86 it's enabled by default and it's quite unlikely anybody wants to
disable all of the modules in this submenu.

Fixes: 8bd836feb6 ("platform/x86: intel_skl_int3472: Move to intel/ subfolder")
Suggested-by: Hans de Goede <hdegoede@redhat.com>
Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Link: https://lore.kernel.org/r/20211222194941.76054-1-andriy.shevchenko@linux.intel.com
Reviewed-by: Hans de Goede <hdegoede@redhat.com>
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
2021-12-23 17:21:58 +01:00
Tim Crawford
ba8cfebd9d platform/x86: system76_acpi: Guard System76 EC specific functionality
Certain functionality or its implementation in System76 EC firmware may
be different to the proprietary ODM EC firmware. Introduce a new bool,
`has_open_ec`, to guard our specific logic. Detect the use of this by
looking for a custom ACPI method name used in System76 firmware.

Signed-off-by: Tim Crawford <tcrawford@system76.com>
Link: https://lore.kernel.org/r/20211222185154.4560-1-tcrawford@system76.com
Reviewed-by: Hans de Goede <hdegoede@redhat.com>
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
2021-12-23 17:21:47 +01:00
David E. Box
a3c8f906ed platform/x86/intel: Move intel_pmt from MFD to Auxiliary Bus
Intel Platform Monitoring Technology (PMT) support is indicated by presence
of an Intel defined PCIe Designated Vendor Specific Extended Capabilities
(DVSEC) structure with a PMT specific ID. The current MFD implementation
creates child devices for each PMT feature, currently telemetry, watcher,
and crashlog. However DVSEC structures may also be used by Intel to
indicate support for other features. The Out Of Band Management Services
Module (OOBMSM) uses DVSEC to enumerate several features, including PMT.
In order to support them it is necessary to modify the intel_pmt driver to
handle the creation of the child devices more generically. To that end,
modify the driver to create child devices for any VSEC/DVSEC features on
supported devices (indicated by PCI ID).  Additionally, move the
implementation from MFD to the Auxiliary bus.  VSEC/DVSEC features are
really multifunctional PCI devices, not platform devices as MFD was
designed for. Auxiliary bus gives more flexibility by allowing the
definition of custom structures that can be shared between associated
auxiliary devices and the parent device. Also, rename the driver from
intel_pmt to intel_vsec to better reflect the purpose.

This series also removes the current runtime pm support which was not
complete to begin with. None of the current devices require runtime pm.
However the support will be replaced when a device is added that requires
it.

Reviewed-by: Mark Gross <markgross@kernel.org>
Acked-by: Hans de Goede <hdegoede@redhat.com>
Signed-off-by: David E. Box <david.e.box@linux.intel.com>
Link: https://lore.kernel.org/r/20211208015015.891275-4-david.e.box@linux.intel.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2021-12-22 13:56:19 +01:00
Andy Shevchenko
c545a70dd2 platform/x86: asus-wmi: Reshuffle headers for better maintenance
Reshuffle headers in alphabetical order for better maintenance.

Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Link: https://lore.kernel.org/r/20211210163009.19894-3-andriy.shevchenko@linux.intel.com
Reviewed-by: Hans de Goede <hdegoede@redhat.com>
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
2021-12-21 19:40:56 +01:00
Andy Shevchenko
522fbca4f7 platform/x86: asus-wmi: Split MODULE_AUTHOR() on per author basis
There are as many as needed MODULE_AUTHOR() macro entries allowed
in the single driver. Split author list to a few macro entries.

Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Link: https://lore.kernel.org/r/20211210163009.19894-2-andriy.shevchenko@linux.intel.com
Reviewed-by: Hans de Goede <hdegoede@redhat.com>
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
2021-12-21 19:40:51 +01:00
Andy Shevchenko
3ac7bf0d47 platform/x86: asus-wmi: Join string literals back
For easy grepping on debug purposes join string literals back in
the messages.

No functional change.

Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Link: https://lore.kernel.org/r/20211210163009.19894-1-andriy.shevchenko@linux.intel.com
Reviewed-by: Hans de Goede <hdegoede@redhat.com>
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
2021-12-21 19:40:36 +01:00
Wang Qing
eb66fb03a7 platform/x86: apple-gmux: use resource_size() with res
This should be (res->end - res->start + 1) here actually,
use resource_size() derectly.

Signed-off-by: Wang Qing <wangqing@vivo.com>
Link: https://lore.kernel.org/r/1639484316-75873-1-git-send-email-wangqing@vivo.com
Reviewed-by: Hans de Goede <hdegoede@redhat.com>
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
2021-12-21 19:35:33 +01:00
Mario Limonciello
09fc14061f platform/x86: amd-pmc: only use callbacks for suspend
This driver is intended to be used exclusively for suspend to idle
so callbacks to send OS_HINT during hibernate and S5 will set OS_HINT
at the wrong time leading to an undefined behavior.

Cc: stable@vger.kernel.org
Signed-off-by: Mario Limonciello <mario.limonciello@amd.com>
Link: https://lore.kernel.org/r/20211210143529.10594-1-mario.limonciello@amd.com
Reviewed-by: Hans de Goede <hdegoede@redhat.com>
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
2021-12-21 19:35:27 +01:00
Miaoqian Lin
804034c4ff platform/mellanox: mlxbf-pmc: Fix an IS_ERR() vs NULL bug in mlxbf_pmc_map_counters
The devm_ioremap() function returns NULL on error, it doesn't return
error pointers. Also according to doc of device_property_read_u64_array,
values in info array are properties of device or NULL.

Signed-off-by: Miaoqian Lin <linmq006@gmail.com>
Link: https://lore.kernel.org/r/20211210070753.10761-1-linmq006@gmail.com
Reviewed-by: Hans de Goede <hdegoede@redhat.com>
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
2021-12-21 19:35:22 +01:00
Dan Carpenter
72e4d07d94 platform/x86: think-lmi: Prevent underflow in index_store()
There needs to be a check to prevent negative offsets for
setting->index.  I have reviewed this code and I think that the
"if (block->instance_count <= instance)" check in __query_block() will
prevent this from resulting in an out of bounds access.  But it's
still worth fixing.

Fixes: 640a5fa50a ("platform/x86: think-lmi: Opcode support")
Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Link: https://lore.kernel.org/r/20211217071209.GF26548@kili
Reviewed-by: Hans de Goede <hdegoede@redhat.com>
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
2021-12-21 18:57:14 +01:00
Wang Qing
855045873b platform/x86: apple-gmux: use resource_size() with res
This should be (res->end - res->start + 1) here actually,
use resource_size() derectly.

Signed-off-by: Wang Qing <wangqing@vivo.com>
Link: https://lore.kernel.org/r/1639484316-75873-1-git-send-email-wangqing@vivo.com
Reviewed-by: Hans de Goede <hdegoede@redhat.com>
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
2021-12-21 18:53:03 +01:00
Mario Limonciello
d386f7ef9f platform/x86: amd-pmc: only use callbacks for suspend
This driver is intended to be used exclusively for suspend to idle
so callbacks to send OS_HINT during hibernate and S5 will set OS_HINT
at the wrong time leading to an undefined behavior.

Cc: stable@vger.kernel.org
Signed-off-by: Mario Limonciello <mario.limonciello@amd.com>
Link: https://lore.kernel.org/r/20211210143529.10594-1-mario.limonciello@amd.com
Reviewed-by: Hans de Goede <hdegoede@redhat.com>
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
2021-12-21 18:52:36 +01:00
Miaoqian Lin
cfc643aa23 platform/mellanox: mlxbf-pmc: Fix an IS_ERR() vs NULL bug in mlxbf_pmc_map_counters
The devm_ioremap() function returns NULL on error, it doesn't return
error pointers. Also according to doc of device_property_read_u64_array,
values in info array are properties of device or NULL.

Signed-off-by: Miaoqian Lin <linmq006@gmail.com>
Link: https://lore.kernel.org/r/20211210070753.10761-1-linmq006@gmail.com
Reviewed-by: Hans de Goede <hdegoede@redhat.com>
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
2021-12-21 18:52:26 +01:00
Sanket Goswami
426c0ff27b platform/x86: amd-pmc: Add support for AMD Smart Trace Buffer
STB (Smart Trace Buffer), is a debug trace buffer that isolates the
failures by analyzing the last running feature of a system. This
non-intrusive way always runs in the background and stores the trace
into the SoC.

This patch enables the STB feature by passing module param
"enable_stb=1" while loading the driver and provides mechanism to
access the STB buffer using the read and write routines.

Co-developed-by: Shyam Sundar S K <Shyam-sundar.S-k@amd.com>
Signed-off-by: Shyam Sundar S K <Shyam-sundar.S-k@amd.com>
Signed-off-by: Sanket Goswami <Sanket.Goswami@amd.com>
Link: https://lore.kernel.org/r/20211130112318.92850-3-Sanket.Goswami@amd.com
Reviewed-by: Hans de Goede <hdegoede@redhat.com>
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
2021-12-21 18:48:01 +01:00
Sanket Goswami
6a5a14b189 platform/x86: amd-pmc: Simplify error handling and store the pci_dev in amd_pmc_dev structure
Handle error-exits in the amd_pmc_probe() to avoid duplication and store
the root port information in amd_pmc_probe() so that the information
can be used across multiple routines.

Suggested-by: Hans de Goede <hdegoede@redhat.com>
Signed-off-by: Sanket Goswami <Sanket.Goswami@amd.com>
Link: https://lore.kernel.org/r/20211130112318.92850-2-Sanket.Goswami@amd.com
Reviewed-by: Hans de Goede <hdegoede@redhat.com>
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
2021-12-21 18:47:57 +01:00
Thomas Weißschuh
400cffd5f4 platform/x86: thinkpad_acpi: support inhibit-charge
This adds support for the inhibit-charge charge_behaviour through the
embedded controller of ThinkPads.

Co-developed-by: Thomas Koch <linrunner@gmx.net>
Signed-off-by: Thomas Koch <linrunner@gmx.net>
Co-developed-by: Nicolò Piazzalunga <nicolopiazzalunga@gmail.com>
Signed-off-by: Nicolò Piazzalunga <nicolopiazzalunga@gmail.com>
Signed-off-by: Thomas Weißschuh <linux@weissschuh.net>
Acked-by: Sebastian Reichel <sebastian.reichel@collabora.com>
Link: https://lore.kernel.org/r/20211123232704.25394-5-linux@weissschuh.net
Reviewed-by: Hans de Goede <hdegoede@redhat.com>
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
2021-12-21 16:28:02 +01:00