devicetree.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: <Victor.Duicu@microchip.com>
To: <andy.shevchenko@gmail.com>
Cc: <dlechner@baylibre.com>, <nuno.sa@analog.com>,
	<linux-iio@vger.kernel.org>, <devicetree@vger.kernel.org>,
	<robh@kernel.org>, <jic23@kernel.org>, <andy@kernel.org>,
	<krzk+dt@kernel.org>, <linux-kernel@vger.kernel.org>,
	<Marius.Cristea@microchip.com>, <conor+dt@kernel.org>
Subject: Re: [PATCH v3 2/2] iio: temperature: add support for MCP998X
Date: Thu, 19 Jun 2025 07:22:50 +0000	[thread overview]
Message-ID: <f980b3c1a4fbd60f70dda9670648479a38313439.camel@microchip.com> (raw)
In-Reply-To: <CAHp75VdRisP+trez2Ysgrhan_zXMWsmawB3XeW+_ePsbNC4RzQ@mail.gmail.com>

On Sat, 2025-06-14 at 00:50 +0300, Andy Shevchenko wrote:
> EXTERNAL EMAIL: Do not click links or open attachments unless you
> know the content is safe
> 
> On Fri, Jun 13, 2025 at 4:02 PM <victor.duicu@microchip.com> wrote:
> > 
> > From: Victor Duicu <victor.duicu@microchip.com>
> > 
> > This is the driver for Microchip MCP998X/33 and MCP998XD/33D
> > Multichannel Automotive Temperature Monitor Family.
> 
> ...

Hi Andy,

> 
> > +MICROCHIP MCP9982 TEMPERATURE DRIVER
> > +M:     Victor Duicu <victor.duicu@microchip.com>
> > +L:     linux-iio@vger.kernel.org
> > +S:     Supported
> > +F:    
> > Documentation/devicetree/bindings/iio/temperature/microchip,mcp9982
> > .yaml
> > +F:     drivers/iio/temperature/mcp9982.c
> 
> So, with the first patch only the dangling file will be present
> without record in MAINTAINERS. Please, make sure that your DT schema
> file is in MAINTAINERS.
> 

Are you referring here to the file sysfs-bus-iio-temperature-mcp9982?
This file was in v2 where there were a few custom attributes. In v3
I removed them, so the driver currently doesn't have custom attributes.
Should I had added it to the files in MAINTAINERS?

Isn't the yaml file sufficient to describe the devicetree? Should I
also add a dts file?
...
> 
> 
> > +#define MCP9982_CHAN(index, si, __address)
> > ({                                          \
> > +       struct iio_chan_spec __chan =
> > {                                                 \
> 
> Why not compound literal?
> 
In v2 I used compound literal, but Jonathan suggested to add
the struct in the macro. After describing the reasoning, we
agreed to code it like this.

[1]:https://lore.kernel.org/linux-iio/20250607182813.64230171@jic23-huawei/

> > +               .type =
> > IIO_TEMP,                                                       \
> > +               .info_mask_separate =
> > BIT(IIO_CHAN_INFO_RAW),                           \
> > +               .info_mask_shared_by_all_available =
> > BIT(IIO_CHAN_INFO_SAMP_FREQ) |     \
> > +               BIT(IIO_CHAN_INFO_LOW_PASS_FILTER_3DB_FREQUENCY)
> > |                      \
> > +              
> > BIT(IIO_CHAN_INFO_OFFSET),                                         
> >      \
> > +               .info_mask_shared_by_all =
> > BIT(IIO_CHAN_INFO_SAMP_FREQ) |               \
> > +               BIT(IIO_CHAN_INFO_LOW_PASS_FILTER_3DB_FREQUENCY)
> > |                      \
> > +               BIT(IIO_CHAN_INFO_HYSTERESIS)
> > |                                         \
> > +              
> > BIT(IIO_CHAN_INFO_OFFSET),                                         
> >      \
> > +               .channel =
> > index,                                                       \
> > +               .address =
> > __address,                                                   \
> > +               .scan_index =
> > si,                                                       \
> > +               .scan_type =
> > {                                                          \
> > +                       .sign =
> > 'u',                                                    \
> > +                       .realbits =
> > 8,                                                  \
> > +                       .storagebits =
> > 8,                                               \
> > +              
> > },                                                                 
> >      \
> > +               .indexed =
> > 1,                                                           \
> > +      
> > };                                                                 
> >              \
> > +      
> > __chan;                                                            
> >              \
> > +})
> 
> 

With Best Regards,
Victor Duicu

> --
> With Best Regards,
> Andy Shevchenko

  reply	other threads:[~2025-06-19  7:22 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-06-13 13:02 [PATCH v3 0/2] add support for MCP998X victor.duicu
2025-06-13 13:02 ` [PATCH v3 1/2] dt-bindings: iio: temperature: " victor.duicu
2025-06-13 14:40   ` Conor Dooley
2025-06-23 13:07     ` Victor.Duicu
2025-07-28 13:01   ` Victor.Duicu
2025-07-29 16:27     ` David Lechner
2025-06-13 13:02 ` [PATCH v3 2/2] " victor.duicu
2025-06-13 21:50   ` Andy Shevchenko
2025-06-19  7:22     ` Victor.Duicu [this message]
2025-06-19  8:29       ` Andy Shevchenko
2025-06-21 17:19         ` Jonathan Cameron
2025-06-23  6:45           ` Andy Shevchenko
2025-06-14 13:18   ` Jonathan Cameron
2025-06-14 13:27     ` Jonathan Cameron

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=f980b3c1a4fbd60f70dda9670648479a38313439.camel@microchip.com \
    --to=victor.duicu@microchip.com \
    --cc=Marius.Cristea@microchip.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).