public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* Tachometer speed returned rather than absolute fan speed?
@ 2014-03-07 14:48 Laszlo Papp
  2014-03-07 15:08 ` Laszlo Papp
  2014-03-07 15:25 ` Jean Delvare
  0 siblings, 2 replies; 18+ messages in thread
From: Laszlo Papp @ 2014-03-07 14:48 UTC (permalink / raw)
  To: LKML, lm-sensors, Guenter Roeck, Jean Delvare

Hi,

In medias res, I find this interface cumbersome:
http://lxr.free-electrons.com/source/Documentation/hwmon/max6650#L31

It returns tachometer speed rather than actual fan speed when you deal
with the fan1_target interface. That would be way more convenient for
end users like me.

Is there any reason for not returning absolute fan speed? I guess,
this would break the behavior now. However, that would be a really
useful convenient feature. Is it possible to add a new interface for
that?

Cheers, L.

^ permalink raw reply	[flat|nested] 18+ messages in thread

* Re: Tachometer speed returned rather than absolute fan speed?
  2014-03-07 14:48 Tachometer speed returned rather than absolute fan speed? Laszlo Papp
@ 2014-03-07 15:08 ` Laszlo Papp
  2014-03-07 15:25 ` Jean Delvare
  1 sibling, 0 replies; 18+ messages in thread
From: Laszlo Papp @ 2014-03-07 15:08 UTC (permalink / raw)
  To: LKML, lm-sensors, Guenter Roeck, Jean Delvare

On Fri, Mar 7, 2014 at 2:48 PM, Laszlo Papp <lpapp@kde.org> wrote:
> Hi,
>
> In medias res, I find this interface cumbersome:
> http://lxr.free-electrons.com/source/Documentation/hwmon/max6650#L31
>
> It returns tachometer speed rather than actual fan speed when you deal
> with the fan1_target interface. That would be way more convenient for
> end users like me.
>
> Is there any reason for not returning absolute fan speed? I guess,
> this would break the behavior now. However, that would be a really
> useful convenient feature. Is it possible to add a new interface for
> that?

It might also just well be a sloppy documentation... 'cause I am
currently struggling to understand how to get the actual fan speed out
of that value ... or is it just so it already returns the absolute fan
speed and there is some logic in the driver (get_fan) function that I
do not understand?

^ permalink raw reply	[flat|nested] 18+ messages in thread

* Re: Tachometer speed returned rather than absolute fan speed?
  2014-03-07 14:48 Tachometer speed returned rather than absolute fan speed? Laszlo Papp
  2014-03-07 15:08 ` Laszlo Papp
@ 2014-03-07 15:25 ` Jean Delvare
  2014-03-07 15:31   ` Laszlo Papp
  2014-03-10  7:11   ` George Spelvin
  1 sibling, 2 replies; 18+ messages in thread
From: Jean Delvare @ 2014-03-07 15:25 UTC (permalink / raw)
  To: Laszlo Papp; +Cc: LKML, lm-sensors, Guenter Roeck

Hi Laszlo,

On Fri, 7 Mar 2014 14:48:01 +0000, Laszlo Papp wrote:
> In medias res, I find this interface cumbersome:
> http://lxr.free-electrons.com/source/Documentation/hwmon/max6650#L31
> 
> It returns tachometer speed rather than actual fan speed when you deal
> with the fan1_target interface. That would be way more convenient for
> end users like me.
> 
> Is there any reason for not returning absolute fan speed? I guess,
> this would break the behavior now. However, that would be a really
> useful convenient feature. Is it possible to add a new interface for
> that?

I'm quite confused. While I admit that the term "tachometer speed" is
awkward, the max6650 driver is reporting fan speeds in RPM as every
other hwmon driver. So I really have no idea what you think is wrong.
What did you think "tachometer speed" was, if not the fan speed? Does
the max6650 driver not return correct fan speeds for you?

-- 
Jean Delvare
SUSE L3 Support

^ permalink raw reply	[flat|nested] 18+ messages in thread

* Re: Tachometer speed returned rather than absolute fan speed?
  2014-03-07 15:25 ` Jean Delvare
@ 2014-03-07 15:31   ` Laszlo Papp
  2014-03-07 15:37     ` Jean Delvare
  2014-03-10  7:11   ` George Spelvin
  1 sibling, 1 reply; 18+ messages in thread
From: Laszlo Papp @ 2014-03-07 15:31 UTC (permalink / raw)
  To: Jean Delvare; +Cc: LKML, lm-sensors, Guenter Roeck

On Fri, Mar 7, 2014 at 3:25 PM, Jean Delvare <jdelvare@suse.de> wrote:
> Hi Laszlo,
>
> On Fri, 7 Mar 2014 14:48:01 +0000, Laszlo Papp wrote:
>> In medias res, I find this interface cumbersome:
>> http://lxr.free-electrons.com/source/Documentation/hwmon/max6650#L31
>>
>> It returns tachometer speed rather than actual fan speed when you deal
>> with the fan1_target interface. That would be way more convenient for
>> end users like me.
>>
>> Is there any reason for not returning absolute fan speed? I guess,
>> this would break the behavior now. However, that would be a really
>> useful convenient feature. Is it possible to add a new interface for
>> that?
>
> I'm quite confused. While I admit that the term "tachometer speed" is
> awkward, the max6650 driver is reporting fan speeds in RPM as every
> other hwmon driver. So I really have no idea what you think is wrong.
> What did you think "tachometer speed" was, if not the fan speed? Does
> the max6650 driver not return correct fan speeds for you?

I was just writing a patch to improve the documentation. Tachometer
value is not equal to the fan speed, and using the terms together is
confusing. It should probably read as follows:

"absolute fan speed in RPM based on the corresponding tachometer
value" or something similar. I just did not get the meaning of two
different values together, and I think that confused me, especially
since get_fan and get_target are doing slightly different
computations, so it took me a while to figure this out from the
datasheet.

Better wording would have definitely helped in here. Fwiw, I asked
another kernel hacker person who also got confused telling me that he
would not know without reading the source code. I think that it is an
indication to improve the documentation. There might be better
alternatives than the one I am proposing, but at least that one clears
up that for me.

^ permalink raw reply	[flat|nested] 18+ messages in thread

