mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Guenter Roeck <linux@roeck-us.net>
To: Hao Yu <haoyufine@gmail.com>
Cc: robh@kernel.org, krzk+dt@kernel.org, conor+dt@kernel.org,
	jcdra1@gmail.com, akhilesh@ee.iitb.ac.in,
	linux-hwmon@vger.kernel.org, devicetree@vger.kernel.org,
	linux-kernel@vger.kernel.org
Subject: Re: [PATCH v2 2/3] hwmon: (aht10) Fix initialization commands for AHT20
Date: Sun, 22 Feb 2026 10:33:29 -0800	[thread overview]
Message-ID: <dab83860-0dd5-4c88-bcb1-99226cf4fce7@roeck-us.net> (raw)
In-Reply-To: <20260222170332.1616-3-haoyufine@gmail.com>

On Mon, Feb 23, 2026 at 01:03:31AM +0800, Hao Yu wrote:
> According to the AHT20 datasheet (updated to V1.0 after the 2023.09
> version), the initialization command for AHT20 is 0b10111110 (0xBE).
> The previous sequence (0xE1) used in earlier versions is no longer
> compatible with newer AHT20 sensors. Update the initialization
> command to ensure the sensor is properly initialized.
> 
> Fixes: d2abcb5cc885 ("hwmon: (aht10) Add support for compatible aht20")
> Signed-off-by: Hao Yu <haoyufine@gmail.com>

Applied, since htis is a fix which doewsn't depend on the devicetree patches.

Thanks,
Guenter

> ---
>  drivers/hwmon/aht10.c | 6 ++++--
>  1 file changed, 4 insertions(+), 2 deletions(-)
> 
> diff --git a/drivers/hwmon/aht10.c b/drivers/hwmon/aht10.c
> index 007befdba977..4ce019d2cc80 100644
> --- a/drivers/hwmon/aht10.c
> +++ b/drivers/hwmon/aht10.c
> @@ -37,7 +37,9 @@
>  #define AHT10_CMD_MEAS	0b10101100
>  #define AHT10_CMD_RST	0b10111010
>  
> -#define DHT20_CMD_INIT	0x71
> +#define AHT20_CMD_INIT	0b10111110
> +
> +#define DHT20_CMD_INIT	0b01110001
>  
>  /*
>   * Flags in the answer byte/command
> @@ -341,7 +343,7 @@ static int aht10_probe(struct i2c_client *client)
>  		data->meas_size = AHT20_MEAS_SIZE;
>  		data->crc8 = true;
>  		crc8_populate_msb(crc8_table, AHT20_CRC8_POLY);
> -		data->init_cmd = AHT10_CMD_INIT;
> +		data->init_cmd = AHT20_CMD_INIT;
>  		break;
>  	case dht20:
>  		data->meas_size = AHT20_MEAS_SIZE;

  reply	other threads:[~2026-02-22 18:33 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-02-22 17:03 [PATCH v2 0/3] Add AHT20 sensor bindings and fix driver initialization Hao Yu
2026-02-22 17:03 ` [PATCH v2 1/3] dt-bindings: hwmon: add aosong,aht10 family Hao Yu
2026-02-23 10:32   ` Krzysztof Kozlowski
2026-02-22 17:03 ` [PATCH v2 2/3] hwmon: (aht10) Fix initialization commands for AHT20 Hao Yu
2026-02-22 18:33   ` Guenter Roeck [this message]
2026-02-22 17:03 ` [PATCH v2 3/3] hwmon: (aht10) Add Device Tree support Hao Yu

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=dab83860-0dd5-4c88-bcb1-99226cf4fce7@roeck-us.net \
    --to=linux@roeck-us.net \
    --cc=akhilesh@ee.iitb.ac.in \
    --cc=conor+dt@kernel.org \
    --cc=devicetree@vger.kernel.org \
    --cc=haoyufine@gmail.com \
    --cc=jcdra1@gmail.com \
    --cc=krzk+dt@kernel.org \
    --cc=linux-hwmon@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --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

all inboxes | Powered by JetHome®