From: Dixit Parmar <dixitparmar19@gmail.com>
To: Jonathan Cameron <jic23@kernel.org>
Cc: "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-kernel@vger.kernel.org, linux-iio@vger.kernel.org,
devicetree@vger.kernel.org
Subject: Re: [PATCH v4 1/2] iio: magnetometer: add support for Infineon TLV493D 3D Magentic sensor
Date: Wed, 20 Aug 2025 10:16:29 +0530 [thread overview]
Message-ID: <aKVTJXe50zf07ipR@dixit> (raw)
In-Reply-To: <20250816140448.37f38d0f@jic23-huawei>
On Sat, Aug 16, 2025 at 02:04:48PM +0100, Jonathan Cameron wrote:
> Hi Dixit,
>
> A couple of really minor things inline. Given Andy has been doing most of the review
> work on this one I'll leave it for a few days to give him chance for a final look.
>
> The stuff below is small so if nothing else comes up I can tweak it whilst applying
>
> Thanks,
>
> Jonathan
>
> > diff --git a/drivers/iio/magnetometer/tlv493d.c b/drivers/iio/magnetometer/tlv493d.c
> > new file mode 100644
> > index 000000000000..ee72211576a6
> > --- /dev/null
> > +++ b/drivers/iio/magnetometer/tlv493d.c
> > @@ -0,0 +1,530 @@
>
> > + TLV493D_AXIS_X,
> > + TLV493D_AXIS_Y,
> > + TLV493D_AXIS_Z,
> > + TLV493D_TEMPERATURE
> As below.
>
> > +};
> > +
> > +enum tlv493d_op_mode {
> > + TLV493D_OP_MODE_POWERDOWN,
> > + TLV493D_OP_MODE_FAST,
> > + TLV493D_OP_MODE_LOWPOWER,
> > + TLV493D_OP_MODE_ULTRA_LOWPOWER,
> > + TLV493D_OP_MODE_MASTERCONTROLLED
> This is not a terminating entry, so would typically have a trailing comma.
Isn't the last entry in the enum list is termintating entry and it should
not have trailing comma?
> > +};
>
> > +
> > +static int tlv493d_init(struct tlv493d_data *data)
>
> I think this is only called from probe, so it would be appropriate
> to use return dev_err_probe() in all the error paths.
There is dev_err_probe() being called based on the return value of this
tlv493d_init(). This function reports the approproiate error(if any) and
the negative return value will result in dev_error_probe().
So I believe having single dev_err_probe() in the _probe() function would
be more appropriate, IMO.
>
> If nothing else comes up I might tweak that whilst applying.
Much appreciated.
Thank you,
Dixit Parmar
next prev parent reply other threads:[~2025-08-20 4:46 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-08-14 2:53 [PATCH v4 0/2] iio: magnetometer: add support for Infineon TLV493D 3D Magnetic Sensor Dixit Parmar
2025-08-14 2:53 ` [PATCH v4 1/2] iio: magnetometer: add support for Infineon TLV493D 3D Magentic sensor Dixit Parmar
2025-08-16 13:04 ` Jonathan Cameron
2025-08-20 4:46 ` Dixit Parmar [this message]
2025-08-20 13:56 ` Andy Shevchenko
2025-08-20 14:08 ` Andy Shevchenko
2025-08-21 3:02 ` Dixit Parmar
2025-08-21 7:41 ` Andy Shevchenko
2025-08-22 2:40 ` Dixit Parmar
2025-08-22 6:11 ` Andy Shevchenko
2025-08-25 3:03 ` Dixit Parmar
2025-08-25 9:50 ` Jonathan Cameron
2025-08-26 2:52 ` Dixit Parmar
2025-08-26 3:02 ` Dixit Parmar
2025-08-30 14:53 ` Jonathan Cameron
2025-08-14 2:53 ` [PATCH v4 2/2] dt-bindings: iio: magnetometer: document Infineon TLV493D 3D Magnetic sensor Dixit Parmar
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=aKVTJXe50zf07ipR@dixit \
--to=dixitparmar19@gmail.com \
--cc=andy@kernel.org \
--cc=conor+dt@kernel.org \
--cc=devicetree@vger.kernel.org \
--cc=dlechner@baylibre.com \
--cc=jic23@kernel.org \
--cc=krzk+dt@kernel.org \
--cc=linux-iio@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--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;
as well as URLs for NNTP newsgroup(s).