* Re: Tachometer speed returned rather than absolute fan speed?
  2014-03-07 15:31   ` Laszlo Papp
@ 2014-03-07 15:37     ` Jean Delvare
  2014-03-07 15:47       ` Laszlo Papp
  0 siblings, 1 reply; 18+ messages in thread
From: Jean Delvare @ 2014-03-07 15:37 UTC (permalink / raw)
  To: Laszlo Papp; +Cc: LKML, lm-sensors, Guenter Roeck

On Fri, 7 Mar 2014 15:31:44 +0000, Laszlo Papp wrote:
> On Fri, Mar 7, 2014 at 3:25 PM, Jean Delvare <jdelvare@suse.de> wrote:
> > Hi Laszlo,
> >
> > On Fri, 7 Mar 2014 14:48:01 +0000, Laszlo Papp wrote:
> >> In medias res, I find this interface cumbersome:
> >> http://lxr.free-electrons.com/source/Documentation/hwmon/max6650#L31
> >>
> >> It returns tachometer speed rather than actual fan speed when you deal
> >> with the fan1_target interface. That would be way more convenient for
> >> end users like me.
> >>
> >> Is there any reason for not returning absolute fan speed? I guess,
> >> this would break the behavior now. However, that would be a really
> >> useful convenient feature. Is it possible to add a new interface for
> >> that?
> >
> > I'm quite confused. While I admit that the term "tachometer speed" is
> > awkward, the max6650 driver is reporting fan speeds in RPM as every
> > other hwmon driver. So I really have no idea what you think is wrong.
> > What did you think "tachometer speed" was, if not the fan speed? Does
> > the max6650 driver not return correct fan speeds for you?
> 
> I was just writing a patch to improve the documentation. Tachometer
> value is not equal to the fan speed, and using the terms together is
> confusing. It should probably read as follows:
> 
> "absolute fan speed in RPM based on the corresponding tachometer
> value" or something similar. I just did not get the meaning of two
> different values together, and I think that confused me, especially
> since get_fan and get_target are doing slightly different
> computations, so it took me a while to figure this out from the
> datasheet.
> 
> Better wording would have definitely helped in here. Fwiw, I asked
> another kernel hacker person who also got confused telling me that he
> would not know without reading the source code. I think that it is an
> indication to improve the documentation. There might be better
> alternatives than the one I am proposing, but at least that one clears
> up that for me.

I agree. I think I would just go with "measured fan speed in RPM", as
tachometer is quite a technical term and the user doesn't need to know.
Care to send a patch?

-- 
Jean Delvare
SUSE L3 Support

^ permalink raw reply	[flat|nested] 18+ messages in thread

* Re: Tachometer speed returned rather than absolute fan speed?
  2014-03-07 15:37     ` Jean Delvare
@ 2014-03-07 15:47       ` Laszlo Papp
  2014-03-07 18:17         ` Guenter Roeck
  0 siblings, 1 reply; 18+ messages in thread
From: Laszlo Papp @ 2014-03-07 15:47 UTC (permalink / raw)
  To: Jean Delvare; +Cc: LKML, lm-sensors, Guenter Roeck

On Fri, Mar 7, 2014 at 3:37 PM, Jean Delvare <jdelvare@suse.de> wrote:
>> > I'm quite confused. While I admit that the term "tachometer speed" is
>> > awkward, the max6650 driver is reporting fan speeds in RPM as every
>> > other hwmon driver. So I really have no idea what you think is wrong.
>> > What did you think "tachometer speed" was, if not the fan speed? Does
>> > the max6650 driver not return correct fan speeds for you?

That is some strange behavior. If I do "echo 1 > pwm1_enable; echo 0 >
pwm1; cat fan1_input", I still see 30 for the connected fan, whereas I
can see it stopped. Is this an expected behavior? I would expect zero
as a user.

>> Better wording would have definitely helped in here. Fwiw, I asked
>> another kernel hacker person who also got confused telling me that he
>> would not know without reading the source code. I think that it is an
>> indication to improve the documentation. There might be better
>> alternatives than the one I am proposing, but at least that one clears
>> up that for me.
>
> I agree. I think I would just go with "measured fan speed in RPM", as
> tachometer is quite a technical term and the user doesn't need to know.
> Care to send a patch?

Hmm, yeah, perhaps. I can try to do that during the weekend.

^ permalink raw reply	[flat|nested] 18+ messages in thread

* Re: Tachometer speed returned rather than absolute fan speed?
  2014-03-07 15:47       ` Laszlo Papp
@ 2014-03-07 18:17         ` Guenter Roeck
  2014-03-08 23:50           ` [lm-sensors] " Guenter Roeck
  0 siblings, 1 reply; 18+ messages in thread
From: Guenter Roeck @ 2014-03-07 18:17 UTC (permalink / raw)
  To: Laszlo Papp; +Cc: Jean Delvare, LKML, lm-sensors

On Fri, Mar 07, 2014 at 03:47:08PM +0000, Laszlo Papp wrote:
> On Fri, Mar 7, 2014 at 3:37 PM, Jean Delvare <jdelvare@suse.de> wrote:
> >> > I'm quite confused. While I admit that the term "tachometer speed" is
> >> > awkward, the max6650 driver is reporting fan speeds in RPM as every
> >> > other hwmon driver. So I really have no idea what you think is wrong.
> >> > What did you think "tachometer speed" was, if not the fan speed? Does
> >> > the max6650 driver not return correct fan speeds for you?
> 
> That is some strange behavior. If I do "echo 1 > pwm1_enable; echo 0 >
> pwm1; cat fan1_input", I still see 30 for the connected fan, whereas I
> can see it stopped. Is this an expected behavior? I would expect zero
> as a user.
> 
I seem to recall that I had seen that as well, with no fan connected.
Maybe the tachometer registers always read at least '1'. I would think
it is wrong, but we'll have to understand the chip a bit better
to be able to provide a fix. Unless you already have a fix ready,
of course. I'll try to re-test tonight if I find the time.

Guenter

^ permalink raw reply	[flat|nested] 18+ messages in thread

* Re: [lm-sensors] Tachometer speed returned rather than absolute fan speed?
  2014-03-07 18:17         ` Guenter Roeck
@ 2014-03-08 23:50           ` Guenter Roeck
  2014-03-09  6:36             ` Laszlo Papp
  2014-04-08  9:19             ` Pavel Machek
  0 siblings, 2 replies; 18+ messages in thread
From: Guenter Roeck @ 2014-03-08 23:50 UTC (permalink / raw)
  To: Laszlo Papp; +Cc: LKML, lm-sensors

On 03/07/2014 10:17 AM, Guenter Roeck wrote:
> On Fri, Mar 07, 2014 at 03:47:08PM +0000, Laszlo Papp wrote:
>> On Fri, Mar 7, 2014 at 3:37 PM, Jean Delvare <jdelvare@suse.de> wrote:
>>>>> I'm quite confused. While I admit that the term "tachometer speed" is
>>>>> awkward, the max6650 driver is reporting fan speeds in RPM as every
>>>>> other hwmon driver. So I really have no idea what you think is wrong.
>>>>> What did you think "tachometer speed" was, if not the fan speed? Does
>>>>> the max6650 driver not return correct fan speeds for you?
>>
>> That is some strange behavior. If I do "echo 1 > pwm1_enable; echo 0 >
>> pwm1; cat fan1_input", I still see 30 for the connected fan, whereas I
>> can see it stopped. Is this an expected behavior? I would expect zero
>> as a user.
>>
> I seem to recall that I had seen that as well, with no fan connected.
> Maybe the tachometer registers always read at least '1'. I would think
> it is wrong, but we'll have to understand the chip a bit better
> to be able to provide a fix. Unless you already have a fix ready,
> of course. I'll try to re-test tonight if I find the time.
>

The reason is (most likely) that your fan input does not have a pull-up
resistor. Per datasheet, the fan inputs need a 10kOhm pull-up resistor.
I confirmed this with my test board - with the pull-up resistor,
inputs read 0, Without pull-up, the reported value is 1, which
translates to 30 RPM.

You might also need the 10 uF capacitor on the FB pin.

Guenter


^ permalink raw reply	[flat|nested] 18+ messages in thread

* Re: [lm-sensors] Tachometer speed returned rather than absolute fan speed?
  2014-03-08 23:50           ` [lm-sensors] " Guenter Roeck
