From: Guenter Roeck <linux@roeck-us.net>
To: Laszlo Papp <lpapp@kde.org>
Cc: hjk@hansjkoch.de, lm-sensors@lm-sensors.org,
linux-kernel@vger.kernel.org
Subject: Re: [lm-sensors] [PATCH] hwmon: (max6650) Add support for gpiodef
Date: Thu, 14 Nov 2013 19:00:44 +0000 [thread overview]
Message-ID: <20131114190044.GE13727@roeck-us.net> (raw)
In-Reply-To: <CAOMwXhNaZ=oqp5mjnCrOSkdax5U6ffsZf_p4mzd3W2jF+=xWqg@mail.gmail.com>
On Thu, Nov 14, 2013 at 06:35:57PM +0000, Laszlo Papp wrote:
> On Thu, Nov 14, 2013 at 6:18 PM, Guenter Roeck <linux@roeck-us.net> wrote:
> > On Thu, Nov 14, 2013 at 06:13:45PM +0000, Laszlo Papp wrote:
> >> On Thu, Nov 14, 2013 at 5:24 PM, Guenter Roeck <linux@roeck-us.net> wrote:
> >>
> >> > On Thu, Nov 14, 2013 at 02:51:01PM +0000, Laszlo Papp wrote:
> >> > > It is necessary for end users when they are using the gpio pins
> >> > connected to the
> >> > > fan controller. There is a separate gpiodef register provided, but it is
> >> > unused
> >> > > under the usual circumstances and that is probably the reason why this
> >> > feature
> >> > > has not been added before. It is necessary for our board to function
> >> > properly.
> >> > >
> >> > > Signed-off-by: Laszlo Papp <lpapp@kde.org>
> >> > > ---
> >> > > Documentation/hwmon/max6650 | 5 +++
> >> > > drivers/hwmon/max6650.c | 107
> >> > ++++++++++++++++++++++++++++++++++++++++++++
> >> > > 2 files changed, 112 insertions(+)
> >> > >
> >> > > diff --git a/Documentation/hwmon/max6650 b/Documentation/hwmon/max6650
> >> > > index 58d9644..32c69a8 100644
> >> > > --- a/Documentation/hwmon/max6650
> >> > > +++ b/Documentation/hwmon/max6650
> >> > > @@ -39,6 +39,11 @@ pwm1 rw relative speed (0-255),
> >> > 255=max. speed.
> >> > > fan1_div rw sets the speed range the inputs can handle. Legal
> >> > > values are 1, 2, 4, and 8. Use lower values for
> >> > > faster fans.
> >> > > +gpio0 rw sets the gpio 0 PIN. Legal values are 0, 1, 2, and
> >> > 3.
> >> > > +gpio1 rw sets the gpio 1 PIN. Legal values are 0, 1, 2, and
> >> > 3.
> >> > > +gpio2 rw sets the gpio 2 PIN. Legal values are 0, 1, 2, and
> >> > 3.
> >> > > +gpio3 rw sets the gpio 3 PIN. Legal values are 0, and 1.
> >> > > +gpio4 rw sets the gpio 4 PIN. Legal values are 0, and 1.
> >> > >
> >> > gpio pins should be exported through the gpio subsystem, usually with a
> >> > gpio
> >> > driver. In this case, it may be acceptable to have the driver register with
> >> > the gpio subsystem to export the pins. Using local sysfs attributes is
> >> > wrong
> >> > and unacceptable.
> >> >
> >>
> >> In short: I am not sure.
> >>
> >> My concern is that these are not generic gpio pins. They seem to have chip
> >> specific functionality, like alarm, full-on, and clock (internal and
> >> external). Strictly speaking, one could even mention that to expose the
> >> GPIODEF register as is without splitting it into five separate gpio pin
> >> entries. Even those five pins behave slightly differently.
> >>
> >> I considered both, but these are the reasons why I decided to keep it chip
> >> specific rather than separately in a generic subsystem.
> >>
> > If the registers are not really gpio pins but are needed / used for chip
> > configuration, the other option would be to configure the values using platform
> > data and/or devicetree data. Either case, exporting the pins to user space via
> > sysfs attribute files in the device directory is the wrong approach.
>
> Hmm, that would not allow dynamic settings on its own - if I am not
> mistaken - which we are in need of. I might be mistaken tough, so
> please forgive my shortcomings.
>
> I was also thinking of module parameters before, as well. Perhaps that
> is a better approach. I am not sure. What do you think about it?
>
Problem with that is that it applies to all MAX6650's.
What are those pins used for ?
If they need to be set at runtime, gpio may be a choice after all.
I think I may need to get a better understanding of your use case.
Thanks,
Guenter
_______________________________________________
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: Guenter Roeck <linux@roeck-us.net>
To: Laszlo Papp <lpapp@kde.org>
Cc: hjk@hansjkoch.de, lm-sensors@lm-sensors.org,
linux-kernel@vger.kernel.org
Subject: Re: [PATCH] hwmon: (max6650) Add support for gpiodef
Date: Thu, 14 Nov 2013 11:00:44 -0800 [thread overview]
Message-ID: <20131114190044.GE13727@roeck-us.net> (raw)
In-Reply-To: <CAOMwXhNaZ=oqp5mjnCrOSkdax5U6ffsZf_p4mzd3W2jF+=xWqg@mail.gmail.com>
On Thu, Nov 14, 2013 at 06:35:57PM +0000, Laszlo Papp wrote:
> On Thu, Nov 14, 2013 at 6:18 PM, Guenter Roeck <linux@roeck-us.net> wrote:
> > On Thu, Nov 14, 2013 at 06:13:45PM +0000, Laszlo Papp wrote:
> >> On Thu, Nov 14, 2013 at 5:24 PM, Guenter Roeck <linux@roeck-us.net> wrote:
> >>
> >> > On Thu, Nov 14, 2013 at 02:51:01PM +0000, Laszlo Papp wrote:
> >> > > It is necessary for end users when they are using the gpio pins
> >> > connected to the
> >> > > fan controller. There is a separate gpiodef register provided, but it is
> >> > unused
> >> > > under the usual circumstances and that is probably the reason why this
> >> > feature
> >> > > has not been added before. It is necessary for our board to function
> >> > properly.
> >> > >
> >> > > Signed-off-by: Laszlo Papp <lpapp@kde.org>
> >> > > ---
> >> > > Documentation/hwmon/max6650 | 5 +++
> >> > > drivers/hwmon/max6650.c | 107
> >> > ++++++++++++++++++++++++++++++++++++++++++++
> >> > > 2 files changed, 112 insertions(+)
> >> > >
> >> > > diff --git a/Documentation/hwmon/max6650 b/Documentation/hwmon/max6650
> >> > > index 58d9644..32c69a8 100644
> >> > > --- a/Documentation/hwmon/max6650
> >> > > +++ b/Documentation/hwmon/max6650
> >> > > @@ -39,6 +39,11 @@ pwm1 rw relative speed (0-255),
> >> > 255=max. speed.
> >> > > fan1_div rw sets the speed range the inputs can handle. Legal
> >> > > values are 1, 2, 4, and 8. Use lower values for
> >> > > faster fans.
> >> > > +gpio0 rw sets the gpio 0 PIN. Legal values are 0, 1, 2, and
> >> > 3.
> >> > > +gpio1 rw sets the gpio 1 PIN. Legal values are 0, 1, 2, and
> >> > 3.
> >> > > +gpio2 rw sets the gpio 2 PIN. Legal values are 0, 1, 2, and
> >> > 3.
> >> > > +gpio3 rw sets the gpio 3 PIN. Legal values are 0, and 1.
> >> > > +gpio4 rw sets the gpio 4 PIN. Legal values are 0, and 1.
> >> > >
> >> > gpio pins should be exported through the gpio subsystem, usually with a
> >> > gpio
> >> > driver. In this case, it may be acceptable to have the driver register with
> >> > the gpio subsystem to export the pins. Using local sysfs attributes is
> >> > wrong
> >> > and unacceptable.
> >> >
> >>
> >> In short: I am not sure.
> >>
> >> My concern is that these are not generic gpio pins. They seem to have chip
> >> specific functionality, like alarm, full-on, and clock (internal and
> >> external). Strictly speaking, one could even mention that to expose the
> >> GPIODEF register as is without splitting it into five separate gpio pin
> >> entries. Even those five pins behave slightly differently.
> >>
> >> I considered both, but these are the reasons why I decided to keep it chip
> >> specific rather than separately in a generic subsystem.
> >>
> > If the registers are not really gpio pins but are needed / used for chip
> > configuration, the other option would be to configure the values using platform
> > data and/or devicetree data. Either case, exporting the pins to user space via
> > sysfs attribute files in the device directory is the wrong approach.
>
> Hmm, that would not allow dynamic settings on its own - if I am not
> mistaken - which we are in need of. I might be mistaken tough, so
> please forgive my shortcomings.
>
> I was also thinking of module parameters before, as well. Perhaps that
> is a better approach. I am not sure. What do you think about it?
>
Problem with that is that it applies to all MAX6650's.
What are those pins used for ?
If they need to be set at runtime, gpio may be a choice after all.
I think I may need to get a better understanding of your use case.
Thanks,
Guenter
next prev parent reply other threads:[~2013-11-14 19:00 UTC|newest]
Thread overview: 56+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-11-14 14:51 [lm-sensors] [PATCH] hwmon: (max6650) Add support for gpiodef Laszlo Papp
2013-11-14 14:51 ` Laszlo Papp
2013-11-14 17:24 ` [lm-sensors] " Guenter Roeck
2013-11-14 17:24 ` Guenter Roeck
2013-11-14 18:13 ` [lm-sensors] " Laszlo Papp
2013-11-14 18:18 ` Guenter Roeck
2013-11-14 18:18 ` Guenter Roeck
2013-11-14 18:35 ` [lm-sensors] " Laszlo Papp
2013-11-14 18:35 ` Laszlo Papp
2013-11-14 19:00 ` Guenter Roeck [this message]
2013-11-14 19:00 ` Guenter Roeck
2013-11-14 20:26 ` [lm-sensors] " Laszlo Papp
2013-11-14 20:26 ` Laszlo Papp
2013-11-14 18:16 ` [lm-sensors] " Laszlo Papp
2013-11-14 18:16 ` Laszlo Papp
2013-11-14 18:54 ` [lm-sensors] " Laszlo Papp
2013-11-14 18:54 ` Laszlo Papp
2013-11-15 19:52 ` [lm-sensors] " Marcus Folkesson
2013-11-19 16:42 ` Laszlo Papp
2013-11-19 16:42 ` Laszlo Papp
2013-11-19 16:54 ` [lm-sensors] " Guenter Roeck
2013-11-19 16:54 ` Guenter Roeck
2013-11-19 18:00 ` [lm-sensors] " Guenter Roeck
2013-11-19 18:00 ` Guenter Roeck
2013-11-19 19:43 ` Laszlo Papp
2013-11-19 19:43 ` Laszlo Papp
2013-11-21 15:20 ` Laszlo Papp
2013-11-21 15:20 ` Laszlo Papp
2013-11-21 17:34 ` Guenter Roeck
2013-11-21 17:34 ` Guenter Roeck
2013-11-21 20:52 ` Laszlo Papp
2013-11-21 20:52 ` Laszlo Papp
2013-11-22 9:23 ` Laszlo Papp
2013-11-22 9:23 ` Laszlo Papp
2013-11-22 14:35 ` Guenter Roeck
2013-11-22 14:35 ` Guenter Roeck
2013-11-22 14:50 ` Laszlo Papp
2013-11-22 14:50 ` Laszlo Papp
2013-11-22 16:04 ` Guenter Roeck
2013-11-22 16:04 ` Guenter Roeck
2013-11-22 17:47 ` Laszlo Papp
2013-11-22 17:47 ` Laszlo Papp
2013-11-22 18:05 ` Guenter Roeck
2013-11-22 18:05 ` Guenter Roeck
2013-11-22 18:08 ` Laszlo Papp
2013-11-22 18:08 ` Laszlo Papp
2013-12-16 15:56 ` Laszlo Papp
2013-12-16 15:56 ` Laszlo Papp
2013-12-16 17:27 ` Guenter Roeck
2013-12-16 17:27 ` Guenter Roeck
2013-12-16 18:28 ` Laszlo Papp
2013-12-16 18:28 ` Laszlo Papp
2013-12-16 18:28 ` Laszlo Papp
2013-12-16 18:28 ` Laszlo Papp
2013-12-16 19:55 ` Guenter Roeck
2013-12-16 19:55 ` 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=20131114190044.GE13727@roeck-us.net \
--to=linux@roeck-us.net \
--cc=hjk@hansjkoch.de \
--cc=linux-kernel@vger.kernel.org \
--cc=lm-sensors@lm-sensors.org \
--cc=lpapp@kde.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.