24 Sep, 2020

1 commit

  • As part of the ongoing i2c transition to the simple probe
    ("probe_new"), this patch uses i2c_match_id to retrieve the
    driver_data for the probed device. The id parameter is thus no longer
    necessary and the simple probe can be used instead.

    Signed-off-by: Stephen Kitt
    Link: https://lore.kernel.org/r/20200821160159.591293-1-steve@sk2.org
    Signed-off-by: Guenter Roeck

    Stephen Kitt
     

24 May, 2019

1 commit

  • Based on 1 normalized pattern(s):

    this program is free software you can redistribute it and or modify
    it under the terms of the gnu general public license as published by
    the free software foundation either version 2 of the license or at
    your option any later version this program is distributed in the
    hope that it will be useful but without any warranty without even
    the implied warranty of merchantability or fitness for a particular
    purpose see the gnu general public license for more details you
    should have received a copy of the gnu general public license along
    with this program if not write to the free software foundation inc
    675 mass ave cambridge ma 02139 usa

    extracted by the scancode license scanner the SPDX license identifier

    GPL-2.0-or-later

    has been chosen to replace the boilerplate/reference in 441 file(s).

    Signed-off-by: Thomas Gleixner
    Reviewed-by: Michael Ellerman (powerpc)
    Reviewed-by: Richard Fontana
    Reviewed-by: Allison Randal
    Reviewed-by: Kate Stewart
    Cc: linux-spdx@vger.kernel.org
    Link: https://lkml.kernel.org/r/20190520071858.739733335@linutronix.de
    Signed-off-by: Greg Kroah-Hartman

    Thomas Gleixner
     

14 Oct, 2013

1 commit


12 Aug, 2013

1 commit


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
     

24 Sep, 2012

1 commit


02 Apr, 2012

1 commit

  • In some configurations, BUG() does not result in an endless loop but returns to
    the caller. This results in the following compiler warning:

    drivers/hwmon/f75375s.c: In function 'duty_mode_enabled':
    drivers/hwmon/f75375s.c:280: warning: control reaches end of non-void function
    drivers/hwmon/f75375s.c: In function 'auto_mode_enabled':
    drivers/hwmon/f75375s.c:295: warning: control reaches end of non-void function

    Fix the warning by returning something sensible after BUG().

    Cc: Nikolaus Schulz
    Cc: Riku Voipio
    Signed-off-by: Guenter Roeck
    Acked-by: Jean Delvare
    Signed-off-by: Guenter Roeck

    Guenter Roeck
     

19 Mar, 2012