@ 2014-03-09  6:36             ` Laszlo Papp
  2014-03-09  8:04               ` Guenter Roeck
  2014-04-08  9:19             ` Pavel Machek
  1 sibling, 1 reply; 18+ messages in thread
From: Laszlo Papp @ 2014-03-09  6:36 UTC (permalink / raw)
  To: Guenter Roeck; +Cc: LKML, lm-sensors

On Sat, Mar 8, 2014 at 11:50 PM, Guenter Roeck <linux@roeck-us.net> wrote:
> On 03/07/2014 10:17 AM, Guenter Roeck wrote:
>>
>> On Fri, Mar 07, 2014 at 03:47:08PM +0000, Laszlo Papp wrote:
>>>
>>> On Fri, Mar 7, 2014 at 3:37 PM, Jean Delvare <jdelvare@suse.de> wrote:
>>>>>>
>>>>>> I'm quite confused. While I admit that the term "tachometer speed" is
>>>>>> awkward, the max6650 driver is reporting fan speeds in RPM as every
>>>>>> other hwmon driver. So I really have no idea what you think is wrong.
>>>>>> What did you think "tachometer speed" was, if not the fan speed? Does
>>>>>> the max6650 driver not return correct fan speeds for you?
>>>
>>>
>>> That is some strange behavior. If I do "echo 1 > pwm1_enable; echo 0 >
>>> pwm1; cat fan1_input", I still see 30 for the connected fan, whereas I
>>> can see it stopped. Is this an expected behavior? I would expect zero
>>> as a user.
>>>
>> I seem to recall that I had seen that as well, with no fan connected.
>> Maybe the tachometer registers always read at least '1'. I would think
>> it is wrong, but we'll have to understand the chip a bit better
>> to be able to provide a fix. Unless you already have a fix ready,
>> of course. I'll try to re-test tonight if I find the time.
>>
>
> The reason is (most likely) that your fan input does not have a pull-up
> resistor. Per datasheet, the fan inputs need a 10kOhm pull-up resistor.
> I confirmed this with my test board - with the pull-up resistor,
> inputs read 0, Without pull-up, the reported value is 1, which
> translates to 30 RPM.
>
> You might also need the 10 uF capacitor on the FB pin.

Hmm, interesting, but then I wonder how it works fine when getting the
data from userspace with ioctl (i.e .without the driver) through
/dev/i2c-1. There must be some trick in that case that I am not yet
aware of. I will double check the schematics on Monday.

Thanks!

^ permalink raw reply	[flat|nested] 18+ messages in thread

* Re: [lm-sensors] Tachometer speed returned rather than absolute fan speed?
  2014-03-09  6:36             ` Laszlo Papp
@ 2014-03-09  8:04               ` Guenter Roeck
  2014-03-09 12:44                 ` Laszlo Papp
  2014-03-10  9:59                 ` Laszlo Papp
  0 siblings, 2 replies; 18+ messages in thread
From: Guenter Roeck @ 2014-03-09  8:04 UTC (permalink / raw)
  To: Laszlo Papp; +Cc: LKML, lm-sensors

On 03/08/2014 10:36 PM, Laszlo Papp wrote:
> On Sat, Mar 8, 2014 at 11:50 PM, Guenter Roeck <linux@roeck-us.net> wrote:
>> On 03/07/2014 10:17 AM, Guenter Roeck wrote:
>>>
>>> On Fri, Mar 07, 2014 at 03:47:08PM +0000, Laszlo Papp wrote:
>>>>
>>>> On Fri, Mar 7, 2014 at 3:37 PM, Jean Delvare <jdelvare@suse.de> wrote:
>>>>>>>
>>>>>>> I'm quite confused. While I admit that the term "tachometer speed" is
>>>>>>> awkward, the max6650 driver is reporting fan speeds in RPM as every
>>>>>>> other hwmon driver. So I really have no idea what you think is wrong.
>>>>>>> What did you think "tachometer speed" was, if not the fan speed? Does
>>>>>>> the max6650 driver not return correct fan speeds for you?
>>>>
>>>>
>>>> That is some strange behavior. If I do "echo 1 > pwm1_enable; echo 0 >
>>>> pwm1; cat fan1_input", I still see 30 for the connected fan, whereas I
>>>> can see it stopped. Is this an expected behavior? I would expect zero
>>>> as a user.
>>>>
>>> I seem to recall that I had seen that as well, with no fan connected.
>>> Maybe the tachometer registers always read at least '1'. I would think
>>> it is wrong, but we'll have to understand the chip a bit better
>>> to be able to provide a fix. Unless you already have a fix ready,
>>> of course. I'll try to re-test tonight if I find the time.
>>>
>>
>> The reason is (most likely) that your fan input does not have a pull-up
>> resistor. Per datasheet, the fan inputs need a 10kOhm pull-up resistor.
>> I confirmed this with my test board - with the pull-up resistor,
>> inputs read 0, Without pull-up, the reported value is 1, which
>> translates to 30 RPM.
>>
>> You might also need the 10 uF capacitor on the FB pin.
>
> Hmm, interesting, but then I wonder how it works fine when getting the
> data from userspace with ioctl (i.e .without the driver) through
> /dev/i2c-1. There must be some trick in that case that I am not yet
> aware of. I will double check the schematics on Monday.
>

With i2cdump on my system I can see that the tachometer register
holds 0 if the resistor is in place, and the sensors command reports
a fan speed or 0 rpm. If the resistor is not in place, the register
content is 1 and sensors reports 30 rpm.

sudo i2cdump -y -f 1 0x48
No size specified (using byte-data access)
      0  1  2  3  4  5  6  7  8  9  a  b  c  d  e  f    0123456789abcdef
00: 00 00 0a 0a ff ff 00 00 00 00 00 00 01 01 00 00    ..??........??..
10: 01 01 01 01 1f 1f 02 02 91 91 91 91 91 91 91 91    ????????????????
20: 00 00 0a 0a ff ff 00 00 00 00 00 00 01 01 00 00    ..??........??..

groeck@desktop:~$ sensors max6651-i2c-1-48
max6651-i2c-1-48
Adapter: i2c-diolan-u2c at bus 003 device 002
fan1:          30 RPM  (div = 4)
fan2:           0 RPM
fan3:          30 RPM
fan4:          30 RPM

Only fan2 (TACH1 chip input) has the resistor installed.

Guenter


^ permalink raw reply	[flat|nested] 18+ messages in thread

* Re: [lm-sensors] Tachometer speed returned rather than absolute fan speed?
  2014-03-09  8:04               ` Guenter Roeck
@ 2014-03-09 12:44                 ` Laszlo Papp
  2014-03-10  9:59                 ` Laszlo Papp
  1 sibling, 0 replies; 18+ messages in thread
From: Laszlo Papp @ 2014-03-09 12:44 UTC (permalink / raw)
  To: Guenter Roeck; +Cc: LKML, lm-sensors

