summaryrefslogtreecommitdiff
path: root/src/drivers/i2c
diff options
context:
space:
mode:
authorFurquan Shaikh <furquan@google.com>2020-04-24 21:59:21 -0700
committerFurquan Shaikh <furquan@google.com>2020-04-28 19:50:26 +0000
commit7536a398e978aa8ddb0e5f2ae12bae73a708b68f (patch)
treeea6a86f305a7be6524b3470946f0f0726b055ade /src/drivers/i2c
parentec3dafd97ccdc4cd4b08476724f3f53a47fbdb7a (diff)
downloadcoreboot-7536a398e978aa8ddb0e5f2ae12bae73a708b68f.tar.xz
device: Constify struct device * parameter to acpi_fill_ssdt()
.acpi_fill_ssdt() does not need to modify the device structure. This change makes the struct device * parameter to acpi_fill_ssdt() as const. Change-Id: I110f4c67c3b6671c9ac0a82e02609902a8ee5d5c Signed-off-by: Furquan Shaikh <furquan@google.com> Reviewed-on: https://review.coreboot.org/c/coreboot/+/40710 Reviewed-by: HAOUAS Elyes <ehaouas@noos.fr> Reviewed-by: Aaron Durbin <adurbin@chromium.org> Reviewed-by: Paul Menzel <paulepanter@users.sourceforge.net> Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Diffstat (limited to 'src/drivers/i2c')
-rw-r--r--src/drivers/i2c/da7219/da7219.c2
-rw-r--r--src/drivers/i2c/designware/dw_i2c.c2
-rw-r--r--src/drivers/i2c/designware/dw_i2c.h2
-rw-r--r--src/drivers/i2c/generic/chip.h2
-rw-r--r--src/drivers/i2c/generic/generic.c4
-rw-r--r--src/drivers/i2c/hid/hid.c2
-rw-r--r--src/drivers/i2c/max98373/max98373.c2
-rw-r--r--src/drivers/i2c/max98927/max98927.c2
-rw-r--r--src/drivers/i2c/nau8825/nau8825.c2
-rw-r--r--src/drivers/i2c/rt1011/rt1011.c2
-rw-r--r--src/drivers/i2c/rt5663/rt5663.c2
-rw-r--r--src/drivers/i2c/sx9310/sx9310.c2
-rw-r--r--src/drivers/i2c/tpm/chip.c2
13 files changed, 14 insertions, 14 deletions
diff --git a/src/drivers/i2c/da7219/da7219.c b/src/drivers/i2c/da7219/da7219.c
index 4cfeb9fb72..931c437546 100644
--- a/src/drivers/i2c/da7219/da7219.c
+++ b/src/drivers/i2c/da7219/da7219.c
@@ -17,7 +17,7 @@
#define DA7219_ACPI_NAME "DLG7"
#define DA7219_ACPI_HID "DLGS7219"
-static void da7219_fill_ssdt(struct device *dev)
+static void da7219_fill_ssdt(const struct device *dev)
{
struct drivers_i2c_da7219_config *config = dev->chip_info;
const char *scope = acpi_device_scope(dev);
diff --git a/src/drivers/i2c/designware/dw_i2c.c b/src/drivers/i2c/designware/dw_i2c.c
index 309dfeee0a..74e24c7a53 100644
--- a/src/drivers/i2c/designware/dw_i2c.c
+++ b/src/drivers/i2c/designware/dw_i2c.c
@@ -805,7 +805,7 @@ void dw_i2c_dev_init(struct device *dev)
* Generate I2C timing information into the SSDT for the OS driver to consume,
* optionally applying override values provided by the caller.
*/
-void dw_i2c_acpi_fill_ssdt(struct device *dev)
+void dw_i2c_acpi_fill_ssdt(const struct device *dev)
{
const struct dw_i2c_bus_config *bcfg;
uintptr_t dw_i2c_addr;
diff --git a/src/drivers/i2c/designware/dw_i2c.h b/src/drivers/i2c/designware/dw_i2c.h
index e309bc12a2..75df47592e 100644
--- a/src/drivers/i2c/designware/dw_i2c.h
+++ b/src/drivers/i2c/designware/dw_i2c.h
@@ -141,7 +141,7 @@ void dw_i2c_dev_init(struct device *dev);
* Common device_operations implementation to fill ACPI SSDT table for i2c
* host controller.
*/
-void dw_i2c_acpi_fill_ssdt(struct device *dev);
+void dw_i2c_acpi_fill_ssdt(const struct device *dev);
/*
* Common device_operations implementation for i2c host controller ops.
diff --git a/src/drivers/i2c/generic/chip.h b/src/drivers/i2c/generic/chip.h
index b167b71bed..e1f4472a44 100644
--- a/src/drivers/i2c/generic/chip.h
+++ b/src/drivers/i2c/generic/chip.h
@@ -76,7 +76,7 @@ struct drivers_i2c_generic_config {
* callback: Callback to fill in device-specific information
* config: Pointer to drivers_i2c_generic_config structure
*/
-void i2c_generic_fill_ssdt(struct device *dev,
+void i2c_generic_fill_ssdt(const struct device *dev,
void (*callback)(const struct device *dev),
struct drivers_i2c_generic_config *config);
diff --git a/src/drivers/i2c/generic/generic.c b/src/drivers/i2c/generic/generic.c
index 38fcfdc160..7e709d6cc7 100644
--- a/src/drivers/i2c/generic/generic.c
+++ b/src/drivers/i2c/generic/generic.c
@@ -43,7 +43,7 @@ static int i2c_generic_write_gpio(struct acpi_gpio *gpio, int *curr_index)
return ret;
}
-void i2c_generic_fill_ssdt(struct device *dev,
+void i2c_generic_fill_ssdt(const struct device *dev,
void (*callback)(const struct device *dev),
struct drivers_i2c_generic_config *config)
{
@@ -159,7 +159,7 @@ void i2c_generic_fill_ssdt(struct device *dev,
config->desc ? : dev->chip_ops->name, dev_path(dev));
}
-static void i2c_generic_fill_ssdt_generator(struct device *dev)
+static void i2c_generic_fill_ssdt_generator(const struct device *dev)
{
i2c_generic_fill_ssdt(dev, NULL, dev->chip_info);
}
diff --git a/src/drivers/i2c/hid/hid.c b/src/drivers/i2c/hid/hid.c
index 0cb28bba65..4fac85874d 100644
--- a/src/drivers/i2c/hid/hid.c
+++ b/src/drivers/i2c/hid/hid.c
@@ -20,7 +20,7 @@ static void i2c_hid_fill_dsm(const struct device *dev)
acpigen_write_dsm_i2c_hid(&dsm_config);
}
-static void i2c_hid_fill_ssdt_generator(struct device *dev)
+static void i2c_hid_fill_ssdt_generator(const struct device *dev)
{
struct drivers_i2c_hid_config *config = dev->chip_info;
config->generic.cid = I2C_HID_CID;
diff --git a/src/drivers/i2c/max98373/max98373.c b/src/drivers/i2c/max98373/max98373.c
index a7df56baa0..067563868c 100644
--- a/src/drivers/i2c/max98373/max98373.c
+++ b/src/drivers/i2c/max98373/max98373.c
@@ -14,7 +14,7 @@
#define MAX98373_ACPI_NAME "MAXI"
#define MAX98373_ACPI_HID "MX98373"
-static void max98373_fill_ssdt(struct device *dev)
+static void max98373_fill_ssdt(const struct device *dev)
{
struct drivers_i2c_max98373_config *config = dev->chip_info;
const char *scope = acpi_device_scope(dev);
diff --git a/src/drivers/i2c/max98927/max98927.c b/src/drivers/i2c/max98927/max98927.c
index 0cb80ae88a..ddd9d152b0 100644
--- a/src/drivers/i2c/max98927/max98927.c
+++ b/src/drivers/i2c/max98927/max98927.c
@@ -14,7 +14,7 @@
#define MAX98927_ACPI_NAME "MAXI"
#define MAX98927_ACPI_HID "MX98927"
-static void max98927_fill_ssdt(struct device *dev)
+static void max98927_fill_ssdt(const struct device *dev)
{
struct drivers_i2c_max98927_config *config = dev->chip_info;
const char *scope = acpi_device_scope(dev);
diff --git a/src/drivers/i2c/nau8825/nau8825.c b/src/drivers/i2c/nau8825/nau8825.c
index c3e95e7506..fd9cfc9679 100644
--- a/src/drivers/i2c/nau8825/nau8825.c
+++ b/src/drivers/i2c/nau8825/nau8825.c
@@ -19,7 +19,7 @@
#define NAU8825_DP_INT(key,val) \
acpi_dp_add_integer(dp, "nuvoton," key, (val))
-static void nau8825_fill_ssdt(struct device *dev)
+static void nau8825_fill_ssdt(const struct device *dev)
{
struct drivers_i2c_nau8825_config *config = dev->chip_info;
const char *scope = acpi_device_scope(dev);
diff --git a/src/drivers/i2c/rt1011/rt1011.c b/src/drivers/i2c/rt1011/rt1011.c
index 68681ef846..ec018cc38f 100644
--- a/src/drivers/i2c/rt1011/rt1011.c
+++ b/src/drivers/i2c/rt1011/rt1011.c
@@ -16,7 +16,7 @@
#define RT1011_DP_INT(key, val) acpi_dp_add_integer(dp, "realtek," key, (val))
-static void rt1011_fill_ssdt(struct device *dev)
+static void rt1011_fill_ssdt(const struct device *dev)
{
struct drivers_i2c_rt1011_config *config = dev->chip_info;
const char *scope = acpi_device_scope(dev);
diff --git a/src/drivers/i2c/rt5663/rt5663.c b/src/drivers/i2c/rt5663/rt5663.c
index 70c14efc45..67d8dea562 100644
--- a/src/drivers/i2c/rt5663/rt5663.c
+++ b/src/drivers/i2c/rt5663/rt5663.c
@@ -17,7 +17,7 @@
#define RT5663_DP_INT(key, val) \
acpi_dp_add_integer(dp, "realtek," key, (val))
-static void rt5663_fill_ssdt(struct device *dev)
+static void rt5663_fill_ssdt(const struct device *dev)
{
struct drivers_i2c_rt5663_config *config = dev->chip_info;
const char *scope = acpi_device_scope(dev);
diff --git a/src/drivers/i2c/sx9310/sx9310.c b/src/drivers/i2c/sx9310/sx9310.c
index a4fac10f60..44cb883478 100644
--- a/src/drivers/i2c/sx9310/sx9310.c
+++ b/src/drivers/i2c/sx9310/sx9310.c
@@ -18,7 +18,7 @@
I2C_SX9310_ACPI_ID "," #NAME, \
config->NAME)
-static void i2c_sx9310_fill_ssdt(struct device *dev)
+static void i2c_sx9310_fill_ssdt(const struct device *dev)
{
struct drivers_i2c_sx9310_config *config = dev->chip_info;
const char *scope = acpi_device_scope(dev);
diff --git a/src/drivers/i2c/tpm/chip.c b/src/drivers/i2c/tpm/chip.c
index b81b0d17c8..fbf9ffa667 100644
--- a/src/drivers/i2c/tpm/chip.c
+++ b/src/drivers/i2c/tpm/chip.c
@@ -11,7 +11,7 @@
#include "tpm.h"
#include "chip.h"
-static void i2c_tpm_fill_ssdt(struct device *dev)
+static void i2c_tpm_fill_ssdt(const struct device *dev)
{
struct drivers_i2c_tpm_config *config = dev->chip_info;
const char *scope = acpi_device_scope(dev);