13 Jan, 2012

1 commit


04 Nov, 2011

1 commit

  • Make use of the new i2c_smbus_{read,write}_word_swapped functions.
    This makes the driver code more compact and readable. It also ensures
    proper error handling.

    Signed-off-by: Jean Delvare
    Acked-by: Jonathan Cameron
    Acked-by: Guenter Roeck
    Cc: Dirk Eibach
    Cc: "Mark M. Hoffman"
    Cc: Guillaume Ligneul

    Jean Delvare
     

13 Jan, 2011

1 commit


03 Jun, 2010

1 commit

  • I2C drivers can use the clientdata-pointer to point to private data. As I2C
    devices are not really unregistered, but merely detached from their driver, it
    used to be the drivers obligation to clear this pointer during remove() or a
    failed probe(). As a couple of drivers forgot to do this, it was agreed that it
    was cleaner if the i2c-core does this clearance when appropriate, as there is
    no guarantee for the lifetime of the clientdata-pointer after remove() anyhow.
    This feature was added to the core with commit
    e4a7b9b04de15f6b63da5ccdd373ffa3057a3681 to fix the faulty drivers.

    As there is no need anymore to clear the clientdata-pointer, remove all current
    occurrences in the drivers to simplify the code and prevent confusion.

    Signed-off-by: Wolfram Sang
    Acked-by: Mark Brown
    Acked-by: Greg Kroah-Hartman
    Acked-by: Richard Purdie
    Acked-by: Dmitry Torokhov
    Signed-off-by: Jean Delvare

    Wolfram Sang
     

06 Feb, 2010

1 commit

  • Different motherboards have different PNP declarations for
    W83781D/W83782D chips. Some declare the whole range of I/O ports (8
    ports), some declare only the useful ports (2 ports at offset 5) and
    some declare fancy ranges, for example 4 ports at offset 4. To
    properly handle all cases, request all ports individually for probing.
    After we have determined that we really have a W83781D or W83782D
    chip, the useful port range will be requested again, as a single
    block.

    I did not see a board which needs this yet, but I know of one for lm78
    driver and I'd like to keep the logic of these two drivers in sync.

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

    Jean Delvare
     

15 Dec, 2009

3 commits


10 Dec, 2009

1 commit


15 Sep, 2009

1 commit


09 May, 2009

1 commit

  • Commit 360782dde00a2e6e7d9fd57535f90934707ab8a8 (hwmon: (w83781d) Stop
    abusing struct i2c_client for ISA devices) broke W83782D support for
    devices connected on the ISA bus. You will hit a NULL pointer
    dereference as soon as you read any device attribute. Other devices,
    and W83782D devices on the SMBus, aren't affected.

    Reported-by: Michel Abraham
    Signed-off-by: Jean Delvare
    Tested-by: Michel Abraham

    Jean Delvare
     

07 Jan, 2009

1 commit

  • I2C_CLIENT_MODULE_PARM is overkill for force_subclients. We really
    only use 4 out of the 48 slots, so we're better defining a custom
    variable instead. This change saves 92 bytes of data for each of the
    five drivers affected.

    Signed-off-by: Jean Delvare
    Cc: Wolfgang Grandegger
    Acked-by: Marc Hulsman
    Cc: Mark M. Hoffman

    Jean Delvare
     

27 Oct, 2008

