13 Jan, 2011

1 commit


15 Aug, 2010

1 commit

  • It's not OK to call platform_device_add_resources() multiple times
    in a row. Despite its name, this functions sets the resources, it
    doesn't add them. So we have to prepare an array with all the
    resources, and then call platform_device_add_resources() once.

    Before this fix, only the last I/O resource would be actually
    registered. The other I/O resources were leaked.

    Signed-off-by: Jean Delvare
    Cc: Jim Cromie
    Cc: stable@kernel.org

    Jean Delvare
     

15 Sep, 2009

1 commit


07 Jan, 2009

1 commit

  • Check for ACPI resource conflicts in hwmon drivers. I've included
    all Super-I/O and PCI drivers.

    I've voluntarily left out:
    * Vendor-specific drivers: if they conflicted on any system, this would
    pretty much mean that they conflict on all systems, and we would know
    by now.
    * Legacy ISA drivers (lm78 and w83781d): they only support chips found
    on old designs were ACPI either wasn't supported or didn't deal with
    thermal management.
    * Drivers accessing the I/O resources indirectly (e.g. through SMBus):
    the checks are already done where they belong, i.e. in the bus drivers.

    Signed-off-by: Jean Delvare
    Acked-by: David Hubbard

    Jean Delvare
     

20 Oct, 2008

6 commits

  • Adds therm-min/max/crit-alarm callbacks, sensor-device-attribute
    declarations, and refs to those new decls in the macro used to initialize
    the therm_group (of sysfs files)

    The thermistors use voltage channels to measure; so they don't have a
    fault-alarm, but unlike the other voltages, they do have an overtemp,
    which we call crit (by convention).

    [akpm@linux-foundation.org: cleanup]
    Signed-off-by: Jim Cromie
    Cc: Jean Delvare
    Cc: "Mark M. Hoffman"
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Jim Cromie
     
  • temp and vin status register values may be set by chip specifications, set
    again by bios, or by this previously loaded driver. Debug output nicely
    displays modprobe init=\d actions.

    Signed-off-by: Jim Cromie
    Cc: Jean Delvare
    Cc: "Mark M. Hoffman"
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Jim Cromie
     
  • Driver handles 3 logical devices in fixed length array. Give this a
    define-d constant.

    Signed-off-by: Jim Cromie
    Cc: Jean Delvare
    Cc: "Mark M. Hoffman"
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Jim Cromie
     
  • Adds temp-min/max/crit/fault-alarm callbacks, sensor-device-attribute
    declarations, and refs to those new decls in the macro used to initialize
    the temp_group (of sysfs files)

    [akpm@linux-foundation.org: cleanups]
    Signed-off-by: Jim Cromie
    Cc: Jean Delvare
    Cc: "Mark M. Hoffman"
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Jim Cromie
     
  • Adds vin-min/max-alarm callbacks, sensor-device-attribute declarations,
    and refs to those new decls in the macro used to initialize the vin_group
    (of sysfs files)

    [akpm@linux-foundation.org: cleanups]
    Signed-off-by: Jim Cromie
    Cc: Jean Delvare
    Cc: "Mark M. Hoffman"
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Jim Cromie
     
  • Bring hwmon/pc87360 into agreement with
    Documentation/hwmon/sysfs-interface.

    Patchset adds separate limit alarms for voltages and temps, it also adds
    temp[123]_fault files. On my Soekris, temps 1,2 are unused/unconnected,
    so temp[123]_fault = 1,1,0 respectively. This agrees with
    /usr/bin/sensors, which has always shown them as OPEN. Temps 4,5,6 are
    thermistor based, and dont have a fault bit in their status register.

    This patch:

    2 different kinds of constants added:
    - CHAN_ALM_* constants for (later) vin, temp alarm callbacks.
    - CHAN_* conversion constants, used in _init_device, partly for RW1C bits

    Signed-off-by: Jim Cromie
    Cc: Jean Delvare
    Cc: "Mark M. Hoffman"
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Jim Cromie
     

08 Feb, 2008

1 commit

  • While it is possible to force SMBus-based hardware monitoring chip
    drivers to drive a not officially supported device, we do not have this
    possibility for Super-I/O-based drivers. That's unfortunate because
    sometimes newer chips are fully compatible and just forcing the driver
    to load would work. Instead of that we have to tell the users to
    recompile the kernel driver, which isn't an easy task for everyone.

    So, I propose that we add a module parameter to all Super-I/O based
    hardware monitoring drivers, letting advanced users force the driver
    to load on their machine. The user has to provide the device ID of a
    supposedly compatible device. This requires looking at the source code or
    a datasheet, so I am confident that users can't randomly force a driver
    without knowing what they are doing. Thus this should be relatively safe.

    As you can see from the code, the implementation is pretty simple and
    unintrusive.

    Signed-off-by: Jean Delvare
    Acked-by: Hans de Goede
    Signed-off-by: Mark M. Hoffman

    Jean Delvare
     

