Patch "platform/x86: int3472/discrete: Ensure the clk/power enable pins are in output mode" has been added to the 6.1-stable tree

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



This is a note to let you know that I've just added the patch titled

    platform/x86: int3472/discrete: Ensure the clk/power enable pins are in output mode

to the 6.1-stable tree which can be found at:
    http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary

The filename of the patch is:
     platform-x86-int3472-discrete-ensure-the-clk-power-enable-pins-are-in-output-mode.patch
and it can be found in the queue-6.1 subdirectory.

If you, or anyone else, feels it should not be added to the stable tree,
please let <stable@xxxxxxxxxxxxxxx> know about it.


>From cf5ac2d45f6e4d11ad78e7b10ae9a4121ba5e995 Mon Sep 17 00:00:00 2001
From: Hans de Goede <hdegoede@xxxxxxxxxx>
Date: Wed, 11 Jan 2023 21:14:26 +0100
Subject: platform/x86: int3472/discrete: Ensure the clk/power enable pins are in output mode

From: Hans de Goede <hdegoede@xxxxxxxxxx>

commit cf5ac2d45f6e4d11ad78e7b10ae9a4121ba5e995 upstream.

acpi_get_and_request_gpiod() does not take a gpio_lookup_flags argument
specifying that the pins direction should be initialized to a specific
value.

This means that in some cases the pins might be left in input mode, causing
the gpiod_set() calls made to enable the clk / regulator to not work.

One example of this problem is the clk-enable GPIO for the ov01a1s sensor
on a Dell Latitude 9420 being left in input mode causing the clk to
never get enabled.

Explicitly set the direction of the pins to output to fix this.

Fixes: 5de691bffe57 ("platform/x86: Add intel_skl_int3472 driver")
Signed-off-by: Hans de Goede <hdegoede@xxxxxxxxxx>
Reviewed-by: Andy Shevchenko <andy@xxxxxxxxxx>
Reviewed-by: Daniel Scally <djrscally@xxxxxxxxx>
Reviewed-by: Sakari Ailus <sakari.ailus@xxxxxxxxxxxxxxx>
Link: https://lore.kernel.org/r/20230111201426.947853-1-hdegoede@xxxxxxxxxx
Signed-off-by: Greg Kroah-Hartman <gregkh@xxxxxxxxxxxxxxxxxxx>
---
 drivers/platform/x86/intel/int3472/clk_and_regulator.c |    3 +++
 drivers/platform/x86/intel/int3472/discrete.c          |    4 ++++
 2 files changed, 7 insertions(+)

--- a/drivers/platform/x86/intel/int3472/clk_and_regulator.c
+++ b/drivers/platform/x86/intel/int3472/clk_and_regulator.c
@@ -181,6 +181,9 @@ int skl_int3472_register_regulator(struc
 		return PTR_ERR(int3472->regulator.gpio);
 	}
 
+	/* Ensure the pin is in output mode and non-active state */
+	gpiod_direction_output(int3472->regulator.gpio, 0);
+
 	cfg.dev = &int3472->adev->dev;
 	cfg.init_data = &init_data;
 	cfg.ena_gpiod = int3472->regulator.gpio;
--- a/drivers/platform/x86/intel/int3472/discrete.c
+++ b/drivers/platform/x86/intel/int3472/discrete.c
@@ -168,6 +168,8 @@ static int skl_int3472_map_gpio_to_clk(s
 			return (PTR_ERR(gpio));
 
 		int3472->clock.ena_gpio = gpio;
+		/* Ensure the pin is in output mode and non-active state */
+		gpiod_direction_output(int3472->clock.ena_gpio, 0);
 		break;
 	case INT3472_GPIO_TYPE_PRIVACY_LED:
 		gpio = acpi_get_and_request_gpiod(path, pin, "int3472,privacy-led");
@@ -175,6 +177,8 @@ static int skl_int3472_map_gpio_to_clk(s
 			return (PTR_ERR(gpio));
 
 		int3472->clock.led_gpio = gpio;
+		/* Ensure the pin is in output mode and non-active state */
+		gpiod_direction_output(int3472->clock.led_gpio, 0);
 		break;
 	default:
 		dev_err(int3472->dev, "Invalid GPIO type 0x%02x for clock\n", type);


Patches currently in stable-queue which might be from hdegoede@xxxxxxxxxx are

queue-6.1/acpi-fix-selecting-wrong-acpi-fwnode-for-the-igpu-on-some-dell-laptops.patch
queue-6.1/platform-x86-int3472-discrete-ensure-the-clk-power-enable-pins-are-in-output-mode.patch
queue-6.1/platform-x86-sony-laptop-don-t-turn-off-0x153-keyboard-backlight-during-probe.patch
queue-6.1/platform-x86-dell-privacy-fix-sw_camera_lens_cover-reporting.patch
queue-6.1/acpi-video-allow-selecting-nvidia-wmi-ec-or-apple-gmux-backlight-from-the-cmdline.patch
queue-6.1/platform-x86-ideapad-laptop-add-legion-5-15arh05-dmi-id-to-set_fn_lock_led_list.patch
queue-6.1/platform-surface-aggregator-ignore-command-messages-not-intended-for-us.patch
queue-6.1/platform-x86-thinkpad_acpi-fix-profile-mode-display-in-amt-mode.patch
queue-6.1/platform-x86-asus-wmi-don-t-load-fan-curves-without-fan.patch
queue-6.1/platform-x86-dell-privacy-only-register-sw_camera_lens_cover-if-present.patch



[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux