diff options
| author | Bingbu Cao <[email protected]> | 2023-05-31 13:44:29 +0000 |
|---|---|---|
| committer | Hans de Goede <[email protected]> | 2023-06-08 08:59:59 +0000 |
| commit | e4543de8b6ffeba0622b9910df90d89676523975 (patch) | |
| tree | 7e05cad7d2398f412367f10063c9cc4fb3fa4c81 /drivers/platform/x86/intel/int3472/discrete.c | |
| parent | platform/x86/amd: pmc: Update metrics table info for Pink Sardine (diff) | |
| download | kernel-e4543de8b6ffeba0622b9910df90d89676523975.tar.gz kernel-e4543de8b6ffeba0622b9910df90d89676523975.zip | |
platform/x86: int3472: Evaluate device's _DSM method to control imaging clock
On some platforms, the imaging clock should be controlled by evaluating
specific clock device's _DSM method instead of setting gpio, so this
change register clock if no gpio based clock and then use the _DSM method
to enable and disable clock.
Signed-off-by: Bingbu Cao <[email protected]>
Signed-off-by: Hao Yao <[email protected]>
Link: https://lore.kernel.org/r/[email protected]
Signed-off-by: Hans de Goede <[email protected]>
Link: https://lore.kernel.org/r/[email protected]
Diffstat (limited to 'drivers/platform/x86/intel/int3472/discrete.c')
| -rw-r--r-- | drivers/platform/x86/intel/int3472/discrete.c | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/drivers/platform/x86/intel/int3472/discrete.c b/drivers/platform/x86/intel/int3472/discrete.c index ef020e23e596..8111579a59d4 100644 --- a/drivers/platform/x86/intel/int3472/discrete.c +++ b/drivers/platform/x86/intel/int3472/discrete.c @@ -258,7 +258,7 @@ static int skl_int3472_handle_gpio_resources(struct acpi_resource *ares, break; case INT3472_GPIO_TYPE_CLK_ENABLE: - ret = skl_int3472_register_clock(int3472, agpio, polarity); + ret = skl_int3472_register_gpio_clock(int3472, agpio, polarity); if (ret) err_msg = "Failed to register clock\n"; @@ -311,6 +311,11 @@ static int skl_int3472_parse_crs(struct int3472_discrete_device *int3472) acpi_dev_free_resource_list(&resource_list); + /* Register _DSM based clock (no-op if a GPIO clock was already registered) */ + ret = skl_int3472_register_dsm_clock(int3472); + if (ret < 0) + return ret; + int3472->gpios.dev_id = int3472->sensor_name; gpiod_add_lookup_table(&int3472->gpios); @@ -356,6 +361,7 @@ static int skl_int3472_discrete_probe(struct platform_device *pdev) int3472->adev = adev; int3472->dev = &pdev->dev; platform_set_drvdata(pdev, int3472); + int3472->clock.imgclk_index = cldb.clock_source; ret = skl_int3472_get_sensor_adev_and_name(&pdev->dev, &int3472->sensor, &int3472->sensor_name); |
