linux-iio.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Dixit Parmar <dixitparmar19@gmail.com>
To: Andy Shevchenko <andy.shevchenko@gmail.com>
Cc: "Jonathan Cameron" <jic23@kernel.org>,
	"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 v3 1/2] iio: magnetometer: add support for Infineon TLV493D 3D Magentic sensor
Date: Sat, 9 Aug 2025 20:03:54 +0530	[thread overview]
Message-ID: <aJdcUhz-vqnx8DwA@dixit> (raw)
In-Reply-To: <CAHp75Vc7Jftvmgb0EgnYmiKtT2TTYb2uQGNgaqm7hvkFWpJ9cg@mail.gmail.com>

On Sat, Aug 09, 2025 at 02:44:00PM +0200, Andy Shevchenko wrote:
> > > > +       data->wr_regs[TLV493D_WR_REG_MODE1] |= mode1_cfg;
> > > > +       data->wr_regs[TLV493D_WR_REG_MODE2] |= mode2_cfg;
> > >
> > > No mask for the existing values in the respective wr_regs? Wouldn't
> > > you need to use FIELD_MODIFY() instead?
> > >
> > I believe, we are doing OR op with the value created using FIELD_PREP,
> > so it should not interefere with the existing non-masked values.
> 
> I am talking about existing values in the array.
>
Right. So in that I think it will make more sense to directly use
FIELD_MODIFY instead of using FIELD_PREP first and then doing this OR
op. Right?
> > However, as FIELD_MODIFY is there, I should utilize it.
> 
> > > > +       u16 val = 0;
> > >
> > > I would move the default assignment to the 'default' case. This makes
> > > the intention clearer.
> > >
> > As per the suggestion on privious version of the patch, we are having
> > ch datatype as enum and as suggested, with enum as swicth-case, it
> > should not have default case. so I think this initialisation to 0 at the
> > beginning should be fine.
> 
> It will make no sense. Please, remove it. and perhaps the compiler
> won't warn, otherwise the default case will be needed.
>
Understood. Will keep it uninitialized.

> > > Missing include for this macro I believe.
> > >
> > No I guess. DEFINE_RUNTIME_DEV_PM_OPS is part of pm_runtime.h and its
> > already included.
> 
> And how is it related to my comment _here_ in the code?
Pardon my misunderstanding. Please ignore.

> > > > +       },
> > > > +       .probe = tlv493d_probe,
> > > > +       .id_table = tlv493d_id,
> > > > +};
> 
> -- 
> With Best Regards,
> Andy Shevchenko

  reply	other threads:[~2025-08-09 14:34 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-08-07  2:56 [PATCH v3 0/2] iio: magnetometer: add support for Infineon TLV493D 3D Magnetic Sensor Dixit Parmar
2025-08-07  2:56 ` [PATCH v3 1/2] iio: magnetometer: add support for Infineon TLV493D 3D Magentic sensor Dixit Parmar
2025-08-07 20:57   ` Andy Shevchenko
2025-08-09 11:28     ` Dixit Parmar
2025-08-09 12:44       ` Andy Shevchenko
2025-08-09 14:33         ` Dixit Parmar [this message]
2025-08-11 12:38           ` Andy Shevchenko
2025-08-09 11:44     ` Dixit Parmar
2025-08-11 20:32   ` Jonathan Cameron
2025-08-07  2:56 ` [PATCH v3 2/2] dt-bindings: iio: magnetometer: document Infineon TLV493D 3D Magnetic sensor Dixit Parmar
2025-08-07  7:34   ` Krzysztof Kozlowski

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=aJdcUhz-vqnx8DwA@dixit \
    --to=dixitparmar19@gmail.com \
    --cc=andy.shevchenko@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).