All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Wilson, David T. (GSFC-5870)" <david.wilson@nasa.gov>
To: Guenter Roeck <linux@roeck-us.net>
Cc: "linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
	"linux-hwmon@vger.kernel.org" <linux-hwmon@vger.kernel.org>
Subject: Re: [EXTERNAL] Re: Potential issue with smb word operations for tmp461 device in tmp401 driver
Date: Tue, 19 Oct 2021 05:42:28 +0000	[thread overview]
Message-ID: <SA1PR09MB74408633E36AE3C97B4D2CA7E7BD9@SA1PR09MB7440.namprd09.prod.outlook.com> (raw)
In-Reply-To: <7f334e4c-0e71-2005-854f-c2d4e068ef85@roeck-us.net>

Guenter,

I've tried testing the patch by checking out the most recent commit's version for tmp401.c and applying the patch. However, the temperature values seem to be to low <1000 for each read.

If I'm understanding the driver code correctly, I believe there's two places of interest that might explain the low values
1. In tmp401_update_device_reg16, the final assignment to data->temp[j][i] overrides the patch's assignment to data->temp[j][i] in the tmp461 branch
2. In SENSOR_DEVICE_ATTR_2_RW, the temp2_offset is at (6, 1), but the newly added LSB array does not contain the LSB address at (6, 1)

Regarding your most recent email, I will try the lm90 by changing the driver tree entry to "ti,tmp451" and I'll let you know if that works for me.

Thanks,
David

From: Guenter Roeck <groeck7@gmail.com> on behalf of Guenter Roeck <linux@roeck-us.net>
Sent: Tuesday, October 19, 2021 12:56 AM
To: Wilson, David T. (GSFC-5870) <david.wilson@nasa.gov>
Cc: linux-kernel@vger.kernel.org <linux-kernel@vger.kernel.org>; linux-hwmon@vger.kernel.org <linux-hwmon@vger.kernel.org>
Subject: [EXTERNAL] Re: Potential issue with smb word operations for tmp461 device in tmp401 driver 
 
David,

On 10/15/21 10:43 AM, Wilson, David T. (GSFC-5870) wrote:
> Hi,
> 
> I am reporting what I believe is a potential issue in the tmp401 driver for the tmp461 device specifically. I am new to reporting issues, so I apologize in advance if I've provided insufficient information for an issue report.
> 
> The problem I'm encountering is that when I use the tmp401 linux driver to read temperature values from the tmp461, all of the read temperature values end with 996 (e.g. 33996, 38996, etc...).
> 
> Looking further into the tmp401 commit messages, I see that the driver was changed to use smb word operations instead of separate byte operations. Although the other supported devices (i.e. tmp432, etc...) are noted to support 16-bit read operations in their respective datasheets, I see no indications of 16-bit read support in the tmp461 datasheet, which is supported by my inquiry in the TI forums (https://gcc02.safelinks.protection.outlook.com/?url=https%3A%2F%2Fe2e.ti.com%2Fsupport%2Fsensors-group%2Fsensors%2Ff%2Fsensors-forum%2F1044935%2Ftmp461-linux-driver-support-and-16-bit-temperature-register-reads&amp;data=04%7C01%7Cdavid.wilson%40nasa.gov%7C2bf9c7234976452dd4a808d992bcc836%7C7005d45845be48ae8140d43da96dd17b%7C0%7C0%7C637702161780144423%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C1000&amp;sdata=JerajTZnSdtQgGlVrfm3IOLNpQcoVKeg5haNU8h1aDs%3D&amp;reserved=0).
> 
> Reverting the driver to the commit before the smb word change, I am then able to read temperature values that do not end only with 996. As a result, I believe that the tmp461 support may be partially broken by the switch to smb word operations.
> 

can you try to instantiate the lm90 driver (instead of the tmp401 driver)
and let me know if it works for you ? If your system uses devicetree,
you might have to select "ti,tmp451" instead of "ti,tmp461".

Thanks,
Guenter

  reply	other threads:[~2021-10-19  5:42 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-10-15 17:43 Potential issue with smb word operations for tmp461 device in tmp401 driver Wilson, David T. (GSFC-5870)
2021-10-15 22:27 ` Guenter Roeck
2021-10-16  2:33   ` [EXTERNAL] " Wilson, David T. (GSFC-5870)
2021-10-16  3:31     ` Guenter Roeck
2021-10-19  4:56 ` Guenter Roeck
2021-10-19  5:42   ` Wilson, David T. (GSFC-5870) [this message]
2021-10-19 14:18     ` [EXTERNAL] " Guenter Roeck
2021-10-21  5:37       ` Wilson, David T. (GSFC-5870)
2021-10-21  7:07         ` Guenter Roeck
2021-10-28  1:54           ` Wilson, David T. (GSFC-5870)
2021-10-28  4:03             ` Guenter Roeck
2021-10-28 16:20             ` Guenter Roeck

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=SA1PR09MB74408633E36AE3C97B4D2CA7E7BD9@SA1PR09MB7440.namprd09.prod.outlook.com \
    --to=david.wilson@nasa.gov \
    --cc=linux-hwmon@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux@roeck-us.net \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.