mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Mark Brown <broonie@kernel.org>
To: Guenter Roeck <linux@roeck-us.net>
Cc: Alessandro Zini <alessandro.zini@siemens.com>,
	Linux Kernel Mailing List <linux-kernel@vger.kernel.org>,
	Linux Next Mailing List <linux-next@vger.kernel.org>,
	Tom Verdonck <tom.verdonck@inspiral.be>
Subject: linux-next: manual merge of the hwmon-staging tree with the hwmon-fixes tree
Date: Mon, 28 Sep 2026 13:48:43 +0100	[thread overview]
Message-ID: <arpiK1_aHlI2bfjo@sirena.org.uk> (raw)

[-- Attachment #1: Type: text/plain, Size: 2956 bytes --]

Hi all,

Today's linux-next merge of the hwmon-staging tree got a conflict in:

  drivers/hwmon/sht4x.c

between commit:

  61406e9cac695 ("hwmon: (sht4x) Fix jiffies wraparound in heater-ready check")

from the hwmon-fixes tree and commit:

  3a4bf85531c55 ("hwmon: (sht4x) Add support for Sensirion STS4x temperature sensors")

from the hwmon-staging tree.

I fixed it up (see below) and can carry the fix as necessary. This
is now fixed as far as linux-next is concerned, but any non trivial
conflicts should be mentioned to your upstream maintainer when your tree
is submitted for merging.  You may also want to consider cooperating
with the maintainer of the conflicting tree to minimise any particularly
complex conflicts.

diff --cc drivers/hwmon/sht4x.c
index da2b6130fca7e,fd1f950448f06..0000000000000
--- a/drivers/hwmon/sht4x.c
+++ b/drivers/hwmon/sht4x.c
@@@ -67,7 -74,8 +74,8 @@@ enum sht4x_chips 
   */
  struct sht4x_data {
  	struct i2c_client	*client;
+ 	enum sht4x_chips	chip_id;
 -	unsigned long		heating_complete;	/* in jiffies */
 +	u64			heating_complete;	/* in jiffies */
  	bool			data_pending;
  	u32			heater_power;	/* in milli-watts */
  	u32			heater_time;	/* in milli-seconds */
@@@ -92,14 -100,18 +100,19 @@@ static int sht4x_read_values(struct sht
  	u8 crc;
  	u8 cmd[SHT4X_CMD_LEN] = {SHT4X_CMD_MEASURE_HPM};
  	u8 raw_data[SHT4X_RESPONSE_LENGTH];
+ 	size_t response_length = data->chip_id == sts4x ?
+ 				 STS4X_RESPONSE_LENGTH : SHT4X_RESPONSE_LENGTH;
 -	unsigned long curr_jiffies;
 +	u64 curr_jiffies;
  
- 	curr_jiffies = get_jiffies_64();
- 	if (time_before64(curr_jiffies, data->heating_complete))
- 		msleep(jiffies_to_msecs(data->heating_complete - curr_jiffies));
+ 	if (data->chip_id != sts4x) {
 -		curr_jiffies = jiffies;
 -		if (time_before(curr_jiffies, data->heating_complete))
++		curr_jiffies = get_jiffies_64();
++		if (time_before64(curr_jiffies, data->heating_complete)) {
+ 			msleep(jiffies_to_msecs(data->heating_complete - curr_jiffies));
++		}
+ 	}
  
  	if (data->data_pending &&
 -	    time_before(jiffies, data->heating_complete + data->update_interval)) {
 +	    time_before64(get_jiffies_64(), data->heating_complete + data->update_interval)) {
  		data->data_pending = false;
  	} else {
  		next_update = data->last_updated +
@@@ -406,11 -428,15 +429,15 @@@ static int sht4x_probe(struct i2c_clien
  	if (!data)
  		return -ENOMEM;
  
+ 	data->chip_id = (uintptr_t)i2c_get_match_data(client);
  	data->update_interval = SHT4X_MIN_POLL_INTERVAL;
  	data->client = client;
- 	data->heater_power = 200;
- 	data->heater_time = 1000;
 -	data->heating_complete = jiffies;
 +	data->heating_complete = get_jiffies_64();
+ 	if (data->chip_id != sts4x) {
+ 		data->heater_power = 200;
+ 		data->heater_time = 1000;
+ 		groups = sht4x_groups;
+ 	}
  
  	crc8_populate_msb(sht4x_crc8_table, SHT4X_CRC8_POLYNOMIAL);
  

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 488 bytes --]

             reply	other threads:[~2026-09-28 12:48 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-09-28 12:48 Mark Brown [this message]
  -- strict thread matches above, loose matches on Subject: below --
2026-05-08 11:13 Thierry Reding

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=arpiK1_aHlI2bfjo@sirena.org.uk \
    --to=broonie@kernel.org \
    --cc=alessandro.zini@siemens.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-next@vger.kernel.org \
    --cc=linux@roeck-us.net \
    --cc=tom.verdonck@inspiral.be \
    /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®