1 commit

  • When w83781d is built-in, the final links fails with the following vague error
    message:

    `.exit.text' referenced in section `.init.text' of drivers/built-in.o: defined
    in discarded section `.exit.text' of drivers/built-in.o

    w83781d_isa_unregister() cannot be marked __exit, as it's also called from
    sensors_w83781d_init(), which is marked __init.

    Signed-off-by: Geert Uytterhoeven
    Cc: Wolfgang Grandegger
    Signed-off-by: Jean Delvare

    Geert Uytterhoeven
     

17 Oct, 2008

5 commits

  • This patch modifies the w83781d driver to use new style driver binding.
    Substantial code modifications are required to deal with the new
    interface, especially legacy device detection.

    [JD: largely edited to make the patch smaller and to get the driver
    to work again on ISA devices.]

    Signed-off-by: Wolfgang Grandegger
    Signed-off-by: Jean Delvare

    Wolfgang Grandegger
     
  • Upcoming changes to the I2C part of the w83781d driver will cause ISA
    devices to no longer have a struct i2c_client at hand. So, we must
    stop (ab)using it now.

    Signed-off-by: Jean Delvare
    Cc: Wolfgang Grandegger

    Jean Delvare
     
  • Probing the ISA bus on systems without ISA bus may hang the system.
    This patch makes the ISA bus related code depend on the kernel
    configuration parameter CONFIG_ISA. It moves ISA bus related code
    into one #ifdef CONFIG_ISA ... #endif block and adds some helper
    function.

    Signed-off-by: Wolfgang Grandegger
    Signed-off-by: Jean Delvare

    Wolfgang Grandegger
     
  • The W83781D and W83782D can be accessed either on the I2C bus or the
    ISA bus. We must not access the same chip through both interfaces. So
    far we were relying on the user passing the correct ignore parameter
    to skip the registration of the I2C interface as suggested by
    sensors-detect, but this is fragile: the user may load the w83781d
    driver without running sensors-detect, and the i2c bus numbers are
    not stable across reboots and hardware changes.

    So, better detect alias chips in the driver directly, and skip any
    I2C chip which is obviously an alias of the ISA chip. This is done
    by comparing the value of 26 selected registers.

    Signed-off-by: Jean Delvare
    Cc: Wolfgang Grandegger

    Jean Delvare
     
  • We can handle the beep enable bit as any other beep mask bit for
    slightly smaller code.

    Signed-off-by: Jean Delvare
    Cc: Wolfgang Grandegger

    Jean Delvare
     

27 Mar, 2008

1 commit

  • Only request I/O ports 0x295-0x296 instead of the full I/O address
    range. This solves a conflict with PNP resources on a few motherboards.

    Also request the I/O ports in two parts (4 low ports, 4 high ports)
    during device detection, otherwise the PNP resource makes the request
    (and thus the detection) fail.

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

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

    Jean Delvare
     

19 Feb, 2008

1 commit


08 Feb, 2008

3 commits


08 Nov, 2007

1 commit

  • Missing curly braces cause an if statement to be evaluated when it
    shouldn't. It happens to be harmless, but that's still worth fixing.
    Thanks to Riku Voipio for reporting.

    Signed-off-by: Jean Delvare
    Acked-By: Riku Voipio
    Signed-off-by: Mark M. Hoffman

    Jean Delvare
     

10 Oct, 2007

5 commits


09 Sep, 2007

1 commit

  • Fix an off-by-one error in the I/O region declaration of two
    hardware monitoring drivers (lm78 and w83781d.) We were requesting
    one extra port at the end of the region.

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

    Jean Delvare
     

12 Aug, 2007

1 commit


08 May, 2007

5 commits


15 Feb, 2007

1 commit


19 Oct, 2006

2 commits

  • Fix debug messages in w83781d at detection time. We can't use dev_dbg()
    on an i2c client's device before calling i2c_attach_client() on that
    client.

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

    Jean Delvare
     
  • Let the w83781d and lm78 hardware monitoring drivers load even when
    no chip was detected at the ISA address. There can still be supported
    chips connected to an I2C bus or SMBus.

    This fixes bug #7293.

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

    Jean Delvare
     

29 Sep, 2006

1 commit

  • w83781d: Fix unchecked return status

    Add 2 attr-file groups (for base and model-specific attrs respectively),
    create the base group with single call to sysfs_create_group,
    check the return code on individual calls to device_create_file for each
    of the model-specific attr-files.

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

    Jim Cromie