* [PATCH] platform/x86: int3472: Add strobe GPIO function
@ 2023-10-07 2:13 Hao Yao
2023-10-07 8:22 ` Andy Shevchenko
0 siblings, 1 reply; 3+ messages in thread
From: Hao Yao @ 2023-10-07 2:13 UTC (permalink / raw)
To: Dan Scally, djrscally, Hans de Goede, Sakari Ailus
Cc: Bingbu Cao, platform-driver-x86, linux-media, Hao Yao,
Andy Shevchenko
Strobe pin is used for Lattice MIPI aggregator to control the LED
so it can be handled together with privacy LED.
Signed-off-by: Hao Yao <hao.yao@intel.com>
Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
---
drivers/platform/x86/intel/int3472/common.h | 1 +
drivers/platform/x86/intel/int3472/discrete.c | 2 ++
2 files changed, 3 insertions(+)
diff --git a/drivers/platform/x86/intel/int3472/common.h b/drivers/platform/x86/intel/int3472/common.h
index 9f29baa13860..655ae3ec0593 100644
--- a/drivers/platform/x86/intel/int3472/common.h
+++ b/drivers/platform/x86/intel/int3472/common.h
@@ -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
diff --git a/drivers/platform/x86/intel/int3472/discrete.c b/drivers/platform/x86/intel/int3472/discrete.c
index e33c2d75975c..b644ce65c990 100644
--- a/drivers/platform/x86/intel/int3472/discrete.c
+++ b/drivers/platform/x86/intel/int3472/discrete.c
@@ -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)
--
2.34.1
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH] platform/x86: int3472: Add strobe GPIO function
2023-10-07 2:13 [PATCH] platform/x86: int3472: Add strobe GPIO function Hao Yao
@ 2023-10-07 8:22 ` Andy Shevchenko
2023-10-07 10:23 ` Hao Yao
0 siblings, 1 reply; 3+ messages in thread
From: Andy Shevchenko @ 2023-10-07 8:22 UTC (permalink / raw)
To: Hao Yao
Cc: Dan Scally, djrscally, Hans de Goede, Sakari Ailus, Bingbu Cao,
platform-driver-x86, linux-media
On Sat, Oct 07, 2023 at 10:13:09AM +0800, Hao Yao wrote:
> 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?!
--
With Best Regards,
Andy Shevchenko
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH] platform/x86: int3472: Add strobe GPIO function
2023-10-07 8:22 ` Andy Shevchenko
@ 2023-10-07 10:23 ` Hao Yao
0 siblings, 0 replies; 3+ messages in thread
From: Hao Yao @ 2023-10-07 10:23 UTC (permalink / raw)
To: Andy Shevchenko
Cc: Dan Scally, djrscally, Hans de Goede, Sakari Ailus, Bingbu Cao,
platform-driver-x86, linux-media
Thank you Andy,
On 2023/10/7 16:22, Andy Shevchenko wrote:
> On Sat, Oct 07, 2023 at 10:13:09AM +0800, Hao Yao wrote:
>> 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".
> 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.
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2023-10-07 10:23 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-10-07 2:13 [PATCH] platform/x86: int3472: Add strobe GPIO function Hao Yao
2023-10-07 8:22 ` Andy Shevchenko
2023-10-07 10:23 ` Hao Yao
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox