From: "Yan, Dongcheng" <dongcheng.yan@linux.intel.com>
To: Hans de Goede <hdegoede@redhat.com>,
Dongcheng Yan <dongcheng.yan@intel.com>,
linux-kernel@vger.kernel.org, linux-media@vger.kernel.org,
sakari.ailus@linux.intel.com, hverkuil@xs4all.nl,
andriy.shevchenko@linux.intel.com, u.kleine-koenig@baylibre.com,
ricardo.ribalda@gmail.com, bingbu.cao@linux.intel.com
Cc: stable@vger.kernel.org, hao.yao@intel.com
Subject: Re: [PATCH v1 1/2] platform/x86: int3472: add hpd pin support
Date: Mon, 14 Apr 2025 15:52:50 +0800 [thread overview]
Message-ID: <c8ae2d43-157c-408a-af89-7248b30d52d1@linux.intel.com> (raw)
In-Reply-To: <cfc709a8-85fc-4e44-9dcf-ae3ef7ee0738@redhat.com>
Hi hans,
On 4/11/2025 4:33 PM, Hans de Goede wrote:
> Hi,
>
> On 11-Apr-25 10:23 AM, Dongcheng Yan wrote:
>> Typically HDMI to MIPI CSI-2 bridges have a pin to signal image data is
>> being received. On the host side this is wired to a GPIO for polling or
>> interrupts. This includes the Lontium HDMI to MIPI CSI-2 bridges
>> lt6911uxe and lt6911uxc.
>>
>> The GPIO "hpd" is used already by other HDMI to CSI-2 bridges, use it
>> here as well.
>>
>> Signed-off-by: Dongcheng Yan <dongcheng.yan@intel.com>
>> ---
>> drivers/platform/x86/intel/int3472/common.h | 1 +
>> drivers/platform/x86/intel/int3472/discrete.c | 6 ++++++
>> 2 files changed, 7 insertions(+)
>>
>> diff --git a/drivers/platform/x86/intel/int3472/common.h b/drivers/platform/x86/intel/int3472/common.h
>> index 145dec66df64..db4cd3720e24 100644
>> --- a/drivers/platform/x86/intel/int3472/common.h
>> +++ b/drivers/platform/x86/intel/int3472/common.h
>> @@ -22,6 +22,7 @@
>> #define INT3472_GPIO_TYPE_POWER_ENABLE 0x0b
>> #define INT3472_GPIO_TYPE_CLK_ENABLE 0x0c
>> #define INT3472_GPIO_TYPE_PRIVACY_LED 0x0d
>> +#define INT3472_GPIO_TYPE_HOTPLUG_DETECT 0x13
>>
>> #define INT3472_PDEV_MAX_NAME_LEN 23
>> #define INT3472_MAX_SENSOR_GPIOS 3
>> diff --git a/drivers/platform/x86/intel/int3472/discrete.c b/drivers/platform/x86/intel/int3472/discrete.c
>> index 30ff8f3ea1f5..28d41b1b3809 100644
>> --- a/drivers/platform/x86/intel/int3472/discrete.c
>> +++ b/drivers/platform/x86/intel/int3472/discrete.c
>> @@ -186,6 +186,10 @@ static void int3472_get_con_id_and_polarity(struct acpi_device *adev, u8 *type,
>> *con_id = "privacy-led";
>> *gpio_flags = GPIO_ACTIVE_HIGH;
>> break;
>> + case INT3472_GPIO_TYPE_HOTPLUG_DETECT:
>> + *con_id = "hpd";
>> + *gpio_flags = GPIO_LOOKUP_FLAGS_DEFAULT;
>
> This looks wrong, we really need to clearly provide a polarity
> here since the ACPI GPIO resources do not provide one.
>
I tested gpio_flags=GPIO_LOOKUP_FLAGS_DEFAULT/HIGH/LOW, the lt6911uxe
driver can pass the test and work normally. Is this the rule of int3472
driver?
In addition, GPIO_LOOKUP_FLAGS_DEFAULT = GPIO_ACTIVE_HIGH |
GPIO_PERSISTENT as defined, maybe it provides a polarity also.
I can change to GPIO_ACTIVE_LOW, but I want to understand the reason.
Best Regard,
Dongcheng> Regards,
>
> Hans
>
>
>
>> + break;
>> case INT3472_GPIO_TYPE_POWER_ENABLE:
>> *con_id = "power-enable";
>> *gpio_flags = GPIO_ACTIVE_HIGH;
>> @@ -212,6 +216,7 @@ static void int3472_get_con_id_and_polarity(struct acpi_device *adev, u8 *type,
>> * 0x0b Power enable
>> * 0x0c Clock enable
>> * 0x0d Privacy LED
>> + * 0x13 Hotplug detect
>> *
>> * There are some known platform specific quirks where that does not quite
>> * hold up; for example where a pin with type 0x01 (Power down) is mapped to
>> @@ -281,6 +286,7 @@ static int skl_int3472_handle_gpio_resources(struct acpi_resource *ares,
>> switch (type) {
>> case INT3472_GPIO_TYPE_RESET:
>> case INT3472_GPIO_TYPE_POWERDOWN:
>> + case INT3472_GPIO_TYPE_HOTPLUG_DETECT:
>> ret = skl_int3472_map_gpio_to_sensor(int3472, agpio, con_id, gpio_flags);
>> if (ret)
>> err_msg = "Failed to map GPIO pin to sensor\n";
>>
>> base-commit: 01c6df60d5d4ae00cd5c1648818744838bba7763
>
>
next prev parent reply other threads:[~2025-04-14 7:52 UTC|newest]
Thread overview: 21+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-04-11 8:23 [PATCH v1 1/2] platform/x86: int3472: add hpd pin support Dongcheng Yan
2025-04-11 8:23 ` [PATCH v1 2/2] media: i2c: change lt6911uxe irq_gpio name to "hpd" Dongcheng Yan
2025-04-11 8:34 ` Hans de Goede
2025-04-14 7:54 ` Yan, Dongcheng
2025-04-11 8:33 ` [PATCH v1 1/2] platform/x86: int3472: add hpd pin support Hans de Goede
2025-04-14 7:52 ` Yan, Dongcheng [this message]
2025-04-14 8:11 ` Andy Shevchenko
2025-04-14 8:40 ` Yan, Dongcheng
2025-04-14 8:49 ` Andy Shevchenko
2025-04-14 9:59 ` Yan, Dongcheng
2025-04-14 11:04 ` Hans de Goede
2025-04-14 11:09 ` Hans de Goede
2025-04-14 11:43 ` Sakari Ailus
2025-04-14 12:21 ` Hans de Goede
2025-04-14 12:32 ` Sakari Ailus
2025-04-14 12:37 ` Hans de Goede
2025-04-14 12:54 ` Sakari Ailus
2025-04-14 14:24 ` Hans de Goede
2025-04-14 8:52 ` Sakari Ailus
2025-04-14 10:01 ` Yan, Dongcheng
2025-04-14 1:18 ` kernel test robot
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=c8ae2d43-157c-408a-af89-7248b30d52d1@linux.intel.com \
--to=dongcheng.yan@linux.intel.com \
--cc=andriy.shevchenko@linux.intel.com \
--cc=bingbu.cao@linux.intel.com \
--cc=dongcheng.yan@intel.com \
--cc=hao.yao@intel.com \
--cc=hdegoede@redhat.com \
--cc=hverkuil@xs4all.nl \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-media@vger.kernel.org \
--cc=ricardo.ribalda@gmail.com \
--cc=sakari.ailus@linux.intel.com \
--cc=stable@vger.kernel.org \
--cc=u.kleine-koenig@baylibre.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.