1 commit

  • This patch converts the drivers in drivers/hwmon/* to use the
    module_i2c_driver() macro which makes the code smaller and a bit simpler.

    Signed-off-by: Axel Lin
    Cc: Corentin Labbe
    Cc: Dirk Eibach
    Cc: "Mark M. Hoffman"
    Cc: Steve Glendinning
    Cc: Riku Voipio
    Cc: Guillaume Ligneul
    Cc: David George
    Cc: "Hans J. Koch"
    Cc: Marc Hulsman
    Cc: Rudolf Marek
    Signed-off-by: Guenter Roeck

    Axel Lin
     

03 Mar, 2012

2 commits

  • It makes no sense to attempt to manually configure the fan in auto mode,
    or set the duty cycle directly in closed loop mode. The corresponding
    registers are then read-only. If the user tries it nonetheless, error out
    with EINVAL instead of silently doing nothing.

    Signed-off-by: Nikolaus Schulz
    [guenter.roeck@ericsson.com: Minor formatting cleanup]
    Signed-off-by: Guenter Roeck

    Nikolaus Schulz
     
  • The F75387 supports automatic fan control using either PWM duty cycle or
    RPM speed values. Make the driver detect the latter mode, and expose the
    different modes in sysfs as per pwm_enable, so that the user can switch
    between them.

    The interpretation of the pwm_enable attribute for the F75387 is adjusted
    to be a superset of those values used for similar Fintek chips which do
    not support automatic duty mode, with 2 mapping to automatic speed mode,
    and moving automatic duty mode to the new value 4.

    Toggling the duty mode via pwm_enable is currently denied for the F75387,
    as the chip then simply reinterprets the fan configuration register values
    according to the new mode, switching between RPM and PWM units, which
    makes this a dangerous operation.

    This patch introduces a new pwm mode into the driver. This is necessary
    because the new mode (automatic pwm mode, 4) may already be enabled by the
    BIOS, and the driver should not break existing functionality. This was seen
    on at least one board.

    Signed-off-by: Nikolaus Schulz
    Signed-off-by: Guenter Roeck

    Nikolaus Schulz
     

29 Feb, 2012

2 commits


23 Feb, 2012

1 commit

  • By hwmon sysfs interface convention, setting pwm_enable to zero sets a fan
    to full speed. In the f75375s driver, this need be done by enabling
    manual fan control, plus duty mode for the F875387 chip, and then setting
    the maximum duty cycle. Fix a bug where the two necessary register writes
    were swapped, effectively discarding the setting to full-speed.

    Signed-off-by: Nikolaus Schulz
    Cc: Riku Voipio
    Signed-off-by: Guenter Roeck

    Nikolaus Schulz
     

10 Feb, 2012

1 commit


09 Feb, 2012

3 commits


06 Jan, 2012

6 commits


25 Oct, 2010

1 commit

  • * 'for-next' of git://git.kernel.org/pub/scm/linux/kernel/git/jikos/trivial: (39 commits)
    Update broken web addresses in arch directory.
    Update broken web addresses in the kernel.
    Revert "drivers/usb: Remove unnecessary return's from void functions" for musb gadget
    Revert "Fix typo: configuation => configuration" partially
    ida: document IDA_BITMAP_LONGS calculation
    ext2: fix a typo on comment in ext2/inode.c
    drivers/scsi: Remove unnecessary casts of private_data
    drivers/s390: Remove unnecessary casts of private_data
    net/sunrpc/rpc_pipe.c: Remove unnecessary casts of private_data
    drivers/infiniband: Remove unnecessary casts of private_data
    drivers/gpu/drm: Remove unnecessary casts of private_data
    kernel/pm_qos_params.c: Remove unnecessary casts of private_data
    fs/ecryptfs: Remove unnecessary casts of private_data
    fs/seq_file.c: Remove unnecessary casts of private_data
    arm: uengine.c: remove C99 comments
    arm: scoop.c: remove C99 comments
    Fix typo configue => configure in comments
    Fix typo: configuation => configuration
    Fix typo interrest[ing|ed] => interest[ing|ed]
    Fix various typos of valid in comments
    ...

    Fix up trivial conflicts in:
    drivers/char/ipmi/ipmi_si_intf.c
    drivers/usb/gadget/rndis.c
    net/irda/irnet/irnet_ppp.c

    Linus Torvalds
     

18 Oct, 2010

1 commit

  • The patch below updates broken web addresses in the kernel

    Signed-off-by: Justin P. Mattock
    Cc: Maciej W. Rozycki
    Cc: Geert Uytterhoeven
    Cc: Finn Thain
    Cc: Randy Dunlap
    Cc: Matt Turner
    Cc: Dimitry Torokhov
    Cc: Mike Frysinger
    Acked-by: Ben Pfaff
    Acked-by: Hans J. Koch
    Reviewed-by: Finn Thain
    Signed-off-by: Jiri Kosina

    Justin P. Mattock
     

17 Sep, 2010

2 commits


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
     

30 Mar, 2010

1 commit

  • …it slab.h inclusion from percpu.h

    percpu.h is included by sched.h and module.h and thus ends up being
    included when building most .c files. percpu.h includes slab.h which
    in turn includes gfp.h making everything defined by the two files
    universally available and complicating inclusion dependencies.

    percpu.h -> slab.h dependency is about to be removed. Prepare for
    this change by updating users of gfp and slab facilities include those
    headers directly instead of assuming availability. As this conversion
    needs to touch large number of source files, the following script is
    used as the basis of conversion.

    http://userweb.kernel.org/~tj/misc/slabh-sweep.py

    The script does the followings.

    * Scan files for gfp and slab usages and update includes such that
    only the necessary includes are there. ie. if only gfp is used,
    gfp.h, if slab is used, slab.h.

    * When the script inserts a new include, it looks at the include
    blocks and try to put the new include such that its order conforms
    to its surrounding. It's put in the include block which contains
    core kernel includes, in the same order that the rest are ordered -
    alphabetical, Christmas tree, rev-Xmas-tree or at the end if there
    doesn't seem to be any matching order.

    * If the script can't find a place to put a new include (mostly
    because the file doesn't have fitting include block), it prints out
    an error message indicating which .h file needs to be added to the
    file.

    The conversion was done in the following steps.

    1. The initial automatic conversion of all .c files updated slightly
    over 4000 files, deleting around 700 includes and adding ~480 gfp.h
    and ~3000 slab.h inclusions. The script emitted errors for ~400
    files.

    2. Each error was manually checked. Some didn't need the inclusion,
    some needed manual addition while adding it to implementation .h or
    embedding .c file was more appropriate for others. This step added
    inclusions to around 150 files.

    3. The script was run again and the output was compared to the edits
    from #2 to make sure no file was left behind.

    4. Several build tests were done and a couple of problems were fixed.
    e.g. lib/decompress_*.c used malloc/free() wrappers around slab
    APIs requiring slab.h to be added manually.

    5. The script was run on all .h files but without automatically
    editing them as sprinkling gfp.h and slab.h inclusions around .h
    files could easily lead to inclusion dependency hell. Most gfp.h
    inclusion directives were ignored as stuff from gfp.h was usually
    wildly available and often used in preprocessor macros. Each
    slab.h inclusion directive was examined and added manually as
    necessary.

    6. percpu.h was updated not to include slab.h.

    7. Build test were done on the following configurations and failures
    were fixed. CONFIG_GCOV_KERNEL was turned off for all tests (as my
    distributed build env didn't work with gcov compiles) and a few
    more options had to be turned off depending on archs to make things
    build (like ipr on powerpc/64 which failed due to missing writeq).

    * x86 and x86_64 UP and SMP allmodconfig and a custom test config.
    * powerpc and powerpc64 SMP allmodconfig
    * sparc and sparc64 SMP allmodconfig
    * ia64 SMP allmodconfig
    * s390 SMP allmodconfig
    * alpha SMP allmodconfig
    * um on x86_64 SMP allmodconfig

    8. percpu.h modifications were reverted so that it could be applied as
    a separate patch and serve as bisection point.

    Given the fact that I had only a couple of failures from tests on step
    6, I'm fairly confident about the coverage of this conversion patch.
    If there is a breakage, it's likely to be something in one of the arch
    headers which should be easily discoverable easily on most builds of
    the specific arch.

    Signed-off-by: Tejun Heo <tj@kernel.org>
    Guess-its-ok-by: Christoph Lameter <cl@linux-foundation.org>
    Cc: Ingo Molnar <mingo@redhat.com>
    Cc: Lee Schermerhorn <Lee.Schermerhorn@hp.com>

    Tejun Heo
     

15 Dec, 2009

3 commits


10 Dec, 2009

1 commit

  • As kind is now hard-coded to -1, there is room for code clean-ups.

    Signed-off-by: Jean Delvare
    Acked-by: Corentin Labbe
    Cc: "Mark M. Hoffman"
    Cc: Juerg Haefliger
    Cc: Riku Voipio
    Acked-by: "Hans J. Koch"
    Cc: Rudolf Marek

    Jean Delvare
     

30 Mar, 2009

1 commit


12 Mar, 2009

1 commit

  • f75375_probe calls i2c_get_clientdata to initialize the data pointer,
    but there isn't yet any client data to get, and the value is never
    used before the variable is assigned a new value seven lines later.

    The call doesn't hurt anything and wastes only a couple of cycles.
    The reason to fix it is because this module serves as an example to
    hackers writing new hwmon drivers, and this part of the example is
    confusing.

    Signed-off-by: Andrew Klossner
    Signed-off-by: Jean Delvare

    Andrew Klossner
     

17 Jul, 2008

1 commit


30 Apr, 2008

2 commits

  • Based on earlier work by Jon Smirl and Jochen Friedrich.

    Update most new-style i2c drivers to use standard module aliasing
    instead of the old driver_name/type driver matching scheme. I've
    left the video drivers apart (except for SoC camera drivers) as
    they're a bit more diffcult to deal with, they'll have their own
    patch later.

    Signed-off-by: Jean Delvare
    Cc: Jon Smirl
    Cc: Jochen Friedrich

    Jean Delvare
     
  • Based on earlier work by Jon Smirl and Jochen Friedrich.

    This patch allows new-style i2c chip drivers to have alias names using
    the official kernel aliasing system and MODULE_DEVICE_TABLE(). At this
    point, the old i2c driver binding scheme (driver_name/type) is still
    supported.

    Signed-off-by: Jean Delvare
    Cc: Jochen Friedrich
    Cc: Jon Smirl
    Cc: Kay Sievers

    Jean Delvare
     

19 Feb, 2008

1 commit


08 Nov, 2007

1 commit