Skip to content

Commit 53eddae

Browse files
jwrdegoedeij-intel
authored andcommitted
platform/x86: int3472: Move common.h to public includes, symbols to INTEL_INT3472
Move the common.h header file to include/linux/platform_data/x86/int3472.h and add a "INTEL_INT3472" kernel-symbol-namespace to the exported symbols. This is a preparation patch for exporting some more symbols for re-use in the atomisp driver. Signed-off-by: Hans de Goede <[email protected]> Reviewed-by: Sakari Ailus <[email protected]> Reviewed-by: Andy Shevchenko <[email protected]> Link: https://lore.kernel.org/r/[email protected] Reviewed-by: Ilpo Järvinen <[email protected]> Signed-off-by: Ilpo Järvinen <[email protected]>
1 parent 3c415b1 commit 53eddae

File tree

8 files changed

+19
-16
lines changed

8 files changed

+19
-16
lines changed

MAINTAINERS

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12241,6 +12241,7 @@ INTEL SKYLAKE INT3472 ACPI DEVICE DRIVER
1224112241
M: Daniel Scally <[email protected]>
1224212242
S: Maintained
1224312243
F: drivers/platform/x86/intel/int3472/
12244+
F: include/linux/platform_data/x86/int3472.h
1224412245

1224512246
INTEL SPEED SELECT TECHNOLOGY
1224612247
M: Srinivas Pandruvada <[email protected]>

drivers/platform/x86/intel/int3472/clk_and_regulator.c

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,11 +6,10 @@
66
#include <linux/clk-provider.h>
77
#include <linux/device.h>
88
#include <linux/gpio/consumer.h>
9+
#include <linux/platform_data/x86/int3472.h>
910
#include <linux/regulator/driver.h>
1011
#include <linux/slab.h>
1112

12-
#include "common.h"
13-
1413
/*
1514
* 82c0d13a-78c5-4244-9bb1-eb8b539a8d11
1615
* This _DSM GUID allows controlling the sensor clk when it is not controlled

drivers/platform/x86/intel/int3472/common.c

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2,10 +2,9 @@
22
/* Author: Dan Scally <[email protected]> */
33

44
#include <linux/acpi.h>
5+
#include <linux/platform_data/x86/int3472.h>
56
#include <linux/slab.h>
67

