From: <markus.stockhausen@gmx.de>
To: "'Guenter Roeck'" <linux@roeck-us.net>, <sashiko@lists.linux.dev>
Cc: <linux-hwmon@vger.kernel.org>
Subject: AW: AW: [PATCH 2/2] hwmon: (lm75) Support active-high alert polarity
Date: Fri, 1 May 2026 22:42:34 +0200 [thread overview]
Message-ID: <022201dcd9ab$0aba9fb0$202fdf10$@gmx.de> (raw)
In-Reply-To: <b9e2db74-d2c7-4ca6-911d-0b59c68cd187@roeck-us.net>
> Von: Guenter Roeck <groeck7@gmail.com> Im Auftrag von Guenter Roeck
> Gesendet: Freitag, 1. Mai 2026 22:14
> Betreff: Re: AW: [PATCH 2/2] hwmon: (lm75) Support active-high alert polarity
>
> > So this will need separate patches:
> > 1) Fix set_mask and alert handling for AS6200 to be low active
> > and to report the alarm correctly even if it is high active
> > (xor config register bit 5 and 10 (translated to 2 and 13)
> > when reporting the alarm).
> > 2) Fix lm75_write_config() to add set_mask to clr_mask to ensure
> > that the bits which are supposed to be set are actually set.
> >
>
> Turns out the default value for AS6200 has more problems. It is set to
> 0x94c0 which claims to be "8 sample/s, 4 CF, positive polarity".
>
> 0xc0 reflects the samples/s. So far so good. However, 0x94 is wrong.
> It sets the single shot bit, effectively disabling the sensor, and
> it does not set the CF bits as advertised. Please change the default
> to 0x10c0 which reflects the intent more closely, except for the
> negative polarity.
Understood. I still need advise about xor during alarm report.
Do you talk about this code?
case as6200:
case tmp112:
- *val = (regval >> 13) & 0x1;
+ *val = ((regval >> 13) & 0x1) ^ 0x1;
Mabye totally stupid but this bug and the deep dive follow up
hits my brain a little bit too hard.
Thanks.
Markus
next prev parent reply other threads:[~2026-05-01 20:42 UTC|newest]
Thread overview: 18+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-05-01 12:05 [PATCH 0/2] Support active-high alert polarity for LM75 Markus Stockhausen
2026-05-01 12:05 ` [PATCH 1/2] dt-bindings: hwmon: lm75: Add lm75,alert-polarity-active-high property Markus Stockhausen
2026-05-01 12:24 ` sashiko-bot
2026-05-02 17:37 ` AW: " markus.stockhausen
2026-05-02 18:10 ` Guenter Roeck
2026-05-03 18:02 ` Conor Dooley
2026-05-01 12:05 ` [PATCH 2/2] hwmon: (lm75) Support active-high alert polarity Markus Stockhausen
2026-05-01 12:45 ` sashiko-bot
2026-05-01 14:06 ` AW: " markus.stockhausen
2026-05-01 17:37 ` Guenter Roeck
2026-05-01 19:00 ` AW: " markus.stockhausen
2026-05-01 19:24 ` Guenter Roeck
2026-05-01 20:14 ` Guenter Roeck
2026-05-01 20:42 ` markus.stockhausen [this message]
2026-05-01 21:19 ` AW: " Guenter Roeck
2026-05-01 17:05 ` Conor Dooley
2026-05-01 19:32 ` Guenter Roeck
2026-05-03 18:00 ` Conor Dooley
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='022201dcd9ab$0aba9fb0$202fdf10$@gmx.de' \
--to=markus.stockhausen@gmx.de \
--cc=linux-hwmon@vger.kernel.org \
--cc=linux@roeck-us.net \
--cc=sashiko@lists.linux.dev \
/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