public inbox for linux-i3c@lists.infradead.org
 help / color / mirror / Atom feed
From: Jonathan Cameron <jic23@kernel.org>
To: Frank Li <Frank.Li@nxp.com>
Cc: "Alexandre Belloni" <alexandre.belloni@bootlin.com>,
	"Miquel Raynal" <miquel.raynal@bootlin.com>,
	"David Lechner" <dlechner@baylibre.com>,
	"Nuno Sá" <nuno.sa@analog.com>,
	"Andy Shevchenko" <andy@kernel.org>,
	"Rob Herring" <robh@kernel.org>,
	"Krzysztof Kozlowski" <krzk+dt@kernel.org>,
	"Conor Dooley" <conor+dt@kernel.org>,
	linux-i3c@lists.infradead.org, linux-kernel@vger.kernel.org,
	imx@lists.linux.dev, linux-iio@vger.kernel.org,
	joshua.yeong@starfivetech.com, devicetree@vger.kernel.org,
	linux@roeck-us.net, "Carlos Song" <carlos.song@nxp.com>,
	"Adrian Fluturel" <fluturel.adrian@gmail.com>,
	"Andy Shevchenko" <andriy.shevchenko@intel.com>
Subject: Re: [PATCH v12 2/2] iio: magnetometer: Add mmc5633 sensor
Date: Sun, 21 Dec 2025 19:13:16 +0000	[thread overview]
Message-ID: <20251221191316.7c3aa128@jic23-huawei> (raw)
In-Reply-To: <20251215-i3c_ddr-v12-2-1ae31225b4d9@nxp.com>

On Mon, 15 Dec 2025 11:51:11 -0500
Frank Li <Frank.Li@nxp.com> wrote:

> Add mmc5633 sensor basic support.
> - Support read 20 bits X/Y/Z magnetic.
> - Support I3C HDR mode to send start measurememt command.
> - Support I3C HDR mode to read all sensors data by one command.
> 
> Co-developed-by: Carlos Song <carlos.song@nxp.com>
> Signed-off-by: Carlos Song <carlos.song@nxp.com>
> Co-developed-by: Adrian Fluturel <fluturel.adrian@gmail.com>
> Signed-off-by: Adrian Fluturel <fluturel.adrian@gmail.com>
> Reviewed-by: Andy Shevchenko <andriy.shevchenko@intel.com>
> Signed-off-by: Frank Li <Frank.Li@nxp.com>

drivers/iio/magnetometer/mmc5633.c:87:5: warning: symbol 'mmc5633_samp_freq' was not declared. Should it be static?
(I fixed up)

With that and the trivial stuff below tidied up whilst applying, applied to the togreg
branch of iio.git. I'll initially push out as testing however to let the
bots take a first look before I annoy linux-next 

Jonathan


> diff --git a/drivers/iio/magnetometer/mmc5633.c b/drivers/iio/magnetometer/mmc5633.c
> new file mode 100644
> index 0000000000000000000000000000000000000000..7b20ff3b063b026ab2ae0170fd8c021973428dea
> --- /dev/null
> +++ b/drivers/iio/magnetometer/mmc5633.c

> +static int mmc5633_write_raw(struct iio_dev *indio_dev,
> +			     struct iio_chan_spec const *chan, int val,
> +			     int val2, long mask)
> +{
> +	struct mmc5633_data *data = iio_priv(indio_dev);
> +	int ret;
> +
> +	switch (mask) {
> +	case IIO_CHAN_INFO_SAMP_FREQ:

This is the missing scope thing from the bot report.  {}
needed in a switch to define scope for local variables like the one guard()
is using under the hood.

> +		ret = mmc5633_get_samp_freq_index(data, val, val2);
> +		if (ret < 0)
> +			return ret;
> +
> +		guard(mutex)(&data->mutex);
> +
> +		return regmap_update_bits(data->regmap, MMC5633_REG_CTRL1,
> +					  MMC5633_CTRL1_BW_MASK,
> +					  FIELD_PREP(MMC5633_CTRL1_BW_MASK, ret));
> +	default:
> +		return -EINVAL;
> +	}
> +}

> +
> +static struct i2c_driver mmc5633_i2c_driver = {
> +	.driver = {
> +		.name = "mmc5633_i2c",
> +		.of_match_table = mmc5633_of_match,
> +		.pm = pm_sleep_ptr(&mmc5633_pm_ops),
> +	},
> +	.probe = mmc5633_i2c_probe,
> +	.id_table =  mmc5633_i2c_id,
Bonus space after =

> +};

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

      parent reply	other threads:[~2025-12-21 19:13 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-12-15 16:51 [PATCH v12 0/2] i3c: Add basic HDR mode support (sensor part) Frank Li
2025-12-15 16:51 ` [PATCH v12 1/2] dt-bindings: trivial-devices: add MEMSIC 3-axis magnetometer Frank Li
2025-12-15 16:51 ` [PATCH v12 2/2] iio: magnetometer: Add mmc5633 sensor Frank Li
2025-12-20 14:34   ` kernel test robot
2025-12-21 19:07     ` Jonathan Cameron
2025-12-29 15:14       ` Frank Li
2025-12-21 19:13   ` Jonathan Cameron [this message]

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=20251221191316.7c3aa128@jic23-huawei \
    --to=jic23@kernel.org \
    --cc=Frank.Li@nxp.com \
    --cc=alexandre.belloni@bootlin.com \
    --cc=andriy.shevchenko@intel.com \
    --cc=andy@kernel.org \
    --cc=carlos.song@nxp.com \
    --cc=conor+dt@kernel.org \
    --cc=devicetree@vger.kernel.org \
    --cc=dlechner@baylibre.com \
    --cc=fluturel.adrian@gmail.com \
    --cc=imx@lists.linux.dev \
    --cc=joshua.yeong@starfivetech.com \
    --cc=krzk+dt@kernel.org \
    --cc=linux-i3c@lists.infradead.org \
    --cc=linux-iio@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux@roeck-us.net \
    --cc=miquel.raynal@bootlin.com \
    --cc=nuno.sa@analog.com \
    --cc=robh@kernel.org \
    /path/to/YOUR_REPLY

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

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