Skip to content

platform/x86: int3472: Add handshake pin support

Hans de Goede linux-media platform-driver-x86 4 versions – In review

Get series with b4
b4 am [email protected]

Versions newest first · linked by author and title

  1. v4 Latest9 patches 8 repliesIn review
  2. v39 patches 5 repliesSuperseded
  3. v29 patches 15 repliesSuperseded
Earlier versions · 1
VersionPostedPatchesRepliesStatus
v18 patches5 repliesSuperseded

Changes in v4 from the cover letter

- Add Andy's Reviewed-by to a few more patches
- At static_assert(GPIO_REGULATOR_SUPPLY_MAP_COUNT == 2) since the code assumes that
- Use unique error messages for power-enable vs handshake skl_int3472_register_regulator() failures
- Drop setting of constraints.enable_time. enable_time already gets set in struct regulator_desc (missed left-over from an older patch version)

Patches in v4 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/9platform/x86: int3472: Add skl_int3472_register_clock() helperdrivers/platform/x86/intel/int3472/clk_and_regulator.c+13 -441 reply
2/9platform/x86: int3472: Stop setting a supply-name for GPIO regulatorsdrivers/platform/x86/intel/int3472/clk_and_regulator.c drivers/platform/x86/intel/int3472/common.h+1 -70 replies
3/9platform/x86: int3472: Drop unused gpio field from struct int3472_gpio_regulatordrivers/platform/x86/intel/int3472/clk_and_regulator.c drivers/platform/x86/intel/int3472/common.h+1 -40 replies
4/9platform/x86: int3472: Rework AVDD second sensor quirk handlingdrivers/platform/x86/intel/int3472/Makefile drivers/platform/x86/intel/int3472/clk_and_regulator.c drivers/platform/x86/intel/int3472/common.h +2 more+50 -290 replies
5/9platform/x86: int3472: Make regulator supply name configurabledrivers/platform/x86/intel/int3472/clk_and_regulator.c drivers/platform/x86/intel/int3472/common.h drivers/platform/x86/intel/int3472/discrete.c+31 -315 replies
6/9platform/x86: int3472: Avoid GPIO regulator spikesdrivers/platform/x86/intel/int3472/clk_and_regulator.c drivers/platform/x86/intel/int3472/common.h drivers/platform/x86/intel/int3472/discrete.c+19 -50 replies
7/9platform/x86: int3472: Prepare for registering more than 1 GPIO regulatordrivers/platform/x86/intel/int3472/clk_and_regulator.c drivers/platform/x86/intel/int3472/common.h+26 -150 replies
8/9platform/x86: int3472: Add handshake pin supportdrivers/platform/x86/intel/int3472/common.h drivers/platform/x86/intel/int3472/discrete.c+16 -10 replies
9/9platform/x86: int3472: Debug log when remapping pinsdrivers/platform/x86/intel/int3472/discrete.c+6 -20 replies

Reviews trailers per patch

All 9 patches have a Reviewed-by or Acked-by of their own; the series has one for all of them.

PatchAndy ShevchenkoIlpo JärvinenDavid HeidelbergSakari Ailus
SeriesT-b R-b
1/9R-b R-b
2/9R-b
3/9R-b
4/9R-b
5/9R-b
6/9R-b
7/9R-b
8/9R-b
9/9R-b

Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes. Scroll the table sideways for all 4 reviewers.

Read the v4 thread

Cover letter [PATCH v4 0/9] platform/x86: int3472: Add handshake pin support

Hi All,

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 comlpete the power-on sequence.

This series implements support for this by modelling the handshake GPIO as a GPIO driven 'dvdd' regulator with an enable-time of 25 ms, also see:

https://lore.kernel.org/platform-driver-x86/[email protected]/

Patch 1 Is an unrelated cleanup which I had lying around
Patches 2-8 Prepare + Implement the handshake GPIO
Patch 9 Is a small patch adding some extra debugging to GPIO remapping

Changes in v4:
- Add Andy's Reviewed-by to a few more patches
- At static_assert(GPIO_REGULATOR_SUPPLY_MAP_COUNT == 2) since the code assumes that
- Use unique error messages for power-enable vs handshake skl_int3472_register_regulator() failures
- Drop setting of constraints.enable_time. enable_time already gets set in struct regulator_desc (missed left-over from an older patch version)

Changes in v3:
- Add Andy's Reviewed-by to a few more patches
- Some comment & commit-message tweaks
- Add comment explaining value of 12 in GPIO_REGULATOR_NAME_LENGTH
- Add a comment to int3472/common.h explaining where the 2 ms comes from
- s/n_regulators/n_regulator_gpios/

Changes in v2:
- Add Andy's Reviewed-by to patches 1-3
- Address Andy's review remarks on patch 5
- Add 2 Tested-by tags to patch 8/9

This series applies on top of Torvald's latest master, for testing with 6.14 this patch needs to be cherry-picked first:
https://web.git.kernel.org/pub/scm/linux/kernel/git/pdx86/platform-drivers-x86.git/commit/?id=81b251c66bdfe263fb5e7a16838512ddaeed77df

Regards,

Hans

Hans de Goede (9):
platform/x86: int3472: Add skl_int3472_register_clock() helper platform/x86: int3472: Stop setting a supply-name for GPIO regulators platform/x86: int3472: Drop unused gpio field from struct

    int3472_gpio_regulator

platform/x86: int3472: Rework AVDD second sensor quirk handling platform/x86: int3472: Make regulator supply name configurable platform/x86: int3472: Avoid GPIO regulator spikes platform/x86: int3472: Prepare for registering more than 1 GPIO
regulator
platform/x86: int3472: Add handshake pin support platform/x86: int3472: Debug log when remapping pins

 drivers/platform/x86/intel/int3472/Makefile   |   3 +-
 .../x86/intel/int3472/clk_and_regulator.c     | 167 ++++++------------
 drivers/platform/x86/intel/int3472/common.h   |  57 ++++--
 drivers/platform/x86/intel/int3472/discrete.c |  41 ++++-
 .../x86/intel/int3472/discrete_quirks.c       |  22 +++
 5 files changed, 158 insertions(+), 132 deletions(-)
 create mode 100644 drivers/platform/x86/intel/int3472/discrete_quirks.c
Signature · 1 line
2.49.0