All of lore.kernel.org
 help / color / mirror / Atom feed
From: Alexandre Belloni <alexandre.belloni@bootlin.com>
To: Krzysztof Kozlowski <krzk@kernel.org>
Cc: Aman Kumar Pandey <aman.kumarpandey@nxp.com>,
	linux-kernel@vger.kernel.org, linux-i3c@lists.infradead.org,
	krzk+dt@kernel.org, robh@kernel.org, conor+dt@kernel.org,
	devicetree@vger.kernel.org, broonie@kernel.org, lee@kernel.org,
	Frank.Li@nxp.com, lgirdwood@gmail.com, vikash.bansal@nxp.com,
	priyanka.jain@nxp.com, shashank.rebbapragada@nxp.com
Subject: Re: [PATCH v4 3/5] mfd: p3h2x4x: Add driver for NXP P3H2x4x i3c hub and on-die regulator
Date: Wed, 14 Jan 2026 18:17:32 +0100	[thread overview]
Message-ID: <20260114171732470bd389@mail.local> (raw)
In-Reply-To: <20260114-refreshing-groovy-buzzard-af2eeb@quoll>

On 14/01/2026 09:28:53+0100, Krzysztof Kozlowski wrote:
> > +static int p3h2x4x_device_probe_i3c(struct i3c_device *i3cdev)
> > +{
> > +	struct p3h2x4x_dev *p3h2x4x;
> > +	int ret;
> > +
> > +	p3h2x4x = devm_kzalloc(&i3cdev->dev, sizeof(*p3h2x4x), GFP_KERNEL);
> > +	if (!p3h2x4x)
> > +		return -ENOMEM;
> > +
> > +	i3cdev_set_drvdata(i3cdev, p3h2x4x);
> > +
> > +	p3h2x4x->regmap = devm_regmap_init_i3c(i3cdev, &p3h2x4x_regmap_config);
> > +	if (IS_ERR(p3h2x4x->regmap)) {
> > +		return dev_err_probe(&i3cdev->dev, PTR_ERR(p3h2x4x->regmap),
> 
> Look here...
> 
> > +				     "Failed to register I3C HUB regmap\n");
> > +	}
> > +
> > +	p3h2x4x->is_p3h2x4x_in_i3c = true;
> > +	p3h2x4x->i3cdev = i3cdev;
> > +
> > +	ret = devm_mfd_add_devices(&i3cdev->dev, PLATFORM_DEVID_NONE,
> > +				   p3h2x4x_devs, ARRAY_SIZE(p3h2x4x_devs),
> > +				   NULL, 0, NULL);
> > +	if (ret)
> > +		return dev_err_probe(&i3cdev->dev, ret, "Failed to add sub devices\n");
> > +
> > +	return 0;
> > +}
> > +
> > +static int p3h2x4x_device_probe_i2c(struct i2c_client *client)
> > +{
> > +	struct p3h2x4x_dev *p3h2x4x;
> > +	int ret;
> > +
> > +	p3h2x4x = devm_kzalloc(&client->dev, sizeof(*p3h2x4x), GFP_KERNEL);
> > +	if (!p3h2x4x)
> > +		return -ENOMEM;
> > +
> > +	i2c_set_clientdata(client, p3h2x4x);
> > +
> > +	p3h2x4x->regmap = devm_regmap_init_i2c(client, &p3h2x4x_regmap_config);
> > +	if (IS_ERR(p3h2x4x->regmap)) {
> > +		ret = PTR_ERR(p3h2x4x->regmap);
> 
> And here!
> 
> Drop. This is completely redundant. How is it that in one place you use
> one syntax and in other place completely different syntax?

I don't think it is redundant, one is for i2c and the other one for i3c
and the other i2c so I guess the hub can be sitting on any of those bus.

I guess the driver could be made so that we could only compile the i2c
part though.

> 
> > +		return dev_err_probe(&client->dev, ret, "Failed to register I3C HUB regmap\n");
> > +	}
> > +
> > +	p3h2x4x->is_p3h2x4x_in_i3c = false;
> > +	p3h2x4x->i2c_client = client;
> > +
> > +	ret = devm_mfd_add_devices(&client->dev, PLATFORM_DEVID_NONE,
> > +				   p3h2x4x_devs, ARRAY_SIZE(p3h2x4x_devs),
> > +				   NULL, 0, NULL);
> > +	if (ret)
> > +		return dev_err_probe(&client->dev, ret, "Failed to add sub devices\n");
> > +
> > +	return 0;
> 
> Best regards,
> Krzysztof
> 

-- 
Alexandre Belloni, co-owner and COO, Bootlin
Embedded Linux and Kernel engineering
https://bootlin.com

-- 
linux-i3c mailing list
linux-i3c@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-i3c

WARNING: multiple messages have this Message-ID (diff)
From: Alexandre Belloni <alexandre.belloni@bootlin.com>
To: Krzysztof Kozlowski <krzk@kernel.org>
Cc: Aman Kumar Pandey <aman.kumarpandey@nxp.com>,
	linux-kernel@vger.kernel.org, linux-i3c@lists.infradead.org,
	krzk+dt@kernel.org, robh@kernel.org, conor+dt@kernel.org,
	devicetree@vger.kernel.org, broonie@kernel.org, lee@kernel.org,
	Frank.Li@nxp.com, lgirdwood@gmail.com, vikash.bansal@nxp.com,
	priyanka.jain@nxp.com, shashank.rebbapragada@nxp.com
Subject: Re: [PATCH v4 3/5] mfd: p3h2x4x: Add driver for NXP P3H2x4x i3c hub and on-die regulator
Date: Wed, 14 Jan 2026 18:17:32 +0100	[thread overview]
Message-ID: <20260114171732470bd389@mail.local> (raw)
In-Reply-To: <20260114-refreshing-groovy-buzzard-af2eeb@quoll>

On 14/01/2026 09:28:53+0100, Krzysztof Kozlowski wrote:
> > +static int p3h2x4x_device_probe_i3c(struct i3c_device *i3cdev)
> > +{
> > +	struct p3h2x4x_dev *p3h2x4x;
> > +	int ret;
> > +
> > +	p3h2x4x = devm_kzalloc(&i3cdev->dev, sizeof(*p3h2x4x), GFP_KERNEL);
> > +	if (!p3h2x4x)
> > +		return -ENOMEM;
> > +
> > +	i3cdev_set_drvdata(i3cdev, p3h2x4x);
> > +
> > +	p3h2x4x->regmap = devm_regmap_init_i3c(i3cdev, &p3h2x4x_regmap_config);
> > +	if (IS_ERR(p3h2x4x->regmap)) {
> > +		return dev_err_probe(&i3cdev->dev, PTR_ERR(p3h2x4x->regmap),
> 
> Look here...
> 
> > +				     "Failed to register I3C HUB regmap\n");
> > +	}
> > +
> > +	p3h2x4x->is_p3h2x4x_in_i3c = true;
> > +	p3h2x4x->i3cdev = i3cdev;
> > +
> > +	ret = devm_mfd_add_devices(&i3cdev->dev, PLATFORM_DEVID_NONE,
> > +				   p3h2x4x_devs, ARRAY_SIZE(p3h2x4x_devs),
> > +				   NULL, 0, NULL);
> > +	if (ret)
> > +		return dev_err_probe(&i3cdev->dev, ret, "Failed to add sub devices\n");
> > +
> > +	return 0;
> > +}
> > +
> > +static int p3h2x4x_device_probe_i2c(struct i2c_client *client)
> > +{
> > +	struct p3h2x4x_dev *p3h2x4x;
> > +	int ret;
> > +
> > +	p3h2x4x = devm_kzalloc(&client->dev, sizeof(*p3h2x4x), GFP_KERNEL);
> > +	if (!p3h2x4x)
> > +		return -ENOMEM;
> > +
> > +	i2c_set_clientdata(client, p3h2x4x);
> > +
> > +	p3h2x4x->regmap = devm_regmap_init_i2c(client, &p3h2x4x_regmap_config);
> > +	if (IS_ERR(p3h2x4x->regmap)) {
> > +		ret = PTR_ERR(p3h2x4x->regmap);
> 
> And here!
> 
> Drop. This is completely redundant. How is it that in one place you use
> one syntax and in other place completely different syntax?

I don't think it is redundant, one is for i2c and the other one for i3c
and the other i2c so I guess the hub can be sitting on any of those bus.

I guess the driver could be made so that we could only compile the i2c
part though.

> 
> > +		return dev_err_probe(&client->dev, ret, "Failed to register I3C HUB regmap\n");
> > +	}
> > +
> > +	p3h2x4x->is_p3h2x4x_in_i3c = false;
> > +	p3h2x4x->i2c_client = client;
> > +
> > +	ret = devm_mfd_add_devices(&client->dev, PLATFORM_DEVID_NONE,
> > +				   p3h2x4x_devs, ARRAY_SIZE(p3h2x4x_devs),
> > +				   NULL, 0, NULL);
> > +	if (ret)
> > +		return dev_err_probe(&client->dev, ret, "Failed to add sub devices\n");
> > +
> > +	return 0;
> 
> Best regards,
> Krzysztof
> 

-- 
Alexandre Belloni, co-owner and COO, Bootlin
Embedded Linux and Kernel engineering
https://bootlin.com

  reply	other threads:[~2026-01-14 17:17 UTC|newest]

Thread overview: 32+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-01-13 11:45 [PATCH v4 1/5] i3c: master: Expose the APIs to support I3C hub Aman Kumar Pandey
2026-01-13 11:45 ` Aman Kumar Pandey
2026-01-13 11:45 ` [PATCH v4 2/5] dt-bindings: i3c: Add NXP P3H2x4x i3c-hub support Aman Kumar Pandey
2026-01-13 11:45   ` Aman Kumar Pandey
2026-01-14  8:23   ` Krzysztof Kozlowski
2026-01-14  8:23     ` Krzysztof Kozlowski
2026-01-15 12:21     ` [EXT] " Aman Kumar Pandey
2026-01-15 12:21       ` Aman Kumar Pandey
2026-01-15 21:01       ` Krzysztof Kozlowski
2026-01-15 21:01         ` Krzysztof Kozlowski
2026-01-15 21:14         ` Frank Li
2026-01-15 21:14           ` Frank Li
2026-01-13 11:45 ` [PATCH v4 3/5] mfd: p3h2x4x: Add driver for NXP P3H2x4x i3c hub and on-die regulator Aman Kumar Pandey
2026-01-13 11:45   ` Aman Kumar Pandey
2026-01-14  8:28   ` Krzysztof Kozlowski
2026-01-14  8:28     ` Krzysztof Kozlowski
2026-01-14 17:17     ` Alexandre Belloni [this message]
2026-01-14 17:17       ` Alexandre Belloni
2026-01-15  8:41       ` Krzysztof Kozlowski
2026-01-15  8:41         ` Krzysztof Kozlowski
2026-01-13 11:45 ` [PATCH v4 4/5] regulator: p3h2x4x: Add driver for on-die regulators in NXP P3H2x4x i3c hub Aman Kumar Pandey
2026-01-13 11:45   ` Aman Kumar Pandey
2026-01-14  8:25   ` Krzysztof Kozlowski
2026-01-14  8:25     ` Krzysztof Kozlowski
2026-01-13 11:45 ` [PATCH v4 5/5] i3c: hub: p3h2x4x: Add support for NXP P3H2x4x I3C hub functionality Aman Kumar Pandey
2026-01-13 11:45   ` Aman Kumar Pandey
2026-01-14  8:30   ` Krzysztof Kozlowski
2026-01-14  8:30     ` Krzysztof Kozlowski
2026-01-14 16:58   ` kernel test robot
2026-01-14 16:58     ` kernel test robot
2026-01-14 23:48   ` kernel test robot
2026-01-14 23:48     ` kernel test robot

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20260114171732470bd389@mail.local \
    --to=alexandre.belloni@bootlin.com \
    --cc=Frank.Li@nxp.com \
    --cc=aman.kumarpandey@nxp.com \
    --cc=broonie@kernel.org \
    --cc=conor+dt@kernel.org \
    --cc=devicetree@vger.kernel.org \
    --cc=krzk+dt@kernel.org \
    --cc=krzk@kernel.org \
    --cc=lee@kernel.org \
    --cc=lgirdwood@gmail.com \
    --cc=linux-i3c@lists.infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=priyanka.jain@nxp.com \
    --cc=robh@kernel.org \
    --cc=shashank.rebbapragada@nxp.com \
    --cc=vikash.bansal@nxp.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.