20 Oct, 2019

2 commits


01 Sep, 2019

1 commit

  • I was about to simplify the call to i2c_unregister_device() when I
    realized that converting to devm_i2c_new_dummy_device() will simplify
    the driver a lot. So I took this approach.

    Signed-off-by: Wolfram Sang
    Link: https://lore.kernel.org/r/20190830133124.21633-3-wsa+renesas@sang-engineering.com
    Signed-off-by: Alexandre Belloni

    Wolfram Sang
     

24 Jul, 2019

1 commit


18 Jul, 2019

1 commit

  • Pull RTC updates from Alexandre Belloni:
    "A quiet cycle this time.

    - ds1307: properly handle oscillator failure flags

    - imx-sc: alarm support

    - pcf2123: alarm support, correct offset handling

    - sun6i: add R40 support

    - simplify getting the adapter of an i2c client"

    * tag 'rtc-5.3' of git://git.kernel.org/pub/scm/linux/kernel/git/abelloni/linux: (37 commits)
    rtc: wm831x: Add IRQF_ONESHOT flag
    rtc: stm32: remove one condition check in stm32_rtc_set_alarm()
    rtc: pcf2123: Fix build error
    rtc: interface: Change type of 'count' from int to u64
    rtc: pcf8563: Clear event flags and disable interrupts before requesting irq
    rtc: pcf8563: Fix interrupt trigger method
    rtc: pcf2123: fix negative offset rounding
    rtc: pcf2123: add alarm support
    rtc: pcf2123: use %ptR
    rtc: pcf2123: port to regmap
    rtc: pcf2123: remove sysfs register view
    rtc: rx8025: simplify getting the adapter of a client
    rtc: rx8010: simplify getting the adapter of a client
    rtc: rv8803: simplify getting the adapter of a client
    rtc: m41t80: simplify getting the adapter of a client
    rtc: fm3130: simplify getting the adapter of a client
    rtc: tegra: Drop MODULE_ALIAS
    rtc: sun6i: Add R40 compatible
    dt-bindings: rtc: sun6i: Add the R40 RTC compatible
    dt-bindings: rtc: Convert Allwinner A31 RTC to a schema
    ...

    Linus Torvalds
     

31 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

    extracted by the scancode license scanner the SPDX license identifier

    GPL-2.0-or-later

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

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

    Thomas Gleixner
     

23 May, 2019

4 commits


23 Oct, 2018

1 commit

  • Clang warns:

    drivers/rtc/rtc-s35390a.c:124:27: warning: implicit conversion from
    'int' to 'char' changes value from 192 to -64 [-Wconstant-conversion]
    buf = S35390A_FLAG_RESET | S35390A_FLAG_24H;
    ~ ~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~
    1 warning generated.

    Update buf to be an unsigned 8-bit integer, which matches the buf member
    in struct i2c_msg.

    https://github.com/ClangBuiltLinux/linux/issues/145
    Signed-off-by: Nathan Chancellor
    Signed-off-by: Alexandre Belloni

    Nathan Chancellor
     

17 Mar, 2018

3 commits


31 Jul, 2017

2 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
     

12 Jul, 2016

4 commits

  • Be more explicit in some comments.

    Signed-off-by: Uwe Kleine-König
    Signed-off-by: Alexandre Belloni

    Uwe Kleine-König
     
  • On some QNAP NAS devices the rtc can wake the machine. Several people
    noticed that once the machine was woken this way it fails to shut down.
    That's because the driver fails to acknowledge the interrupt and so it
    keeps active and restarts the machine immediatly after shutdown. See
    https://bugs.debian.org/794266 for a bug report.

    Doing this correctly requires to interpret the INT2 flag of the first read
    of the STATUS1 register because this bit is cleared by read.

    Note this is not maximally robust though because a pending irq isn't
    detected when the STATUS1 register was already read (and so INT2 is not
    set) but the irq was not disabled. But that is a hardware imposed problem
    that cannot easily be fixed by software.

    Signed-off-by: Uwe Kleine-König
    Signed-off-by: Alexandre Belloni

    Uwe Kleine-König
     
  • There were two deviations from the reference manual: you have to wait
    half a second when POC is active and you might have to repeat
    initialization when POC or BLD are still set after the sequence.

    Note however that as POC and BLD are cleared by read the driver might
    not be able to detect that a reset is necessary. I don't have a good
    idea how to fix this.

    Additionally report the value read from STATUS1 to the caller. This
    prepares the next patch.

    Signed-off-by: Uwe Kleine-König
    Signed-off-by: Alexandre Belloni

    Uwe Kleine-König
     
  • There are several issues fixed in this patch:

    - When alarm isn't enabled, set .enabled to zero instead of returning
    -EINVAL.
    - Ignore how IRQ1 is configured when determining if IRQ2 is on.
    - The three alarm registers have an enable flag which must be
    evaluated.
    - The chip always triggers when the seconds register gets 0.

    Note that the rtc framework however doesn't handle the result correctly
    because it doesn't check wday being initialized and so interprets an
    alarm being set for 10:00 AM in three days as 10:00 AM tomorrow (or
    today if that's not over yet).

    Signed-off-by: Uwe Kleine-König
    Signed-off-by: Alexandre Belloni

    Uwe Kleine-König
     

30 Apr, 2013

1 commit


06 Oct, 2012

2 commits


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
     

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
     

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
     

12 May, 2008

1 commit

  • As the old driver_name/type matching scheme is going away soon, change
    the dummy device mechanism to use the new matching scheme.

    This has the downside that dummy i2c clients can no longer choose
    their name, they'll all appear as "dummy" in sysfs and in log
    messages. I don't think it is a problem in practice though, as there
    is little reason to use these i2c clients to log messages.

    Signed-off-by: Jean Delvare

    Jean Delvare
     

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
     

05 Mar, 2008

1 commit

  • This adds basic get/set time support for the Seiko Instruments S-35390A.
    This chip communicates using I2C and is used on the QNAP TS-109/TS-209 NAS
    devices.

    [akpm@linux-foundation.org: coding-style fixes]
    Signed-off-by: Byron Bradley
    Acked-by: Jean Delvare
    Acked-by: David Brownell
    Tested-by: Tim Ellis
    Cc: Alessandro Zummo
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Byron Bradley