mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Andreas Kemnade <andreas@kemnade.info>
To: Pablo Mazzini <pmazzini@gmail.com>
Cc: Guenter Roeck <linux@roeck-us.net>,
	Mark Brown <broonie@kernel.org>,
	Liam Girdwood <lgirdwood@gmail.com>, Lee Jones <lee@kernel.org>,
	Alistair Francis <alistair@alistair23.me>,
	linux-hwmon@vger.kernel.org, mfd@lists.linux.dev,
	linux-kernel@vger.kernel.org
Subject: Re: [PATCH 5/7] regulator: sy7636a: report the temperature
Date: Tue, 27 Oct 2026 10:18:52 +0100	[thread overview]
Message-ID: <20261027101852.39b9031a@kemnade.info> (raw)
In-Reply-To: <CAAxh=jsKe95EsKnTypXtfTxGhYCMO1E7U=hWb3y6DBpgoiOVUw@mail.gmail.com>

On Tue, 27 Oct 2026 07:32:14 +0000
Pablo Mazzini <pmazzini@gmail.com> wrote:

> Hi Guenter, Andreas,
> 
> On Mon, Oct 26, 2026 at 07:35:24AM -0700, Guenter Roeck wrote:
> > This is going the wrong way. The correct solution would be to convert
> > the hwmon driver to an auxiliary driver.  
> 
> Understood. In v2 the hwmon driver stays in drivers/hwmon and becomes an
> auxiliary driver of the regulator, which binds the I2C device directly.
> 
But that is a cleanup action, which is at least a separate patch (maybe
replacing and exending your patch 6). So the other patches can go into
their separate trees.

> On Tue, 27 Oct 2026 00:26:35 +0100, Andreas Kemnade wrote:
> > But it introduces another race condition.
> > The temperature might be read too early.
> > 1ms delay should suffice.
> >
> > The  SY7636A_OPERATION_MODE_CRL_ONOFF flag might be reset before
> > reading the temperature. If that register does not reset to zero
> > but just keeps the temperature last read, then we have no problem.  
> 
> Good points. For v2 I read power good (0x07) and the temperature (0x08)
> in one I2C transfer, and return -ENODATA unless power good is set, so no
> locking is needed.
> 
From the data sheet we can ensure that power good occurs guaranteed after
the first sampling, so this approach is fine for the most common
use case. It reduces the time window with readable temperature
a bit more than needed, but that should not matter.

Regards,
Andreas

  reply	other threads:[~2026-10-27  9:19 UTC|newest]

Thread overview: 21+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-10-26  0:39 [PATCH 0/7] sy7636a: power the panel only during updates Pablo Mazzini
2026-10-26  0:39 ` [PATCH 1/7] ARM: dts: imx: keep the SY7636A VCOM on Pablo Mazzini
2026-10-26  7:30   ` Andreas Kemnade
2026-10-26  8:21     ` Pablo Mazzini
2026-10-26  0:39 ` [PATCH 2/7] regulator: sy7636a: fix the chip name Pablo Mazzini
2026-10-26  7:39   ` Andreas Kemnade
2026-10-26  0:39 ` [PATCH 3/7] regulator: sy7636a: add VCOM voltage control Pablo Mazzini
2026-10-26  7:41   ` Andreas Kemnade
2026-10-26  0:39 ` [PATCH 4/7] regulator: sy7636a: wait for power good, then switch VCOM_EN Pablo Mazzini
2026-10-26  8:10   ` Andreas Kemnade
2026-10-26  8:44     ` Pablo Mazzini
2026-10-26  0:39 ` [PATCH 5/7] regulator: sy7636a: report the temperature Pablo Mazzini
2026-10-26  8:42   ` Andreas Kemnade
2026-10-26 14:35   ` Guenter Roeck
2026-10-26 23:26     ` Andreas Kemnade
2026-10-27  7:32       ` Pablo Mazzini
2026-10-27  9:18         ` Andreas Kemnade [this message]
2026-10-26  0:39 ` [PATCH 6/7] regulator: sy7636a: bind to the I2C device directly Pablo Mazzini
2026-10-26  0:39 ` [PATCH 7/7] ARM: imx_v6_v7_defconfig: drop the SY7636A MFD and hwmon options Pablo Mazzini
2026-10-26  9:37 ` [PATCH 0/7] sy7636a: power the panel only during updates Andreas Kemnade
2026-10-26 11:28   ` Pablo Mazzini

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=20261027101852.39b9031a@kemnade.info \
    --to=andreas@kemnade.info \
    --cc=alistair@alistair23.me \
    --cc=broonie@kernel.org \
    --cc=lee@kernel.org \
    --cc=lgirdwood@gmail.com \
    --cc=linux-hwmon@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux@roeck-us.net \
    --cc=mfd@lists.linux.dev \
    --cc=pmazzini@gmail.com \
    /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

all inboxes | Powered by JetHome®