On Sun, Mar 9, 2014 at 8:04 AM, Guenter Roeck <linux@roeck-us.net> wrote:
> On 03/08/2014 10:36 PM, Laszlo Papp wrote:
>>
>> On Sat, Mar 8, 2014 at 11:50 PM, Guenter Roeck <linux@roeck-us.net> wrote:
>>>
>>> On 03/07/2014 10:17 AM, Guenter Roeck wrote:
>>>>
>>>>
>>>> On Fri, Mar 07, 2014 at 03:47:08PM +0000, Laszlo Papp wrote:
>>>>>
>>>>>
>>>>> On Fri, Mar 7, 2014 at 3:37 PM, Jean Delvare <jdelvare@suse.de> wrote:
>>>>>>>>
>>>>>>>>
>>>>>>>> I'm quite confused. While I admit that the term "tachometer speed"
>>>>>>>> is
>>>>>>>> awkward, the max6650 driver is reporting fan speeds in RPM as every
>>>>>>>> other hwmon driver. So I really have no idea what you think is
>>>>>>>> wrong.
>>>>>>>> What did you think "tachometer speed" was, if not the fan speed?
>>>>>>>> Does
>>>>>>>> the max6650 driver not return correct fan speeds for you?
>>>>>
>>>>>
>>>>>
>>>>> That is some strange behavior. If I do "echo 1 > pwm1_enable; echo 0 >
>>>>> pwm1; cat fan1_input", I still see 30 for the connected fan, whereas I
>>>>> can see it stopped. Is this an expected behavior? I would expect zero
>>>>> as a user.
>>>>>
>>>> I seem to recall that I had seen that as well, with no fan connected.
>>>> Maybe the tachometer registers always read at least '1'. I would think
>>>> it is wrong, but we'll have to understand the chip a bit better
>>>> to be able to provide a fix. Unless you already have a fix ready,
>>>> of course. I'll try to re-test tonight if I find the time.
>>>>
>>>
>>> The reason is (most likely) that your fan input does not have a pull-up
>>> resistor. Per datasheet, the fan inputs need a 10kOhm pull-up resistor.
>>> I confirmed this with my test board - with the pull-up resistor,
>>> inputs read 0, Without pull-up, the reported value is 1, which
>>> translates to 30 RPM.
>>>
>>> You might also need the 10 uF capacitor on the FB pin.
>>
>>
>> Hmm, interesting, but then I wonder how it works fine when getting the
>> data from userspace with ioctl (i.e .without the driver) through
>> /dev/i2c-1. There must be some trick in that case that I am not yet
>> aware of. I will double check the schematics on Monday.
>>
>
> With i2cdump on my system I can see that the tachometer register
> holds 0 if the resistor is in place, and the sensors command reports
> a fan speed or 0 rpm. If the resistor is not in place, the register
> content is 1 and sensors reports 30 rpm.
>
> sudo i2cdump -y -f 1 0x48
> No size specified (using byte-data access)
>      0  1  2  3  4  5  6  7  8  9  a  b  c  d  e  f    0123456789abcdef
> 00: 00 00 0a 0a ff ff 00 00 00 00 00 00 01 01 00 00    ..??........??..
> 10: 01 01 01 01 1f 1f 02 02 91 91 91 91 91 91 91 91    ????????????????
> 20: 00 00 0a 0a ff ff 00 00 00 00 00 00 01 01 00 00    ..??........??..
>
> groeck@desktop:~$ sensors max6651-i2c-1-48
> max6651-i2c-1-48
> Adapter: i2c-diolan-u2c at bus 003 device 002
> fan1:          30 RPM  (div = 4)
> fan2:           0 RPM
> fan3:          30 RPM
> fan4:          30 RPM
>
> Only fan2 (TACH1 chip input) has the resistor installed.

Hmm, ok. Thank you for the detailed reply!

^ permalink raw reply	[flat|nested] 18+ messages in thread

* Re: [lm-sensors] Tachometer speed returned rather than absolute fan speed?
  2014-03-07 15:25 ` Jean Delvare
  2014-03-07 15:31   ` Laszlo Papp
@ 2014-03-10  7:11   ` George Spelvin
  1 sibling, 0 replies; 18+ messages in thread
From: George Spelvin @ 2014-03-10  7:11 UTC (permalink / raw)
  To: jdelvare; +Cc: linux, linux-kernel, lm-sensors, lpapp

> What did you think "tachometer speed" was, if not the fan speed? Does
> the max6650 driver not return correct fan speeds for you?

Given that most PC fans produce two pulses per rotation, I assumed it was
the frequency of the tachometer signal, which is twice the fan RPM.

^ permalink raw reply	[flat|nested] 18+ messages in thread

* Re: [lm-sensors] Tachometer speed returned rather than absolute fan speed?
  2014-03-09  8:04               ` Guenter Roeck
  2014-03-09 12:44                 ` Laszlo Papp
@ 2014-03-10  9:59                 ` Laszlo Papp
  2014-03-10 13:26                   ` Guenter Roeck
  1 sibling, 1 reply; 18+ messages in thread
From: Laszlo Papp @ 2014-03-10  9:59 UTC (permalink / raw)
  To: Guenter Roeck; +Cc: LKML, lm-sensors

> The reason is (most likely) that your fan input does not have a pull-up resistor. Per datasheet, the fan inputs need a 10kOhm pull-up resistor. I confirmed this with my test board - with the pull-up resistor, inputs read 0, Without pull-up, the reported value is 1, which translates to 30 RPM. You might also need the 10 uF capacitor on the FB pin.

We have both of them in place as per requirement for the chip as far
as I understand the datasheet. The circuit would not work properly
without it.
> sudo i2cdump -y -f 1 0x48
> No size specified (using byte-data access)
>      0  1  2  3  4  5  6  7  8  9  a  b  c  d  e  f    0123456789abcdef
> 00: 00 00 0a 0a ff ff 00 00 00 00 00 00 01 01 00 00    ..??........??..
> 10: 01 01 01 01 1f 1f 02 02 91 91 91 91 91 91 91 91    ????????????????
> 20: 00 00 0a 0a ff ff 00 00 00 00 00 00 01 01 00 00    ..??........??..

/usr/sbin/i2cdump -y -f 1 0x48
No size specified (using byte-data access)
     0  1  2  3  4  5  6  7  8  9  a  b  c  d  e  f    0123456789abcdef
00: 00 00 3a 3a fc fc b4 b4 00 00 00 00 01 01 01 01    ..::????....????
10: 09 09 01 01 1c 1c 02 02 91 91 91 91 91 91 91 91    ????????????????
20: 00 00 3a 3a fc fc b4 b4 00 00 00 00 01 01 01 01    ..::????....????
30: 09 09 01 01 1c 1c 02 02 91 91 91 91 91 91 91 91    ????????????????
40: 00 00 3a 3a fc fc b4 b4 00 00 00 00 01 01 01 01    ..::????....????
50: 08 08 01 01 1c 1c 02 02 91 91 91 91 91 91 91 91    ????????????????
60: 00 00 3a 3a fc fc b4 b4 00 00 00 00 01 01 01 01    ..::????....????
70: 08 08 01 01 1c 1c 02 02 91 91 91 91 91 91 91 91    ????????????????
80: 00 00 3a 3a fc fc b4 b4 00 00 00 00 01 01 01 01    ..::????....????
90: 08 08 01 01 1c 1c 02 02 91 91 91 91 91 91 91 91    ????????????????
a0: 00 00 3a 3a fc fc b4 b4 00 00 00 00 01 01 01 01    ..::????....????
b0: 08 08 01 01 1c 1c 02 02 91 91 91 91 91 91 91 91    ????????????????
c0: 00 00 3a 3a fc fc b4 b4 00 00 00 00 01 01 01 01    ..::????....????
d0: 08 08 01 01 1c 1c 02 02 91 91 91 91 91 91 91 91    ????????????????
e0: 00 00 3a 3a fc fc b4 b4 00 00 00 00 01 01 01 01    ..::????....????
f0: 08 08 01 01 1c 1c 02 02 91 91 91 91 91 91 91 91    ????????????????

> groeck@desktop:~$ sensors max6651-i2c-1-48
> max6651-i2c-1-48
> Adapter: i2c-diolan-u2c at bus 003 device 002
> fan1:          30 RPM  (div = 4)
> fan2:           0 RPM
> fan3:          30 RPM
> fan4:          30 RPM

sensors max6651-i2c-1-48
max6651-i2c-1-48
Adapter: DaVinci I2C adapter
fan1:          30 RPM  (div = 4)
fan2:          30 RPM
fan3:         420 RPM
fan4:          30 RPM

> Only fan2 (TACH1 chip input) has the resistor installed.

We have it both on fan1 and fan4.

If I use our scope for checking the tachometer, I see level zero on
the scope, but 1 when checking the open collector level, since that is
the purpose of the pull-up resistor.

I am currently clueless. Fwiw, I am now using linux kernel 3.2.1 for
the moment. I cannot see any bugfixes in the log with regards to that,
though. I am still not sure what is going on, so I cannot claim that
it is a bug, nor can I exclude it. Any help would be appreciated.

^ permalink raw reply	[flat|nested] 18+ messages in thread

* Re: [lm-sensors] Tachometer speed returned rather than absolute fan speed?
  2014-03-10  9:59                 ` Laszlo Papp
