Linux-Hwmon Archive mirror
 help / color / mirror / Atom feed
From: "Miclaus, Antoniu" <Antoniu.Miclaus@analog.com>
To: Chris Packham <Chris.Packham@alliedtelesis.co.nz>,
	Alessandro Zummo <a.zummo@towertech.it>,
	Alexandre Belloni <alexandre.belloni@bootlin.com>,
	Rob Herring <robh+dt@kernel.org>,
	Krzysztof Kozlowski <krzysztof.kozlowski+dt@linaro.org>,
	Conor Dooley <conor+dt@kernel.org>,
	Jean Delvare <jdelvare@suse.com>,
	Guenter Roeck <linux@roeck-us.net>,
	"linux-rtc@vger.kernel.org" <linux-rtc@vger.kernel.org>,
	"devicetree@vger.kernel.org" <devicetree@vger.kernel.org>,
	"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
	"linux-hwmon@vger.kernel.org" <linux-hwmon@vger.kernel.org>
Subject: RE: [PATCH v9 2/2] rtc: max31335: add driver support
Date: Mon, 19 Feb 2024 09:04:57 +0000	[thread overview]
Message-ID: <CY4PR03MB3399F66B70302CD41D6DC82E9B512@CY4PR03MB3399.namprd03.prod.outlook.com> (raw)
In-Reply-To: <1a51a8ac-e2a6-4054-b91d-c860913b7385@alliedtelesis.co.nz>



--
Antoniu Miclăuş

> -----Original Message-----
> From: Chris Packham <Chris.Packham@alliedtelesis.co.nz>
> Sent: Monday, February 19, 2024 4:52 AM
> To: Miclaus, Antoniu <Antoniu.Miclaus@analog.com>; Alessandro Zummo
> <a.zummo@towertech.it>; Alexandre Belloni
> <alexandre.belloni@bootlin.com>; Rob Herring <robh+dt@kernel.org>;
> Krzysztof Kozlowski <krzysztof.kozlowski+dt@linaro.org>; Conor Dooley
> <conor+dt@kernel.org>; Jean Delvare <jdelvare@suse.com>; Guenter Roeck
> <linux@roeck-us.net>; linux-rtc@vger.kernel.org; devicetree@vger.kernel.org;
> linux-kernel@vger.kernel.org; linux-hwmon@vger.kernel.org
> Subject: Re: [PATCH v9 2/2] rtc: max31335: add driver support
> 
> [External]
> 
> Hi All,
> 
> I'm looking at folding this into the rest of the max313xx support (but
> I'll stick with the max31335 name since that's landed) and I noticed a
> problem.
> 
> On 21/11/23 01:00, Antoniu Miclaus wrote:
> > RTC driver for MAX31335 ±2ppm Automotive Real-Time Clock with
> > Integrated MEMS Resonator.
> >
> > Reviewed-by: Guenter Roeck <linux@roeck-us.net>
> > Signed-off-by: Antoniu Miclaus <antoniu.miclaus@analog.com>
> <snip>
> > +
> > +static bool max31335_volatile_reg(struct device *dev, unsigned int reg)
> > +{
> > +	/* time keeping registers */
> > +	if (reg >= MAX31335_SECONDS &&
> > +	    reg < MAX31335_SECONDS + MAX31335_TIME_SIZE)
> > +		return true;
> > +
> > +	/* interrupt status register */
> > +	if (reg == MAX31335_INT_EN1_A1IE)
> > +		return true;
> Presumably this should be something else as MAX31335_INT_EN1_A1IE is a
> bitfield offset not a register.  Based on the other chips I'm guessing
> this should be `reg == MAX31335_STATUS1`. I'll try to incorporate a fix
> into my update but someone might want to fix it up for stable.

Indeed, MAX31335_STATUS1  should be used here. I re-checked the latest
datasheet that I have.

Thanks for pointing that out. 

I will add a patch soon.

> > +
> > +	/* temperature registers */
> > +	if (reg == MAX31335_TEMP_DATA_MSB ||
> MAX31335_TEMP_DATA_LSB)
> > +		return true;
> > +
> > +	return false;
> > +}
> > +

  reply	other threads:[~2024-02-19  9:05 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-11-20 12:00 [PATCH v9 1/2] dt-bindings: rtc: max31335: add max31335 bindings Antoniu Miclaus
2023-11-20 12:00 ` [PATCH v9 2/2] rtc: max31335: add driver support Antoniu Miclaus
2024-02-19  2:51   ` Chris Packham
2024-02-19  9:04     ` Miclaus, Antoniu [this message]
2024-01-15 22:38 ` [PATCH v9 1/2] dt-bindings: rtc: max31335: add max31335 bindings Alexandre Belloni

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=CY4PR03MB3399F66B70302CD41D6DC82E9B512@CY4PR03MB3399.namprd03.prod.outlook.com \
    --to=antoniu.miclaus@analog.com \
    --cc=Chris.Packham@alliedtelesis.co.nz \
    --cc=a.zummo@towertech.it \
    --cc=alexandre.belloni@bootlin.com \
    --cc=conor+dt@kernel.org \
    --cc=devicetree@vger.kernel.org \
    --cc=jdelvare@suse.com \
    --cc=krzysztof.kozlowski+dt@linaro.org \
    --cc=linux-hwmon@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-rtc@vger.kernel.org \
    --cc=linux@roeck-us.net \
    --cc=robh+dt@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 read-only IMAP folder(s) and NNTP newsgroup(s).