e lines are hardwired as output
- If that is not the case, verify that all lines are really
open drain, they should be if all are both input and
output at the same time.
> + ret = gpiochip_add(>gp);
> + if (ret < 0) {
> + dev_err(>dev, "Could not register gpiochip, %d\n
t;lock);
> +
> + return ret;
> +}
Can the read function return an error code? In that case it should be checked
everywhere.
Also be sure to clamp ret like this:
return !!ret;
Apart from this it looks good.
Yours,
Linus Walleij
--
To unsubscribe from this list: send the line "unsubscribe linux-hwmon" in
the body of a message to majord...@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
iper kernel]
> Signed-off-by: Pantelis Antoniou <pantelis.anton...@konsulko.com>
This driver again has the same review comments as the two first
ones, GPIOLIB_IRQCHIP etc. Revise accordingly and repost
and I will look at it again.
(Interestingly this one uses BIT() properly.)
Yours,
Linus Walleij
This switches the AB8500 hardware monitor driver to using
the standard IIO ADC channel lookup and conversion routines.
Signed-off-by: Linus Walleij <linus.wall...@linaro.org>
---
drivers/hwmon/ab8500.c | 65 +++---
1 file changed, 41 insertions(
This switches the AB8500 battery temperature driver to using
the standard IIO ADC channel lookup and conversion routines.
Signed-off-by: Linus Walleij <linus.wall...@linaro.org>
---
drivers/power/supply/ab8500_btemp.c | 41 ++---
1 file changed, 29 inse
: Davide Hug <d...@videhug.ch>
Cc: Jonathan Cameron <ji...@cam.ac.uk>
Signed-off-by: Linus Walleij <linus.wall...@linaro.org>
---
ARM SoC folks: please ACK this so the HWMON maintainer can merge
it when it is in reasonable shape.
Davide: can you test this patch with your setup?
Jo
criptors first though :/
Also: which GPIO controller is this used with, so I can check
how/if it supports open drain?
Yours,
Linus Walleij
--
To unsubscribe from this list: send the line "unsubscribe linux-hwmon" in
the body of a message to majord...@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
On Fri, Sep 8, 2017 at 11:27 PM, Linus Walleij <linus.wall...@linaro.org> wrote:
> Maybe the driver needs to be converted to use GPIO
> descriptors first though :/
I got annoyed that the driver was so oldschool and sent a patch
fixing this. It'd be great if you could test it!
the configuration from the device tree directly into the
state container members.
Signed-off-by: Linus Walleij <linus.wall...@linaro.org>
---
drivers/hwmon/gpio-fan.c | 88 +---
1 file changed, 30 insertions(+), 58 deletions(-)
diff --git a/drivers/hwmo
global GPIO numberspace,
used to control the different fan speeds. Rename these fields to
"gpios" (pluralis) and "num_gpios" so as to make it unambiguous.
Convert some instances of "unsigned" to "unsigned int" to keep
checkpatch happy.
Signed-off
by myself, but especially from people
with fans using several GPIO lines.
Linus Walleij (9):
hwmon: gpio-fan: Move DT bindings to the right place
hwmon: gpio-fan: Use local variable pointers
hwmon: gpio-fan: Localize platform data
hwmon: gpio-fan: Send around device pointer
hwmon: gpio-fan
h happy.
Signed-off-by: Linus Walleij <linus.wall...@linaro.org>
---
drivers/hwmon/gpio-fan.c | 23 ++-
include/linux/gpio-fan.h | 36
2 files changed, 22 insertions(+), 37 deletions(-)
delete mode 100644 include/linux/gpio-fan.h
diff
Create local struct device *dev and device_node *np pointers to
make the code easier to read.
Signed-off-by: Linus Walleij <linus.wall...@linaro.org>
---
drivers/hwmon/gpio-fan.c | 16 +---
1 file changed, 9 insertions(+), 7 deletions(-)
diff --git a/drivers/hwmon/gpio-f
We have no users of platform data, we made platform data driver-local,
so cut all #ifdefs for the platform data case, and depend on the
Kconfig CONFIG_OF_GPIO symbol.
Signed-off-by: Linus Walleij <linus.wall...@linaro.org>
---
drivers/hwmon/Kconfig| 1 +
drivers/hwmon/gpio-fan.
There is no point in storing the GPIO alarm settings in their
own struct so merge this into the main state container.
Convert the variables from "unsigned" to "unsigned int" to
make checkpatch happy.
Signed-off-by: Linus Walleij <linus.wall...@linaro.org>
---
dri
This converts the GPIO fan driver to use GPIO descriptors. This way
we avoid indirection since the gpiolib anyway just use descriptors
inside, and we also get rid of explicit polarity handling: the
descriptors internally knows if the line is active high or active
low.
Signed-off-by: Linus Walleij
On Sun, Oct 8, 2017 at 6:20 PM, Guenter Roeck <li...@roeck-us.net> wrote:
> On Tue, Sep 26, 2017 at 01:09:11AM +0200, Linus Walleij wrote:
>> static int fan_alarm_init(struct gpio_fan_data *fan_data)
>> {
>> - int err;
>> int alarm_irq;
>>
This converts the GPIO fan driver to use GPIO descriptors. This way
we avoid indirection since the gpiolib anyway just use descriptors
inside, and we also get rid of explicit polarity handling: the
descriptors internally knows if the line is active high or active
low.
Signed-off-by: Linus Walleij
_gpio))
>
> Is this still needed ? Just wondering - I would have thought that
> gpiod_get_value_cansleep() does the conversion.
My bad. Fixing in V2, sending it soon.
Yours,
Linus Walleij
--
To unsubscribe from this list: send the line "unsubscribe linux-hwmon" in
the bo
appear later. The sensor was still added
which is incorrect: sensors must strictly be added after the
thermal zones, so deferred probe must be respected.
Signed-off-by: Linus Walleij <linus.wall...@linaro.org>
---
drivers/hwmon/hwmon.c | 17 +
1 file changed, 13 insertions
appear later. The sensor was still added
which is incorrect: sensors must strictly be added after the
thermal zones, so deferred probe must be respected.
Signed-off-by: Linus Walleij <linus.wall...@linaro.org>
---
ChangeLog v1->v2:
- Explicitly discard -ENODEV as this is OK, forward any other
o check for
> -EPROBE_DEFER and only return this specific error, but ignore all others.
Sounds more like we should ignore -ENODEV and respect all other
errors? It will be more robust if some code changes and some
new error code appears again.
I will cook a patch like so.
Yours,
Linus Walleij
On Sun, Dec 3, 2017 at 4:39 PM, Guenter Roeck <li...@roeck-us.net> wrote:
> On 12/03/2017 05:24 AM, Linus Walleij wrote:
>> Is it possible to use drivers/thermal to set up a policy
>> for controlling the HWMON fan directly by reading the
>> HWMON sensor input periodi
On Mon, Aug 13, 2018 at 12:31 AM Guenter Roeck wrote:
> On 08/09/2018 09:15 PM, Guenter Roeck wrote:
> > On 08/09/2018 03:24 PM, Linus Walleij wrote:
> >> +if (id == SMART_TEMP_PROP_194)
> >> +break;
>
> 231 also seems to report the temp
like disk diagnostics and
self-test etc is definately policy IMO (smartmontools even have a
daemon for it, in the manpage it is stated how to instruct it to ignore
the temperature beacause it "changes too often"), so the temperature
of the hard disk is dubious as "policy", it
ors) instead of several which also seem sparingly
maintained (hddtemp). smartmontools make good use of the
data, but it has other main purposes than temperature monitoring
and is a pretty big hammer for that.
Yours,
Linus Walleij
On Sat, Aug 11, 2018 at 9:15 PM Guenter Roeck wrote:
> On Fri, Aug 10, 2018 at 12:24:25AM +0200, Linus Walleij wrote:
> > + /* Names the hwmon device something like "sd_0:0:0:0" */
> > + sname = devm_kasprintf(dev, GFP_KERNEL, "sd_%s", d
hddtemp"
(which seems dormant) though I haven't tested it.
This driver does not block any simultaneous use of
other SMART userspace tools, it's a both/and approach,
not either/or.
Signed-off-by: Linus Walleij
---
ChangeLog RFC->v1:
- Put includes in alphabetical order.
- Octal 00444 inst
ch seems dormant) though I haven't tested it.
This driver does not block any simultaneous use of
other SMART userspace tools, it's a both/and approach,
not either/or.
Signed-off-by: Linus Walleij
---
TODO:
- How does this interoperate with SCSI or NVME drives?
They have SMART extensions but it is
ch seems dormant) though I haven't tested it.
This driver does not block any simultaneous use of
other SMART userspace tools, it's a both/and approach,
not either/or.
Reviewed-by: Guenter Roeck
Signed-off-by: Linus Walleij
---
TODO:
- How does this interoperate with SCSI or NVME drives?
They have
On Mon, Oct 8, 2018 at 8:09 AM Hannes Reinecke wrote:
> On 10/7/18 10:49 PM, Linus Walleij wrote:
> Hmm. I might be getting something wrong here, but the main problem with
> SMART values is that they are _not_ really standardized; plus any drive
> is free to implement whatever they w
Hi Christian,
thanks a lot for your feedback!
On Tue, Oct 16, 2018 at 7:36 AM Christian Franke
wrote:
> Linus Walleij wrote:
> > ...
> > - I am uncertain if this applies to SAS drives as well,
> >it appears not (Christian Frankes answer) they
> >require a dif
ors
will go away with their parent devices.
Reviewed-by: Guenter Roeck # HWMON
Signed-off-by: Linus Walleij
---
ChangeLog v5->v6:
- Add the hwmon sensor on the scsi_add_lun() synchronous
or scsi_sysfs_add_devices() asynchronous path.
- Add a flag to drivers/usb/storage/scsiglue.c so th
registers using
devm_hwmon_device_register_with_info() so hwmon sensors
will go away with their parent devices.
Reviewed-by: Guenter Roeck # HWMON
Signed-off-by: Linus Walleij
---
ChangeLog v6->v7:
- Updated the commit message.
- Partly bumping because SCSI maintainers seem to be
ghosting the patch. I'm con
just ATA.
The thing/command I pass in now is ATA_16 (0x85)
16-byte pass-thru, I take it that a ATA_16 pass thru
is NOT a proper command or modepage but
something like an uglyhack?...
Yours,
Linus Walleij
or would you like me to send a v2?
Yours,
Linus Walleij
This adds device tree probing for the AD7418 hwmon sensor.
When device tree is not enabled, stub functions will kick
in.
Tested on the Gateway Cambria GW2358-4.
Signed-off-by: Linus Walleij
---
drivers/hwmon/ad7418.c | 14 +-
1 file changed, 13 insertions(+), 1 deletion(-)
diff
This adds device tree bindings for Analog Devices AD741x
as found in Gateway routers.
Cc: devicet...@vger.kernel.org
Signed-off-by: Linus Walleij
---
.../devicetree/bindings/hwmon/ad741x.txt | 15 +++
1 file changed, 15 insertions(+)
create mode 100644 Documentation
38 matches
Mail list logo