@ 2014-03-10 13:26                   ` Guenter Roeck
  2014-03-10 13:50                     ` Laszlo Papp
  0 siblings, 1 reply; 18+ messages in thread
From: Guenter Roeck @ 2014-03-10 13:26 UTC (permalink / raw)
  To: Laszlo Papp; +Cc: LKML, lm-sensors

On 03/10/2014 02:59 AM, Laszlo Papp wrote:
>> The reason is (most likely) that your fan input does not have a pull-up resistor. Per datasheet, the fan inputs need a 10kOhm pull-up resistor. I confirmed this with my test board - with the pull-up resistor, inputs read 0, Without pull-up, the reported value is 1, which translates to 30 RPM. You might also need the 10 uF capacitor on the FB pin.
>
> We have both of them in place as per requirement for the chip as far
> as I understand the datasheet. The circuit would not work properly
> without it.
>> sudo i2cdump -y -f 1 0x48
>> No size specified (using byte-data access)
>>       0  1  2  3  4  5  6  7  8  9  a  b  c  d  e  f    0123456789abcdef
>> 00: 00 00 0a 0a ff ff 00 00 00 00 00 00 01 01 00 00    ..??........??..
>> 10: 01 01 01 01 1f 1f 02 02 91 91 91 91 91 91 91 91    ????????????????
>> 20: 00 00 0a 0a ff ff 00 00 00 00 00 00 01 01 00 00    ..??........??..
>
> /usr/sbin/i2cdump -y -f 1 0x48
> No size specified (using byte-data access)
>       0  1  2  3  4  5  6  7  8  9  a  b  c  d  e  f    0123456789abcdef
> 00: 00 00 3a 3a fc fc b4 b4 00 00 00 00 01 01 01 01    ..::????....????
> 10: 09 09 01 01 1c 1c 02 02 91 91 91 91 91 91 91 91    ????????????????
> 20: 00 00 3a 3a fc fc b4 b4 00 00 00 00 01 01 01 01    ..::????....????
> 30: 09 09 01 01 1c 1c 02 02 91 91 91 91 91 91 91 91    ????????????????
> 40: 00 00 3a 3a fc fc b4 b4 00 00 00 00 01 01 01 01    ..::????....????
> 50: 08 08 01 01 1c 1c 02 02 91 91 91 91 91 91 91 91    ????????????????
> 60: 00 00 3a 3a fc fc b4 b4 00 00 00 00 01 01 01 01    ..::????....????
> 70: 08 08 01 01 1c 1c 02 02 91 91 91 91 91 91 91 91    ????????????????
> 80: 00 00 3a 3a fc fc b4 b4 00 00 00 00 01 01 01 01    ..::????....????
> 90: 08 08 01 01 1c 1c 02 02 91 91 91 91 91 91 91 91    ????????????????
> a0: 00 00 3a 3a fc fc b4 b4 00 00 00 00 01 01 01 01    ..::????....????
> b0: 08 08 01 01 1c 1c 02 02 91 91 91 91 91 91 91 91    ????????????????
> c0: 00 00 3a 3a fc fc b4 b4 00 00 00 00 01 01 01 01    ..::????....????
> d0: 08 08 01 01 1c 1c 02 02 91 91 91 91 91 91 91 91    ????????????????
> e0: 00 00 3a 3a fc fc b4 b4 00 00 00 00 01 01 01 01    ..::????....????
> f0: 08 08 01 01 1c 1c 02 02 91 91 91 91 91 91 91 91    ????????????????
>
>> groeck@desktop:~$ sensors max6651-i2c-1-48
>> max6651-i2c-1-48
>> Adapter: i2c-diolan-u2c at bus 003 device 002
>> fan1:          30 RPM  (div = 4)
>> fan2:           0 RPM
>> fan3:          30 RPM
>> fan4:          30 RPM
>
> sensors max6651-i2c-1-48
> max6651-i2c-1-48
> Adapter: DaVinci I2C adapter
> fan1:          30 RPM  (div = 4)
> fan2:          30 RPM
> fan3:         420 RPM
> fan4:          30 RPM
>
>> Only fan2 (TACH1 chip input) has the resistor installed.
>
> We have it both on fan1 and fan4.
>
> If I use our scope for checking the tachometer, I see level zero on
> the scope, but 1 when checking the open collector level, since that is
> the purpose of the pull-up resistor.
>
With the pull-up installed, you should always see a high voltage on the
scope or with a volt meter. The scope would not see or be able to know
that the pin is OC if the pull-up resistor is there.

If it is truly OC, it would be floating and might show low. If you can,
I would suggest to manually add a 10k resistor against VCC to the open
connector and see what happens.

Another way to find out for sure might be to disconnect power and
measure resistance between the tachometer pin and VCC.

Guenter


^ permalink raw reply	[flat|nested] 18+ messages in thread

