26 Jan, 2013

1 commit

  • SENSORS_LIMIT and the generic clamp_val have the same functionality,
    and clamp_val is more efficient.

    This patch reduces text size by 9052 bytes and bss size by 11624 bytes
    for x86_64 builds.

    Signed-off-by: Guenter Roeck
    Acked-by: George Joseph
    Acked-by: Jean Delvare

    Guenter Roeck
     

22 Jul, 2012

1 commit


10 Apr, 2012

1 commit

  • Some configurations produce the following compiler warning:

    drivers/hwmon/smsc47m1.c: In function 'sm_smsc47m1_init':
    drivers/hwmon/smsc47m1.c:938: warning: 'address' may be used uninitialized in this function

    While this is a false positive, it can easily be fixed by overloading the return
    value from smsc47m1_find with both address and error return code (the address
    is an unsigned short and thus never negative). This also reduces module size by
    a few bytes (46 bytes for x86_64).

    Signed-off-by: Guenter Roeck
    Reviewed-by: Robert Coulson

    Guenter Roeck
     

19 Mar, 2012

2 commits

  • Fixed:
    ERROR: code indent should use tabs where possible
    ERROR: do not use assignment in if condition
    ERROR: space required after that ',' (ctx:VxV)
    ERROR: spaces required around that '=' (ctx:VxV)
    ERROR: trailing statements should be on next line
    ERROR: trailing whitespace
    WARNING: simple_strtol is obsolete, use kstrtol instead
    WARNING: static const char * array should probably be static const char * const

    Modify multi-line comments to follow Documentation/CodingStyle.

    Also: s/#define^I/#define /

    Not fixed (false positive):
    ERROR: Macros with multiple statements should be enclosed in a do - while loop

    Cc: Jean Delvare
    Signed-off-by: Guenter Roeck

    Guenter Roeck
     
  • Fix checkpatch issue:
    ERROR: do not use assignment in if condition

    Replace repeated calls to device_create_file() with calls to sysfs_create_group.

    Cc: Jean Delvare
    Signed-off-by: Guenter Roeck

    Guenter Roeck
     

09 Jan, 2011

1 commit


25 Jan, 2010

1 commit


17 Dec, 2009

3 commits

  • If the address is set but the device isn't enabled, attempt to enable
    it. If it won't work for any reason (resource conflict, no function
    enabled) the initial state is restored. The initial state is also
    restored on module unloading.

    Signed-off-by: Jean Delvare
    Tested-by: Sean Fidler

    Jean Delvare
     
  • If an error occurs during probing, there's no point in keeping the
    module in memory. Better fail the module loading early to make the
    problem more visible.

    Signed-off-by: Jean Delvare
    Tested-by: Sean Fidler

    Jean Delvare
     
  • The I/O area of the SMSC LPC47M1xx chips which we use, gives access to
    a lot of registers, some of which are related to fan speed monitoring
    and control, but many are not. At the moment, the smsc47m1 driver
    requests the whole I/O port range. This could easily result in
    resource conflicts with either ACPI or other drivers.

    Request only the I/O ports we really use, to prevent such conflicts.

    Signed-off-by: Jean Delvare
    Tested-by: Sean Fidler

    Jean Delvare
     

15 Sep, 2009

1 commit


28 Jul, 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
     

17 Feb, 2008

1 commit


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


13 Aug, 2007

1 commit

  • The smsc47m1 driver no longer creates the name attribute used by
    libsensors to identify chip types. It was lost during the conversion
    to a platform driver. I was fooled by the fact that we do have a
    group with all attributes, but only to delete them all at once. The
    group is not used to create the attributes, so we have to explicitly
    create the name attribute.

    This fixes lm-sensors ticket #2236:
    http://lm-sensors.org/ticket/2236

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

    Jean Delvare
     

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

2 commits

  • Fix a potential race condition when some hardware monitoring platform
    drivers are being unloaded. I believe that the driver data pointer
    shouldn't be cleared before all the sysfs files are removed, otherwise
    a sysfs callback might attempt to dereference a NULL pointer. I'm not
    sure exactly what the driver core protects drivers against, so let's
    play it safe.

    While we're here, clear the driver data pointer when probe fails, so
    as to not leave an invalid pointer behind us.

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

    Jean Delvare
     
  • Use platform_device_add_data() in hardware monitoring drivers. This
    makes the code nicer and smaller too. Reported by David Hubbard.

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

    Jean Delvare
     

08 May, 2007

5 commits


19 Oct, 2006

1 commit

  • The SMSC LPC47M112 Super-I/O chip appears to be compatible with the
    LPC47M10x and LPC47M13x as far as hardware monitoring is concerned.
    The device ID is even the same, so it's really only a documentation
    update.

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

    Jean Delvare
     

29 Sep, 2006

2 commits


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
     

27 Jun, 2006

1 commit

  • acquired (aquired)
    contiguous (contigious)
    successful (succesful, succesfull)
    surprise (suprise)
    whether (weather)
    some other misspellings

    Signed-off-by: Andreas Mohr
    Signed-off-by: Adrian Bunk

    Andreas Mohr
     

24 Mar, 2006

1 commit

  • 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
     

06 Jan, 2006

2 commits


29 Oct, 2005

2 commits


10 Sep, 2005

1 commit


06 Sep, 2005

3 commits

  • The only thing left in i2c-sensor.h are module parameter definition
    macros. It's only an extension of what i2c.h offers, and this extension
    is not sensors-specific. As a matter of fact, a few non-sensors drivers
    use them. So we better merge them in i2c.h, and get rid of i2c-sensor.h
    altogether.

    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