lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CA+_ehUy+WSzRre+64KxeJKtOb_Et8HO=oMV+fNrGF5HHLzh3MA@mail.gmail.com>
Date: Tue, 13 May 2025 22:11:03 +0200
From: "Christian Marangi (Ansuel)" <ansuelsmth@...il.com>
To: ALOK TIWARI <alok.a.tiwari@...cle.com>
Cc: "Rafael J. Wysocki" <rafael@...nel.org>, Daniel Lezcano <daniel.lezcano@...aro.org>, 
	Zhang Rui <rui.zhang@...el.com>, Lukasz Luba <lukasz.luba@....com>, Rob Herring <robh@...nel.org>, 
	Krzysztof Kozlowski <krzk+dt@...nel.org>, Conor Dooley <conor+dt@...nel.org>, linux-pm@...r.kernel.org, 
	devicetree@...r.kernel.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH v6 2/2] thermal: Add support for Airoha EN7581 thermal sensor

Il giorno mar 13 mag 2025 alle ore 21:50 ALOK TIWARI
<alok.a.tiwari@...cle.com> ha scritto:
>
> > + * the same addr is used for ADC volt and valid reading.
> > + * In such case, VALID ADDR is used and volt addr is ignored.
> > + */
> > +#define   EN7581_RD_CTRL_DIFF                        BIT(0)
> > +#define EN7581_TEMPADCVALIDMASK                      0x884
> > +#define   EN7581_ADV_RD_VALID_POLARITY               BIT(5)
> > +#define   EN7581_ADV_RD_VALID_POS            GENMASK(4, 0)
> > +#define EN7581_TEMPADCVOLTAGESHIFT           0x888
> > +#define   EN7581_ADC_VOLTAGE_SHIFT           GENMASK(4, 0)
> > +/*
> > + * Same values for each CTL.
> > + * Can operate in:
> > + * - 1 sample
> > + * - 2 sample and make average of them
> > + * - 4,6,10,16 sample, drop max and min and make avgerage of them
>
> typo avgerage -> average
>
> [...]
> > +}
> > +
> > +static void airoha_thermal_setup_monitor(struct airoha_thermal_priv *priv)
> > +{
> > +     /* Set measure mode */
> > +     writel(FIELD_PREP(EN7581_MSRCTL0, EN7581_MSRCTL_6SAMPLE_MAX_MIX_AVG4),
> > +            priv->base + EN7581_TEMPMSRCTL0);
> > +
> > +     /*
> > +      * Configure ADC valid reading addr
> > +      * The AHB temp monitor system doesn't have direct access to the
> > +      * thermal sensor. It does instead work by providing all kind of
> > +      * address to configure how to access and setup an ADC for the
> > +      * sensor. EN7581 supports only one sensor hence the
> > +      * implementation is greatly simplified but the AHB supports
> > +      * up to 4 different sensor from the same ADC that can be
>
> "all kind of address" ->  "various addresses"
> 4 different sensor -> 4 different sensors
>
> > +      * switched by tuning the ADC mux or wiriting address.
>
> typo wiriting -> writing
>
> > +      *
> > +      * We set valid instead of volt as we don't enable valid/volt
> > +      * split reading and AHB read valid addr in such case.
> > +      */
> > +     writel(priv->scu_adc_res.start + EN7581_DOUT_TADC,
> > +            priv->base + EN7581_TEMPADCVALIDADDR);
> > +
>

Thanks a lot for the spelling check. I can send a follow-up or resend this...

Don't know what Daniel prefers.

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