* Re: [lm-sensors] Tachometer speed returned rather than absolute fan speed?
  2014-03-10 13:26                   ` Guenter Roeck
@ 2014-03-10 13:50                     ` Laszlo Papp
  2014-03-10 15:11                       ` Guenter Roeck
  0 siblings, 1 reply; 18+ messages in thread
From: Laszlo Papp @ 2014-03-10 13:50 UTC (permalink / raw)
  To: Guenter Roeck; +Cc: LKML, lm-sensors

On Mon, Mar 10, 2014 at 1:26 PM, Guenter Roeck <linux@roeck-us.net> wrote:
> On 03/10/2014 02:59 AM, Laszlo Papp wrote:
>>>
>>> The reason is (most likely) that your fan input does not have a pull-up
>>> resistor. Per datasheet, the fan inputs need a 10kOhm pull-up resistor. I
>>> confirmed this with my test board - with the pull-up resistor, inputs read
>>> 0, Without pull-up, the reported value is 1, which translates to 30 RPM. You
>>> might also need the 10 uF capacitor on the FB pin.
>>
>>
>> We have both of them in place as per requirement for the chip as far
>> as I understand the datasheet. The circuit would not work properly
>> without it.
>>>
>>> sudo i2cdump -y -f 1 0x48
>>> No size specified (using byte-data access)
>>>       0  1  2  3  4  5  6  7  8  9  a  b  c  d  e  f    0123456789abcdef
>>> 00: 00 00 0a 0a ff ff 00 00 00 00 00 00 01 01 00 00    ..??........??..
>>> 10: 01 01 01 01 1f 1f 02 02 91 91 91 91 91 91 91 91    ????????????????
>>> 20: 00 00 0a 0a ff ff 00 00 00 00 00 00 01 01 00 00    ..??........??..
>>
>>
>> /usr/sbin/i2cdump -y -f 1 0x48
>> No size specified (using byte-data access)
>>       0  1  2  3  4  5  6  7  8  9  a  b  c  d  e  f    0123456789abcdef
>> 00: 00 00 3a 3a fc fc b4 b4 00 00 00 00 01 01 01 01    ..::????....????
>> 10: 09 09 01 01 1c 1c 02 02 91 91 91 91 91 91 91 91    ????????????????
>> 20: 00 00 3a 3a fc fc b4 b4 00 00 00 00 01 01 01 01    ..::????....????
>> 30: 09 09 01 01 1c 1c 02 02 91 91 91 91 91 91 91 91    ????????????????
>> 40: 00 00 3a 3a fc fc b4 b4 00 00 00 00 01 01 01 01    ..::????....????
>> 50: 08 08 01 01 1c 1c 02 02 91 91 91 91 91 91 91 91    ????????????????
>> 60: 00 00 3a 3a fc fc b4 b4 00 00 00 00 01 01 01 01    ..::????....????
>> 70: 08 08 01 01 1c 1c 02 02 91 91 91 91 91 91 91 91    ????????????????
>> 80: 00 00 3a 3a fc fc b4 b4 00 00 00 00 01 01 01 01    ..::????....????
>> 90: 08 08 01 01 1c 1c 02 02 91 91 91 91 91 91 91 91    ????????????????
>> a0: 00 00 3a 3a fc fc b4 b4 00 00 00 00 01 01 01 01    ..::????....????
>> b0: 08 08 01 01 1c 1c 02 02 91 91 91 91 91 91 91 91    ????????????????
>> c0: 00 00 3a 3a fc fc b4 b4 00 00 00 00 01 01 01 01    ..::????....????
>> d0: 08 08 01 01 1c 1c 02 02 91 91 91 91 91 91 91 91    ????????????????
>> e0: 00 00 3a 3a fc fc b4 b4 00 00 00 00 01 01 01 01    ..::????....????
>> f0: 08 08 01 01 1c 1c 02 02 91 91 91 91 91 91 91 91    ????????????????
>>
>>> groeck@desktop:~$ sensors max6651-i2c-1-48
>>> max6651-i2c-1-48
>>> Adapter: i2c-diolan-u2c at bus 003 device 002
>>> fan1:          30 RPM  (div = 4)
>>> fan2:           0 RPM
>>> fan3:          30 RPM
>>> fan4:          30 RPM
>>
>>
>> sensors max6651-i2c-1-48
>> max6651-i2c-1-48
>> Adapter: DaVinci I2C adapter
>> fan1:          30 RPM  (div = 4)
>> fan2:          30 RPM
>> fan3:         420 RPM
>> fan4:          30 RPM
>>
>>> Only fan2 (TACH1 chip input) has the resistor installed.
>>
>>
>> We have it both on fan1 and fan4.
>>
>> If I use our scope for checking the tachometer, I see level zero on
>> the scope, but 1 when checking the open collector level, since that is
>> the purpose of the pull-up resistor.
>>
> With the pull-up installed, you should always see a high voltage on the
> scope or with a volt meter. The scope would not see or be able to know
> that the pin is OC if the pull-up resistor is there.
>
> If it is truly OC, it would be floating and might show low. If you can,
> I would suggest to manually add a 10k resistor against VCC to the open
> connector and see what happens.
>
> Another way to find out for sure might be to disconnect power and
> measure resistance between the tachometer pin and VCC.

Perhaps I was not clear. So, we do have both the resistors and
capacitor as required. I double checked the schematics as well as the
pins coming from the fan and that was zero. The tacho0 input, however,
was 1.

^ permalink raw reply	[flat|nested] 18+ messages in thread

* Re: [lm-sensors] Tachometer speed returned rather than absolute fan speed?
  2014-03-10 13:50                     ` Laszlo Papp
@ 2014-03-10 15:11                       ` Guenter Roeck
  2014-03-10 18:00                         ` Laszlo Papp
  0 siblings, 1 reply; 18+ messages in thread
From: Guenter Roeck @ 2014-03-10 15:11 UTC (permalink / raw)
  To: Laszlo Papp; +Cc: LKML, lm-sensors

