* [PATCH] hwmon : (mr75203) fix macro typo
@ 2021-12-15 11:30 Arseny Demidov
2021-12-15 11:59 ` Guenter Roeck
0 siblings, 1 reply; 12+ messages in thread
From: Arseny Demidov @ 2021-12-15 11:30 UTC (permalink / raw)
Cc: arsdemal, Arseny Demidov, Jean Delvare, Guenter Roeck,
linux-hwmon, linux-kernel
In the file mr75203.c we have a macro named
POWER_DELAY_CYCLE_256, the correct value should be 0x100
Signed-off-by: Arseny Demidov <a.demidov@yadro.com>
---
drivers/hwmon/mr75203.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/hwmon/mr75203.c b/drivers/hwmon/mr75203.c
index 868243dba1ee..1ba1e3145969 100644
--- a/drivers/hwmon/mr75203.c
+++ b/drivers/hwmon/mr75203.c
@@ -93,7 +93,7 @@
#define VM_CH_REQ BIT(21)
#define IP_TMR 0x05
-#define POWER_DELAY_CYCLE_256 0x80
+#define POWER_DELAY_CYCLE_256 0x100
#define POWER_DELAY_CYCLE_64 0x40
#define PVT_POLL_DELAY_US 20
--
2.25.1
^ permalink raw reply related [flat|nested] 12+ messages in thread
* Re: [PATCH] hwmon : (mr75203) fix macro typo
2021-12-15 11:30 [PATCH] hwmon : (mr75203) fix macro typo Arseny Demidov
@ 2021-12-15 11:59 ` Guenter Roeck
2021-12-15 12:31 ` Guenter Roeck
0 siblings, 1 reply; 12+ messages in thread
From: Guenter Roeck @ 2021-12-15 11:59 UTC (permalink / raw)
To: Arseny Demidov; +Cc: Arseny Demidov, Jean Delvare, linux-hwmon, linux-kernel
On 12/15/21 3:30 AM, Arseny Demidov wrote:
> In the file mr75203.c we have a macro named
> POWER_DELAY_CYCLE_256, the correct value should be 0x100
>
How do you know that ? Do you have access to the datasheet, or
is it just an assumption based on the name of the define ?
Guenter
> Signed-off-by: Arseny Demidov <a.demidov@yadro.com>
> ---
> drivers/hwmon/mr75203.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/hwmon/mr75203.c b/drivers/hwmon/mr75203.c
> index 868243dba1ee..1ba1e3145969 100644
> --- a/drivers/hwmon/mr75203.c
> +++ b/drivers/hwmon/mr75203.c
> @@ -93,7 +93,7 @@
> #define VM_CH_REQ BIT(21)
>
> #define IP_TMR 0x05
> -#define POWER_DELAY_CYCLE_256 0x80
> +#define POWER_DELAY_CYCLE_256 0x100
> #define POWER_DELAY_CYCLE_64 0x40
>
> #define PVT_POLL_DELAY_US 20
>
^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: [PATCH] hwmon : (mr75203) fix macro typo
2021-12-15 11:59 ` Guenter Roeck
@ 2021-12-15 12:31 ` Guenter Roeck
2021-12-15 12:36 ` Arseny Demidov
0 siblings, 1 reply; 12+ messages in thread
From: Guenter Roeck @ 2021-12-15 12:31 UTC (permalink / raw)
To: Arseny Demidov; +Cc: Arseny Demidov, Jean Delvare, linux-hwmon, linux-kernel
On 12/15/21 3:59 AM, Guenter Roeck wrote:
> On 12/15/21 3:30 AM, Arseny Demidov wrote:
>> In the file mr75203.c we have a macro named
>> POWER_DELAY_CYCLE_256, the correct value should be 0x100
>>
>
> How do you know that ? Do you have access to the datasheet, or
> is it just an assumption based on the name of the define ?
>
Also, how do you know that the value is wrong, not the name
of the define ?
Guenter
> Guenter
>
>> Signed-off-by: Arseny Demidov <a.demidov@yadro.com>
>> ---
>> drivers/hwmon/mr75203.c | 2 +-
>> 1 file changed, 1 insertion(+), 1 deletion(-)
>>
>> diff --git a/drivers/hwmon/mr75203.c b/drivers/hwmon/mr75203.c
>> index 868243dba1ee..1ba1e3145969 100644
>> --- a/drivers/hwmon/mr75203.c
>> +++ b/drivers/hwmon/mr75203.c
>> @@ -93,7 +93,7 @@
>> #define VM_CH_REQ BIT(21)
>> #define IP_TMR 0x05
>> -#define POWER_DELAY_CYCLE_256 0x80
>> +#define POWER_DELAY_CYCLE_256 0x100
>> #define POWER_DELAY_CYCLE_64 0x40
>> #define PVT_POLL_DELAY_US 20
>>
>
^ permalink raw reply [flat|nested] 12+ messages in thread
* RE: [PATCH] hwmon : (mr75203) fix macro typo
2021-12-15 12:31 ` Guenter Roeck
@ 2021-12-15 12:36 ` Arseny Demidov
2021-12-15 16:27 ` Guenter Roeck
0 siblings, 1 reply; 12+ messages in thread
From: Arseny Demidov @ 2021-12-15 12:36 UTC (permalink / raw)
To: Guenter Roeck, Arseny Demidov; +Cc: Jean Delvare, linux-hwmon, linux-kernel
Yes, I have access to the datasheet and caught an error on simulation IP-block.
The datasheet says that register "Expressed in units of IP clk cycles."
Typical power-up delays for Temperature Sensor are 256 cycles i. e. 0x100
-----Original Message-----
From: Guenter Roeck <groeck7@gmail.com> On Behalf Of Guenter Roeck
Sent: Wednesday, December 15, 2021 3:31 PM
To: Arseny Demidov <arsdemal@gmail.com>
Cc: Arseny Demidov <a.demidov@yadro.com>; Jean Delvare <jdelvare@suse.com>; linux-hwmon@vger.kernel.org; linux-kernel@vger.kernel.org
Subject: Re: [PATCH] hwmon : (mr75203) fix macro typo
On 12/15/21 3:59 AM, Guenter Roeck wrote:
> On 12/15/21 3:30 AM, Arseny Demidov wrote:
>> In the file mr75203.c we have a macro named POWER_DELAY_CYCLE_256,
>> the correct value should be 0x100
>>
>
> How do you know that ? Do you have access to the datasheet, or is it
> just an assumption based on the name of the define ?
>
Also, how do you know that the value is wrong, not the name of the define ?
Guenter
> Guenter
>
>> Signed-off-by: Arseny Demidov <a.demidov@yadro.com>
>> ---
>> drivers/hwmon/mr75203.c | 2 +-
>> 1 file changed, 1 insertion(+), 1 deletion(-)
>>
>> diff --git a/drivers/hwmon/mr75203.c b/drivers/hwmon/mr75203.c index
>> 868243dba1ee..1ba1e3145969 100644
>> --- a/drivers/hwmon/mr75203.c
>> +++ b/drivers/hwmon/mr75203.c
>> @@ -93,7 +93,7 @@
>> #define VM_CH_REQ BIT(21)
>> #define IP_TMR 0x05
>> -#define POWER_DELAY_CYCLE_256 0x80
>> +#define POWER_DELAY_CYCLE_256 0x100
>> #define POWER_DELAY_CYCLE_64 0x40
>> #define PVT_POLL_DELAY_US 20
>>
>
^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: [PATCH] hwmon : (mr75203) fix macro typo
2021-12-15 12:36 ` Arseny Demidov
@ 2021-12-15 16:27 ` Guenter Roeck
2021-12-16 14:26 ` Andy Shevchenko
0 siblings, 1 reply; 12+ messages in thread
From: Guenter Roeck @ 2021-12-15 16:27 UTC (permalink / raw)
To: Arseny Demidov; +Cc: Arseny Demidov, Jean Delvare, linux-hwmon, linux-kernel
On Wed, Dec 15, 2021 at 12:36:32PM +0000, Arseny Demidov wrote:
> Yes, I have access to the datasheet and caught an error on simulation IP-block.
> The datasheet says that register "Expressed in units of IP clk cycles."
> Typical power-up delays for Temperature Sensor are 256 cycles i. e. 0x100
Please add that information to the commit description. Also,
please copy Rahul Tanwar <rahul.tanwar@linux.intel.com> and
Andy Shevchenko <andriy.shevchenko@intel.com> on your patch.
Thanks,
Guenter
>
> -----Original Message-----
> From: Guenter Roeck <groeck7@gmail.com> On Behalf Of Guenter Roeck
> Sent: Wednesday, December 15, 2021 3:31 PM
> To: Arseny Demidov <arsdemal@gmail.com>
> Cc: Arseny Demidov <a.demidov@yadro.com>; Jean Delvare <jdelvare@suse.com>; linux-hwmon@vger.kernel.org; linux-kernel@vger.kernel.org
> Subject: Re: [PATCH] hwmon : (mr75203) fix macro typo
>
> On 12/15/21 3:59 AM, Guenter Roeck wrote:
> > On 12/15/21 3:30 AM, Arseny Demidov wrote:
> >> In the file mr75203.c we have a macro named POWER_DELAY_CYCLE_256,
> >> the correct value should be 0x100
> >>
> >
> > How do you know that ? Do you have access to the datasheet, or is it
> > just an assumption based on the name of the define ?
> >
>
> Also, how do you know that the value is wrong, not the name of the define ?
>
> Guenter
>
> > Guenter
> >
> >> Signed-off-by: Arseny Demidov <a.demidov@yadro.com>
> >> ---
> >> drivers/hwmon/mr75203.c | 2 +-
> >> 1 file changed, 1 insertion(+), 1 deletion(-)
> >>
> >> diff --git a/drivers/hwmon/mr75203.c b/drivers/hwmon/mr75203.c index
> >> 868243dba1ee..1ba1e3145969 100644
> >> --- a/drivers/hwmon/mr75203.c
> >> +++ b/drivers/hwmon/mr75203.c
> >> @@ -93,7 +93,7 @@
> >> #define VM_CH_REQ BIT(21)
> >> #define IP_TMR 0x05
> >> -#define POWER_DELAY_CYCLE_256 0x80
> >> +#define POWER_DELAY_CYCLE_256 0x100
> >> #define POWER_DELAY_CYCLE_64 0x40
> >> #define PVT_POLL_DELAY_US 20
> >>
> >
>
^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: [PATCH] hwmon : (mr75203) fix macro typo
2021-12-15 16:27 ` Guenter Roeck
@ 2021-12-16 14:26 ` Andy Shevchenko
2021-12-16 14:40 ` Guenter Roeck
0 siblings, 1 reply; 12+ messages in thread
From: Andy Shevchenko @ 2021-12-16 14:26 UTC (permalink / raw)
To: Guenter Roeck, Tanwar, Rahul
Cc: Arseny Demidov, Arseny Demidov, Jean Delvare, linux-hwmon, linux-kernel
On Wed, Dec 15, 2021 at 11:37 PM Guenter Roeck <linux@roeck-us.net> wrote:
> On Wed, Dec 15, 2021 at 12:36:32PM +0000, Arseny Demidov wrote:
> Please add that information to the commit description. Also,
> please copy Rahul Tanwar <rahul.tanwar@linux.intel.com> and
> Andy Shevchenko <andriy.shevchenko@intel.com> on your patch.
I see how my name appeared here:)
Okay, I have no access to the datasheet, I believe Rahul is the best
person here to answer this question.
--
With Best Regards,
Andy Shevchenko
^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: [PATCH] hwmon : (mr75203) fix macro typo
2021-12-16 14:26 ` Andy Shevchenko
@ 2021-12-16 14:40 ` Guenter Roeck
2021-12-16 14:54 ` Andy Shevchenko
0 siblings, 1 reply; 12+ messages in thread
From: Guenter Roeck @ 2021-12-16 14:40 UTC (permalink / raw)
To: Andy Shevchenko, Tanwar, Rahul
Cc: Arseny Demidov, Arseny Demidov, Jean Delvare, linux-hwmon, linux-kernel
On 12/16/21 6:26 AM, Andy Shevchenko wrote:
> On Wed, Dec 15, 2021 at 11:37 PM Guenter Roeck <linux@roeck-us.net> wrote:
>> On Wed, Dec 15, 2021 at 12:36:32PM +0000, Arseny Demidov wrote:
>
>> Please add that information to the commit description. Also,
>> please copy Rahul Tanwar <rahul.tanwar@linux.intel.com> and
>> Andy Shevchenko <andriy.shevchenko@intel.com> on your patch.
>
> I see how my name appeared here:)
> Okay, I have no access to the datasheet, I believe Rahul is the best
> person here to answer this question.
>
You reviewed the original patch, so I thought it would be appropriate
to copy you on this patch.
Guenter
^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: [PATCH] hwmon : (mr75203) fix macro typo
2021-12-16 14:40 ` Guenter Roeck
@ 2021-12-16 14:54 ` Andy Shevchenko
0 siblings, 0 replies; 12+ messages in thread
From: Andy Shevchenko @ 2021-12-16 14:54 UTC (permalink / raw)
To: Guenter Roeck
Cc: Tanwar, Rahul, Arseny Demidov, Arseny Demidov, Jean Delvare,
linux-hwmon, linux-kernel
On Thu, Dec 16, 2021 at 4:40 PM Guenter Roeck <linux@roeck-us.net> wrote:
> On 12/16/21 6:26 AM, Andy Shevchenko wrote:
> > On Wed, Dec 15, 2021 at 11:37 PM Guenter Roeck <linux@roeck-us.net> wrote:
> >> On Wed, Dec 15, 2021 at 12:36:32PM +0000, Arseny Demidov wrote:
> >
> >> Please add that information to the commit description. Also,
> >> please copy Rahul Tanwar <rahul.tanwar@linux.intel.com> and
> >> Andy Shevchenko <andriy.shevchenko@intel.com> on your patch.
> >
> > I see how my name appeared here:)
> > Okay, I have no access to the datasheet, I believe Rahul is the best
> > person here to answer this question.
> >
>
> You reviewed the original patch, so I thought it would be appropriate
> to copy you on this patch.
Yes, yes, no objections to that!
Just because I have no access to the datasheet, I relied on what Rahul used.
--
With Best Regards,
Andy Shevchenko
^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: [PATCH] hwmon : (mr75203) fix macro typo
2021-12-17 16:05 ` Guenter Roeck
@ 2021-12-17 16:45 ` Andy Shevchenko
0 siblings, 0 replies; 12+ messages in thread
From: Andy Shevchenko @ 2021-12-17 16:45 UTC (permalink / raw)
To: Guenter Roeck
Cc: Arseny Demidov, rahul.tanwar, Arseny Demidov, Jean Delvare,
linux-hwmon, linux-kernel
On Fri, Dec 17, 2021 at 08:05:17AM -0800, Guenter Roeck wrote:
> On 12/16/21 6:19 AM, Andy Shevchenko wrote:
> > On Thu, Dec 16, 2021 at 11:33:02AM +0300, Arseny Demidov wrote:
...
> > > -#define POWER_DELAY_CYCLE_256 0x80
> > > +#define POWER_DELAY_CYCLE_256 0x100
> > > #define POWER_DELAY_CYCLE_64 0x40
> >
> > I;m wondering why they are in hex? Perhaps the decimal is better for both.
> >
> Maybe, but that is POV, and I tend to leave it up to driver authors to decide.
> It is definitely not something we would want to change as part of a bug fix.
Agreed on both points.
--
With Best Regards,
Andy Shevchenko
^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: [PATCH] hwmon : (mr75203) fix macro typo
2021-12-16 14:19 ` Andy Shevchenko
@ 2021-12-17 16:05 ` Guenter Roeck
2021-12-17 16:45 ` Andy Shevchenko
0 siblings, 1 reply; 12+ messages in thread
From: Guenter Roeck @ 2021-12-17 16:05 UTC (permalink / raw)
To: Andy Shevchenko, Arseny Demidov
Cc: rahul.tanwar, Arseny Demidov, Jean Delvare, linux-hwmon, linux-kernel
On 12/16/21 6:19 AM, Andy Shevchenko wrote:
> On Thu, Dec 16, 2021 at 11:33:02AM +0300, Arseny Demidov wrote:
>> In the file mr75203.c we have a macro named POWER_DELAY_CYCLE_256,
>> the correct value should be 0x100. The register ip_tmr is expressed
>> in units of IP clk cycles, in accordance with the datasheet.
>> Typical power-up delays for Temperature Sensor are 256 cycles i.e. 0x100.
>
> Should you provide Fixes tag?
Yes. Also, please update the subject. This is not about "fix macro typo".
it fixes a wrong/bad delay value.
>
> ...
>
>> -#define POWER_DELAY_CYCLE_256 0x80
>> +#define POWER_DELAY_CYCLE_256 0x100
>> #define POWER_DELAY_CYCLE_64 0x40
>
> I;m wondering why they are in hex? Perhaps the decimal is better for both.
>
Maybe, but that is POV, and I tend to leave it up to driver authors to decide.
It is definitely not something we would want to change as part of a bug fix.
Thanks,
Guenter
^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: [PATCH] hwmon : (mr75203) fix macro typo
2021-12-16 8:33 Arseny Demidov
@ 2021-12-16 14:19 ` Andy Shevchenko
2021-12-17 16:05 ` Guenter Roeck
0 siblings, 1 reply; 12+ messages in thread
From: Andy Shevchenko @ 2021-12-16 14:19 UTC (permalink / raw)
To: Arseny Demidov
Cc: rahul.tanwar, Arseny Demidov, Jean Delvare, Guenter Roeck,
linux-hwmon, linux-kernel
On Thu, Dec 16, 2021 at 11:33:02AM +0300, Arseny Demidov wrote:
> In the file mr75203.c we have a macro named POWER_DELAY_CYCLE_256,
> the correct value should be 0x100. The register ip_tmr is expressed
> in units of IP clk cycles, in accordance with the datasheet.
> Typical power-up delays for Temperature Sensor are 256 cycles i.e. 0x100.
Should you provide Fixes tag?
...
> -#define POWER_DELAY_CYCLE_256 0x80
> +#define POWER_DELAY_CYCLE_256 0x100
> #define POWER_DELAY_CYCLE_64 0x40
I;m wondering why they are in hex? Perhaps the decimal is better for both.
--
With Best Regards,
Andy Shevchenko
^ permalink raw reply [flat|nested] 12+ messages in thread
* [PATCH] hwmon : (mr75203) fix macro typo
@ 2021-12-16 8:33 Arseny Demidov
2021-12-16 14:19 ` Andy Shevchenko
0 siblings, 1 reply; 12+ messages in thread
From: Arseny Demidov @ 2021-12-16 8:33 UTC (permalink / raw)
Cc: arsdemal, rahul.tanwar, andriy.shevchenko, Arseny Demidov,
Jean Delvare, Guenter Roeck, linux-hwmon, linux-kernel
In the file mr75203.c we have a macro named POWER_DELAY_CYCLE_256,
the correct value should be 0x100. The register ip_tmr is expressed
in units of IP clk cycles, in accordance with the datasheet.
Typical power-up delays for Temperature Sensor are 256 cycles i.e. 0x100.
Signed-off-by: Arseny Demidov <a.demidov@yadro.com>
---
drivers/hwmon/mr75203.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/hwmon/mr75203.c b/drivers/hwmon/mr75203.c
index 868243dba1ee..1ba1e3145969 100644
--- a/drivers/hwmon/mr75203.c
+++ b/drivers/hwmon/mr75203.c
@@ -93,7 +93,7 @@
#define VM_CH_REQ BIT(21)
#define IP_TMR 0x05
-#define POWER_DELAY_CYCLE_256 0x80
+#define POWER_DELAY_CYCLE_256 0x100
#define POWER_DELAY_CYCLE_64 0x40
#define PVT_POLL_DELAY_US 20
--
2.25.1
^ permalink raw reply related [flat|nested] 12+ messages in thread
end of thread, other threads:[~2021-12-17 16:46 UTC | newest]
Thread overview: 12+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-12-15 11:30 [PATCH] hwmon : (mr75203) fix macro typo Arseny Demidov
2021-12-15 11:59 ` Guenter Roeck
2021-12-15 12:31 ` Guenter Roeck
2021-12-15 12:36 ` Arseny Demidov
2021-12-15 16:27 ` Guenter Roeck
2021-12-16 14:26 ` Andy Shevchenko
2021-12-16 14:40 ` Guenter Roeck
2021-12-16 14:54 ` Andy Shevchenko
2021-12-16 8:33 Arseny Demidov
2021-12-16 14:19 ` Andy Shevchenko
2021-12-17 16:05 ` Guenter Roeck
2021-12-17 16:45 ` Andy Shevchenko
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.