21 Aug, 2019

9 commits


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
     

19 Jun, 2019

6 commits

  • 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
     
  • Using result = (value + divisor/2) / divisor is rounding values up and only
    works well for positive values. Instead use DIV_ROUND_CLOSEST which does
    the correct thing.

    Signed-off-by: Alexandre Belloni

    Alexandre Belloni
     
  • Allows alarm to be controlled using, e.g., the RTC_WKALM_SET ioctl.

    Signed-off-by: Dylan Howey
    Signed-off-by: Alexandre Belloni

    Dylan Howey
     
  • Use %ptR to print date in human readable format.

    Signed-off-by: Dylan Howey
    Signed-off-by: Alexandre Belloni

    Dylan Howey
     
  • Also remove pcf2123_delay_trec. This claimed to add a 30ns delay to SPI
    writes, but I could not see any reference to this requirement in the
    datasheet. Closest thing I could find to a requirement are timings for the
    SPI chip enable line, which cannot be controlled by this driver (the ndelay
    came after the call to spi_write_then_read, which means it would sleep
    after CE has already gone inactive). Things seem to work fine without it.

    Signed-off-by: Dylan Howey
    Signed-off-by: Alexandre Belloni

    Dylan Howey
     
  • Use regmap debugfs register view instead.

    Signed-off-by: Dylan Howey
    Signed-off-by: Alexandre Belloni

    Dylan Howey
     

19 Dec, 2018

1 commit


02 Mar, 2018

1 commit


01 Sep, 2016

1 commit


04 Jun, 2016

1 commit


20 May, 2016

1 commit

  • Many drivers are defining a DRV_VERSION. This is often only used for
    MODULE_VERSION and sometimes to print an info message at probe time. This
    is kind of pointless as they are all versionned with the kernel anyway.
    Also the core will print a message when a new rtc is found.

    Signed-off-by: Alexandre Belloni

    Alexandre Belloni
     

15 Mar, 2016

6 commits

  • pcf2123 has an offset register, which can be used to make minor
    adjustments to the clock rate to compensate for temperature or
    a crystal that is not exactly right.

    Signed-off-by: Joshua Clayton
    Signed-off-by: Alexandre Belloni

    Joshua Clayton
     
  • pcf2123 data sheet recommends a software reset when the chip
    is first powered on. This change avoids resetting the chip
    every time the driver is loaded, which has some negative effects.

    There are several registers including a clock rate adjustment that really
    should survive a reload of the driver (or reboot).

    In addition, stopping and restarting the clock to verify the chip is
    there is not a good thing once the time is set.

    According to the data sheet, the seconds register has a 1 in
    the high bit when the voltage has gotten low. We check for this
    condition, as well as whether the time retrieved from the chip is
    valid. We reset the rtc only if the time is not reliable and valid.
    This is sufficient for checking for the presence of the chip,
    as either all zeros or all 0xff will result in an invalid time/date

    Signed-off-by: Joshua Clayton
    Signed-off-by: Alexandre Belloni

    Joshua Clayton
     
  • Refactor chip reset items into its own function, isolating it from
    the rest of the device probe.
    Subsequent commits will avoid calling this code.

    Signed-off-by: Joshua Clayton
    Signed-off-by: Alexandre Belloni

    Joshua Clayton
     
  • Add new functions pcf2123_write(), and pcf2123_write_reg().
    Use named defines for the values being written.

    This improves modularity and readability, and reduces lines of code.

    Signed-off-by: Joshua Clayton
    Signed-off-by: Alexandre Belloni

    Joshua Clayton
     
  • Put read operations into a function.
    This improves modularity and readability.

    Signed-off-by: Joshua Clayton
    Signed-off-by: Alexandre Belloni

    Joshua Clayton
     
  • Add defines for all 16 registers in the pcf2123.
    Add defines for useful bits from several registers
    I've tried to document all the registers, and
    as best as possible, all the special bits they employ

    Use BIT() wherever possible in the bit definitions

    Signed-off-by: Joshua Clayton
    Signed-off-by: Alexandre Belloni

    Joshua Clayton
     

28 Oct, 2015

1 commit


05 Sep, 2015

1 commit


14 Feb, 2015

1 commit


13 Nov, 2013

1 commit

  • Use the wrapper function for retrieving the platform data instead of
    accessing dev->platform_data directly. This is a cosmetic change to make
    the code simpler and enhance the readability.

    Signed-off-by: Jingoo Han
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Jingoo Han
     

04 Jul, 2013

2 commits


30 Apr, 2013

2 commits


04 Jan, 2013

1 commit

  • CONFIG_HOTPLUG is going away as an option. As a result, the __dev*
    markings need to be removed.

    This change removes the use of __devinit, __devexit_p, __devinitdata,
    __devinitconst, and __devexit from these drivers.

    Based on patches originally written by Bill Pemberton, but redone by me
    in order to handle some of the coding style issues better, by hand.

    Cc: Bill Pemberton
    Cc: Alessandro Zummo
    Cc: Srinidhi Kasagar
    Cc: Linus Walleij
    Cc: Mike Frysinger
    Cc: Wan ZongShun
    Cc: Guan Xuetao
    Cc: Mark Brown
    Signed-off-by: Greg Kroah-Hartman

    Greg Kroah-Hartman
     

22 Aug, 2012

1 commit

  • Dynamically allocated sysfs attributes must be initialized using
    sysfs_attr_init(), otherwise lockdep complains: BUG: key

    not in
    .data!

    Found by Linux Driver Verification project (linuxtesting.org).

    Signed-off-by: Ilya Shchepetkov
    Cc: Chris Verges
    Cc: Christian Pellegrin
    Cc: Alessandro Zummo
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Ilya Shchepetkov
     

24 Mar, 2012

1 commit

  • Factor out some boilerplate code for spi driver registration into
    module_spi_driver.

    Signed-off-by: Axel Lin
    Cc: Mark Jackson
    Cc: Dennis Aberilla
    Cc: Nikolaus Voss
    Cc: "Kim B. Heino"
    Cc: Raphael Assenat
    Cc: Chris Verges
    Cc: Magnus Damm
    Cc: Atsushi Nemoto
    Cc: Alessandro Zummo
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Axel Lin
     

11 Jan, 2012

1 commit

  • In ancient times it was necessary to manually initialize the bus field of
    an spi_driver to spi_bus_type. These days this is done in
    spi_driver_register(), so we can drop the manual assignment.

    The patch was generated using the following coccinelle semantic patch:
    //
    @@
    identifier _driver;
    @@
    struct spi_driver _driver = {
    .driver = {
    - .bus = &spi_bus_type,
    },
    };
    //

    Signed-off-by: Lars-Peter Clausen
    Cc: John Stultz
    Cc: Alessandro Zummo
    Cc: Grant Likely
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Lars-Peter Clausen
     

01 Nov, 2011

1 commit