iio: proximity: sx_common: Unexport sx_common_get_raw_register_config()
authorAndy Shevchenko <andriy.shevchenko@linux.intel.com>
Tue, 3 Sep 2024 21:28:21 +0000 (00:28 +0300)
committerJonathan Cameron <Jonathan.Cameron@huawei.com>
Mon, 30 Sep 2024 08:20:59 +0000 (09:20 +0100)
sx_common_get_raw_register_config() is used in a single driver,
move it there.

Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Link: https://patch.msgid.link/20240903212922.3731221-3-andriy.shevchenko@linux.intel.com
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
drivers/iio/proximity/sx9324.c
drivers/iio/proximity/sx_common.c
drivers/iio/proximity/sx_common.h

index 629f83c37d595be28e403da4ff09648d0c8308cf..40747d7f6e7e9da65cf30148636bf3cc41c83251 100644 (file)
@@ -868,6 +868,26 @@ static u8 sx9324_parse_phase_prop(struct device *dev,
        return raw;
 }
 
+static void sx_common_get_raw_register_config(struct device *dev,
+                                             struct sx_common_reg_default *reg_def)
+{
+#ifdef CONFIG_ACPI
+       struct acpi_device *adev = ACPI_COMPANION(dev);
+       u32 raw = 0, ret;
+       char prop[80];
+
+       if (!reg_def->property || !adev)
+               return;
+
+       snprintf(prop, ARRAY_SIZE(prop), "%s,reg_%s", acpi_device_hid(adev), reg_def->property);
+       ret = device_property_read_u32(dev, prop, &raw);
+       if (ret)
+               return;
+
+       reg_def->def = raw;
+#endif
+}
+
 static const struct sx_common_reg_default *
 sx9324_get_default_reg(struct device *dev, int idx,
                       struct sx_common_reg_default *reg_def)
index 71aa6dced7d3422df8b057ebe347ee37783facfe..bcf502e0234236e2362c1eb63da3bc488b0178a1 100644 (file)
@@ -421,27 +421,6 @@ static const struct iio_buffer_setup_ops sx_common_buffer_setup_ops = {
        .postdisable = sx_common_buffer_postdisable,
 };
 
-void sx_common_get_raw_register_config(struct device *dev,
-                                      struct sx_common_reg_default *reg_def)
-{
-#ifdef CONFIG_ACPI
-       struct acpi_device *adev = ACPI_COMPANION(dev);
-       u32 raw = 0, ret;
-       char prop[80];
-
-       if (!reg_def->property || !adev)
-               return;
-
-       snprintf(prop, ARRAY_SIZE(prop), "%s,reg_%s", acpi_device_hid(adev), reg_def->property);
-       ret = device_property_read_u32(dev, prop, &raw);
-       if (ret)
-               return;
-
-       reg_def->def = raw;
-#endif
-}
-EXPORT_SYMBOL_NS_GPL(sx_common_get_raw_register_config, SEMTECH_PROX);
-
 #define SX_COMMON_SOFT_RESET                           0xde
 
 static int sx_common_init_device(struct device *dev, struct iio_dev *indio_dev)
index 101b90e52ff268983383836ae099e696376718f1..175505eaae7b77424de8f98d1a87e7de6dff10ca 100644 (file)
@@ -150,9 +150,6 @@ int sx_common_probe(struct i2c_client *client,
                    const struct sx_common_chip_info *chip_info,
                    const struct regmap_config *regmap_config);
 
-void sx_common_get_raw_register_config(struct device *dev,
-                                      struct sx_common_reg_default *reg_def);
-
 /* 3 is the number of events defined by a single phase. */
 extern const struct iio_event_spec sx_common_events[3];