10 Oct, 2007

2 commits


31 Jul, 2007

1 commit

  • On Sun, 22 Jul 2007 00:30:56 +0200, Gabriel C wrote:
    > I noticed this warnings on current git:
    >
    > drivers/hwmon/pc87360.c:1082: warning: 'pc87360_remove' defined but not used
    > drivers/hwmon/sis5595.c:580: warning: 'sis5595_remove' defined but not used
    > drivers/hwmon/smsc47m1.c:608: warning: 'smsc47m1_remove' defined but not used
    > drivers/hwmon/via686a.c:648: warning: 'via686a_remove' defined but not used
    > drivers/hwmon/vt8231.c:755: warning: 'vt8231_remove' defined but not used

    Signed-off-by: Jean Delvare
    Signed-off-by: Mark M. Hoffman

    Jean Delvare
     

20 Jul, 2007

1 commit


13 Dec, 2006

1 commit


29 Sep, 2006

3 commits

  • pc87360: Check for error on sysfs files creation

    Use sysfs_create_group() for 2 sensor-types which are chip-model
    invariant, i.e. all-or-nothing attribute groups.
    Other 2 groups vary too much due to configuration, etc, so we keep the
    loops of device_create_file(), but now check their returns.

    Signed-off-by: Jim Cromie
    Signed-off-by: Jean Delvare
    Signed-off-by: Greg Kroah-Hartman

    Jim Cromie
     
  • pc87360: Delete sysfs files on device deletion

    Add 4 explicit attribute groups for the 5 sensor types:
    voltage (in), therm, temp, and fan & pwm (together in one group).
    Use sysfs_remove_group() to drop them, but keeps the existing
    startup code, which calls device_create_file in loops.

    Signed-off-by: Jim Cromie
    Signed-off-by: Jean Delvare
    Signed-off-by: Greg Kroah-Hartman

    Jim Cromie
     
  • pc87360: Move some code around

    Moves code for get-set-decl tuples for 3 items: cpu0_vid, vrm, alarms_in
    up, to just after the get-set-decl tuple for voltages.
    These items are already 'activated' together with the rest of the
    voltage attributes, so the move tightens the grouping that's made
    explicit in next patch.

    Signed-off-by: Jim Cromie
    Signed-off-by: Jean Delvare
    Signed-off-by: Greg Kroah-Hartman

    Jim Cromie
     

27 Sep, 2006

1 commit

  • i2c-isa: Restore driver owner

    Commit 2b48716d1d2f2edb1e7cbc5ecf1cb2cb39373e33 back in January
    2006 was a bit overzealous. It removed .owner from all i2c drivers,
    including i2c-isa ones, while they still need it.

    Signed-off-by: Jean Delvare
    Signed-off-by: Greg Kroah-Hartman

    Jean Delvare
     

24 Mar, 2006

