platform/x86: int3472: Split into 2 drivers
authorHans de Goede <hdegoede@redhat.com>
Fri, 3 Dec 2021 10:28:50 +0000 (11:28 +0100)
committerHans de Goede <hdegoede@redhat.com>
Mon, 13 Dec 2021 10:44:48 +0000 (11:44 +0100)
commita2f9fbc247eea0ad1b0b59bc29bec144c5ead03c
tree72752380acd6557ac766224ee34baf55f13fcd17
parent9dfa374cc6d04d2515adc21c39e356b64ee45a29
platform/x86: int3472: Split into 2 drivers

The intel_skl_int3472.ko module contains 2 separate drivers,
the int3472_discrete platform driver and the int3472_tps68470
I2C-driver.

These 2 drivers contain very little shared code, only
skl_int3472_get_acpi_buffer() and skl_int3472_fill_cldb() are
shared.

Split the module into 2 drivers, linking the little shared code
directly into both.

This will allow us to add soft-module dependencies for the
tps68470 clk, gpio and regulator drivers to the new
intel_skl_int3472_tps68470.ko to help with probe ordering issues
without causing these modules to get loaded on boards which only
use the int3472_discrete platform driver.

While at it also rename the .c and .h files to remove the
cumbersome intel_skl_int3472_ prefix.

Reviewed-by: Andy Shevchenko <andy.shevchenko@gmail.com>
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Link: https://lore.kernel.org/r/20211203102857.44539-8-hdegoede@redhat.com
drivers/platform/x86/intel/int3472/Makefile
drivers/platform/x86/intel/int3472/clk_and_regulator.c [moved from drivers/platform/x86/intel/int3472/intel_skl_int3472_clk_and_regulator.c with 99% similarity]
drivers/platform/x86/intel/int3472/common.c [new file with mode: 0644]
drivers/platform/x86/intel/int3472/common.h [moved from drivers/platform/x86/intel/int3472/intel_skl_int3472_common.h with 94% similarity]
drivers/platform/x86/intel/int3472/discrete.c [moved from drivers/platform/x86/intel/int3472/intel_skl_int3472_discrete.c with 93% similarity]
drivers/platform/x86/intel/int3472/intel_skl_int3472_common.c [deleted file]
drivers/platform/x86/intel/int3472/tps68470.c [moved from drivers/platform/x86/intel/int3472/intel_skl_int3472_tps68470.c with 85% similarity]