Skip to contentSkip to conversation

platform/x86: int3472: Add strobe GPIO function

PATCH In review Hao Yao 2 participants 3 messages Oct 7, 2023

Subsystems (3)
lore
Share & tools
lore

Hao Yao

author
#0 lore raw

PATCH 1/1 platform/x86: int3472: Add strobe GPIO function

Strobe pin is used for Lattice MIPI aggregator to control the LED so it can be handled together with privacy LED.

---
 drivers/platform/x86/intel/int3472/common.h   | 1 +
 drivers/platform/x86/intel/int3472/discrete.c | 2 ++
 2 files changed, 3 insertions(+)
drivers/platform/x86/intel/int3472/common.h +1 -0
index 9f29baa13860..655ae3ec0593 100644
@@ -19,6 +19,7 @@
 /* PMIC GPIO Types */
 #define INT3472_GPIO_TYPE_RESET					0x00
 #define INT3472_GPIO_TYPE_POWERDOWN				0x01
+#define INT3472_GPIO_TYPE_STROBE				0x02
 #define INT3472_GPIO_TYPE_POWER_ENABLE				0x0b
 #define INT3472_GPIO_TYPE_CLK_ENABLE				0x0c
 #define INT3472_GPIO_TYPE_PRIVACY_LED				0x0d
drivers/platform/x86/intel/int3472/discrete.c +2 -0
index e33c2d75975c..b644ce65c990 100644
@@ -102,6 +102,7 @@ static void int3472_get_func_and_polarity(u8 type, const char **func, u32 *polar
 		*func = "clk-enable";
 		*polarity = GPIO_ACTIVE_HIGH;
 		break;
+	case INT3472_GPIO_TYPE_STROBE:
 	case INT3472_GPIO_TYPE_PRIVACY_LED:
 		*func = "privacy-led";
 		*polarity = GPIO_ACTIVE_HIGH;
@@ -211,6 +212,7 @@ static int skl_int3472_handle_gpio_resources(struct acpi_resource *ares,
 			err_msg = "Failed to register clock\n";
 
 		break;
+	case INT3472_GPIO_TYPE_STROBE:
 	case INT3472_GPIO_TYPE_PRIVACY_LED:
 		ret = skl_int3472_register_pled(int3472, agpio, polarity);
 		if (ret)
Signature · 1 line
2.34.1
#1 lore raw
Quoted 2 lines · Hao Yao

Strobe pin is used for Lattice MIPI aggregator to control the LED so it can be handled together with privacy LED.

Thinking about this more, I am not now sure that this is a good approach. The idea behind the STROBE LED is that is used for flash light and should not be like on/off state, but rather the (quite) short pulse.

Combining these two together may even overheat the real strobe LED if used.

That said, is that platform using strobe GPIO for the privacy LED for real?!

Signature · 2 lines
With Best Regards,
Andy Shevchenko
author
#2 lore raw

Thank you Andy,

Quoted 9 lines · Andy Shevchenko
Quoted 2 lines · Hao Yao

Strobe pin is used for Lattice MIPI aggregator to control the LED so it can be handled together with privacy LED.

Thinking about this more, I am not now sure that this is a good approach. The idea behind the STROBE LED is that is used for flash light and should not be like on/off state, but rather the (quite) short pulse.

Combining these two together may even overheat the real strobe LED if used.

I agree. If the GPIO is used for a real flash LED, is it better to develop a new driver to control it. For example, some cameras need a flashlight device "LM3643".

Quoted 1 line

That said, is that platform using strobe GPIO for the privacy LED for real?!

On my Meteor Lake device, this pin is used for IR camera so actually it should control the IR LED. However I still don't know its detail usage. It may depends on the Lattice firmware, because I found only the handshake pin takes effects now and can't do more experiments. I think we should leave it open and I will update when I find something new.