On Mon, Mar 10, 2014 at 01:50:01PM +0000, Laszlo Papp wrote:
> On Mon, Mar 10, 2014 at 1:26 PM, Guenter Roeck <linux@roeck-us.net> wrote:
> > On 03/10/2014 02:59 AM, Laszlo Papp wrote:
> >>>
> >>> The reason is (most likely) that your fan input does not have a pull-up
> >>> resistor. Per datasheet, the fan inputs need a 10kOhm pull-up resistor. I
> >>> confirmed this with my test board - with the pull-up resistor, inputs read
> >>> 0, Without pull-up, the reported value is 1, which translates to 30 RPM. You
> >>> might also need the 10 uF capacitor on the FB pin.
> >>
> >>
> >> We have both of them in place as per requirement for the chip as far
> >> as I understand the datasheet. The circuit would not work properly
> >> without it.
> >>>
> >>> sudo i2cdump -y -f 1 0x48
> >>> No size specified (using byte-data access)
> >>>       0  1  2  3  4  5  6  7  8  9  a  b  c  d  e  f    0123456789abcdef
> >>> 00: 00 00 0a 0a ff ff 00 00 00 00 00 00 01 01 00 00    ..??........??..
> >>> 10: 01 01 01 01 1f 1f 02 02 91 91 91 91 91 91 91 91    ????????????????
> >>> 20: 00 00 0a 0a ff ff 00 00 00 00 00 00 01 01 00 00    ..??........??..
> >>
> >>
> >> /usr/sbin/i2cdump -y -f 1 0x48
> >> No size specified (using byte-data access)
> >>       0  1  2  3  4  5  6  7  8  9  a  b  c  d  e  f    0123456789abcdef
> >> 00: 00 00 3a 3a fc fc b4 b4 00 00 00 00 01 01 01 01    ..::????....????
> >> 10: 09 09 01 01 1c 1c 02 02 91 91 91 91 91 91 91 91    ????????????????
> >> 20: 00 00 3a 3a fc fc b4 b4 00 00 00 00 01 01 01 01    ..::????....????
> >> 30: 09 09 01 01 1c 1c 02 02 91 91 91 91 91 91 91 91    ????????????????
> >> 40: 00 00 3a 3a fc fc b4 b4 00 00 00 00 01 01 01 01    ..::????....????
> >> 50: 08 08 01 01 1c 1c 02 02 91 91 91 91 91 91 91 91    ????????????????
> >> 60: 00 00 3a 3a fc fc b4 b4 00 00 00 00 01 01 01 01    ..::????....????
> >> 70: 08 08 01 01 1c 1c 02 02 91 91 91 91 91 91 91 91    ????????????????
> >> 80: 00 00 3a 3a fc fc b4 b4 00 00 00 00 01 01 01 01    ..::????....????
> >> 90: 08 08 01 01 1c 1c 02 02 91 91 91 91 91 91 91 91    ????????????????
> >> a0: 00 00 3a 3a fc fc b4 b4 00 00 00 00 01 01 01 01    ..::????....????
> >> b0: 08 08 01 01 1c 1c 02 02 91 91 91 91 91 91 91 91    ????????????????
> >> c0: 00 00 3a 3a fc fc b4 b4 00 00 00 00 01 01 01 01    ..::????....????
> >> d0: 08 08 01 01 1c 1c 02 02 91 91 91 91 91 91 91 91    ????????????????
> >> e0: 00 00 3a 3a fc fc b4 b4 00 00 00 00 01 01 01 01    ..::????....????
> >> f0: 08 08 01 01 1c 1c 02 02 91 91 91 91 91 91 91 91    ????????????????
> >>
> >>> groeck@desktop:~$ sensors max6651-i2c-1-48
> >>> max6651-i2c-1-48
> >>> Adapter: i2c-diolan-u2c at bus 003 device 002
> >>> fan1:          30 RPM  (div = 4)
> >>> fan2:           0 RPM
> >>> fan3:          30 RPM
> >>> fan4:          30 RPM
> >>
> >>
> >> sensors max6651-i2c-1-48
> >> max6651-i2c-1-48
> >> Adapter: DaVinci I2C adapter
> >> fan1:          30 RPM  (div = 4)
> >> fan2:          30 RPM
> >> fan3:         420 RPM
> >> fan4:          30 RPM
> >>
> >>> Only fan2 (TACH1 chip input) has the resistor installed.
> >>
> >>
> >> We have it both on fan1 and fan4.
> >>
> >> If I use our scope for checking the tachometer, I see level zero on
> >> the scope, but 1 when checking the open collector level, since that is
> >> the purpose of the pull-up resistor.
> >>
> > With the pull-up installed, you should always see a high voltage on the
> > scope or with a volt meter. The scope would not see or be able to know
> > that the pin is OC if the pull-up resistor is there.
> >
> > If it is truly OC, it would be floating and might show low. If you can,
> > I would suggest to manually add a 10k resistor against VCC to the open
> > connector and see what happens.
> >
> > Another way to find out for sure might be to disconnect power and
> > measure resistance between the tachometer pin and VCC.
> 
> Perhaps I was not clear. So, we do have both the resistors and
> capacitor as required. I double checked the schematics as well as the
> pins coming from the fan and that was zero. The tacho0 input, however,
> was 1.
> 

How can the pin coming from the fan be zero, and the tach0 input be 1
at the same time ? Those should be the same ?

Anyway, I don't think I can help you further. All I can say is that
the chip operates as expected on my test board.

Guenter

^ permalink raw reply	[flat|nested] 18+ messages in thread

* Re: [lm-sensors] Tachometer speed returned rather than absolute fan speed?
  2014-03-10 15:11                       ` Guenter Roeck
@ 2014-03-10 18:00                         ` Laszlo Papp
  0 siblings, 0 replies; 18+ messages in thread
From: Laszlo Papp @ 2014-03-10 18:00 UTC (permalink / raw)
  To: Guenter Roeck; +Cc: LKML, lm-sensors