2 commits

  • convert drivers/hwmon/*.c semaphore use to mutexes.

    the conversion was generated via scripts, and the result was validated
    automatically via a script as well.

    all affected hwmon drivers were build-tested.

    Signed-off-by: Ingo Molnar
    Signed-off-by: Jean Delvare
    Signed-off-by: Greg Kroah-Hartman

    Ingo Molnar
     
  • Convert individual sensors to sensor-attr arrays by each sensor type,
    and initialize them in loops instead of long blocks of individual calls.

    Signed-off-by: Jim Cromie
    Signed-off-by: Jean Delvare
    Signed-off-by: Greg Kroah-Hartman

    Jim Cromie
     

06 Jan, 2006

2 commits


29 Oct, 2005

1 commit


06 Sep, 2005

9 commits

  • pc87360: consolidate fan helper

    This patch consolidates the _set_fan_min() helper routine into the 2
    line sysfs-callback wrapper that uses it.

    Signed-off-by: Jim Cromie
    Signed-off-by: Jean Delvare
    Signed-off-by: Greg Kroah-Hartman

    Jim Cromie
     
  • pc87360: number-skew to init

    The temp, therm, fan, pwm callbacks all have an offset skew in the code
    which accommodates attribute numbering conventions under
    /sys/bus/i2c/devices/9191-6620/ (ie they start at 1)

    This patch moves that skew into the declaration, and out of the
    functions (except for therm, where we simplify from 2 skews to 1). The
    declarative skew is clearer, less error-prone, and more efficient.

    The use of 11+offset-4 below reflects the fact that the sysfs numbering
    of these units is 4, 5, 6, but they use internal VLM units 11, 12, 13 to
    measure the thermistor voltages.

    There's one remaining skew factor, in *_crit callbacks below, because
    there are no critical thresholds for voltages 0-10, only for those
    supporting the thermistors.

    Signed-off-by: Jim Cromie
    Signed-off-by: Jean Delvare
    Signed-off-by: Greg Kroah-Hartman

    Jim Cromie
     
  • Use the new "dynamic sysfs callbacks", as introduced recently by Yani
    Ioannou, in pc87360.

    Note that this change isn't indiscriminate. Only those attributes that
    would benefit from having an index (i.e., those which are
    macro-repeated) have been converted.

    This significantly shrinks the size of the module:
    before: 49235 drivers/hwmon/pc87360.ko
    after: 32532 drivers/hwmon/pc87360.ko

    Signed-off-by: Jim Cromie
    Signed-off-by: Jean Delvare
    Signed-off-by: Greg Kroah-Hartman

    Jim Cromie
     
  • The only part left in i2c-sensor is the VRM/VRD/VID handling code.
    This is in no way related to i2c, so it doesn't belong there. Move
    the code to hwmon, where it belongs.

    Note that not all hardware monitoring drivers do VRM/VRD/VID
    operations, so less drivers depend on hwmon-vid than there were
    depending on i2c-sensor.

    Signed-off-by: Jean Delvare
    Signed-off-by: Greg Kroah-Hartman

    Jean Delvare
     
  • Super-I/O find functions in hardware monitoring drivers can be tagged
    __init as they are only called from functions themselves tagged __init.
    Two of them (smsc47b397 and w83627ehf) already do, but the other four
    of them (it87, pc87360, smsc47m1 and w83627hf) did not.

    This saves a few bytes of memory after the drivers are loaded, 192 in
    the case of the it87 driver.

    Signed-off-by: Jean Delvare
    Signed-off-by: Greg Kroah-Hartman

    Jean Delvare
     
  • We could refactor the error message 34 different i2c drivers print if
    i2c_detach_client() fails in this function itself. Saves quite a few
    lines of code. Documentation is updated to reflect that change.

    Note that this patch should be applied after Rudolf Marek's w83792d
    patches.

    Signed-off-by: Jean Delvare
    Signed-off-by: Greg Kroah-Hartman

    Jean Delvare
     
  • Call the ISA chip drivers detection function directly instead of relying
    on i2c_detect. The net effect is that address lists won't be handled
    anymore, but they were mostly useless in the ISA case anyway (pc87360,
    smsc47m1, smsc47b397 had already dropped them).

    We don't need to handle multiple devices, all we may need is a way to
    force a given address instead of the original one (some drivers already
    do: sis5595, via686a, w83627hf), and, for drivers supporting multiple
    chips, a way to force one given kind. All this may be added later on
    demand, but I actually don't think there will be much demand.

    Signed-off-by: Greg Kroah-Hartman

    Jean Delvare
     
  • Convert the 10 ISA hardware monitoring drivers (it87, lm78, pc87360,
    sis5595, smsc47b397, smsc47m1, via686a, w83627hf, w83627ehf, w83781d) to
    explicitely register with i2c-isa. For hybrid drivers (it87, lm78,
    w83781d), we now have two separate instances of i2c_driver, one for the
    I2C interface of the chip, and one for ISA interface. In the long run,
    the one for ISA will be replaced with a different driver type.

    At this point, all drivers are working again, except for missing
    dependencies in Kconfig.

    Signed-off-by: Greg Kroah-Hartman

    Jean Delvare
     
  • This patch modifies sensors chip drivers to make use of the new
    sysfs class "hwmon".

    Signed-off-by: Mark M. Hoffman
    Signed-off-by: Jean Delvare
    Signed-off-by: Greg Kroah-Hartman

    Mark M. Hoffman
     

30 Jul, 2005

1 commit

  • A few split string in i2c (and now hwmon) drivers lack a joining space,
    causing them to display incorrectly. This trivial patch fixes that up.
    Please apply, thanks.

    Signed-off-by: Jean Delvare
    Signed-off-by: Greg Kroah-Hartman
    Signed-off-by: Linus Torvalds

    Jean Delvare
     

12 Jul, 2005

1 commit

  • Part 2: Move the driver files themselves.

    Note that the patch "adds trailing whitespace", because it does move the
    files as-is, and some files happen to have trailing whitespace.

    From: Jean Delvare
    Signed-off-by: Greg Kroah-Hartman

    Jean Delvare