Commit 5de691bf authored by Daniel Scally's avatar Daniel Scally Committed by Hans de Goede
Browse files

platform/x86: Add intel_skl_int3472 driver



ACPI devices with _HID INT3472 are currently matched to the tps68470
driver, however this does not cover all situations in which that _HID
occurs. We've encountered three possibilities:

1. On Chrome OS devices, an ACPI device with _HID INT3472 (representing
a physical TPS68470 device) that requires a GPIO and OpRegion driver
2. On devices designed for Windows, an ACPI device with _HID INT3472
(again representing a physical TPS68470 device) which requires GPIO,
Clock and Regulator drivers.
3. On other devices designed for Windows, an ACPI device with _HID
INT3472 which does **not** represent a physical TPS68470, and is instead
used as a dummy device to group some system GPIO lines which are meant
to be consumed by the sensor that is dependent on this entry.

This commit adds a new module, registering a platform driver to deal
with the 3rd scenario plus an i2c driver to deal with #1 and #2, by
querying the CLDB buffer found against INT3472 entries to determine
which is most appropriate.

Suggested-by: default avatarLaurent Pinchart <laurent.pinchart@ideasonboard.com>
Signed-off-by: default avatarDaniel Scally <djrscally@gmail.com>
Link: https://lore.kernel.org/r/20210603224007.120560-6-djrscally@gmail.com


[hdegoede@redhat.com Make skl_int3472_tps68470_calc_type() static]
Signed-off-by: default avatarHans de Goede <hdegoede@redhat.com>
parent c8d9c367
Loading
Loading
Loading
Loading
+5 −0
Original line number Diff line number Diff line
@@ -9385,6 +9385,11 @@ S: Maintained
F:	arch/x86/include/asm/intel_scu_ipc.h
F:	drivers/platform/x86/intel_scu_*
INTEL SKYLAKE INT3472 ACPI DEVICE DRIVER
M:	Daniel Scally <djrscally@gmail.com>
S:	Maintained
F:	drivers/platform/x86/intel-int3472/
INTEL SPEED SELECT TECHNOLOGY
M:	Srinivas Pandruvada <srinivas.pandruvada@linux.intel.com>
L:	platform-driver-x86@vger.kernel.org
+2 −0
Original line number Diff line number Diff line
@@ -709,6 +709,8 @@ config INTEL_CHT_INT33FE
	  device and CONFIG_TYPEC_FUSB302=m and CONFIG_BATTERY_MAX17042=m
	  for Type-C device.

source "drivers/platform/x86/intel-int3472/Kconfig"

config INTEL_HID_EVENT
	tristate "INTEL HID Event"
	depends on ACPI
+1 −0
Original line number Diff line number Diff line
@@ -76,6 +76,7 @@ obj-$(CONFIG_INTEL_HID_EVENT) += intel-hid.o
obj-$(CONFIG_INTEL_INT0002_VGPIO)	+= intel_int0002_vgpio.o
obj-$(CONFIG_INTEL_MENLOW)		+= intel_menlow.o
obj-$(CONFIG_INTEL_OAKTRAIL)		+= intel_oaktrail.o
obj-$(CONFIG_INTEL_SKL_INT3472)		+= intel-int3472/
obj-$(CONFIG_INTEL_VBTN)		+= intel-vbtn.o

# MSI
+30 −0
Original line number Diff line number Diff line
config INTEL_SKL_INT3472
	tristate "Intel SkyLake ACPI INT3472 Driver"
	depends on ACPI
	depends on COMMON_CLK && CLKDEV_LOOKUP
	depends on I2C
	depends on GPIOLIB
	depends on REGULATOR
	select MFD_CORE
	select REGMAP_I2C
	help
	  This driver adds power controller support for the Intel SkyCam
	  devices found on the Intel SkyLake platforms.

	  The INT3472 is a camera power controller, a logical device found on
	  Intel Skylake-based systems that can map to different hardware
	  devices depending on the platform. On machines designed for Chrome OS
	  it maps to a TPS68470 camera PMIC. On machines designed for Windows,
	  it maps to either a TP68470 camera PMIC, a uP6641Q sensor PMIC, or a
	  set of discrete GPIOs and power gates.

	  If your device was designed for Chrome OS, this driver will provide
	  an ACPI OpRegion, which must be available before any of the devices
	  using it are probed. For this reason, you should select Y if your
	  device was designed for ChromeOS. For the same reason the
	  I2C_DESIGNWARE_PLATFORM option must be set to Y too.

	  Say Y or M here if you have a SkyLake device designed for use
	  with Windows or ChromeOS. Say N here if you are not sure.

	  The module will be named "intel-skl-int3472".
+5 −0
Original line number Diff line number Diff line
obj-$(CONFIG_INTEL_SKL_INT3472)		+= intel_skl_int3472.o
intel_skl_int3472-objs			:= intel_skl_int3472_common.o \
					   intel_skl_int3472_discrete.o \
					   intel_skl_int3472_tps68470.o \
					   intel_skl_int3472_clk_and_regulator.o
Loading