On Mon, Mar 10, 2014 at 3:11 PM, Guenter Roeck <linux@roeck-us.net> wrote:
> On Mon, Mar 10, 2014 at 01:50:01PM +0000, Laszlo Papp wrote:
>> On Mon, Mar 10, 2014 at 1:26 PM, Guenter Roeck <linux@roeck-us.net> wrote:
>> > On 03/10/2014 02:59 AM, Laszlo Papp wrote:
>> >>>
>> >>> The reason is (most likely) that your fan input does not have a pull-up
>> >>> resistor. Per datasheet, the fan inputs need a 10kOhm pull-up resistor. I
>> >>> confirmed this with my test board - with the pull-up resistor, inputs read
>> >>> 0, Without pull-up, the reported value is 1, which translates to 30 RPM. You
>> >>> might also need the 10 uF capacitor on the FB pin.
>> >>
>> >>
>> >> We have both of them in place as per requirement for the chip as far
>> >> as I understand the datasheet. The circuit would not work properly
>> >> without it.
>> >>>
>> >>> sudo i2cdump -y -f 1 0x48
>> >>> No size specified (using byte-data access)
>> >>>       0  1  2  3  4  5  6  7  8  9  a  b  c  d  e  f    0123456789abcdef
>> >>> 00: 00 00 0a 0a ff ff 00 00 00 00 00 00 01 01 00 00    ..??........??..
>> >>> 10: 01 01 01 01 1f 1f 02 02 91 91 91 91 91 91 91 91    ????????????????
>> >>> 20: 00 00 0a 0a ff ff 00 00 00 00 00 00 01 01 00 00    ..??........??..
>> >>
>> >>
>> >> /usr/sbin/i2cdump -y -f 1 0x48
>> >> No size specified (using byte-data access)
>> >>       0  1  2  3  4  5  6  7  8  9  a  b  c  d  e  f    0123456789abcdef
>> >> 00: 00 00 3a 3a fc fc b4 b4 00 00 00 00 01 01 01 01    ..::????....????
>> >> 10: 09 09 01 01 1c 1c 02 02 91 91 91 91 91 91 91 91    ????????????????
>> >> 20: 00 00 3a 3a fc fc b4 b4 00 00 00 00 01 01 01 01    ..::????....????
>> >> 30: 09 09 01 01 1c 1c 02 02 91 91 91 91 91 91 91 91    ????????????????
>> >> 40: 00 00 3a 3a fc fc b4 b4 00 00 00 00 01 01 01 01    ..::????....????
>> >> 50: 08 08 01 01 1c 1c 02 02 91 91 91 91 91 91 91 91    ????????????????
>> >> 60: 00 00 3a 3a fc fc b4 b4 00 00 00 00 01 01 01 01    ..::????....????
>> >> 70: 08 08 01 01 1c 1c 02 02 91 91 91 91 91 91 91 91    ????????????????
>> >> 80: 00 00 3a 3a fc fc b4 b4 00 00 00 00 01 01 01 01    ..::????....????
>> >> 90: 08 08 01 01 1c 1c 02 02 91 91 91 91 91 91 91 91    ????????????????
>> >> a0: 00 00 3a 3a fc fc b4 b4 00 00 00 00 01 01 01 01    ..::????....????
>> >> b0: 08 08 01 01 1c 1c 02 02 91 91 91 91 91 91 91 91    ????????????????
>> >> c0: 00 00 3a 3a fc fc b4 b4 00 00 00 00 01 01 01 01    ..::????....????
>> >> d0: 08 08 01 01 1c 1c 02 02 91 91 91 91 91 91 91 91    ????????????????
>> >> e0: 00 00 3a 3a fc fc b4 b4 00 00 00 00 01 01 01 01    ..::????....????
>> >> f0: 08 08 01 01 1c 1c 02 02 91 91 91 91 91 91 91 91    ????????????????
>> >>
>> >>> groeck@desktop:~$ sensors max6651-i2c-1-48
>> >>> max6651-i2c-1-48
>> >>> Adapter: i2c-diolan-u2c at bus 003 device 002
>> >>> fan1:          30 RPM  (div = 4)
>> >>> fan2:           0 RPM
>> >>> fan3:          30 RPM
>> >>> fan4:          30 RPM
>> >>
>> >>
>> >> sensors max6651-i2c-1-48
>> >> max6651-i2c-1-48
>> >> Adapter: DaVinci I2C adapter
>> >> fan1:          30 RPM  (div = 4)
>> >> fan2:          30 RPM
>> >> fan3:         420 RPM
>> >> fan4:          30 RPM
>> >>
>> >>> Only fan2 (TACH1 chip input) has the resistor installed.
>> >>
>> >>
>> >> We have it both on fan1 and fan4.
>> >>
>> >> If I use our scope for checking the tachometer, I see level zero on
>> >> the scope, but 1 when checking the open collector level, since that is
>> >> the purpose of the pull-up resistor.
>> >>
>> > With the pull-up installed, you should always see a high voltage on the
>> > scope or with a volt meter. The scope would not see or be able to know
>> > that the pin is OC if the pull-up resistor is there.
>> >
>> > If it is truly OC, it would be floating and might show low. If you can,
>> > I would suggest to manually add a 10k resistor against VCC to the open
>> > connector and see what happens.
>> >
>> > Another way to find out for sure might be to disconnect power and
>> > measure resistance between the tachometer pin and VCC.
>>
>> Perhaps I was not clear. So, we do have both the resistors and
>> capacitor as required. I double checked the schematics as well as the
>> pins coming from the fan and that was zero. The tacho0 input, however,
>> was 1.
>>
>
> How can the pin coming from the fan be zero, and the tach0 input be 1
> at the same time ? Those should be the same ?

Nope, that is what the pull-up resistor is for. It will pull the level up to 1.

^ permalink raw reply	[flat|nested] 18+ messages in thread

* Re: [lm-sensors] Tachometer speed returned rather than absolute fan speed?
  2014-03-08 23:50           ` [lm-sensors] " Guenter Roeck
  2014-03-09  6:36             ` Laszlo Papp
@ 2014-04-08  9:19             ` Pavel Machek
  1 sibling, 0 replies; 18+ messages in thread
From: Pavel Machek @ 2014-04-08  9:19 UTC (permalink / raw)
  To: Guenter Roeck; +Cc: Laszlo Papp, LKML, lm-sensors

On Sat 2014-03-08 15:50:49, Guenter Roeck wrote:
> On 03/07/2014 10:17 AM, Guenter Roeck wrote:
> >On Fri, Mar 07, 2014 at 03:47:08PM +0000, Laszlo Papp wrote:
> >>On Fri, Mar 7, 2014 at 3:37 PM, Jean Delvare <jdelvare@suse.de> wrote:
> >>>>>I'm quite confused. While I admit that the term "tachometer speed" is
> >>>>>awkward, the max6650 driver is reporting fan speeds in RPM as every
> >>>>>other hwmon driver. So I really have no idea what you think is wrong.
> >>>>>What did you think "tachometer speed" was, if not the fan speed? Does
> >>>>>the max6650 driver not return correct fan speeds for you?
> >>
> >>That is some strange behavior. If I do "echo 1 > pwm1_enable; echo 0 >
> >>pwm1; cat fan1_input", I still see 30 for the connected fan, whereas I
> >>can see it stopped. Is this an expected behavior? I would expect zero
> >>as a user.
> >>
> >I seem to recall that I had seen that as well, with no fan connected.
> >Maybe the tachometer registers always read at least '1'. I would think
> >it is wrong, but we'll have to understand the chip a bit better
> >to be able to provide a fix. Unless you already have a fix ready,
> >of course. I'll try to re-test tonight if I find the time.
> >
> 
> The reason is (most likely) that your fan input does not have a pull-up
> resistor. Per datasheet, the fan inputs need a 10kOhm pull-up resistor.
> I confirmed this with my test board - with the pull-up resistor,
> inputs read 0, Without pull-up, the reported value is 1, which
> translates to 30 RPM.

While this is hardware problem, it might make sense for kernel to work
around it -- return 0 in case 30 RPM observed.
									Pavel
-- 
(english) http://www.livejournal.com/~pavelmachek
(cesky, pictures) http://atrey.karlin.mff.cuni.cz/~pavel/picture/horses/blog.html

^ permalink raw reply	[flat|nested] 18+ messages in thread

end of thread, other threads:[~2014-04-08  9:19 UTC | newest]

Thread overview: 18+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-03-07 14:48 Tachometer speed returned rather than absolute fan speed? Laszlo Papp
2014-03-07 15:08 ` Laszlo Papp
2014-03-07 15:25 ` Jean Delvare
2014-03-07 15:31   ` Laszlo Papp
2014-03-07 15:37     ` Jean Delvare
2014-03-07 15:47       ` Laszlo Papp
2014-03-07 18:17         ` Guenter Roeck
2014-03-08 23:50           ` [lm-sensors] " Guenter Roeck
2014-03-09  6:36             ` Laszlo Papp
2014-03-09  8:04               ` Guenter Roeck
2014-03-09 12:44                 ` Laszlo Papp
2014-03-10  9:59                 ` Laszlo Papp
2014-03-10 13:26                   ` Guenter Roeck
2014-03-10 13:50                     ` Laszlo Papp
2014-03-10 15:11                       ` Guenter Roeck
2014-03-10 18:00                         ` Laszlo Papp
2014-04-08  9:19             ` Pavel Machek
2014-03-10  7:11   ` George Spelvin

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox