* [PATCH 1/5] media: i2c: ov5675: Wait for endpoint
2026-03-10 12:44 [PATCH 0/5] platform: int3472: Add MSI prestige 14 AI EVO data Antti Laakso
@ 2026-03-10 12:44 ` Antti Laakso
2026-03-10 13:03 ` Hans de Goede
2026-03-10 12:44 ` [PATCH 2/5] media: ipu-bridge: Add ov5675 sensor Antti Laakso
` (3 subsequent siblings)
4 siblings, 1 reply; 23+ messages in thread
From: Antti Laakso @ 2026-03-10 12:44 UTC (permalink / raw)
To: linux-media
Cc: linux-gpio, platform-driver-x86, linusw, brgl, sakari.ailus,
mchehab, dan.scally, hansg, ilpo.jarvinen, hverkuil+cisco, sre,
hao.yao, jason.z.chen, jimmy.su, miguel.vadillo, kees, ribalda
Defer probe if endpoint is not yet available. And do it before acquiring
clock, gpio and regulators.
Signed-off-by: Antti Laakso <antti.laakso@linux.intel.com>
---
drivers/media/i2c/ov5675.c | 16 +++++++---------
1 file changed, 7 insertions(+), 9 deletions(-)
diff --git a/drivers/media/i2c/ov5675.c b/drivers/media/i2c/ov5675.c
index ea26df328189..81916fa8c117 100644
--- a/drivers/media/i2c/ov5675.c
+++ b/drivers/media/i2c/ov5675.c
@@ -1181,6 +1181,13 @@ static int ov5675_get_hwcfg(struct ov5675 *ov5675)
if (!fwnode)
return -ENXIO;
+ ep = fwnode_graph_get_endpoint_by_id(fwnode, 0, 0,
+ FWNODE_GRAPH_ENDPOINT_NEXT);
+ ret = v4l2_fwnode_endpoint_alloc_parse(ep, &bus_cfg);
+ fwnode_handle_put(ep);
+ if (ret)
+ return ret;
+
ov5675->xvclk = devm_v4l2_sensor_clk_get(dev, NULL);
if (IS_ERR(ov5675->xvclk))
return dev_err_probe(dev, PTR_ERR(ov5675->xvclk),
@@ -1210,15 +1217,6 @@ static int ov5675_get_hwcfg(struct ov5675 *ov5675)
if (ret)
return ret;
- ep = fwnode_graph_get_next_endpoint(fwnode, NULL);
- if (!ep)
- return -ENXIO;
-
- ret = v4l2_fwnode_endpoint_alloc_parse(ep, &bus_cfg);
- fwnode_handle_put(ep);
- if (ret)
- return ret;
-
if (bus_cfg.bus.mipi_csi2.num_data_lanes != OV5675_DATA_LANES) {
dev_err(dev, "number of CSI2 data lanes %d is not supported",
bus_cfg.bus.mipi_csi2.num_data_lanes);
--
2.53.0
^ permalink raw reply related [flat|nested] 23+ messages in thread* Re: [PATCH 1/5] media: i2c: ov5675: Wait for endpoint
2026-03-10 12:44 ` [PATCH 1/5] media: i2c: ov5675: Wait for endpoint Antti Laakso
@ 2026-03-10 13:03 ` Hans de Goede
2026-03-10 13:08 ` Sakari Ailus
0 siblings, 1 reply; 23+ messages in thread
From: Hans de Goede @ 2026-03-10 13:03 UTC (permalink / raw)
To: Antti Laakso, linux-media
Cc: linux-gpio, platform-driver-x86, linusw, brgl, sakari.ailus,
mchehab, dan.scally, ilpo.jarvinen, hverkuil+cisco, sre, hao.yao,
jason.z.chen, jimmy.su, miguel.vadillo, kees, ribalda
Hi,
Thank you for your patches for this, cool to see someone working
on supporting this!
On 10-Mar-26 13:44, Antti Laakso wrote:
> Defer probe if endpoint is not yet available. And do it before acquiring
> clock, gpio and regulators.
>
> Signed-off-by: Antti Laakso <antti.laakso@linux.intel.com>
> ---
> drivers/media/i2c/ov5675.c | 16 +++++++---------
> 1 file changed, 7 insertions(+), 9 deletions(-)
>
> diff --git a/drivers/media/i2c/ov5675.c b/drivers/media/i2c/ov5675.c
> index ea26df328189..81916fa8c117 100644
> --- a/drivers/media/i2c/ov5675.c
> +++ b/drivers/media/i2c/ov5675.c
> @@ -1181,6 +1181,13 @@ static int ov5675_get_hwcfg(struct ov5675 *ov5675)
> if (!fwnode)
> return -ENXIO;
>
> + ep = fwnode_graph_get_endpoint_by_id(fwnode, 0, 0,
> + FWNODE_GRAPH_ENDPOINT_NEXT);
> + ret = v4l2_fwnode_endpoint_alloc_parse(ep, &bus_cfg);
> + fwnode_handle_put(ep);
> + if (ret)
> + return ret;
This should be:
return dev_err_probe(dev, ret, "failed to parse endpoint\n");
> +
> ov5675->xvclk = devm_v4l2_sensor_clk_get(dev, NULL);
> if (IS_ERR(ov5675->xvclk))
and here and in all other error-exit paths you now need to do:
if (IS_ERR(ov5675->xvclk)) {
ret = dev_err_probe(dev, PTR_ERR(ov5675->xvclk), "failed to get xvclk\n");
goto check_hwcfg_error;
}
So that the v4l2_fwnode_endpoint_free(&bus_cfg); get called.
Note in this case I also dropped the %pe print because dev_err_probe()
already prints the errno value from its second argument.
You will need to add a similar ret = ...; goto check_hwcfg_error;
to all other error-exits below this point.
Regards,
Hans
> return dev_err_probe(dev, PTR_ERR(ov5675->xvclk),
> @@ -1210,15 +1217,6 @@ static int ov5675_get_hwcfg(struct ov5675 *ov5675)
> if (ret)
> return ret;
>
> - ep = fwnode_graph_get_next_endpoint(fwnode, NULL);
> - if (!ep)
> - return -ENXIO;
> -
> - ret = v4l2_fwnode_endpoint_alloc_parse(ep, &bus_cfg);
> - fwnode_handle_put(ep);
> - if (ret)
> - return ret;
> -
> if (bus_cfg.bus.mipi_csi2.num_data_lanes != OV5675_DATA_LANES) {
> dev_err(dev, "number of CSI2 data lanes %d is not supported",
> bus_cfg.bus.mipi_csi2.num_data_lanes);
^ permalink raw reply [flat|nested] 23+ messages in thread* Re: [PATCH 1/5] media: i2c: ov5675: Wait for endpoint
2026-03-10 13:03 ` Hans de Goede
@ 2026-03-10 13:08 ` Sakari Ailus
2026-03-10 13:12 ` Hans de Goede
0 siblings, 1 reply; 23+ messages in thread
From: Sakari Ailus @ 2026-03-10 13:08 UTC (permalink / raw)
To: Hans de Goede
Cc: Antti Laakso, linux-media, linux-gpio, platform-driver-x86,
linusw, brgl, mchehab, dan.scally, ilpo.jarvinen, hverkuil+cisco,
sre, hao.yao, jason.z.chen, jimmy.su, miguel.vadillo, kees,
ribalda
Hi Hans,
On Tue, Mar 10, 2026 at 02:03:30PM +0100, Hans de Goede wrote:
> Hi,
>
> Thank you for your patches for this, cool to see someone working
> on supporting this!
>
> On 10-Mar-26 13:44, Antti Laakso wrote:
> > Defer probe if endpoint is not yet available. And do it before acquiring
> > clock, gpio and regulators.
> >
> > Signed-off-by: Antti Laakso <antti.laakso@linux.intel.com>
> > ---
> > drivers/media/i2c/ov5675.c | 16 +++++++---------
> > 1 file changed, 7 insertions(+), 9 deletions(-)
> >
> > diff --git a/drivers/media/i2c/ov5675.c b/drivers/media/i2c/ov5675.c
> > index ea26df328189..81916fa8c117 100644
> > --- a/drivers/media/i2c/ov5675.c
> > +++ b/drivers/media/i2c/ov5675.c
> > @@ -1181,6 +1181,13 @@ static int ov5675_get_hwcfg(struct ov5675 *ov5675)
> > if (!fwnode)
> > return -ENXIO;
> >
> > + ep = fwnode_graph_get_endpoint_by_id(fwnode, 0, 0,
> > + FWNODE_GRAPH_ENDPOINT_NEXT);
> > + ret = v4l2_fwnode_endpoint_alloc_parse(ep, &bus_cfg);
> > + fwnode_handle_put(ep);
> > + if (ret)
> > + return ret;
>
> This should be:
>
> return dev_err_probe(dev, ret, "failed to parse endpoint\n");
I'd keep it as-is; see
<URL:https://lore.kernel.org/linux-media/20260310080038.1182695-1-sakari.ailus@linux.intel.com/T/#u>.
V4l2-fwnode also prints errors (albeit on debug level) on failures.
--
Kind regards,
Sakari Ailus
^ permalink raw reply [flat|nested] 23+ messages in thread
* Re: [PATCH 1/5] media: i2c: ov5675: Wait for endpoint
2026-03-10 13:08 ` Sakari Ailus
@ 2026-03-10 13:12 ` Hans de Goede
0 siblings, 0 replies; 23+ messages in thread
From: Hans de Goede @ 2026-03-10 13:12 UTC (permalink / raw)
To: Sakari Ailus
Cc: Antti Laakso, linux-media, linux-gpio, platform-driver-x86,
linusw, brgl, mchehab, dan.scally, ilpo.jarvinen, hverkuil+cisco,
sre, hao.yao, jason.z.chen, jimmy.su, miguel.vadillo, kees,
ribalda
Hi,
On 10-Mar-26 14:08, Sakari Ailus wrote:
> Hi Hans,
>
> On Tue, Mar 10, 2026 at 02:03:30PM +0100, Hans de Goede wrote:
>> Hi,
>>
>> Thank you for your patches for this, cool to see someone working
>> on supporting this!
>>
>> On 10-Mar-26 13:44, Antti Laakso wrote:
>>> Defer probe if endpoint is not yet available. And do it before acquiring
>>> clock, gpio and regulators.
>>>
>>> Signed-off-by: Antti Laakso <antti.laakso@linux.intel.com>
>>> ---
>>> drivers/media/i2c/ov5675.c | 16 +++++++---------
>>> 1 file changed, 7 insertions(+), 9 deletions(-)
>>>
>>> diff --git a/drivers/media/i2c/ov5675.c b/drivers/media/i2c/ov5675.c
>>> index ea26df328189..81916fa8c117 100644
>>> --- a/drivers/media/i2c/ov5675.c
>>> +++ b/drivers/media/i2c/ov5675.c
>>> @@ -1181,6 +1181,13 @@ static int ov5675_get_hwcfg(struct ov5675 *ov5675)
>>> if (!fwnode)
>>> return -ENXIO;
>>>
>>> + ep = fwnode_graph_get_endpoint_by_id(fwnode, 0, 0,
>>> + FWNODE_GRAPH_ENDPOINT_NEXT);
>>> + ret = v4l2_fwnode_endpoint_alloc_parse(ep, &bus_cfg);
>>> + fwnode_handle_put(ep);
>>> + if (ret)
>>> + return ret;
>>
>> This should be:
>>
>> return dev_err_probe(dev, ret, "failed to parse endpoint\n");
>
> I'd keep it as-is; see
> <URL:https://lore.kernel.org/linux-media/20260310080038.1182695-1-sakari.ailus@linux.intel.com/T/#u>.
> V4l2-fwnode also prints errors (albeit on debug level) on failures.
Ok, keeping this as is is fine with me.
There still is the issue of adding the goto-s to properly free
the bus_cfg on errors.
Regards,
Hans
^ permalink raw reply [flat|nested] 23+ messages in thread
* [PATCH 2/5] media: ipu-bridge: Add ov5675 sensor
2026-03-10 12:44 [PATCH 0/5] platform: int3472: Add MSI prestige 14 AI EVO data Antti Laakso
2026-03-10 12:44 ` [PATCH 1/5] media: i2c: ov5675: Wait for endpoint Antti Laakso
@ 2026-03-10 12:44 ` Antti Laakso
2026-03-10 13:06 ` Hans de Goede
2026-03-10 13:25 ` Dan Scally
2026-03-10 12:44 ` [PATCH 3/5] platform: int3472: Add gpio platform data Antti Laakso
` (2 subsequent siblings)
4 siblings, 2 replies; 23+ messages in thread
From: Antti Laakso @ 2026-03-10 12:44 UTC (permalink / raw)
To: linux-media
Cc: linux-gpio, platform-driver-x86, linusw, brgl, sakari.ailus,
mchehab, dan.scally, hansg, ilpo.jarvinen, hverkuil+cisco, sre,
hao.yao, jason.z.chen, jimmy.su, miguel.vadillo, kees, ribalda
The Omnivision ov5675 is found from MSI prestige
14 AI EVO laptop, for example.
Signed-off-by: Antti Laakso <antti.laakso@linux.intel.com>
---
drivers/media/pci/intel/ipu-bridge.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/drivers/media/pci/intel/ipu-bridge.c b/drivers/media/pci/intel/ipu-bridge.c
index c895584e25a0..ee070d44d5f1 100644
--- a/drivers/media/pci/intel/ipu-bridge.c
+++ b/drivers/media/pci/intel/ipu-bridge.c
@@ -91,6 +91,8 @@ static const struct ipu_sensor_config ipu_supported_sensors[] = {
IPU_SENSOR_CONFIG("OVTIDB10", 1, 560000000),
/* Omnivision OV2680 */
IPU_SENSOR_CONFIG("OVTI2680", 1, 331200000),
+ /* Omnivision OV5675 */
+ IPU_SENSOR_CONFIG("OVTI5675", 1, 450000000),
/* Omnivision OV8856 */
IPU_SENSOR_CONFIG("OVTI8856", 3, 180000000, 360000000, 720000000),
/* Sony IMX471 */
--
2.53.0
^ permalink raw reply related [flat|nested] 23+ messages in thread* Re: [PATCH 2/5] media: ipu-bridge: Add ov5675 sensor
2026-03-10 12:44 ` [PATCH 2/5] media: ipu-bridge: Add ov5675 sensor Antti Laakso
@ 2026-03-10 13:06 ` Hans de Goede
2026-03-10 13:25 ` Dan Scally
1 sibling, 0 replies; 23+ messages in thread
From: Hans de Goede @ 2026-03-10 13:06 UTC (permalink / raw)
To: Antti Laakso, linux-media
Cc: linux-gpio, platform-driver-x86, linusw, brgl, sakari.ailus,
mchehab, dan.scally, ilpo.jarvinen, hverkuil+cisco, sre, hao.yao,
jason.z.chen, jimmy.su, miguel.vadillo, kees, ribalda
Hi,
On 10-Mar-26 13:44, Antti Laakso wrote:
> The Omnivision ov5675 is found from MSI prestige
> 14 AI EVO laptop, for example.
>
> Signed-off-by: Antti Laakso <antti.laakso@linux.intel.com>
Thanks, patch looks good to me:
Reviewed-by: Hans de Goede <johannes.goede@oss.qualcomm.com>
Regards,
Hans
> ---
> drivers/media/pci/intel/ipu-bridge.c | 2 ++
> 1 file changed, 2 insertions(+)
>
> diff --git a/drivers/media/pci/intel/ipu-bridge.c b/drivers/media/pci/intel/ipu-bridge.c
> index c895584e25a0..ee070d44d5f1 100644
> --- a/drivers/media/pci/intel/ipu-bridge.c
> +++ b/drivers/media/pci/intel/ipu-bridge.c
> @@ -91,6 +91,8 @@ static const struct ipu_sensor_config ipu_supported_sensors[] = {
> IPU_SENSOR_CONFIG("OVTIDB10", 1, 560000000),
> /* Omnivision OV2680 */
> IPU_SENSOR_CONFIG("OVTI2680", 1, 331200000),
> + /* Omnivision OV5675 */
> + IPU_SENSOR_CONFIG("OVTI5675", 1, 450000000),
> /* Omnivision OV8856 */
> IPU_SENSOR_CONFIG("OVTI8856", 3, 180000000, 360000000, 720000000),
> /* Sony IMX471 */
^ permalink raw reply [flat|nested] 23+ messages in thread* Re: [PATCH 2/5] media: ipu-bridge: Add ov5675 sensor
2026-03-10 12:44 ` [PATCH 2/5] media: ipu-bridge: Add ov5675 sensor Antti Laakso
2026-03-10 13:06 ` Hans de Goede
@ 2026-03-10 13:25 ` Dan Scally
1 sibling, 0 replies; 23+ messages in thread
From: Dan Scally @ 2026-03-10 13:25 UTC (permalink / raw)
To: Antti Laakso, linux-media
Cc: linux-gpio, platform-driver-x86, linusw, brgl, sakari.ailus,
mchehab, hansg, ilpo.jarvinen, hverkuil+cisco, sre, hao.yao,
jason.z.chen, jimmy.su, miguel.vadillo, kees, ribalda
Hi Antti, thanks for the patches
On 10/03/2026 12:44, Antti Laakso wrote:
> The Omnivision ov5675 is found from MSI prestige
> 14 AI EVO laptop, for example.
>
> Signed-off-by: Antti Laakso <antti.laakso@linux.intel.com>
> ---
Looks ok to me:
Reviewed-by: Daniel Scally <dan.scally@ideasonboard.com>
> drivers/media/pci/intel/ipu-bridge.c | 2 ++
> 1 file changed, 2 insertions(+)
>
> diff --git a/drivers/media/pci/intel/ipu-bridge.c b/drivers/media/pci/intel/ipu-bridge.c
> index c895584e25a0..ee070d44d5f1 100644
> --- a/drivers/media/pci/intel/ipu-bridge.c
> +++ b/drivers/media/pci/intel/ipu-bridge.c
> @@ -91,6 +91,8 @@ static const struct ipu_sensor_config ipu_supported_sensors[] = {
> IPU_SENSOR_CONFIG("OVTIDB10", 1, 560000000),
> /* Omnivision OV2680 */
> IPU_SENSOR_CONFIG("OVTI2680", 1, 331200000),
> + /* Omnivision OV5675 */
> + IPU_SENSOR_CONFIG("OVTI5675", 1, 450000000),
> /* Omnivision OV8856 */
> IPU_SENSOR_CONFIG("OVTI8856", 3, 180000000, 360000000, 720000000),
> /* Sony IMX471 */
^ permalink raw reply [flat|nested] 23+ messages in thread
* [PATCH 3/5] platform: int3472: Add gpio platform data
2026-03-10 12:44 [PATCH 0/5] platform: int3472: Add MSI prestige 14 AI EVO data Antti Laakso
2026-03-10 12:44 ` [PATCH 1/5] media: i2c: ov5675: Wait for endpoint Antti Laakso
2026-03-10 12:44 ` [PATCH 2/5] media: ipu-bridge: Add ov5675 sensor Antti Laakso
@ 2026-03-10 12:44 ` Antti Laakso
2026-03-10 13:06 ` Hans de Goede
` (2 more replies)
2026-03-10 12:44 ` [PATCH 4/5] gpio: tps68470: Add i2c daisy chain support Antti Laakso
2026-03-10 12:44 ` [PATCH 5/5] platform: int3472: Add MSI prestige board data Antti Laakso
4 siblings, 3 replies; 23+ messages in thread
From: Antti Laakso @ 2026-03-10 12:44 UTC (permalink / raw)
To: linux-media
Cc: linux-gpio, platform-driver-x86, linusw, brgl, sakari.ailus,
mchehab, dan.scally, hansg, ilpo.jarvinen, hverkuil+cisco, sre,
hao.yao, jason.z.chen, jimmy.su, miguel.vadillo, kees, ribalda
The tps68470 supports i2c daisy chain, which need to be configured by
gpio-tps68470 driver. Add daisy chain information to platform data.
Signed-off-by: Antti Laakso <antti.laakso@linux.intel.com>
---
drivers/platform/x86/intel/int3472/tps68470.c | 2 ++
drivers/platform/x86/intel/int3472/tps68470.h | 1 +
include/linux/platform_data/tps68470.h | 4 ++++
3 files changed, 7 insertions(+)
diff --git a/drivers/platform/x86/intel/int3472/tps68470.c b/drivers/platform/x86/intel/int3472/tps68470.c
index a496075c0d2a..b02bc675cabe 100644
--- a/drivers/platform/x86/intel/int3472/tps68470.c
+++ b/drivers/platform/x86/intel/int3472/tps68470.c
@@ -197,6 +197,8 @@ static int skl_int3472_tps68470_probe(struct i2c_client *client)
cells[1].platform_data = (void *)board_data->tps68470_regulator_pdata;
cells[1].pdata_size = sizeof(struct tps68470_regulator_platform_data);
cells[2].name = "tps68470-gpio";
+ cells[2].platform_data = (void *)board_data->tps68470_gpio_pdata;
+ cells[2].pdata_size = sizeof(*board_data->tps68470_gpio_pdata);
for (i = 0; i < board_data->n_gpiod_lookups; i++)
gpiod_add_lookup_table(board_data->tps68470_gpio_lookup_tables[i]);
diff --git a/drivers/platform/x86/intel/int3472/tps68470.h b/drivers/platform/x86/intel/int3472/tps68470.h
index 35915e701593..c1c4290eb6d5 100644
--- a/drivers/platform/x86/intel/int3472/tps68470.h
+++ b/drivers/platform/x86/intel/int3472/tps68470.h
@@ -17,6 +17,7 @@ struct tps68470_regulator_platform_data;
struct int3472_tps68470_board_data {
const char *dev_name;
const struct tps68470_regulator_platform_data *tps68470_regulator_pdata;
+ const struct tps68470_gpio_platform_data *tps68470_gpio_pdata;
unsigned int n_gpiod_lookups;
struct gpiod_lookup_table *tps68470_gpio_lookup_tables[];
};
diff --git a/include/linux/platform_data/tps68470.h b/include/linux/platform_data/tps68470.h
index e605a2cab07f..7330dab7a711 100644
--- a/include/linux/platform_data/tps68470.h
+++ b/include/linux/platform_data/tps68470.h
@@ -27,6 +27,10 @@ struct tps68470_regulator_platform_data {
const struct regulator_init_data *reg_init_data[TPS68470_NUM_REGULATORS];
};
+struct tps68470_gpio_platform_data {
+ const bool daisy_chain_enable;
+};
+
struct tps68470_clk_consumer {
const char *consumer_dev_name;
const char *consumer_con_id;
--
2.53.0
^ permalink raw reply related [flat|nested] 23+ messages in thread* Re: [PATCH 3/5] platform: int3472: Add gpio platform data
2026-03-10 12:44 ` [PATCH 3/5] platform: int3472: Add gpio platform data Antti Laakso
@ 2026-03-10 13:06 ` Hans de Goede
2026-03-10 13:32 ` Bartosz Golaszewski
2026-03-10 14:27 ` Dan Scally
2 siblings, 0 replies; 23+ messages in thread
From: Hans de Goede @ 2026-03-10 13:06 UTC (permalink / raw)
To: Antti Laakso, linux-media
Cc: linux-gpio, platform-driver-x86, linusw, brgl, sakari.ailus,
mchehab, dan.scally, ilpo.jarvinen, hverkuil+cisco, sre, hao.yao,
jason.z.chen, jimmy.su, miguel.vadillo, kees, ribalda
Hi,
On 10-Mar-26 13:44, Antti Laakso wrote:
> The tps68470 supports i2c daisy chain, which need to be configured by
> gpio-tps68470 driver. Add daisy chain information to platform data.
>
> Signed-off-by: Antti Laakso <antti.laakso@linux.intel.com>
Thanks, patch looks good to me:
Reviewed-by: Hans de Goede <johannes.goede@oss.qualcomm.com>
Regards,
Hans
> ---
> drivers/platform/x86/intel/int3472/tps68470.c | 2 ++
> drivers/platform/x86/intel/int3472/tps68470.h | 1 +
> include/linux/platform_data/tps68470.h | 4 ++++
> 3 files changed, 7 insertions(+)
>
> diff --git a/drivers/platform/x86/intel/int3472/tps68470.c b/drivers/platform/x86/intel/int3472/tps68470.c
> index a496075c0d2a..b02bc675cabe 100644
> --- a/drivers/platform/x86/intel/int3472/tps68470.c
> +++ b/drivers/platform/x86/intel/int3472/tps68470.c
> @@ -197,6 +197,8 @@ static int skl_int3472_tps68470_probe(struct i2c_client *client)
> cells[1].platform_data = (void *)board_data->tps68470_regulator_pdata;
> cells[1].pdata_size = sizeof(struct tps68470_regulator_platform_data);
> cells[2].name = "tps68470-gpio";
> + cells[2].platform_data = (void *)board_data->tps68470_gpio_pdata;
> + cells[2].pdata_size = sizeof(*board_data->tps68470_gpio_pdata);
>
> for (i = 0; i < board_data->n_gpiod_lookups; i++)
> gpiod_add_lookup_table(board_data->tps68470_gpio_lookup_tables[i]);
> diff --git a/drivers/platform/x86/intel/int3472/tps68470.h b/drivers/platform/x86/intel/int3472/tps68470.h
> index 35915e701593..c1c4290eb6d5 100644
> --- a/drivers/platform/x86/intel/int3472/tps68470.h
> +++ b/drivers/platform/x86/intel/int3472/tps68470.h
> @@ -17,6 +17,7 @@ struct tps68470_regulator_platform_data;
> struct int3472_tps68470_board_data {
> const char *dev_name;
> const struct tps68470_regulator_platform_data *tps68470_regulator_pdata;
> + const struct tps68470_gpio_platform_data *tps68470_gpio_pdata;
> unsigned int n_gpiod_lookups;
> struct gpiod_lookup_table *tps68470_gpio_lookup_tables[];
> };
> diff --git a/include/linux/platform_data/tps68470.h b/include/linux/platform_data/tps68470.h
> index e605a2cab07f..7330dab7a711 100644
> --- a/include/linux/platform_data/tps68470.h
> +++ b/include/linux/platform_data/tps68470.h
> @@ -27,6 +27,10 @@ struct tps68470_regulator_platform_data {
> const struct regulator_init_data *reg_init_data[TPS68470_NUM_REGULATORS];
> };
>
> +struct tps68470_gpio_platform_data {
> + const bool daisy_chain_enable;
> +};
> +
> struct tps68470_clk_consumer {
> const char *consumer_dev_name;
> const char *consumer_con_id;
^ permalink raw reply [flat|nested] 23+ messages in thread* Re: [PATCH 3/5] platform: int3472: Add gpio platform data
2026-03-10 12:44 ` [PATCH 3/5] platform: int3472: Add gpio platform data Antti Laakso
2026-03-10 13:06 ` Hans de Goede
@ 2026-03-10 13:32 ` Bartosz Golaszewski
2026-03-11 11:17 ` Antti Laakso
2026-03-10 14:27 ` Dan Scally
2 siblings, 1 reply; 23+ messages in thread
From: Bartosz Golaszewski @ 2026-03-10 13:32 UTC (permalink / raw)
To: Antti Laakso
Cc: linux-gpio, platform-driver-x86, linusw, brgl, sakari.ailus,
mchehab, dan.scally, hansg, ilpo.jarvinen, hverkuil+cisco, sre,
hao.yao, jason.z.chen, jimmy.su, miguel.vadillo, kees, ribalda,
linux-media
On Tue, 10 Mar 2026 13:44:25 +0100, Antti Laakso
<antti.laakso@linux.intel.com> said:
> The tps68470 supports i2c daisy chain, which need to be configured by
> gpio-tps68470 driver. Add daisy chain information to platform data.
>
> Signed-off-by: Antti Laakso <antti.laakso@linux.intel.com>
> ---
> drivers/platform/x86/intel/int3472/tps68470.c | 2 ++
> drivers/platform/x86/intel/int3472/tps68470.h | 1 +
> include/linux/platform_data/tps68470.h | 4 ++++
> 3 files changed, 7 insertions(+)
>
> diff --git a/drivers/platform/x86/intel/int3472/tps68470.c b/drivers/platform/x86/intel/int3472/tps68470.c
> index a496075c0d2a..b02bc675cabe 100644
> --- a/drivers/platform/x86/intel/int3472/tps68470.c
> +++ b/drivers/platform/x86/intel/int3472/tps68470.c
> @@ -197,6 +197,8 @@ static int skl_int3472_tps68470_probe(struct i2c_client *client)
> cells[1].platform_data = (void *)board_data->tps68470_regulator_pdata;
> cells[1].pdata_size = sizeof(struct tps68470_regulator_platform_data);
> cells[2].name = "tps68470-gpio";
> + cells[2].platform_data = (void *)board_data->tps68470_gpio_pdata;
> + cells[2].pdata_size = sizeof(*board_data->tps68470_gpio_pdata);
>
> for (i = 0; i < board_data->n_gpiod_lookups; i++)
> gpiod_add_lookup_table(board_data->tps68470_gpio_lookup_tables[i]);
> diff --git a/drivers/platform/x86/intel/int3472/tps68470.h b/drivers/platform/x86/intel/int3472/tps68470.h
> index 35915e701593..c1c4290eb6d5 100644
> --- a/drivers/platform/x86/intel/int3472/tps68470.h
> +++ b/drivers/platform/x86/intel/int3472/tps68470.h
> @@ -17,6 +17,7 @@ struct tps68470_regulator_platform_data;
> struct int3472_tps68470_board_data {
> const char *dev_name;
> const struct tps68470_regulator_platform_data *tps68470_regulator_pdata;
> + const struct tps68470_gpio_platform_data *tps68470_gpio_pdata;
> unsigned int n_gpiod_lookups;
> struct gpiod_lookup_table *tps68470_gpio_lookup_tables[];
> };
> diff --git a/include/linux/platform_data/tps68470.h b/include/linux/platform_data/tps68470.h
> index e605a2cab07f..7330dab7a711 100644
> --- a/include/linux/platform_data/tps68470.h
> +++ b/include/linux/platform_data/tps68470.h
> @@ -27,6 +27,10 @@ struct tps68470_regulator_platform_data {
> const struct regulator_init_data *reg_init_data[TPS68470_NUM_REGULATORS];
> };
>
> +struct tps68470_gpio_platform_data {
> + const bool daisy_chain_enable;
> +};
> +
> struct tps68470_clk_consumer {
> const char *consumer_dev_name;
> const char *consumer_con_id;
> --
> 2.53.0
>
>
I know this is the pattern used in this driver but why not start converting
it gradually to more modern APIs?
You could do:
static const struct property_entry tps68470_gpio_props[] = {
PROPERTY_ENTRY_BOOL("daisy-chain-enable"),
{ }
};
static const struct software_node tps68470_gpio_swnode = {
.properties = tps68470_gpio_props,
};
static int skl_int3472_tps68470_probe(struct i2c_client *client)
{
...
cells[2].swnode = &tps68470_gpio_swnode;
...
}
And avoid both modifying the public header as well as using ugly platform
data. In the GPIO driver you'd just need:
if (device_property_present(&pdev->dev, "daisy-chain-enable"))
Bartosz
^ permalink raw reply [flat|nested] 23+ messages in thread* Re: [PATCH 3/5] platform: int3472: Add gpio platform data
2026-03-10 13:32 ` Bartosz Golaszewski
@ 2026-03-11 11:17 ` Antti Laakso
0 siblings, 0 replies; 23+ messages in thread
From: Antti Laakso @ 2026-03-11 11:17 UTC (permalink / raw)
To: Bartosz Golaszewski
Cc: linux-gpio, platform-driver-x86, linusw, sakari.ailus, mchehab,
dan.scally, hansg, ilpo.jarvinen, hverkuil+cisco, sre, hao.yao,
jason.z.chen, jimmy.su, miguel.vadillo, kees, ribalda,
linux-media
Hi Bartosz,
On Tue, Mar 10, 2026 at 06:32:31AM -0700, Bartosz Golaszewski wrote:
> On Tue, 10 Mar 2026 13:44:25 +0100, Antti Laakso
> <antti.laakso@linux.intel.com> said:
> > The tps68470 supports i2c daisy chain, which need to be configured by
> > gpio-tps68470 driver. Add daisy chain information to platform data.
> >
> > Signed-off-by: Antti Laakso <antti.laakso@linux.intel.com>
> > ---
> > drivers/platform/x86/intel/int3472/tps68470.c | 2 ++
> > drivers/platform/x86/intel/int3472/tps68470.h | 1 +
> > include/linux/platform_data/tps68470.h | 4 ++++
> > 3 files changed, 7 insertions(+)
> >
> > diff --git a/drivers/platform/x86/intel/int3472/tps68470.c b/drivers/platform/x86/intel/int3472/tps68470.c
> > index a496075c0d2a..b02bc675cabe 100644
> > --- a/drivers/platform/x86/intel/int3472/tps68470.c
> > +++ b/drivers/platform/x86/intel/int3472/tps68470.c
> > @@ -197,6 +197,8 @@ static int skl_int3472_tps68470_probe(struct i2c_client *client)
> > cells[1].platform_data = (void *)board_data->tps68470_regulator_pdata;
> > cells[1].pdata_size = sizeof(struct tps68470_regulator_platform_data);
> > cells[2].name = "tps68470-gpio";
> > + cells[2].platform_data = (void *)board_data->tps68470_gpio_pdata;
> > + cells[2].pdata_size = sizeof(*board_data->tps68470_gpio_pdata);
> >
> > for (i = 0; i < board_data->n_gpiod_lookups; i++)
> > gpiod_add_lookup_table(board_data->tps68470_gpio_lookup_tables[i]);
> > diff --git a/drivers/platform/x86/intel/int3472/tps68470.h b/drivers/platform/x86/intel/int3472/tps68470.h
> > index 35915e701593..c1c4290eb6d5 100644
> > --- a/drivers/platform/x86/intel/int3472/tps68470.h
> > +++ b/drivers/platform/x86/intel/int3472/tps68470.h
> > @@ -17,6 +17,7 @@ struct tps68470_regulator_platform_data;
> > struct int3472_tps68470_board_data {
> > const char *dev_name;
> > const struct tps68470_regulator_platform_data *tps68470_regulator_pdata;
> > + const struct tps68470_gpio_platform_data *tps68470_gpio_pdata;
> > unsigned int n_gpiod_lookups;
> > struct gpiod_lookup_table *tps68470_gpio_lookup_tables[];
> > };
> > diff --git a/include/linux/platform_data/tps68470.h b/include/linux/platform_data/tps68470.h
> > index e605a2cab07f..7330dab7a711 100644
> > --- a/include/linux/platform_data/tps68470.h
> > +++ b/include/linux/platform_data/tps68470.h
> > @@ -27,6 +27,10 @@ struct tps68470_regulator_platform_data {
> > const struct regulator_init_data *reg_init_data[TPS68470_NUM_REGULATORS];
> > };
> >
> > +struct tps68470_gpio_platform_data {
> > + const bool daisy_chain_enable;
> > +};
> > +
> > struct tps68470_clk_consumer {
> > const char *consumer_dev_name;
> > const char *consumer_con_id;
> > --
> > 2.53.0
> >
> >
>
> I know this is the pattern used in this driver but why not start converting
> it gradually to more modern APIs?
>
> You could do:
>
> static const struct property_entry tps68470_gpio_props[] = {
> PROPERTY_ENTRY_BOOL("daisy-chain-enable"),
> { }
> };
>
> static const struct software_node tps68470_gpio_swnode = {
> .properties = tps68470_gpio_props,
> };
>
> static int skl_int3472_tps68470_probe(struct i2c_client *client)
> {
> ...
> cells[2].swnode = &tps68470_gpio_swnode;
> ...
> }
>
> And avoid both modifying the public header as well as using ugly platform
> data. In the GPIO driver you'd just need:
>
> if (device_property_present(&pdev->dev, "daisy-chain-enable"))
>
> Bartosz
Thanks for suggestion, I'll use software node in v2.
Antti
^ permalink raw reply [flat|nested] 23+ messages in thread
* Re: [PATCH 3/5] platform: int3472: Add gpio platform data
2026-03-10 12:44 ` [PATCH 3/5] platform: int3472: Add gpio platform data Antti Laakso
2026-03-10 13:06 ` Hans de Goede
2026-03-10 13:32 ` Bartosz Golaszewski
@ 2026-03-10 14:27 ` Dan Scally
2 siblings, 0 replies; 23+ messages in thread
From: Dan Scally @ 2026-03-10 14:27 UTC (permalink / raw)
To: Antti Laakso, linux-media
Cc: linux-gpio, platform-driver-x86, linusw, brgl, sakari.ailus,
mchehab, hansg, ilpo.jarvinen, hverkuil+cisco, sre, hao.yao,
jason.z.chen, jimmy.su, miguel.vadillo, kees, ribalda
Hi Antti
On 10/03/2026 12:44, Antti Laakso wrote:
> The tps68470 supports i2c daisy chain, which need to be configured by
> gpio-tps68470 driver. Add daisy chain information to platform data.
>
> Signed-off-by: Antti Laakso <antti.laakso@linux.intel.com>
> ---
I think this change is good, so:
Reviewed-by: Daniel Scally <dan.scally@ideasonboard.com>
However I think Bartosz' suggestion has a lot of merit, so if you wanted to revise the patch in that
direction, that would be even more welcome.
Thanks
Dan
> drivers/platform/x86/intel/int3472/tps68470.c | 2 ++
> drivers/platform/x86/intel/int3472/tps68470.h | 1 +
> include/linux/platform_data/tps68470.h | 4 ++++
> 3 files changed, 7 insertions(+)
>
> diff --git a/drivers/platform/x86/intel/int3472/tps68470.c b/drivers/platform/x86/intel/int3472/tps68470.c
> index a496075c0d2a..b02bc675cabe 100644
> --- a/drivers/platform/x86/intel/int3472/tps68470.c
> +++ b/drivers/platform/x86/intel/int3472/tps68470.c
> @@ -197,6 +197,8 @@ static int skl_int3472_tps68470_probe(struct i2c_client *client)
> cells[1].platform_data = (void *)board_data->tps68470_regulator_pdata;
> cells[1].pdata_size = sizeof(struct tps68470_regulator_platform_data);
> cells[2].name = "tps68470-gpio";
> + cells[2].platform_data = (void *)board_data->tps68470_gpio_pdata;
> + cells[2].pdata_size = sizeof(*board_data->tps68470_gpio_pdata);
>
> for (i = 0; i < board_data->n_gpiod_lookups; i++)
> gpiod_add_lookup_table(board_data->tps68470_gpio_lookup_tables[i]);
> diff --git a/drivers/platform/x86/intel/int3472/tps68470.h b/drivers/platform/x86/intel/int3472/tps68470.h
> index 35915e701593..c1c4290eb6d5 100644
> --- a/drivers/platform/x86/intel/int3472/tps68470.h
> +++ b/drivers/platform/x86/intel/int3472/tps68470.h
> @@ -17,6 +17,7 @@ struct tps68470_regulator_platform_data;
> struct int3472_tps68470_board_data {
> const char *dev_name;
> const struct tps68470_regulator_platform_data *tps68470_regulator_pdata;
> + const struct tps68470_gpio_platform_data *tps68470_gpio_pdata;
> unsigned int n_gpiod_lookups;
> struct gpiod_lookup_table *tps68470_gpio_lookup_tables[];
> };
> diff --git a/include/linux/platform_data/tps68470.h b/include/linux/platform_data/tps68470.h
> index e605a2cab07f..7330dab7a711 100644
> --- a/include/linux/platform_data/tps68470.h
> +++ b/include/linux/platform_data/tps68470.h
> @@ -27,6 +27,10 @@ struct tps68470_regulator_platform_data {
> const struct regulator_init_data *reg_init_data[TPS68470_NUM_REGULATORS];
> };
>
> +struct tps68470_gpio_platform_data {
> + const bool daisy_chain_enable;
> +};
> +
> struct tps68470_clk_consumer {
> const char *consumer_dev_name;
> const char *consumer_con_id;
^ permalink raw reply [flat|nested] 23+ messages in thread
* [PATCH 4/5] gpio: tps68470: Add i2c daisy chain support
2026-03-10 12:44 [PATCH 0/5] platform: int3472: Add MSI prestige 14 AI EVO data Antti Laakso
` (2 preceding siblings ...)
2026-03-10 12:44 ` [PATCH 3/5] platform: int3472: Add gpio platform data Antti Laakso
@ 2026-03-10 12:44 ` Antti Laakso
2026-03-10 13:07 ` Hans de Goede
2026-03-10 14:33 ` Dan Scally
2026-03-10 12:44 ` [PATCH 5/5] platform: int3472: Add MSI prestige board data Antti Laakso
4 siblings, 2 replies; 23+ messages in thread
From: Antti Laakso @ 2026-03-10 12:44 UTC (permalink / raw)
To: linux-media
Cc: linux-gpio, platform-driver-x86, linusw, brgl, sakari.ailus,
mchehab, dan.scally, hansg, ilpo.jarvinen, hverkuil+cisco, sre,
hao.yao, jason.z.chen, jimmy.su, miguel.vadillo, kees, ribalda
The tps68470 daisy chain make use of gpio 1 and 2. When in use, these
gpios must be configured as inputs without pull-up.
Signed-off-by: Antti Laakso <antti.laakso@linux.intel.com>
---
drivers/gpio/gpio-tps68470.c | 23 ++++++++++++++++++++++-
1 file changed, 22 insertions(+), 1 deletion(-)
diff --git a/drivers/gpio/gpio-tps68470.c b/drivers/gpio/gpio-tps68470.c
index d4fbdf90e190..729ad8e397fc 100644
--- a/drivers/gpio/gpio-tps68470.c
+++ b/drivers/gpio/gpio-tps68470.c
@@ -14,6 +14,7 @@
#include <linux/gpio/driver.h>
#include <linux/mfd/tps68470.h>
#include <linux/module.h>
+#include <linux/platform_data/tps68470.h>
#include <linux/platform_device.h>
#include <linux/regmap.h>
@@ -120,6 +121,17 @@ static int tps68470_gpio_input(struct gpio_chip *gc, unsigned int offset)
TPS68470_GPIO_MODE_MASK, 0x00);
}
+static int tps68470_enable_i2c_daisy_chain(struct gpio_chip *gc)
+{
+ int ret;
+
+ ret = tps68470_gpio_input(gc, 1);
+ if (ret)
+ return ret;
+
+ return tps68470_gpio_input(gc, 2);
+}
+
static const char *tps68470_names[TPS68470_N_GPIO] = {
"gpio.0", "gpio.1", "gpio.2", "gpio.3",
"gpio.4", "gpio.5", "gpio.6",
@@ -129,6 +141,8 @@ static const char *tps68470_names[TPS68470_N_GPIO] = {
static int tps68470_gpio_probe(struct platform_device *pdev)
{
struct tps68470_gpio_data *tps68470_gpio;
+ struct tps68470_gpio_platform_data *pdata = dev_get_platdata(&pdev->dev);
+ int ret = 0;
tps68470_gpio = devm_kzalloc(&pdev->dev, sizeof(*tps68470_gpio),
GFP_KERNEL);
@@ -149,7 +163,14 @@ static int tps68470_gpio_probe(struct platform_device *pdev)
tps68470_gpio->gc.base = -1;
tps68470_gpio->gc.parent = &pdev->dev;
- return devm_gpiochip_add_data(&pdev->dev, &tps68470_gpio->gc, tps68470_gpio);
+ ret = devm_gpiochip_add_data(&pdev->dev, &tps68470_gpio->gc, tps68470_gpio);
+ if (ret)
+ return ret;
+
+ if (pdata && pdata->daisy_chain_enable)
+ ret = tps68470_enable_i2c_daisy_chain(&tps68470_gpio->gc);
+
+ return ret;
}
static struct platform_driver tps68470_gpio_driver = {
--
2.53.0
^ permalink raw reply related [flat|nested] 23+ messages in thread* Re: [PATCH 4/5] gpio: tps68470: Add i2c daisy chain support
2026-03-10 12:44 ` [PATCH 4/5] gpio: tps68470: Add i2c daisy chain support Antti Laakso
@ 2026-03-10 13:07 ` Hans de Goede
2026-03-10 14:33 ` Dan Scally
1 sibling, 0 replies; 23+ messages in thread
From: Hans de Goede @ 2026-03-10 13:07 UTC (permalink / raw)
To: Antti Laakso, linux-media
Cc: linux-gpio, platform-driver-x86, linusw, brgl, sakari.ailus,
mchehab, dan.scally, ilpo.jarvinen, hverkuil+cisco, sre, hao.yao,
jason.z.chen, jimmy.su, miguel.vadillo, kees, ribalda
Hi,
On 10-Mar-26 13:44, Antti Laakso wrote:
> The tps68470 daisy chain make use of gpio 1 and 2. When in use, these
> gpios must be configured as inputs without pull-up.
>
> Signed-off-by: Antti Laakso <antti.laakso@linux.intel.com>
Thanks, patch looks good to me:
Reviewed-by: Hans de Goede <johannes.goede@oss.qualcomm.com>
Regards,
Hans
> ---
> drivers/gpio/gpio-tps68470.c | 23 ++++++++++++++++++++++-
> 1 file changed, 22 insertions(+), 1 deletion(-)
>
> diff --git a/drivers/gpio/gpio-tps68470.c b/drivers/gpio/gpio-tps68470.c
> index d4fbdf90e190..729ad8e397fc 100644
> --- a/drivers/gpio/gpio-tps68470.c
> +++ b/drivers/gpio/gpio-tps68470.c
> @@ -14,6 +14,7 @@
> #include <linux/gpio/driver.h>
> #include <linux/mfd/tps68470.h>
> #include <linux/module.h>
> +#include <linux/platform_data/tps68470.h>
> #include <linux/platform_device.h>
> #include <linux/regmap.h>
>
> @@ -120,6 +121,17 @@ static int tps68470_gpio_input(struct gpio_chip *gc, unsigned int offset)
> TPS68470_GPIO_MODE_MASK, 0x00);
> }
>
> +static int tps68470_enable_i2c_daisy_chain(struct gpio_chip *gc)
> +{
> + int ret;
> +
> + ret = tps68470_gpio_input(gc, 1);
> + if (ret)
> + return ret;
> +
> + return tps68470_gpio_input(gc, 2);
> +}
> +
> static const char *tps68470_names[TPS68470_N_GPIO] = {
> "gpio.0", "gpio.1", "gpio.2", "gpio.3",
> "gpio.4", "gpio.5", "gpio.6",
> @@ -129,6 +141,8 @@ static const char *tps68470_names[TPS68470_N_GPIO] = {
> static int tps68470_gpio_probe(struct platform_device *pdev)
> {
> struct tps68470_gpio_data *tps68470_gpio;
> + struct tps68470_gpio_platform_data *pdata = dev_get_platdata(&pdev->dev);
> + int ret = 0;
>
> tps68470_gpio = devm_kzalloc(&pdev->dev, sizeof(*tps68470_gpio),
> GFP_KERNEL);
> @@ -149,7 +163,14 @@ static int tps68470_gpio_probe(struct platform_device *pdev)
> tps68470_gpio->gc.base = -1;
> tps68470_gpio->gc.parent = &pdev->dev;
>
> - return devm_gpiochip_add_data(&pdev->dev, &tps68470_gpio->gc, tps68470_gpio);
> + ret = devm_gpiochip_add_data(&pdev->dev, &tps68470_gpio->gc, tps68470_gpio);
> + if (ret)
> + return ret;
> +
> + if (pdata && pdata->daisy_chain_enable)
> + ret = tps68470_enable_i2c_daisy_chain(&tps68470_gpio->gc);
> +
> + return ret;
> }
>
> static struct platform_driver tps68470_gpio_driver = {
^ permalink raw reply [flat|nested] 23+ messages in thread* Re: [PATCH 4/5] gpio: tps68470: Add i2c daisy chain support
2026-03-10 12:44 ` [PATCH 4/5] gpio: tps68470: Add i2c daisy chain support Antti Laakso
2026-03-10 13:07 ` Hans de Goede
@ 2026-03-10 14:33 ` Dan Scally
1 sibling, 0 replies; 23+ messages in thread
From: Dan Scally @ 2026-03-10 14:33 UTC (permalink / raw)
To: Antti Laakso, linux-media
Cc: linux-gpio, platform-driver-x86, linusw, brgl, sakari.ailus,
mchehab, hansg, ilpo.jarvinen, hverkuil+cisco, sre, hao.yao,
jason.z.chen, jimmy.su, miguel.vadillo, kees, ribalda
Hi Antti
On 10/03/2026 12:44, Antti Laakso wrote:
> The tps68470 daisy chain make use of gpio 1 and 2. When in use, these
> gpios must be configured as inputs without pull-up.
>
> Signed-off-by: Antti Laakso <antti.laakso@linux.intel.com>
> ---
Reviewed-by: Daniel Scally <dan.scally@ideasonboard.com>
> drivers/gpio/gpio-tps68470.c | 23 ++++++++++++++++++++++-
> 1 file changed, 22 insertions(+), 1 deletion(-)
>
> diff --git a/drivers/gpio/gpio-tps68470.c b/drivers/gpio/gpio-tps68470.c
> index d4fbdf90e190..729ad8e397fc 100644
> --- a/drivers/gpio/gpio-tps68470.c
> +++ b/drivers/gpio/gpio-tps68470.c
> @@ -14,6 +14,7 @@
> #include <linux/gpio/driver.h>
> #include <linux/mfd/tps68470.h>
> #include <linux/module.h>
> +#include <linux/platform_data/tps68470.h>
> #include <linux/platform_device.h>
> #include <linux/regmap.h>
>
> @@ -120,6 +121,17 @@ static int tps68470_gpio_input(struct gpio_chip *gc, unsigned int offset)
> TPS68470_GPIO_MODE_MASK, 0x00);
> }
>
> +static int tps68470_enable_i2c_daisy_chain(struct gpio_chip *gc)
> +{
> + int ret;
> +
> + ret = tps68470_gpio_input(gc, 1);
> + if (ret)
> + return ret;
> +
> + return tps68470_gpio_input(gc, 2);
> +}
> +
> static const char *tps68470_names[TPS68470_N_GPIO] = {
> "gpio.0", "gpio.1", "gpio.2", "gpio.3",
> "gpio.4", "gpio.5", "gpio.6",
> @@ -129,6 +141,8 @@ static const char *tps68470_names[TPS68470_N_GPIO] = {
> static int tps68470_gpio_probe(struct platform_device *pdev)
> {
> struct tps68470_gpio_data *tps68470_gpio;
> + struct tps68470_gpio_platform_data *pdata = dev_get_platdata(&pdev->dev);
> + int ret = 0;
>
> tps68470_gpio = devm_kzalloc(&pdev->dev, sizeof(*tps68470_gpio),
> GFP_KERNEL);
> @@ -149,7 +163,14 @@ static int tps68470_gpio_probe(struct platform_device *pdev)
> tps68470_gpio->gc.base = -1;
> tps68470_gpio->gc.parent = &pdev->dev;
>
> - return devm_gpiochip_add_data(&pdev->dev, &tps68470_gpio->gc, tps68470_gpio);
> + ret = devm_gpiochip_add_data(&pdev->dev, &tps68470_gpio->gc, tps68470_gpio);
> + if (ret)
> + return ret;
> +
> + if (pdata && pdata->daisy_chain_enable)
> + ret = tps68470_enable_i2c_daisy_chain(&tps68470_gpio->gc);
> +
> + return ret;
> }
>
> static struct platform_driver tps68470_gpio_driver = {
^ permalink raw reply [flat|nested] 23+ messages in thread
* [PATCH 5/5] platform: int3472: Add MSI prestige board data
2026-03-10 12:44 [PATCH 0/5] platform: int3472: Add MSI prestige 14 AI EVO data Antti Laakso
` (3 preceding siblings ...)
2026-03-10 12:44 ` [PATCH 4/5] gpio: tps68470: Add i2c daisy chain support Antti Laakso
@ 2026-03-10 12:44 ` Antti Laakso
2026-03-10 13:09 ` Hans de Goede
2026-03-10 14:32 ` Dan Scally
4 siblings, 2 replies; 23+ messages in thread
From: Antti Laakso @ 2026-03-10 12:44 UTC (permalink / raw)
To: linux-media
Cc: linux-gpio, platform-driver-x86, linusw, brgl, sakari.ailus,
mchehab, dan.scally, hansg, ilpo.jarvinen, hverkuil+cisco, sre,
hao.yao, jason.z.chen, jimmy.su, miguel.vadillo, kees, ribalda
Define regulators and gpios for MSI Prestige 14 AI EVO+ laptop.
Signed-off-by: Antti Laakso <antti.laakso@linux.intel.com>
---
.../x86/intel/int3472/tps68470_board_data.c | 97 +++++++++++++++++++
1 file changed, 97 insertions(+)
diff --git a/drivers/platform/x86/intel/int3472/tps68470_board_data.c b/drivers/platform/x86/intel/int3472/tps68470_board_data.c
index 71357a036292..fe7c23e72d66 100644
--- a/drivers/platform/x86/intel/int3472/tps68470_board_data.c
+++ b/drivers/platform/x86/intel/int3472/tps68470_board_data.c
@@ -232,6 +232,73 @@ static const struct tps68470_regulator_platform_data dell_7212_tps68470_pdata =
},
};
+/* Settings for MSI Prestige 14 laptop. */
+
+static struct regulator_consumer_supply ovti5675_avdd_consumer_supplies[] = {
+ REGULATOR_SUPPLY("avdd", "i2c-OVTI5675:00"),
+};
+
+static struct regulator_consumer_supply ovti5675_dovdd_consumer_supplies[] = {
+ REGULATOR_SUPPLY("dovdd", "i2c-OVTI5675:00"),
+};
+
+static struct regulator_consumer_supply ovti5675_dvdd_consumer_supplies[] = {
+ REGULATOR_SUPPLY("dvdd", "i2c-OVTI5675:00"),
+};
+
+static const struct regulator_init_data msi_p14_ai_evo_tps68470_core_reg_init_data = {
+ .constraints = {
+ .min_uV = 1200000,
+ .max_uV = 1200000,
+ .apply_uV = 1,
+ .valid_ops_mask = REGULATOR_CHANGE_STATUS,
+ },
+ .num_consumer_supplies = ARRAY_SIZE(ovti5675_dvdd_consumer_supplies),
+ .consumer_supplies = ovti5675_dvdd_consumer_supplies,
+};
+
+static const struct regulator_init_data msi_p14_ai_evo_tps68470_ana_reg_init_data = {
+ .constraints = {
+ .min_uV = 2815200,
+ .max_uV = 2815200,
+ .apply_uV = 1,
+ .valid_ops_mask = REGULATOR_CHANGE_STATUS,
+ },
+ .num_consumer_supplies = ARRAY_SIZE(ovti5675_avdd_consumer_supplies),
+ .consumer_supplies = ovti5675_avdd_consumer_supplies,
+};
+
+static const struct regulator_init_data msi_p14_ai_evo_tps68470_vio_reg_init_data = {
+ .constraints = {
+ .min_uV = 1800600,
+ .max_uV = 1800600,
+ .apply_uV = 1,
+ .valid_ops_mask = REGULATOR_CHANGE_STATUS,
+ },
+ .num_consumer_supplies = 0,
+ .consumer_supplies = NULL,
+};
+
+static const struct regulator_init_data msi_p14_ai_evo_tps68470_vsio_reg_init_data = {
+ .constraints = {
+ .min_uV = 1800600,
+ .max_uV = 1800600,
+ .apply_uV = 1,
+ .valid_ops_mask = REGULATOR_CHANGE_STATUS,
+ },
+ .num_consumer_supplies = ARRAY_SIZE(ovti5675_dovdd_consumer_supplies),
+ .consumer_supplies = ovti5675_dovdd_consumer_supplies,
+};
+
+static const struct tps68470_regulator_platform_data msi_p14_ai_evo_tps68470_pdata = {
+ .reg_init_data = {
+ [TPS68470_CORE] = &msi_p14_ai_evo_tps68470_core_reg_init_data,
+ [TPS68470_ANA] = &msi_p14_ai_evo_tps68470_ana_reg_init_data,
+ [TPS68470_VIO] = &msi_p14_ai_evo_tps68470_vio_reg_init_data,
+ [TPS68470_VSIO] = &msi_p14_ai_evo_tps68470_vsio_reg_init_data,
+ },
+};
+
static struct gpiod_lookup_table surface_go_int347a_gpios = {
.dev_id = "i2c-INT347A:00",
.table = {
@@ -258,6 +325,19 @@ static struct gpiod_lookup_table dell_7212_int3479_gpios = {
}
};
+static struct gpiod_lookup_table msi_p14_ai_evo_ovti5675_gpios = {
+ .dev_id = "i2c-OVTI5675:00",
+ .table = {
+ GPIO_LOOKUP_IDX("tps68470-gpio", 9, "reset", 0, GPIO_ACTIVE_LOW),
+ GPIO_LOOKUP_IDX("tps68470-gpio", 7, "reset", 1, GPIO_ACTIVE_LOW),
+ { }
+ }
+};
+
+static const struct tps68470_gpio_platform_data msi_p14_ai_evo_tps68470_gpio_pdata = {
+ .daisy_chain_enable = true,
+};
+
static const struct int3472_tps68470_board_data surface_go_tps68470_board_data = {
.dev_name = "i2c-INT3472:05",
.tps68470_regulator_pdata = &surface_go_tps68470_pdata,
@@ -287,6 +367,16 @@ static const struct int3472_tps68470_board_data dell_7212_tps68470_board_data =
},
};
+static const struct int3472_tps68470_board_data msi_p14_ai_evo_tps68470_board_data = {
+ .dev_name = "i2c-INT3472:06",
+ .tps68470_regulator_pdata = &msi_p14_ai_evo_tps68470_pdata,
+ .tps68470_gpio_pdata = &msi_p14_ai_evo_tps68470_gpio_pdata,
+ .n_gpiod_lookups = 1,
+ .tps68470_gpio_lookup_tables = {
+ &msi_p14_ai_evo_ovti5675_gpios,
+ },
+};
+
static const struct dmi_system_id int3472_tps68470_board_data_table[] = {
{
.matches = {
@@ -316,6 +406,13 @@ static const struct dmi_system_id int3472_tps68470_board_data_table[] = {
},
.driver_data = (void *)&dell_7212_tps68470_board_data,
},
+ {
+ .matches = {
+ DMI_EXACT_MATCH(DMI_SYS_VENDOR, "Micro-Star International Co., Ltd."),
+ DMI_EXACT_MATCH(DMI_PRODUCT_NAME, "Prestige 14 AI+ Evo C2VMG"),
+ },
+ .driver_data = (void *)&msi_p14_ai_evo_tps68470_board_data,
+ },
{ }
};
--
2.53.0
^ permalink raw reply related [flat|nested] 23+ messages in thread* Re: [PATCH 5/5] platform: int3472: Add MSI prestige board data
2026-03-10 12:44 ` [PATCH 5/5] platform: int3472: Add MSI prestige board data Antti Laakso
@ 2026-03-10 13:09 ` Hans de Goede
2026-03-10 13:17 ` Sakari Ailus
2026-03-10 14:32 ` Dan Scally
1 sibling, 1 reply; 23+ messages in thread
From: Hans de Goede @ 2026-03-10 13:09 UTC (permalink / raw)
To: Antti Laakso, linux-media
Cc: linux-gpio, platform-driver-x86, linusw, brgl, sakari.ailus,
mchehab, dan.scally, ilpo.jarvinen, hverkuil+cisco, sre, hao.yao,
jason.z.chen, jimmy.su, miguel.vadillo, kees, ribalda
Hi,
On 10-Mar-26 13:44, Antti Laakso wrote:
> Define regulators and gpios for MSI Prestige 14 AI EVO+ laptop.
>
> Signed-off-by: Antti Laakso <antti.laakso@linux.intel.com>
> ---
> .../x86/intel/int3472/tps68470_board_data.c | 97 +++++++++++++++++++
> 1 file changed, 97 insertions(+)
>
> diff --git a/drivers/platform/x86/intel/int3472/tps68470_board_data.c b/drivers/platform/x86/intel/int3472/tps68470_board_data.c
> index 71357a036292..fe7c23e72d66 100644
> --- a/drivers/platform/x86/intel/int3472/tps68470_board_data.c
> +++ b/drivers/platform/x86/intel/int3472/tps68470_board_data.c
> @@ -232,6 +232,73 @@ static const struct tps68470_regulator_platform_data dell_7212_tps68470_pdata =
> },
> };
>
> +/* Settings for MSI Prestige 14 laptop. */
> +
> +static struct regulator_consumer_supply ovti5675_avdd_consumer_supplies[] = {
> + REGULATOR_SUPPLY("avdd", "i2c-OVTI5675:00"),
> +};
> +
> +static struct regulator_consumer_supply ovti5675_dovdd_consumer_supplies[] = {
> + REGULATOR_SUPPLY("dovdd", "i2c-OVTI5675:00"),
> +};
> +
> +static struct regulator_consumer_supply ovti5675_dvdd_consumer_supplies[] = {
> + REGULATOR_SUPPLY("dvdd", "i2c-OVTI5675:00"),
> +};
> +
> +static const struct regulator_init_data msi_p14_ai_evo_tps68470_core_reg_init_data = {
> + .constraints = {
> + .min_uV = 1200000,
> + .max_uV = 1200000,
> + .apply_uV = 1,
> + .valid_ops_mask = REGULATOR_CHANGE_STATUS,
> + },
> + .num_consumer_supplies = ARRAY_SIZE(ovti5675_dvdd_consumer_supplies),
> + .consumer_supplies = ovti5675_dvdd_consumer_supplies,
> +};
> +
> +static const struct regulator_init_data msi_p14_ai_evo_tps68470_ana_reg_init_data = {
> + .constraints = {
> + .min_uV = 2815200,
> + .max_uV = 2815200,
> + .apply_uV = 1,
> + .valid_ops_mask = REGULATOR_CHANGE_STATUS,
> + },
> + .num_consumer_supplies = ARRAY_SIZE(ovti5675_avdd_consumer_supplies),
> + .consumer_supplies = ovti5675_avdd_consumer_supplies,
> +};
> +
> +static const struct regulator_init_data msi_p14_ai_evo_tps68470_vio_reg_init_data = {
> + .constraints = {
> + .min_uV = 1800600,
> + .max_uV = 1800600,
> + .apply_uV = 1,
> + .valid_ops_mask = REGULATOR_CHANGE_STATUS,
> + },
> + .num_consumer_supplies = 0,
> + .consumer_supplies = NULL,
> +};
> +
> +static const struct regulator_init_data msi_p14_ai_evo_tps68470_vsio_reg_init_data = {
> + .constraints = {
> + .min_uV = 1800600,
> + .max_uV = 1800600,
> + .apply_uV = 1,
> + .valid_ops_mask = REGULATOR_CHANGE_STATUS,
> + },
> + .num_consumer_supplies = ARRAY_SIZE(ovti5675_dovdd_consumer_supplies),
> + .consumer_supplies = ovti5675_dovdd_consumer_supplies,
> +};
> +
> +static const struct tps68470_regulator_platform_data msi_p14_ai_evo_tps68470_pdata = {
> + .reg_init_data = {
> + [TPS68470_CORE] = &msi_p14_ai_evo_tps68470_core_reg_init_data,
> + [TPS68470_ANA] = &msi_p14_ai_evo_tps68470_ana_reg_init_data,
> + [TPS68470_VIO] = &msi_p14_ai_evo_tps68470_vio_reg_init_data,
> + [TPS68470_VSIO] = &msi_p14_ai_evo_tps68470_vsio_reg_init_data,
> + },
> +};
> +
> static struct gpiod_lookup_table surface_go_int347a_gpios = {
> .dev_id = "i2c-INT347A:00",
> .table = {
> @@ -258,6 +325,19 @@ static struct gpiod_lookup_table dell_7212_int3479_gpios = {
> }
> };
>
> +static struct gpiod_lookup_table msi_p14_ai_evo_ovti5675_gpios = {
> + .dev_id = "i2c-OVTI5675:00",
> + .table = {
> + GPIO_LOOKUP_IDX("tps68470-gpio", 9, "reset", 0, GPIO_ACTIVE_LOW),
> + GPIO_LOOKUP_IDX("tps68470-gpio", 7, "reset", 1, GPIO_ACTIVE_LOW),
> + { }
> + }
> +};
> +
> +static const struct tps68470_gpio_platform_data msi_p14_ai_evo_tps68470_gpio_pdata = {
> + .daisy_chain_enable = true,
> +};
> +
> static const struct int3472_tps68470_board_data surface_go_tps68470_board_data = {
> .dev_name = "i2c-INT3472:05",
> .tps68470_regulator_pdata = &surface_go_tps68470_pdata,
> @@ -287,6 +367,16 @@ static const struct int3472_tps68470_board_data dell_7212_tps68470_board_data =
> },
> };
>
> +static const struct int3472_tps68470_board_data msi_p14_ai_evo_tps68470_board_data = {
> + .dev_name = "i2c-INT3472:06",
> + .tps68470_regulator_pdata = &msi_p14_ai_evo_tps68470_pdata,
> + .tps68470_gpio_pdata = &msi_p14_ai_evo_tps68470_gpio_pdata,
> + .n_gpiod_lookups = 1,
> + .tps68470_gpio_lookup_tables = {
> + &msi_p14_ai_evo_ovti5675_gpios,
> + },
> +};
> +
> static const struct dmi_system_id int3472_tps68470_board_data_table[] = {
> {
> .matches = {
> @@ -316,6 +406,13 @@ static const struct dmi_system_id int3472_tps68470_board_data_table[] = {
> },
> .driver_data = (void *)&dell_7212_tps68470_board_data,
> },
> + {
> + .matches = {
> + DMI_EXACT_MATCH(DMI_SYS_VENDOR, "Micro-Star International Co., Ltd."),
> + DMI_EXACT_MATCH(DMI_PRODUCT_NAME, "Prestige 14 AI+ Evo C2VMG"),
I think this match might be a bit to specific, e.g. there also is a C1M model where
this might also apply? See:
https://www.msi.com/Business-Productivity/Prestige-14-AI-Evo-C1MX
or maybe these are really different ?
If you can look into that somehow that would be great. If you cannot find
out if other models are compatible we should probably play it safe and
keep the specific match you've above for now.
Reviewed-by: Hans de Goede <johannes.goede@oss.qualcomm.com>
Regards,
Hans
> + },
> + .driver_data = (void *)&msi_p14_ai_evo_tps68470_board_data,
> + },
> { }
> };
>
^ permalink raw reply [flat|nested] 23+ messages in thread* Re: [PATCH 5/5] platform: int3472: Add MSI prestige board data
2026-03-10 13:09 ` Hans de Goede
@ 2026-03-10 13:17 ` Sakari Ailus
2026-03-10 14:24 ` Hans de Goede
0 siblings, 1 reply; 23+ messages in thread
From: Sakari Ailus @ 2026-03-10 13:17 UTC (permalink / raw)
To: Hans de Goede
Cc: Antti Laakso, linux-media, linux-gpio, platform-driver-x86,
linusw, brgl, mchehab, dan.scally, ilpo.jarvinen, hverkuil+cisco,
sre, hao.yao, jason.z.chen, jimmy.su, miguel.vadillo, kees,
ribalda
Hi Hans,
On Tue, Mar 10, 2026 at 02:09:54PM +0100, Hans de Goede wrote:
> Hi,
>
> On 10-Mar-26 13:44, Antti Laakso wrote:
> > Define regulators and gpios for MSI Prestige 14 AI EVO+ laptop.
> >
> > Signed-off-by: Antti Laakso <antti.laakso@linux.intel.com>
> > ---
> > .../x86/intel/int3472/tps68470_board_data.c | 97 +++++++++++++++++++
> > 1 file changed, 97 insertions(+)
> >
> > diff --git a/drivers/platform/x86/intel/int3472/tps68470_board_data.c b/drivers/platform/x86/intel/int3472/tps68470_board_data.c
> > index 71357a036292..fe7c23e72d66 100644
> > --- a/drivers/platform/x86/intel/int3472/tps68470_board_data.c
> > +++ b/drivers/platform/x86/intel/int3472/tps68470_board_data.c
> > @@ -232,6 +232,73 @@ static const struct tps68470_regulator_platform_data dell_7212_tps68470_pdata =
> > },
> > };
> >
> > +/* Settings for MSI Prestige 14 laptop. */
> > +
> > +static struct regulator_consumer_supply ovti5675_avdd_consumer_supplies[] = {
> > + REGULATOR_SUPPLY("avdd", "i2c-OVTI5675:00"),
> > +};
> > +
> > +static struct regulator_consumer_supply ovti5675_dovdd_consumer_supplies[] = {
> > + REGULATOR_SUPPLY("dovdd", "i2c-OVTI5675:00"),
> > +};
> > +
> > +static struct regulator_consumer_supply ovti5675_dvdd_consumer_supplies[] = {
> > + REGULATOR_SUPPLY("dvdd", "i2c-OVTI5675:00"),
> > +};
> > +
> > +static const struct regulator_init_data msi_p14_ai_evo_tps68470_core_reg_init_data = {
> > + .constraints = {
> > + .min_uV = 1200000,
> > + .max_uV = 1200000,
> > + .apply_uV = 1,
> > + .valid_ops_mask = REGULATOR_CHANGE_STATUS,
> > + },
> > + .num_consumer_supplies = ARRAY_SIZE(ovti5675_dvdd_consumer_supplies),
> > + .consumer_supplies = ovti5675_dvdd_consumer_supplies,
> > +};
> > +
> > +static const struct regulator_init_data msi_p14_ai_evo_tps68470_ana_reg_init_data = {
> > + .constraints = {
> > + .min_uV = 2815200,
> > + .max_uV = 2815200,
> > + .apply_uV = 1,
> > + .valid_ops_mask = REGULATOR_CHANGE_STATUS,
> > + },
> > + .num_consumer_supplies = ARRAY_SIZE(ovti5675_avdd_consumer_supplies),
> > + .consumer_supplies = ovti5675_avdd_consumer_supplies,
> > +};
> > +
> > +static const struct regulator_init_data msi_p14_ai_evo_tps68470_vio_reg_init_data = {
> > + .constraints = {
> > + .min_uV = 1800600,
> > + .max_uV = 1800600,
> > + .apply_uV = 1,
> > + .valid_ops_mask = REGULATOR_CHANGE_STATUS,
> > + },
> > + .num_consumer_supplies = 0,
> > + .consumer_supplies = NULL,
> > +};
> > +
> > +static const struct regulator_init_data msi_p14_ai_evo_tps68470_vsio_reg_init_data = {
> > + .constraints = {
> > + .min_uV = 1800600,
> > + .max_uV = 1800600,
> > + .apply_uV = 1,
> > + .valid_ops_mask = REGULATOR_CHANGE_STATUS,
> > + },
> > + .num_consumer_supplies = ARRAY_SIZE(ovti5675_dovdd_consumer_supplies),
> > + .consumer_supplies = ovti5675_dovdd_consumer_supplies,
> > +};
> > +
> > +static const struct tps68470_regulator_platform_data msi_p14_ai_evo_tps68470_pdata = {
> > + .reg_init_data = {
> > + [TPS68470_CORE] = &msi_p14_ai_evo_tps68470_core_reg_init_data,
> > + [TPS68470_ANA] = &msi_p14_ai_evo_tps68470_ana_reg_init_data,
> > + [TPS68470_VIO] = &msi_p14_ai_evo_tps68470_vio_reg_init_data,
> > + [TPS68470_VSIO] = &msi_p14_ai_evo_tps68470_vsio_reg_init_data,
> > + },
> > +};
> > +
> > static struct gpiod_lookup_table surface_go_int347a_gpios = {
> > .dev_id = "i2c-INT347A:00",
> > .table = {
> > @@ -258,6 +325,19 @@ static struct gpiod_lookup_table dell_7212_int3479_gpios = {
> > }
> > };
> >
> > +static struct gpiod_lookup_table msi_p14_ai_evo_ovti5675_gpios = {
> > + .dev_id = "i2c-OVTI5675:00",
> > + .table = {
> > + GPIO_LOOKUP_IDX("tps68470-gpio", 9, "reset", 0, GPIO_ACTIVE_LOW),
> > + GPIO_LOOKUP_IDX("tps68470-gpio", 7, "reset", 1, GPIO_ACTIVE_LOW),
> > + { }
> > + }
> > +};
> > +
> > +static const struct tps68470_gpio_platform_data msi_p14_ai_evo_tps68470_gpio_pdata = {
> > + .daisy_chain_enable = true,
> > +};
> > +
> > static const struct int3472_tps68470_board_data surface_go_tps68470_board_data = {
> > .dev_name = "i2c-INT3472:05",
> > .tps68470_regulator_pdata = &surface_go_tps68470_pdata,
> > @@ -287,6 +367,16 @@ static const struct int3472_tps68470_board_data dell_7212_tps68470_board_data =
> > },
> > };
> >
> > +static const struct int3472_tps68470_board_data msi_p14_ai_evo_tps68470_board_data = {
> > + .dev_name = "i2c-INT3472:06",
> > + .tps68470_regulator_pdata = &msi_p14_ai_evo_tps68470_pdata,
> > + .tps68470_gpio_pdata = &msi_p14_ai_evo_tps68470_gpio_pdata,
> > + .n_gpiod_lookups = 1,
> > + .tps68470_gpio_lookup_tables = {
> > + &msi_p14_ai_evo_ovti5675_gpios,
> > + },
> > +};
> > +
> > static const struct dmi_system_id int3472_tps68470_board_data_table[] = {
> > {
> > .matches = {
> > @@ -316,6 +406,13 @@ static const struct dmi_system_id int3472_tps68470_board_data_table[] = {
> > },
> > .driver_data = (void *)&dell_7212_tps68470_board_data,
> > },
> > + {
> > + .matches = {
> > + DMI_EXACT_MATCH(DMI_SYS_VENDOR, "Micro-Star International Co., Ltd."),
> > + DMI_EXACT_MATCH(DMI_PRODUCT_NAME, "Prestige 14 AI+ Evo C2VMG"),
>
> I think this match might be a bit to specific, e.g. there also is a C1M model where
> this might also apply? See:
>
> https://www.msi.com/Business-Productivity/Prestige-14-AI-Evo-C1MX
>
> or maybe these are really different ?
>
> If you can look into that somehow that would be great. If you cannot find
> out if other models are compatible we should probably play it safe and
> keep the specific match you've above for now.
This one is MTL whereas Antti's patch adds support for an LNL laptop. It'd
be great if we could get a confirmation from MSI the PMIC configuration in
these models would match Presige 14 AI+ (or that it's different). There's
also a very similar model with a 13" display... Without a confirmation I
wouldn't relax the DMI check.
That being said, the risk of smoke being released might be small on a wrong
regulator (or GPIO) configuration but it can't be ruled out.
>
> Reviewed-by: Hans de Goede <johannes.goede@oss.qualcomm.com>
--
Regards,
Sakari Ailus
^ permalink raw reply [flat|nested] 23+ messages in thread* Re: [PATCH 5/5] platform: int3472: Add MSI prestige board data
2026-03-10 13:17 ` Sakari Ailus
@ 2026-03-10 14:24 ` Hans de Goede
0 siblings, 0 replies; 23+ messages in thread
From: Hans de Goede @ 2026-03-10 14:24 UTC (permalink / raw)
To: Sakari Ailus
Cc: Antti Laakso, linux-media, linux-gpio, platform-driver-x86,
linusw, brgl, mchehab, dan.scally, ilpo.jarvinen, hverkuil+cisco,
sre, hao.yao, jason.z.chen, jimmy.su, miguel.vadillo, kees,
ribalda
Hi,
On 10-Mar-26 14:17, Sakari Ailus wrote:
> Hi Hans,
>
> On Tue, Mar 10, 2026 at 02:09:54PM +0100, Hans de Goede wrote:
>> Hi,
>>
>> On 10-Mar-26 13:44, Antti Laakso wrote:
>>> Define regulators and gpios for MSI Prestige 14 AI EVO+ laptop.
>>>
>>> Signed-off-by: Antti Laakso <antti.laakso@linux.intel.com>
>>> ---
>>> .../x86/intel/int3472/tps68470_board_data.c | 97 +++++++++++++++++++
>>> 1 file changed, 97 insertions(+)
>>>
>>> diff --git a/drivers/platform/x86/intel/int3472/tps68470_board_data.c b/drivers/platform/x86/intel/int3472/tps68470_board_data.c
>>> index 71357a036292..fe7c23e72d66 100644
>>> --- a/drivers/platform/x86/intel/int3472/tps68470_board_data.c
>>> +++ b/drivers/platform/x86/intel/int3472/tps68470_board_data.c
>>> @@ -232,6 +232,73 @@ static const struct tps68470_regulator_platform_data dell_7212_tps68470_pdata =
>>> },
>>> };
>>>
>>> +/* Settings for MSI Prestige 14 laptop. */
>>> +
>>> +static struct regulator_consumer_supply ovti5675_avdd_consumer_supplies[] = {
>>> + REGULATOR_SUPPLY("avdd", "i2c-OVTI5675:00"),
>>> +};
>>> +
>>> +static struct regulator_consumer_supply ovti5675_dovdd_consumer_supplies[] = {
>>> + REGULATOR_SUPPLY("dovdd", "i2c-OVTI5675:00"),
>>> +};
>>> +
>>> +static struct regulator_consumer_supply ovti5675_dvdd_consumer_supplies[] = {
>>> + REGULATOR_SUPPLY("dvdd", "i2c-OVTI5675:00"),
>>> +};
>>> +
>>> +static const struct regulator_init_data msi_p14_ai_evo_tps68470_core_reg_init_data = {
>>> + .constraints = {
>>> + .min_uV = 1200000,
>>> + .max_uV = 1200000,
>>> + .apply_uV = 1,
>>> + .valid_ops_mask = REGULATOR_CHANGE_STATUS,
>>> + },
>>> + .num_consumer_supplies = ARRAY_SIZE(ovti5675_dvdd_consumer_supplies),
>>> + .consumer_supplies = ovti5675_dvdd_consumer_supplies,
>>> +};
>>> +
>>> +static const struct regulator_init_data msi_p14_ai_evo_tps68470_ana_reg_init_data = {
>>> + .constraints = {
>>> + .min_uV = 2815200,
>>> + .max_uV = 2815200,
>>> + .apply_uV = 1,
>>> + .valid_ops_mask = REGULATOR_CHANGE_STATUS,
>>> + },
>>> + .num_consumer_supplies = ARRAY_SIZE(ovti5675_avdd_consumer_supplies),
>>> + .consumer_supplies = ovti5675_avdd_consumer_supplies,
>>> +};
>>> +
>>> +static const struct regulator_init_data msi_p14_ai_evo_tps68470_vio_reg_init_data = {
>>> + .constraints = {
>>> + .min_uV = 1800600,
>>> + .max_uV = 1800600,
>>> + .apply_uV = 1,
>>> + .valid_ops_mask = REGULATOR_CHANGE_STATUS,
>>> + },
>>> + .num_consumer_supplies = 0,
>>> + .consumer_supplies = NULL,
>>> +};
>>> +
>>> +static const struct regulator_init_data msi_p14_ai_evo_tps68470_vsio_reg_init_data = {
>>> + .constraints = {
>>> + .min_uV = 1800600,
>>> + .max_uV = 1800600,
>>> + .apply_uV = 1,
>>> + .valid_ops_mask = REGULATOR_CHANGE_STATUS,
>>> + },
>>> + .num_consumer_supplies = ARRAY_SIZE(ovti5675_dovdd_consumer_supplies),
>>> + .consumer_supplies = ovti5675_dovdd_consumer_supplies,
>>> +};
>>> +
>>> +static const struct tps68470_regulator_platform_data msi_p14_ai_evo_tps68470_pdata = {
>>> + .reg_init_data = {
>>> + [TPS68470_CORE] = &msi_p14_ai_evo_tps68470_core_reg_init_data,
>>> + [TPS68470_ANA] = &msi_p14_ai_evo_tps68470_ana_reg_init_data,
>>> + [TPS68470_VIO] = &msi_p14_ai_evo_tps68470_vio_reg_init_data,
>>> + [TPS68470_VSIO] = &msi_p14_ai_evo_tps68470_vsio_reg_init_data,
>>> + },
>>> +};
>>> +
>>> static struct gpiod_lookup_table surface_go_int347a_gpios = {
>>> .dev_id = "i2c-INT347A:00",
>>> .table = {
>>> @@ -258,6 +325,19 @@ static struct gpiod_lookup_table dell_7212_int3479_gpios = {
>>> }
>>> };
>>>
>>> +static struct gpiod_lookup_table msi_p14_ai_evo_ovti5675_gpios = {
>>> + .dev_id = "i2c-OVTI5675:00",
>>> + .table = {
>>> + GPIO_LOOKUP_IDX("tps68470-gpio", 9, "reset", 0, GPIO_ACTIVE_LOW),
>>> + GPIO_LOOKUP_IDX("tps68470-gpio", 7, "reset", 1, GPIO_ACTIVE_LOW),
>>> + { }
>>> + }
>>> +};
>>> +
>>> +static const struct tps68470_gpio_platform_data msi_p14_ai_evo_tps68470_gpio_pdata = {
>>> + .daisy_chain_enable = true,
>>> +};
>>> +
>>> static const struct int3472_tps68470_board_data surface_go_tps68470_board_data = {
>>> .dev_name = "i2c-INT3472:05",
>>> .tps68470_regulator_pdata = &surface_go_tps68470_pdata,
>>> @@ -287,6 +367,16 @@ static const struct int3472_tps68470_board_data dell_7212_tps68470_board_data =
>>> },
>>> };
>>>
>>> +static const struct int3472_tps68470_board_data msi_p14_ai_evo_tps68470_board_data = {
>>> + .dev_name = "i2c-INT3472:06",
>>> + .tps68470_regulator_pdata = &msi_p14_ai_evo_tps68470_pdata,
>>> + .tps68470_gpio_pdata = &msi_p14_ai_evo_tps68470_gpio_pdata,
>>> + .n_gpiod_lookups = 1,
>>> + .tps68470_gpio_lookup_tables = {
>>> + &msi_p14_ai_evo_ovti5675_gpios,
>>> + },
>>> +};
>>> +
>>> static const struct dmi_system_id int3472_tps68470_board_data_table[] = {
>>> {
>>> .matches = {
>>> @@ -316,6 +406,13 @@ static const struct dmi_system_id int3472_tps68470_board_data_table[] = {
>>> },
>>> .driver_data = (void *)&dell_7212_tps68470_board_data,
>>> },
>>> + {
>>> + .matches = {
>>> + DMI_EXACT_MATCH(DMI_SYS_VENDOR, "Micro-Star International Co., Ltd."),
>>> + DMI_EXACT_MATCH(DMI_PRODUCT_NAME, "Prestige 14 AI+ Evo C2VMG"),
>>
>> I think this match might be a bit too specific, e.g. there also is a C1M model where
>> this might also apply? See:
>>
>> https://www.msi.com/Business-Productivity/Prestige-14-AI-Evo-C1MX
>>
>> or maybe these are really different ?
>>
>> If you can look into that somehow that would be great. If you cannot find
>> out if other models are compatible we should probably play it safe and
>> keep the specific match you've above for now.
>
> This one is MTL whereas Antti's patch adds support for an LNL laptop. It'd
> be great if we could get a confirmation from MSI the PMIC configuration in
> these models would match Presige 14 AI+ (or that it's different). There's
> also a very similar model with a 13" display... Without a confirmation I
> wouldn't relax the DMI check.
>
> That being said, the risk of smoke being released might be small on a wrong
> regulator (or GPIO) configuration but it can't be ruled out.
Ack, lets keep the match as is for now then.
Regards,
Hans
^ permalink raw reply [flat|nested] 23+ messages in thread
* Re: [PATCH 5/5] platform: int3472: Add MSI prestige board data
2026-03-10 12:44 ` [PATCH 5/5] platform: int3472: Add MSI prestige board data Antti Laakso
2026-03-10 13:09 ` Hans de Goede
@ 2026-03-10 14:32 ` Dan Scally
2026-03-10 15:02 ` Hans de Goede
2026-03-11 11:20 ` Antti Laakso
1 sibling, 2 replies; 23+ messages in thread
From: Dan Scally @ 2026-03-10 14:32 UTC (permalink / raw)
To: Antti Laakso, linux-media
Cc: linux-gpio, platform-driver-x86, linusw, brgl, sakari.ailus,
mchehab, hansg, ilpo.jarvinen, hverkuil+cisco, sre, hao.yao,
jimmy.su, miguel.vadillo, kees, ribalda
Hi Antti
On 10/03/2026 12:44, Antti Laakso wrote:
> Define regulators and gpios for MSI Prestige 14 AI EVO+ laptop.
>
> Signed-off-by: Antti Laakso <antti.laakso@linux.intel.com>
> ---
> .../x86/intel/int3472/tps68470_board_data.c | 97 +++++++++++++++++++
> 1 file changed, 97 insertions(+)
>
> diff --git a/drivers/platform/x86/intel/int3472/tps68470_board_data.c b/drivers/platform/x86/intel/int3472/tps68470_board_data.c
> index 71357a036292..fe7c23e72d66 100644
> --- a/drivers/platform/x86/intel/int3472/tps68470_board_data.c
> +++ b/drivers/platform/x86/intel/int3472/tps68470_board_data.c
> @@ -232,6 +232,73 @@ static const struct tps68470_regulator_platform_data dell_7212_tps68470_pdata =
> },
> };
>
> +/* Settings for MSI Prestige 14 laptop. */
> +
> +static struct regulator_consumer_supply ovti5675_avdd_consumer_supplies[] = {
> + REGULATOR_SUPPLY("avdd", "i2c-OVTI5675:00"),
> +};
> +
> +static struct regulator_consumer_supply ovti5675_dovdd_consumer_supplies[] = {
> + REGULATOR_SUPPLY("dovdd", "i2c-OVTI5675:00"),
> +};
> +
> +static struct regulator_consumer_supply ovti5675_dvdd_consumer_supplies[] = {
> + REGULATOR_SUPPLY("dvdd", "i2c-OVTI5675:00"),
> +};
> +
> +static const struct regulator_init_data msi_p14_ai_evo_tps68470_core_reg_init_data = {
> + .constraints = {
> + .min_uV = 1200000,
> + .max_uV = 1200000,
> + .apply_uV = 1,
> + .valid_ops_mask = REGULATOR_CHANGE_STATUS,
> + },
> + .num_consumer_supplies = ARRAY_SIZE(ovti5675_dvdd_consumer_supplies),
> + .consumer_supplies = ovti5675_dvdd_consumer_supplies,
> +};
> +
> +static const struct regulator_init_data msi_p14_ai_evo_tps68470_ana_reg_init_data = {
> + .constraints = {
> + .min_uV = 2815200,
> + .max_uV = 2815200,
> + .apply_uV = 1,
> + .valid_ops_mask = REGULATOR_CHANGE_STATUS,
> + },
> + .num_consumer_supplies = ARRAY_SIZE(ovti5675_avdd_consumer_supplies),
> + .consumer_supplies = ovti5675_avdd_consumer_supplies,
> +};
> +
> +static const struct regulator_init_data msi_p14_ai_evo_tps68470_vio_reg_init_data = {
> + .constraints = {
> + .min_uV = 1800600,
> + .max_uV = 1800600,
> + .apply_uV = 1,
> + .valid_ops_mask = REGULATOR_CHANGE_STATUS,
> + },
> + .num_consumer_supplies = 0,
> + .consumer_supplies = NULL,
> +};
> +
> +static const struct regulator_init_data msi_p14_ai_evo_tps68470_vsio_reg_init_data = {
> + .constraints = {
> + .min_uV = 1800600,
> + .max_uV = 1800600,
> + .apply_uV = 1,
> + .valid_ops_mask = REGULATOR_CHANGE_STATUS,
> + },
> + .num_consumer_supplies = ARRAY_SIZE(ovti5675_dovdd_consumer_supplies),
> + .consumer_supplies = ovti5675_dovdd_consumer_supplies,
> +};
> +
> +static const struct tps68470_regulator_platform_data msi_p14_ai_evo_tps68470_pdata = {
> + .reg_init_data = {
> + [TPS68470_CORE] = &msi_p14_ai_evo_tps68470_core_reg_init_data,
> + [TPS68470_ANA] = &msi_p14_ai_evo_tps68470_ana_reg_init_data,
> + [TPS68470_VIO] = &msi_p14_ai_evo_tps68470_vio_reg_init_data,
> + [TPS68470_VSIO] = &msi_p14_ai_evo_tps68470_vsio_reg_init_data,
> + },
> +};
> +
> static struct gpiod_lookup_table surface_go_int347a_gpios = {
> .dev_id = "i2c-INT347A:00",
> .table = {
> @@ -258,6 +325,19 @@ static struct gpiod_lookup_table dell_7212_int3479_gpios = {
> }
> };
>
> +static struct gpiod_lookup_table msi_p14_ai_evo_ovti5675_gpios = {
> + .dev_id = "i2c-OVTI5675:00",
> + .table = {
> + GPIO_LOOKUP_IDX("tps68470-gpio", 9, "reset", 0, GPIO_ACTIVE_LOW),
> + GPIO_LOOKUP_IDX("tps68470-gpio", 7, "reset", 1, GPIO_ACTIVE_LOW),
The ov5675 driver seems only to look for a single gpio, so I think the second entry would never be
accessed here...should there be an accompanying driver change?
Thanks
Dan
> + { }
> + }
> +};
> +
> +static const struct tps68470_gpio_platform_data msi_p14_ai_evo_tps68470_gpio_pdata = {
> + .daisy_chain_enable = true,
> +};
> +
> static const struct int3472_tps68470_board_data surface_go_tps68470_board_data = {
> .dev_name = "i2c-INT3472:05",
> .tps68470_regulator_pdata = &surface_go_tps68470_pdata,
> @@ -287,6 +367,16 @@ static const struct int3472_tps68470_board_data dell_7212_tps68470_board_data =
> },
> };
>
> +static const struct int3472_tps68470_board_data msi_p14_ai_evo_tps68470_board_data = {
> + .dev_name = "i2c-INT3472:06",
> + .tps68470_regulator_pdata = &msi_p14_ai_evo_tps68470_pdata,
> + .tps68470_gpio_pdata = &msi_p14_ai_evo_tps68470_gpio_pdata,
> + .n_gpiod_lookups = 1,
> + .tps68470_gpio_lookup_tables = {
> + &msi_p14_ai_evo_ovti5675_gpios,
> + },
> +};
> +
> static const struct dmi_system_id int3472_tps68470_board_data_table[] = {
> {
> .matches = {
> @@ -316,6 +406,13 @@ static const struct dmi_system_id int3472_tps68470_board_data_table[] = {
> },
> .driver_data = (void *)&dell_7212_tps68470_board_data,
> },
> + {
> + .matches = {
> + DMI_EXACT_MATCH(DMI_SYS_VENDOR, "Micro-Star International Co., Ltd."),
> + DMI_EXACT_MATCH(DMI_PRODUCT_NAME, "Prestige 14 AI+ Evo C2VMG"),
> + },
> + .driver_data = (void *)&msi_p14_ai_evo_tps68470_board_data,
> + },
> { }
> };
>
^ permalink raw reply [flat|nested] 23+ messages in thread* Re: [PATCH 5/5] platform: int3472: Add MSI prestige board data
2026-03-10 14:32 ` Dan Scally
@ 2026-03-10 15:02 ` Hans de Goede
2026-03-11 11:20 ` Antti Laakso
1 sibling, 0 replies; 23+ messages in thread
From: Hans de Goede @ 2026-03-10 15:02 UTC (permalink / raw)
To: Dan Scally, Antti Laakso, linux-media
Cc: linux-gpio, platform-driver-x86, linusw, brgl, sakari.ailus,
mchehab, ilpo.jarvinen, hverkuil+cisco, sre, hao.yao, jimmy.su,
miguel.vadillo, kees, ribalda
Hi,
On 10-Mar-26 15:32, Dan Scally wrote:
> Hi Antti
>
> On 10/03/2026 12:44, Antti Laakso wrote:
>> Define regulators and gpios for MSI Prestige 14 AI EVO+ laptop.
>>
>> Signed-off-by: Antti Laakso <antti.laakso@linux.intel.com>
>> ---
>> .../x86/intel/int3472/tps68470_board_data.c | 97 +++++++++++++++++++
>> 1 file changed, 97 insertions(+)
>>
>> diff --git a/drivers/platform/x86/intel/int3472/tps68470_board_data.c b/drivers/platform/x86/intel/int3472/tps68470_board_data.c
>> index 71357a036292..fe7c23e72d66 100644
>> --- a/drivers/platform/x86/intel/int3472/tps68470_board_data.c
>> +++ b/drivers/platform/x86/intel/int3472/tps68470_board_data.c
>> @@ -232,6 +232,73 @@ static const struct tps68470_regulator_platform_data dell_7212_tps68470_pdata =
>> },
>> };
>> +/* Settings for MSI Prestige 14 laptop. */
>> +
>> +static struct regulator_consumer_supply ovti5675_avdd_consumer_supplies[] = {
>> + REGULATOR_SUPPLY("avdd", "i2c-OVTI5675:00"),
>> +};
>> +
>> +static struct regulator_consumer_supply ovti5675_dovdd_consumer_supplies[] = {
>> + REGULATOR_SUPPLY("dovdd", "i2c-OVTI5675:00"),
>> +};
>> +
>> +static struct regulator_consumer_supply ovti5675_dvdd_consumer_supplies[] = {
>> + REGULATOR_SUPPLY("dvdd", "i2c-OVTI5675:00"),
>> +};
>> +
>> +static const struct regulator_init_data msi_p14_ai_evo_tps68470_core_reg_init_data = {
>> + .constraints = {
>> + .min_uV = 1200000,
>> + .max_uV = 1200000,
>> + .apply_uV = 1,
>> + .valid_ops_mask = REGULATOR_CHANGE_STATUS,
>> + },
>> + .num_consumer_supplies = ARRAY_SIZE(ovti5675_dvdd_consumer_supplies),
>> + .consumer_supplies = ovti5675_dvdd_consumer_supplies,
>> +};
>> +
>> +static const struct regulator_init_data msi_p14_ai_evo_tps68470_ana_reg_init_data = {
>> + .constraints = {
>> + .min_uV = 2815200,
>> + .max_uV = 2815200,
>> + .apply_uV = 1,
>> + .valid_ops_mask = REGULATOR_CHANGE_STATUS,
>> + },
>> + .num_consumer_supplies = ARRAY_SIZE(ovti5675_avdd_consumer_supplies),
>> + .consumer_supplies = ovti5675_avdd_consumer_supplies,
>> +};
>> +
>> +static const struct regulator_init_data msi_p14_ai_evo_tps68470_vio_reg_init_data = {
>> + .constraints = {
>> + .min_uV = 1800600,
>> + .max_uV = 1800600,
>> + .apply_uV = 1,
>> + .valid_ops_mask = REGULATOR_CHANGE_STATUS,
>> + },
>> + .num_consumer_supplies = 0,
>> + .consumer_supplies = NULL,
>> +};
>> +
>> +static const struct regulator_init_data msi_p14_ai_evo_tps68470_vsio_reg_init_data = {
>> + .constraints = {
>> + .min_uV = 1800600,
>> + .max_uV = 1800600,
>> + .apply_uV = 1,
>> + .valid_ops_mask = REGULATOR_CHANGE_STATUS,
>> + },
>> + .num_consumer_supplies = ARRAY_SIZE(ovti5675_dovdd_consumer_supplies),
>> + .consumer_supplies = ovti5675_dovdd_consumer_supplies,
>> +};
>> +
>> +static const struct tps68470_regulator_platform_data msi_p14_ai_evo_tps68470_pdata = {
>> + .reg_init_data = {
>> + [TPS68470_CORE] = &msi_p14_ai_evo_tps68470_core_reg_init_data,
>> + [TPS68470_ANA] = &msi_p14_ai_evo_tps68470_ana_reg_init_data,
>> + [TPS68470_VIO] = &msi_p14_ai_evo_tps68470_vio_reg_init_data,
>> + [TPS68470_VSIO] = &msi_p14_ai_evo_tps68470_vsio_reg_init_data,
>> + },
>> +};
>> +
>> static struct gpiod_lookup_table surface_go_int347a_gpios = {
>> .dev_id = "i2c-INT347A:00",
>> .table = {
>> @@ -258,6 +325,19 @@ static struct gpiod_lookup_table dell_7212_int3479_gpios = {
>> }
>> };
>> +static struct gpiod_lookup_table msi_p14_ai_evo_ovti5675_gpios = {
>> + .dev_id = "i2c-OVTI5675:00",
>> + .table = {
>> + GPIO_LOOKUP_IDX("tps68470-gpio", 9, "reset", 0, GPIO_ACTIVE_LOW),
>> + GPIO_LOOKUP_IDX("tps68470-gpio", 7, "reset", 1, GPIO_ACTIVE_LOW),
>
> The ov5675 driver seems only to look for a single gpio, so I think the second entry would never be accessed here...should there be an accompanying driver change?
Ah I missed this, yes having 2 entries mapping to the same label is not
useful. The first entry (with index 0) will simply always be used in that
case.
Also this should use plain GPIO_LOOKUP() since the index part (the only
difference here) is never used in sensor drivers.
Regards,
Hans
>
> Thanks
> Dan
>
>> + { }
>> + }
>> +};
>> +
>> +static const struct tps68470_gpio_platform_data msi_p14_ai_evo_tps68470_gpio_pdata = {
>> + .daisy_chain_enable = true,
>> +};
>> +
>> static const struct int3472_tps68470_board_data surface_go_tps68470_board_data = {
>> .dev_name = "i2c-INT3472:05",
>> .tps68470_regulator_pdata = &surface_go_tps68470_pdata,
>> @@ -287,6 +367,16 @@ static const struct int3472_tps68470_board_data dell_7212_tps68470_board_data =
>> },
>> };
>> +static const struct int3472_tps68470_board_data msi_p14_ai_evo_tps68470_board_data = {
>> + .dev_name = "i2c-INT3472:06",
>> + .tps68470_regulator_pdata = &msi_p14_ai_evo_tps68470_pdata,
>> + .tps68470_gpio_pdata = &msi_p14_ai_evo_tps68470_gpio_pdata,
>> + .n_gpiod_lookups = 1,
>> + .tps68470_gpio_lookup_tables = {
>> + &msi_p14_ai_evo_ovti5675_gpios,
>> + },
>> +};
>> +
>> static const struct dmi_system_id int3472_tps68470_board_data_table[] = {
>> {
>> .matches = {
>> @@ -316,6 +406,13 @@ static const struct dmi_system_id int3472_tps68470_board_data_table[] = {
>> },
>> .driver_data = (void *)&dell_7212_tps68470_board_data,
>> },
>> + {
>> + .matches = {
>> + DMI_EXACT_MATCH(DMI_SYS_VENDOR, "Micro-Star International Co., Ltd."),
>> + DMI_EXACT_MATCH(DMI_PRODUCT_NAME, "Prestige 14 AI+ Evo C2VMG"),
>> + },
>> + .driver_data = (void *)&msi_p14_ai_evo_tps68470_board_data,
>> + },
>> { }
>> };
>>
>
^ permalink raw reply [flat|nested] 23+ messages in thread* Re: [PATCH 5/5] platform: int3472: Add MSI prestige board data
2026-03-10 14:32 ` Dan Scally
2026-03-10 15:02 ` Hans de Goede
@ 2026-03-11 11:20 ` Antti Laakso
1 sibling, 0 replies; 23+ messages in thread
From: Antti Laakso @ 2026-03-11 11:20 UTC (permalink / raw)
To: Dan Scally
Cc: linux-media, linux-gpio, platform-driver-x86, linusw, brgl,
sakari.ailus, mchehab, hansg, ilpo.jarvinen, hverkuil+cisco, sre,
hao.yao, jimmy.su, miguel.vadillo, kees, ribalda
Thanks for review Dan,
On Tue, Mar 10, 2026 at 02:32:56PM +0000, Dan Scally wrote:
> Hi Antti
>
> On 10/03/2026 12:44, Antti Laakso wrote:
> > Define regulators and gpios for MSI Prestige 14 AI EVO+ laptop.
> >
> > Signed-off-by: Antti Laakso <antti.laakso@linux.intel.com>
> > ---
> > .../x86/intel/int3472/tps68470_board_data.c | 97 +++++++++++++++++++
> > 1 file changed, 97 insertions(+)
> >
> > diff --git a/drivers/platform/x86/intel/int3472/tps68470_board_data.c b/drivers/platform/x86/intel/int3472/tps68470_board_data.c
> > index 71357a036292..fe7c23e72d66 100644
> > --- a/drivers/platform/x86/intel/int3472/tps68470_board_data.c
> > +++ b/drivers/platform/x86/intel/int3472/tps68470_board_data.c
> > @@ -232,6 +232,73 @@ static const struct tps68470_regulator_platform_data dell_7212_tps68470_pdata =
> > },
> > };
> > +/* Settings for MSI Prestige 14 laptop. */
> > +
> > +static struct regulator_consumer_supply ovti5675_avdd_consumer_supplies[] = {
> > + REGULATOR_SUPPLY("avdd", "i2c-OVTI5675:00"),
> > +};
> > +
> > +static struct regulator_consumer_supply ovti5675_dovdd_consumer_supplies[] = {
> > + REGULATOR_SUPPLY("dovdd", "i2c-OVTI5675:00"),
> > +};
> > +
> > +static struct regulator_consumer_supply ovti5675_dvdd_consumer_supplies[] = {
> > + REGULATOR_SUPPLY("dvdd", "i2c-OVTI5675:00"),
> > +};
> > +
> > +static const struct regulator_init_data msi_p14_ai_evo_tps68470_core_reg_init_data = {
> > + .constraints = {
> > + .min_uV = 1200000,
> > + .max_uV = 1200000,
> > + .apply_uV = 1,
> > + .valid_ops_mask = REGULATOR_CHANGE_STATUS,
> > + },
> > + .num_consumer_supplies = ARRAY_SIZE(ovti5675_dvdd_consumer_supplies),
> > + .consumer_supplies = ovti5675_dvdd_consumer_supplies,
> > +};
> > +
> > +static const struct regulator_init_data msi_p14_ai_evo_tps68470_ana_reg_init_data = {
> > + .constraints = {
> > + .min_uV = 2815200,
> > + .max_uV = 2815200,
> > + .apply_uV = 1,
> > + .valid_ops_mask = REGULATOR_CHANGE_STATUS,
> > + },
> > + .num_consumer_supplies = ARRAY_SIZE(ovti5675_avdd_consumer_supplies),
> > + .consumer_supplies = ovti5675_avdd_consumer_supplies,
> > +};
> > +
> > +static const struct regulator_init_data msi_p14_ai_evo_tps68470_vio_reg_init_data = {
> > + .constraints = {
> > + .min_uV = 1800600,
> > + .max_uV = 1800600,
> > + .apply_uV = 1,
> > + .valid_ops_mask = REGULATOR_CHANGE_STATUS,
> > + },
> > + .num_consumer_supplies = 0,
> > + .consumer_supplies = NULL,
> > +};
> > +
> > +static const struct regulator_init_data msi_p14_ai_evo_tps68470_vsio_reg_init_data = {
> > + .constraints = {
> > + .min_uV = 1800600,
> > + .max_uV = 1800600,
> > + .apply_uV = 1,
> > + .valid_ops_mask = REGULATOR_CHANGE_STATUS,
> > + },
> > + .num_consumer_supplies = ARRAY_SIZE(ovti5675_dovdd_consumer_supplies),
> > + .consumer_supplies = ovti5675_dovdd_consumer_supplies,
> > +};
> > +
> > +static const struct tps68470_regulator_platform_data msi_p14_ai_evo_tps68470_pdata = {
> > + .reg_init_data = {
> > + [TPS68470_CORE] = &msi_p14_ai_evo_tps68470_core_reg_init_data,
> > + [TPS68470_ANA] = &msi_p14_ai_evo_tps68470_ana_reg_init_data,
> > + [TPS68470_VIO] = &msi_p14_ai_evo_tps68470_vio_reg_init_data,
> > + [TPS68470_VSIO] = &msi_p14_ai_evo_tps68470_vsio_reg_init_data,
> > + },
> > +};
> > +
> > static struct gpiod_lookup_table surface_go_int347a_gpios = {
> > .dev_id = "i2c-INT347A:00",
> > .table = {
> > @@ -258,6 +325,19 @@ static struct gpiod_lookup_table dell_7212_int3479_gpios = {
> > }
> > };
> > +static struct gpiod_lookup_table msi_p14_ai_evo_ovti5675_gpios = {
> > + .dev_id = "i2c-OVTI5675:00",
> > + .table = {
> > + GPIO_LOOKUP_IDX("tps68470-gpio", 9, "reset", 0, GPIO_ACTIVE_LOW),
> > + GPIO_LOOKUP_IDX("tps68470-gpio", 7, "reset", 1, GPIO_ACTIVE_LOW),
>
> The ov5675 driver seems only to look for a single gpio, so I think the
> second entry would never be accessed here...should there be an accompanying
> driver change?
>
> Thanks
> Dan
Yes, the gpio 7 is not needed. I'll fix it for v2.
> > + { }
> > + }
> > +};
> > +
> > +static const struct tps68470_gpio_platform_data msi_p14_ai_evo_tps68470_gpio_pdata = {
> > + .daisy_chain_enable = true,
> > +};
> > +
> > static const struct int3472_tps68470_board_data surface_go_tps68470_board_data = {
> > .dev_name = "i2c-INT3472:05",
> > .tps68470_regulator_pdata = &surface_go_tps68470_pdata,
> > @@ -287,6 +367,16 @@ static const struct int3472_tps68470_board_data dell_7212_tps68470_board_data =
> > },
> > };
> > +static const struct int3472_tps68470_board_data msi_p14_ai_evo_tps68470_board_data = {
> > + .dev_name = "i2c-INT3472:06",
> > + .tps68470_regulator_pdata = &msi_p14_ai_evo_tps68470_pdata,
> > + .tps68470_gpio_pdata = &msi_p14_ai_evo_tps68470_gpio_pdata,
> > + .n_gpiod_lookups = 1,
> > + .tps68470_gpio_lookup_tables = {
> > + &msi_p14_ai_evo_ovti5675_gpios,
> > + },
> > +};
> > +
> > static const struct dmi_system_id int3472_tps68470_board_data_table[] = {
> > {
> > .matches = {
> > @@ -316,6 +406,13 @@ static const struct dmi_system_id int3472_tps68470_board_data_table[] = {
> > },
> > .driver_data = (void *)&dell_7212_tps68470_board_data,
> > },
> > + {
> > + .matches = {
> > + DMI_EXACT_MATCH(DMI_SYS_VENDOR, "Micro-Star International Co., Ltd."),
> > + DMI_EXACT_MATCH(DMI_PRODUCT_NAME, "Prestige 14 AI+ Evo C2VMG"),
> > + },
> > + .driver_data = (void *)&msi_p14_ai_evo_tps68470_board_data,
> > + },
> > { }
> > };
>
^ permalink raw reply [flat|nested] 23+ messages in thread