X86 platform drivers
 help / color / mirror / Atom feed
From: Andy Shevchenko <andy@kernel.org>
To: Hans de Goede <hdegoede@redhat.com>
Cc: "Ilpo Järvinen" <ilpo.jarvinen@linux.intel.com>,
	"Dan Scally" <djrscally@gmail.com>,
	"Alan Stern" <stern@rowland.harvard.edu>,
	"Sakari Ailus" <sakari.ailus@linux.intel.com>,
	"Hao Yao" <hao.yao@intel.com>,
	"Bingbu Cao" <bingbu.cao@intel.com>, Duane <duanek@chorus.net>,
	platform-driver-x86@vger.kernel.org, linux-media@vger.kernel.org
Subject: Re: [PATCH v3 8/9] platform/x86: int3472: Add handshake pin support
Date: Wed, 16 Apr 2025 21:16:28 +0300	[thread overview]
Message-ID: <Z__z_G21Ro2jGDkP@smile.fi.intel.com> (raw)
In-Reply-To: <20250416124037.90508-9-hdegoede@redhat.com>

On Wed, Apr 16, 2025 at 02:40:36PM +0200, Hans de Goede wrote:
> New Intel Meteor Lake based laptops with IPU6 cameras have a new type 0x12
> pin defined in the INT3472 sensor companion device which describes
> the sensor's GPIOs.
> 
> This pin is primarily used on designs with a Lattice FPGA chip which is
> capable of running the sensor independently of the main CPU for features
> like presence detection. This pin needs to be driven high to make the FPGA
> run the power-on sequence of the sensor. After driving the pin high,
> the FPGA "firmware" needs 25ms to complete the power-on sequence.
> 
> Add support for this modelling the handshake pin as a GPIO driven "dvdd"
> regulator with a 25 ms enable time. This model was chosen because:
> 
> 1. Sensor chips don't have a handshake pin, so we need to abstract this
>    in some way which does not require modification to the sensor drivers,
>    sensor drivers using the bulk-regulator API to get avdd + vddio + dvdd
>    is normal. So this will work to get the right value set to the handshake
>    pin without requiring sensor driver modifications.
> 
> 2. Sensors typically wait only a small time for the sensor to power-on
>    after de-asserting reset. Not the 25ms the Lattice chip requires.
>    Using the regulator framework's enable_time allows hiding the need for
>    this delay from the sensor drivers.

...

>  			if (ret)
>  				err_msg = "Failed to map regulator to sensor\n";
>  
> +			break;

> +			if (ret)
> +				err_msg = "Failed to map regulator to sensor\n";
> +
>  			break;

As discussed this might be changed to have the same format string with supplied
name as a parameter.

Reviewed-by: Andy Shevchenko <andy@kernel.org>

-- 
With Best Regards,
Andy Shevchenko



  reply	other threads:[~2025-04-16 18:16 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-04-16 12:40 [PATCH v3 0/9] platform/x86: int3472: Add handshake pin support Hans de Goede
2025-04-16 12:40 ` [PATCH v3 1/9] platform/x86: int3472: Add skl_int3472_register_clock() helper Hans de Goede
2025-04-16 12:40 ` [PATCH v3 2/9] platform/x86: int3472: Stop setting a supply-name for GPIO regulators Hans de Goede
2025-04-16 12:40 ` [PATCH v3 3/9] platform/x86: int3472: Drop unused gpio field from struct int3472_gpio_regulator Hans de Goede
2025-04-16 12:40 ` [PATCH v3 4/9] platform/x86: int3472: Rework AVDD second sensor quirk handling Hans de Goede
2025-04-16 12:40 ` [PATCH v3 5/9] platform/x86: int3472: Make regulator supply name configurable Hans de Goede
2025-04-16 18:13   ` Andy Shevchenko
2025-04-17  9:52     ` Hans de Goede
2025-04-16 12:40 ` [PATCH v3 6/9] platform/x86: int3472: Avoid GPIO regulator spikes Hans de Goede
2025-04-16 12:40 ` [PATCH v3 7/9] platform/x86: int3472: Prepare for registering more than 1 GPIO regulator Hans de Goede
2025-04-16 18:14   ` Andy Shevchenko
2025-04-16 12:40 ` [PATCH v3 8/9] platform/x86: int3472: Add handshake pin support Hans de Goede
2025-04-16 18:16   ` Andy Shevchenko [this message]
2025-04-17 10:56     ` Hans de Goede
2025-04-16 12:40 ` [PATCH v3 9/9] platform/x86: int3472: Debug log when remapping pins Hans de Goede

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=Z__z_G21Ro2jGDkP@smile.fi.intel.com \
    --to=andy@kernel.org \
    --cc=bingbu.cao@intel.com \
    --cc=djrscally@gmail.com \
    --cc=duanek@chorus.net \
    --cc=hao.yao@intel.com \
    --cc=hdegoede@redhat.com \
    --cc=ilpo.jarvinen@linux.intel.com \
    --cc=linux-media@vger.kernel.org \
    --cc=platform-driver-x86@vger.kernel.org \
    --cc=sakari.ailus@linux.intel.com \
    --cc=stern@rowland.harvard.edu \
    /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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox