19 Jun, 2019

1 commit

  • Based on 2 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 version 2 as
    published by the free software foundation

    this program is free software you can redistribute it and or modify
    it under the terms of the gnu general public license version 2 as
    published by the free software foundation #

    extracted by the scancode license scanner the SPDX license identifier

    GPL-2.0-only

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

    Signed-off-by: Thomas Gleixner
    Reviewed-by: Enrico Weigelt
    Reviewed-by: Kate Stewart
    Reviewed-by: Allison Randal
    Cc: linux-spdx@vger.kernel.org
    Link: https://lkml.kernel.org/r/20190604081206.933168790@linutronix.de
    Signed-off-by: Greg Kroah-Hartman

    Thomas Gleixner
     

11 Feb, 2019

1 commit


06 Feb, 2019

1 commit


17 Mar, 2018

3 commits


09 Mar, 2017

1 commit

  • The driver doesn't have a struct of_device_id table but supported devices
    are registered via Device Trees. This is working on the assumption that a
    I2C device registered via OF will always match a legacy I2C device ID and
    that the MODALIAS reported will always be of the form i2c:.

    But this could change in the future so the correct approach is to have an
    OF device ID table if the devices are registered via OF.

    Signed-off-by: Javier Martinez Canillas
    Signed-off-by: Alexandre Belloni

    Javier Martinez Canillas
     

09 Jul, 2016

1 commit


21 May, 2016

1 commit


20 May, 2016

2 commits


14 Oct, 2014

1 commit


08 May, 2013

1 commit


30 Apr, 2013

1 commit


22 Feb, 2013

1 commit


06 Oct, 2012

1 commit

  • Convert the struct i2c_msg initialization to C99 format. This makes
    maintaining and editing the code simpler. Also helps once other fields
    like transferred are added in future. while at it also fix a checkpatch
    warn WARNING: sizeof rs5c->buf should be sizeof(rs5c->buf)

    Signed-off-by: Shubhrajyoti D
    Reviewed-by: Felipe Balbi
    Cc: Alessandro Zummo
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Shubhrajyoti D
     

24 Mar, 2012

1 commit

  • Factor out some boilerplate code for i2c driver registration into
    module_i2c_driver.

    Signed-off-by: Axel Lin
    Cc: Piotr Ziecik
    Cc: Alessandro Zummo
    Cc: Scott Wood
    Cc: Srikanth Srinivasan
    Cc: Mike Rapoport
    Cc: Sergey Lapin
    Cc: Roman Fietze
    Cc: Herbert Valerio Riedel
    Cc: Alexander Bigga
    Cc: Dale Farnsworth
    Cc: Gregory Hermant
    Cc: Wolfgang Grandegger
    Cc: Martyn Welch
    Cc: Byron Bradley
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Axel Lin
     

01 Nov, 2011

1 commit


10 Mar, 2011

1 commit

  • With the generic RTC rework, the UIE mode irqs are handled
    in the generic layer, and only hardware specific ioctls
    get passed down to the rtc driver layer.

    So this patch removes the UIE mode ioctl handling in the rtc
    driver layer, which never get used.

    CC: Thomas Gleixner
    CC: Alessandro Zummo
    CC: Marcelo Roberto Jimenez
    CC: rtc-linux@googlegroups.com
    Signed-off-by: John Stultz

    John Stultz
     

04 Feb, 2011

1 commit

  • Some rtc drivers use the ioctl method instead of the alarm_irq_enable
    method for enabling alarm interupts. With the new virtualized RTC
    rework, its important for drivers to use the alarm_irq_enable instead.

    This patch converts the drivers that use the AIE ioctl method to
    use the alarm_irq_enable method. Other ioctl cmds are left untouched.

    I have not been able to test or even compile most of these drivers.
    Any help to make sure this change is correct would be appreciated!

    CC: Alessandro Zummo
    CC: Thomas Gleixner
    CC: Marcelo Roberto Jimenez
    Reported-by: Marcelo Roberto Jimenez
    Tested-by: Marcelo Roberto Jimenez
    Signed-off-by: John Stultz

    John Stultz
     

23 Dec, 2010

1 commit

  • Match the buffer size to the amount of initialized values. Before, it was
    one too big and thus destroyed the neighbouring register causing the clock
    to run at false speeds.

    Reported-by: Andre van Rooyen
    Signed-off-by: Wolfram Sang
    Cc: Alessandro Zummo
    Cc:
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    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
     

20 Oct, 2008

1 commit

  • Change drivers/rtc/ to use the new bcd2bin/bin2bcd functions instead of
    the obsolete BCD_TO_BIN/BIN_TO_BCD/BCD2BIN/BIN2BCD macros.

    Signed-off-by: Adrian Bunk
    Acked-by: Alessandro Zummo
    Cc: David Brownell
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Adrian Bunk
     

17 Oct, 2008

