All of lore.kernel.org
 help / color / mirror / Atom feed
From: Simon Guinot <simon.guinot@sequanux.org>
To: linux-arm-kernel@lists.infradead.org
Subject: Re: [lm-sensors] [PATCH] hwmon: (gpio-fan) allow to use alarm support alone from DT
Date: Wed, 25 Feb 2015 11:14:30 +0000	[thread overview]
Message-ID: <20150225111430.GV1509@kw.sim.vm.gnt> (raw)
In-Reply-To: <54EB3C84.30503@roeck-us.net>


[-- Attachment #1.1: Type: text/plain, Size: 2177 bytes --]

On Mon, Feb 23, 2015 at 06:43:16AM -0800, Guenter Roeck wrote:
> On 02/23/2015 06:34 AM, Simon Guinot wrote:
> >On Mon, Feb 23, 2015 at 06:06:12AM -0800, Guenter Roeck wrote:
> >>On 02/23/2015 04:58 AM, Simon Guinot wrote:
> >>>On some boards, such as the LaCie 2Big Network v2 or 2Big NAS (based on
> >>>Marvell Kirkwood SoCs), an I2C fan controller is used but the alarm
> >>>signal is wired to a separate GPIO. Unfortunately, the gpio-fan driver
> >>>can't be used to handle GPIO alarm alone from DT: an error is returned
> >>>if the "gpios" DT property is missing.
> >>>
> >>>This patch allows to use the gpio-fan driver even if the "alarm-gpios"
> >>>DT property is defined alone.
> >>>
> >>
> >>That is the wrong solution. The gpio alarm signal should be handled
> >>by the fan controller driver.
> >
> >Hi Guenter,
> >
> >Sure it should, but unfortunately it is not the case. I have several
> >boards using this mechanism (ie: a separate fan alarm GPIO). I think the
> >idea was to reduce the board cost...
> >
> Well, yes, the driver for the fan controller chip needs to be updated
> to support interrupts.

This will not help for the boards I mentioned. As an attempt to reduce
the board cost, a fan with 2 wires has been used. This means we don't
have any tachymeter feedback and then the controller alarm mechanism
can't be used. Instead a kind of hardware hack allows to have a fan
alarm on a separate GPIO.

> 
> >Then this means I need a way to support this alarm signal and I can't
> >find a better one than using gpio-fan. Note that this was possible with
> >the original gpio-fan implementation (before the DT binding addition).
> >
> 
> That doesn't help.

Handle the GPIO fan alarm feature from the fan controller driver don't
look good either to me. This alarm mechanism is not a part of the fan
controller itself but rather something apart. Also I am afraid that the
result would really look like a hack.

Simon

> 
> 
> _______________________________________________
> linux-arm-kernel mailing list
> linux-arm-kernel@lists.infradead.org
> http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

[-- Attachment #1.2: Digital signature --]
[-- Type: application/pgp-signature, Size: 181 bytes --]

[-- Attachment #2: Type: text/plain, Size: 153 bytes --]

_______________________________________________
lm-sensors mailing list
lm-sensors@lm-sensors.org
http://lists.lm-sensors.org/mailman/listinfo/lm-sensors

WARNING: multiple messages have this Message-ID (diff)
From: simon.guinot@sequanux.org (Simon Guinot)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH] hwmon: (gpio-fan) allow to use alarm support alone from DT
Date: Wed, 25 Feb 2015 12:14:30 +0100	[thread overview]
Message-ID: <20150225111430.GV1509@kw.sim.vm.gnt> (raw)
In-Reply-To: <54EB3C84.30503@roeck-us.net>

On Mon, Feb 23, 2015 at 06:43:16AM -0800, Guenter Roeck wrote:
> On 02/23/2015 06:34 AM, Simon Guinot wrote:
> >On Mon, Feb 23, 2015 at 06:06:12AM -0800, Guenter Roeck wrote:
> >>On 02/23/2015 04:58 AM, Simon Guinot wrote:
> >>>On some boards, such as the LaCie 2Big Network v2 or 2Big NAS (based on
> >>>Marvell Kirkwood SoCs), an I2C fan controller is used but the alarm
> >>>signal is wired to a separate GPIO. Unfortunately, the gpio-fan driver
> >>>can't be used to handle GPIO alarm alone from DT: an error is returned
> >>>if the "gpios" DT property is missing.
> >>>
> >>>This patch allows to use the gpio-fan driver even if the "alarm-gpios"
> >>>DT property is defined alone.
> >>>
> >>
> >>That is the wrong solution. The gpio alarm signal should be handled
> >>by the fan controller driver.
> >
> >Hi Guenter,
> >
> >Sure it should, but unfortunately it is not the case. I have several
> >boards using this mechanism (ie: a separate fan alarm GPIO). I think the
> >idea was to reduce the board cost...
> >
> Well, yes, the driver for the fan controller chip needs to be updated
> to support interrupts.

This will not help for the boards I mentioned. As an attempt to reduce
the board cost, a fan with 2 wires has been used. This means we don't
have any tachymeter feedback and then the controller alarm mechanism
can't be used. Instead a kind of hardware hack allows to have a fan
alarm on a separate GPIO.

> 
> >Then this means I need a way to support this alarm signal and I can't
> >find a better one than using gpio-fan. Note that this was possible with
> >the original gpio-fan implementation (before the DT binding addition).
> >
> 
> That doesn't help.

Handle the GPIO fan alarm feature from the fan controller driver don't
look good either to me. This alarm mechanism is not a part of the fan
controller itself but rather something apart. Also I am afraid that the
result would really look like a hack.

Simon

> 
> 
> _______________________________________________
> linux-arm-kernel mailing list
> linux-arm-kernel at lists.infradead.org
> http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 181 bytes
Desc: Digital signature
URL: <http://lists.infradead.org/pipermail/linux-arm-kernel/attachments/20150225/7fcd800a/attachment.sig>

  reply	other threads:[~2015-02-25 11:14 UTC|newest]

Thread overview: 24+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-02-23 12:58 [lm-sensors] [PATCH] hwmon: (gpio-fan) allow to use alarm support alone from DT Simon Guinot
2015-02-23 12:58 ` Simon Guinot
2015-02-23 13:42 ` [lm-sensors] " Andrew Lunn
2015-02-23 13:42   ` Andrew Lunn
2015-02-23 14:06 ` [lm-sensors] " Guenter Roeck
2015-02-23 14:06   ` Guenter Roeck
2015-02-23 14:34   ` [lm-sensors] " Simon Guinot
2015-02-23 14:34     ` Simon Guinot
2015-02-23 14:43     ` [lm-sensors] " Guenter Roeck
2015-02-23 14:43       ` Guenter Roeck
2015-02-25 11:14       ` Simon Guinot [this message]
2015-02-25 11:14         ` Simon Guinot
2015-02-25 13:50         ` [lm-sensors] " Andrew Lunn
2015-02-25 13:50           ` Andrew Lunn
2015-02-25 14:29           ` [lm-sensors] " Simon Guinot
2015-02-25 14:29             ` Simon Guinot
2015-02-25 14:52             ` [lm-sensors] " Guenter Roeck
2015-02-25 14:52               ` Guenter Roeck
2015-02-25 14:51           ` [lm-sensors] " Guenter Roeck
2015-02-25 14:51             ` Guenter Roeck
2015-02-25 15:04             ` [lm-sensors] " Andrew Lunn
2015-02-25 15:04               ` Andrew Lunn
2015-02-25 16:20               ` [lm-sensors] " Guenter Roeck
2015-02-25 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=20150225111430.GV1509@kw.sim.vm.gnt \
    --to=simon.guinot@sequanux.org \
    --cc=linux-arm-kernel@lists.infradead.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 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.