linux-arm-kernel.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
From: guenter.roeck@ericsson.com (Guenter Roeck)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH 1/2] hwmon: add generic GPIO fan driver
Date: Mon, 18 Oct 2010 13:50:34 -0700	[thread overview]
Message-ID: <20101018205034.GA10473@ericsson.com> (raw)
In-Reply-To: <20101018203610.GD29120@kw.sim.vm.gnt>

On Mon, Oct 18, 2010 at 04:36:10PM -0400, Simon Guinot wrote:
[ ... ]

> > I don't really understand the value of supporting pwm attributes,
> > since you have to convert those to rpm anyway. Why not just stick
> > with fan1_input and fan1_target ? This would simplify the code a lot.
> 
> I don't know very well the hwmon API. I have simply been fooled by the
> sysfs-interface document which claim that fan[1-*]_target only make
> sense for a closed-loop fan. Moreover, I was expecting gpio-fan to be
> compliant with the fancontrol shell script...
> 
> But anyway, you are right. I just don't want the pwm interface.
> 
If the fancontrol script doesn't support fanX_target, and a given fan 
doesn't support pwm, it might make sense to update it. 

Jean, any comments ?

> > > +
> > > +err_free_gpio:
> > > +       for (i = i - 1; i >= 0; i--)
> > > +               gpio_free(ctrl[i]);
> > > +
> > This misses the most recently allocated gpio pin if gpio_direction_output() failed.
> 
> The gpio is freed above while handling the gpio_direction_output() error.
> 
I missed that. Thatks for the clarification.

> > > +
> > > +       dev_info(&pdev->dev, "GPIO fan initialized\n");
> > > +
> > Might be a good idea to add a notion of which fan was initialized.
> > After all, there could be more than one.
> 
> dev_info() don't do it for me ? anyway, I will check this too.
> 
It probably does. Wonder what it actually shows. Can you check ?

Thanks,
Guenter

  reply	other threads:[~2010-10-18 20:50 UTC|newest]

Thread overview: 33+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-05-22 10:54 [PATCH 4/5] hwmon: DNS323 rev C1 fan support Benjamin Herrenschmidt
2010-05-22 11:00 ` Benjamin Herrenschmidt
2010-10-13 11:59 ` Simon Guinot
2010-10-13 16:34   ` [lm-sensors] " Guenter Roeck
2010-10-17 15:40     ` Simon Guinot
2010-10-17 15:50       ` [PATCH 1/2] hwmon: add generic GPIO fan driver Simon Guinot
2010-10-17 15:50         ` [PATCH 2/2] [ARM] Kirkwood: add fan support for Network Space Max v2 Simon Guinot
2010-10-22  1:53           ` Guenter Roeck
2010-10-22  2:08             ` Nicolas Pitre
2010-10-22  4:30               ` Guenter Roeck
2010-10-22  9:29                 ` [PATCH] " Simon Guinot
2010-10-22  9:59                   ` Guenter Roeck
2010-10-22  8:27               ` [PATCH 2/2] " Simon Guinot
2010-10-22  9:58                 ` Guenter Roeck
2010-10-22 18:39                 ` Guenter Roeck
2010-10-22 18:50                   ` Nicolas Pitre
2010-10-18 16:08         ` [PATCH 1/2] hwmon: add generic GPIO fan driver Guenter Roeck
2010-10-18 18:00           ` Chris Moore
2010-10-18 18:35             ` Guenter Roeck
2010-10-18 20:36           ` Simon Guinot
2010-10-18 20:50             ` Guenter Roeck [this message]
2010-10-19 11:46               ` Simon Guinot
2010-10-19 14:52                 ` Guenter Roeck
2010-10-19  6:52             ` Guenter Roeck
2010-10-19  8:36               ` Simon Guinot
2010-10-19 15:15                 ` Guenter Roeck
2010-10-19 19:30                   ` Simon Guinot
2010-10-21 20:07           ` Simon Guinot
2010-10-21 20:26             ` Guenter Roeck
2010-10-19 22:03         ` Guenter Roeck
2010-10-20  0:19           ` Simon Guinot
2010-10-20  0:50             ` Guenter Roeck
2010-10-20  7:59               ` Simon Guinot

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=20101018205034.GA10473@ericsson.com \
    --to=guenter.roeck@ericsson.com \
    --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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).