2 commits

  • This adds support for the Ricoh R2025S/D series of I2C RTCs, produced by
    Ricoh Japan and described at:

    http://www.ricoh.co.jp/LSI/product_rtc/2wire/r2025x/

    This series has very minor deviations from the rest of the RS5C chips,
    most of which have to do with the oscillator, which was abstracted away in
    an earlier patch.

    Signed-off-by: Paul Mundt
    Acked-by: David Brownell
    Tested-by: Riku Voipio
    Acked-by: Alessandro Zummo
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Paul Mundt
     
  • rtc-rs5c372 presently depends on I2C master mode transfers, despite the
    fact that these RTCs frequently find themselves on SMBus-only adapters.

    Given that the only capabilities that were checked were for I2C_FUNC_I2C,
    it's assumed that most of the adapters that are currently using this
    driver are fairly sane, and are able to handle SMBus emulation (though we
    adjust the default capabilities to check for I2C_FUNC_SMBUS_EMUL anyways,
    which is the vast majority of them. The adapters that don't have their
    own ->smbus_xfer() fall back on the ->master_xfer() through the emulated
    transfer).

    The special case is iop3xx, which has more than its fair share of hacks
    within this driver, it remains untested -- though also claims to support
    emulated SMBus accesses. The corner case there is rs5c_get_regs() which
    uses access mode #3 for transferring the register state, while we use mode
    #1 for SMBus.

    Signed-off-by: Paul Mundt
    Acked-by: David Brownell
    Tested-by: Riku Voipio
    Acked-by: Alessandro Zummo
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Paul Mundt
     

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
     

28 Apr, 2008

2 commits

  • __FUNCTION__ is gcc-specific, use __func__

    Signed-off-by: Harvey Harrison
    Cc: David Brownell
    Cc: Alessandro Zummo
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Harvey Harrison
     
  • rs5c_get_regs() currently uses rs5c->rtc->name for its debug printk when
    i2c_transfer() fails, though it is used several times before the rtc dev
    has been registered. The earliest we can get at the symbolic name is via
    the i2c client's struct device, which can be handled by moving the first
    rs5c_get_regs() until after the client pointer is assigned.

    Signed-off-by: Paul Mundt
    Cc: David Brownell
    Cc: Alessandro Zummo
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Paul Mundt
     

18 Jul, 2007

1 commit

  • Convert rtc-rs5c372 to be a "new style" I2C driver, and update the
    Kconfig text to be more complete..

    Verified on an OMAP H4 development platform, along with a board
    init patch to declare its rv5c387a device.

    Only one defconfig -- powerpc/linkstation -- uses this driver; but
    several other platforms use it, just without defconfig support.

    Such platforms need to be converted so (a) their I2C adapter driver
    supports new-style drivers, and (b) board init code declares this
    I2C device.

    Signed-off-by: David Brownell
    Cc: Voipio Riku
    Acked-by: Guennadi Liakhovetski
    Cc: Martin Michlmayr
    Cc: Jean Delvare
    Cc: Alessandro Zummo
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    David Brownell
     

14 Feb, 2007

1 commit


06 Jan, 2007

1 commit

  • Bugfixes:
    - Handle RTCs which are configured to use 12-hour mode.
    - Never report bogus/un-initialized times.
    - Displaying "raw trim" requires not masking it first!
    - Fix the sysfs and procfs display of crystal and trim data.

    Features:
    - Handle other RTCs in this family, notably rv5c386/rv5c387.
    - Declare the other registers.
    - Provide alarm get/set functionality.
    - Handle AIE and UIE; but no IRQ handling yet.

    Cleanup:
    - Shrink object by not including needless sysfs or procfs support
    - We don't need no steenkin' forward declarations. (Except one.)

    Until the I2C framework merges "new style" driver support, matching
    the driver model better, using rv5c chips or alarm IRQs requires a
    separate board-specific patch. (And an IRQ handler, handing off labor
    through a work_struct...)

    This uses the "method 3" register reads, but notes that it's done
    to work around an evident i2c adapter driver bug.

    Signed-off-by: David Brownell
    Acked-by: Alessandro Zummo
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    David Brownell
     

11 Dec, 2006

1 commit

  • Update more I2C drivers that live outside drivers/i2c to understand that using
    adapter->dev is not The Way. When actually referring to the adapter hardware,
    adapter->class_dev.dev is the answer. When referring to a device connected to
    it, client->dev.dev is the answer.

    Signed-off-by: David Brownell
    Acked-by: Alessandro Zummo
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    David Brownell
     

08 Dec, 2006

2 commits


26 Nov, 2006

1 commit

  • The correct order is: NULL check before dereference

    This was a guaranteed NULL dereference with debugging enabled since
    rs5c372_sysfs_show_osc() does actually pass NULL...

    Spotted by the Coverity checker.

    Signed-off-by: Adrian Bunk
    Acked-by: Alessandro Zummo
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Adrian Bunk
     

04 Oct, 2006

1 commit


01 Oct, 2006

1 commit


11 Apr, 2006

2 commits