lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID:
 <FR2PPF4571F02BC2D65FAC64CCAF6F3F1798C2AA@FR2PPF4571F02BC.DEUP281.PROD.OUTLOOK.COM>
Date: Wed, 13 Aug 2025 10:11:44 +0000
From: Remi Buisson <Remi.Buisson@....com>
To: Jonathan Cameron <jic23@...nel.org>,
        Remi Buisson via B4 Relay
	<devnull+remi.buisson.tdk.com@...nel.org>
CC: David Lechner <dlechner@...libre.com>,
        Nuno Sá
	<nuno.sa@...log.com>,
        Andy Shevchenko <andy@...nel.org>, Rob Herring
	<robh@...nel.org>,
        Krzysztof Kozlowski <krzk+dt@...nel.org>,
        Conor Dooley
	<conor+dt@...nel.org>,
        "linux-kernel@...r.kernel.org"
	<linux-kernel@...r.kernel.org>,
        "linux-iio@...r.kernel.org"
	<linux-iio@...r.kernel.org>,
        "devicetree@...r.kernel.org"
	<devicetree@...r.kernel.org>
Subject: RE: [PATCH v3 7/8] iio: imu: inv_icm45600: add I3C driver for
 inv_icm45600 driver

>
>
>From: Jonathan Cameron <jic23@...nel.org> 
>Sent: Thursday, July 24, 2025 6:18 PM
>To: Remi Buisson via B4 Relay <devnull+remi.buisson.tdk.com@...nel.org>
>Cc: Remi Buisson <Remi.Buisson@....com>; David Lechner <dlechner@...libre.com>; Nuno Sá <nuno.sa@...log.com>; Andy Shevchenko <andy@...nel.org>; Rob Herring <robh@...nel.org>; Krzysztof Kozlowski <krzk+dt@...nel.org>; Conor Dooley <conor+dt@...nel.org>; linux-kernel@...r.kernel.org; linux-iio@...r.kernel.org; devicetree@...r.kernel.org
>Subject: Re: [PATCH v3 7/8] iio: imu: inv_icm45600: add I3C driver for inv_icm45600 driver
>
>On Thu, 17 Jul 2025 13:25:59 +0000
>Remi Buisson via B4 Relay <devnull+remi.buisson.tdk.com@...nel.org> wrote:
>
>> From: Remi Buisson <remi.buisson@....com>
>> 
>> Add I3C driver for InvenSense ICM-45600 devices.
>> 
>> Signed-off-by: Remi Buisson <remi.buisson@....com>
>A few more trivial things in here.
>
>Thanks,
>
>Jonathan
Thanks for the review, all agreed.
>
>> diff --git a/drivers/iio/imu/inv_icm45600/inv_icm45600_i3c.c b/drivers/iio/imu/inv_icm45600/inv_icm45600_i3c.c
>> new file mode 100644
>> index 0000000000000000000000000000000000000000..9db249ca53ec3fecb0f85792a353d05463f52acb
>> --- /dev/null
>> +++ b/drivers/iio/imu/inv_icm45600/inv_icm45600_i3c.c
>> @@ -0,0 +1,82 @@
>
>> +};
>> +
>> +static const struct i3c_device_id inv_icm45600_i3c_ids[] = {
>> +	I3C_DEVICE_EXTRA_INFO(0x0235, 0x0000, 0x0011, (void *)NULL),
>> +	I3C_DEVICE_EXTRA_INFO(0x0235, 0x0000, 0x0084, (void *)NULL),
>> +	{ /* sentinel */ },
>
>no comma on sentinels.
>
Yes.
>
>> +static int inv_icm45600_i3c_probe(struct i3c_device *i3cdev)
>> +{
>> +	int ret;
>> +	unsigned int whoami;
>> +	struct regmap *regmap;
>> +	const int nb_chip = ARRAY_SIZE(i3c_chip_info);
>> +	int chip;
>> +
>> +	regmap = devm_regmap_init_i3c(i3cdev, &inv_icm45600_regmap_config);
>> +	if (IS_ERR(regmap)) {
>> +		dev_err(&i3cdev->dev, "Failed to register i3c regmap %ld\n", PTR_ERR(regmap));
>> +		return PTR_ERR(regmap);
>Use return dev_err_probe() for all error messages in probe.
Ok.
>
>> +	}
>> +
>> +	ret = regmap_read(regmap, INV_ICM45600_REG_WHOAMI, &whoami);
>> +	if (ret) {
>> +		dev_err(&i3cdev->dev, "Failed to read part id %d\n", whoami);
>> +		return ret;
>> +	}
>> +
>> +	for (chip = 0; chip < nb_chip; chip++) {
>> +		if (whoami == i3c_chip_info[chip]->whoami)
>> +			break;
>> +	}
>> +
>> +	if (chip == nb_chip) {
>> +		dev_err(&i3cdev->dev, "Failed to match part id %d\n", whoami);
>> +		return -ENODEV;
>> +	}
>> +
>> +	return inv_icm45600_core_probe(regmap, i3c_chip_info[chip], false, NULL);
>> +}
>
>> 
>
>

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