7-
#include "common.h"
8-
98
union acpi_object *skl_int3472_get_acpi_buffer(struct acpi_device *adev, char *id)
109
{
1110
struct acpi_buffer buffer = { ACPI_ALLOCATE_BUFFER, NULL };
@@ -29,7 +28,7 @@ union acpi_object *skl_int3472_get_acpi_buffer(struct acpi_device *adev, char *i
2928

3029
return obj;
3130
}
32-
EXPORT_SYMBOL_GPL(skl_int3472_get_acpi_buffer);
31+
EXPORT_SYMBOL_NS_GPL(skl_int3472_get_acpi_buffer, "INTEL_INT3472");
3332

3433
int skl_int3472_fill_cldb(struct acpi_device *adev, struct int3472_cldb *cldb)
3534
{
@@ -53,7 +52,7 @@ int skl_int3472_fill_cldb(struct acpi_device *adev, struct int3472_cldb *cldb)
5352
kfree(obj);
5453
return ret;
5554
}
56-
EXPORT_SYMBOL_GPL(skl_int3472_fill_cldb);
55+
EXPORT_SYMBOL_NS_GPL(skl_int3472_fill_cldb, "INTEL_INT3472");
5756

5857
/* sensor_adev_ret may be NULL, name_ret must not be NULL */
5958
int skl_int3472_get_sensor_adev_and_name(struct device *dev,
@@ -84,7 +83,7 @@ int skl_int3472_get_sensor_adev_and_name(struct device *dev,
8483

8584
return ret;
8685
}
87-
EXPORT_SYMBOL_GPL(skl_int3472_get_sensor_adev_and_name);
86+
EXPORT_SYMBOL_NS_GPL(skl_int3472_get_sensor_adev_and_name, "INTEL_INT3472");
8887

8988
MODULE_DESCRIPTION("Intel SkyLake INT3472 ACPI Device Driver library");
9089
MODULE_AUTHOR("Daniel Scally <[email protected]>");

drivers/platform/x86/intel/int3472/discrete.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,12 +12,11 @@
1212
#include <linux/kernel.h>
1313
#include <linux/module.h>
1414
#include <linux/overflow.h>
15+
#include <linux/platform_data/x86/int3472.h>
1516
#include <linux/platform_device.h>
1617
#include <linux/string_choices.h>
1718
#include <linux/uuid.h>
1819

19-
#include "common.h"
20-
2120
/*
2221
* 79234640-9e10-4fea-a5c1-b5aa8b19756f
2322
* This _DSM GUID returns information about the GPIO lines mapped to a
@@ -479,3 +478,4 @@ module_platform_driver(int3472_discrete);
479478
MODULE_DESCRIPTION("Intel SkyLake INT3472 ACPI Discrete Device Driver");
480479
MODULE_AUTHOR("Daniel Scally <[email protected]>");
481480
MODULE_LICENSE("GPL v2");
481+
MODULE_IMPORT_NS("INTEL_INT3472");

drivers/platform/x86/intel/int3472/discrete_quirks.c

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,7 @@
22
/* Author: Hans de Goede <[email protected]> */
33

44
#include <linux/dmi.h>
5-
6-
#include "common.h"
5+
#include <linux/platform_data/x86/int3472.h>
76

87
static const struct int3472_discrete_quirks lenovo_miix_510_quirks = {
98
.avdd_second_sensor = "i2c-OVTI2680:00",

drivers/platform/x86/intel/int3472/led.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
#include <linux/acpi.h>
55
#include <linux/gpio/consumer.h>
66
#include <linux/leds.h>
7-
#include "common.h"
7+
#include <linux/platform_data/x86/int3472.h>
88

99
static int int3472_pled_set(struct led_classdev *led_cdev,
1010
enum led_brightness brightness)

drivers/platform/x86/intel/int3472/tps68470.c

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,10 +8,10 @@
88
#include <linux/mfd/tps68470.h>
99
#include <linux/platform_device.h>
1010
#include <linux/platform_data/tps68470.h>
11+
#include <linux/platform_data/x86/int3472.h>
1112
#include <linux/regmap.h>
1213
#include <linux/string.h>
1314

14-
#include "common.h"
1515
#include "tps68470.h"
1616

1717
#define DESIGNED_FOR_CHROMEOS 1
@@ -261,4 +261,5 @@ module_i2c_driver(int3472_tps68470);
261261
MODULE_DESCRIPTION("Intel SkyLake INT3472 ACPI TPS68470 Device Driver");
262262
MODULE_AUTHOR("Daniel Scally <[email protected]>");
263263
MODULE_LICENSE("GPL v2");
264+
MODULE_IMPORT_NS("INTEL_INT3472");
264265
MODULE_SOFTDEP("pre: clk-tps68470 tps68470-regulator");

drivers/platform/x86/intel/int3472/common.h renamed to include/linux/platform_data/x86/int3472.h

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,12 @@
11
/* SPDX-License-Identifier: GPL-2.0 */
2-
/* Author: Dan Scally <[email protected]> */
2+
/*
3+
* Intel INT3472 ACPI camera sensor power-management support
4+
*
5+
* Author: Dan Scally <[email protected]>
6+
*/
37

4-
#ifndef _INTEL_SKL_INT3472_H
5-
#define _INTEL_SKL_INT3472_H
8+
#ifndef __PLATFORM_DATA_X86_INT3472_H
9+
#define __PLATFORM_DATA_X86_INT3472_H
610

711
#include <linux/clk-provider.h>
812
#include <linux/gpio/machine.h>

0 commit comments

Comments
 (0)