13 Mar, 2019

1 commit

  • …ernel/git/chrome-platform/linux

    Pull chrome platform updates from Benson Leung:

    - SPDX identifier cleanup for platform/chrome

    - Cleanup series between mfd and chrome/platform, moving cros-ec
    attributes from mfd/cros_ec_dev to sub-drivers in platform/chrome

    - Wilco EC driver

    - Maintainership change to new group repository

    * tag 'tag-chrome-platform-for-v5.1' of git://git.kernel.org/pub/scm/linux/kernel/git/chrome-platform/linux:
    platform/chrome: fix wilco-ec dependencies
    platform/chrome: wilco_ec: Add RTC driver
    platform/chrome: wilco_ec: Add support for raw commands in debugfs
    platform/chrome: Add new driver for Wilco EC
    platform/chrome: cros_ec: Remove cros_ec dependency in lpc_mec
    MAINTAINERS: chrome-platform: change the git tree to a chrome-platform group git tree
    platform/chrome: cros_ec_sysfs: remove pr_fmt() define
    platform/chrome: cros_ec_lightbar: remove pr_fmt() define
    platform/chrome: cros_kbd_led_backlight: switch to SPDX identifier
    platform/chrome: cros_ec_spi: switch to SPDX identifier
    platform/chrome: cros_ec_proto: switch to SPDX identifier
    platform/chrome: cros_ec_lpc: switch to SPDX identifier
    platform/chrome: cros_ec_i2c: switch to SPDX identifier
    platform/chrome: cros_ec_vbc: switch to SPDX identifier
    platform/chrome: cros_ec_sysfs: switch to SPDX identifier
    platform/chrome: cros_ec_lightbar: switch to SPDX identifier
    platform/chrome: cros_ec_debugfs: switch to SPDX identifier
    platform/chrome: cromeos_pstore: switch to SPDX identifier

    Linus Torvalds
     

05 Mar, 2019

7 commits


04 Mar, 2019

7 commits


03 Mar, 2019

2 commits

  • Add support for Epson rx8571 real-time clock. rx8571 rtc is compatible
    with rx8581,except that rx8571 has additional 16 bytes of RAM.

    16 bytes of nvmem is supported and exposed in sysfs (# is the instance
    number,starting with 0): /sys/bus/nvmem/devices/rx8571-#/nvmem

    Signed-off-by: Biju Das
    Signed-off-by: Alexandre Belloni

    Biju Das
     
  • Some of defines are not in use since
    7b5768486a910532885f01b9d2dad4818c8b3be1. Remove it to make the code
    easier to read and understand.

    Signed-off-by: Alexey Roslyakov
    Signed-off-by: Alexandre Belloni

    Alexey Roslyakov
     

26 Feb, 2019

1 commit


22 Feb, 2019

1 commit

  • This Embedded Controller has an internal RTC that is exposed
    as a standard RTC class driver with read/write functionality.

    The driver is added to the drivers/rtc/ so that the maintainer of that
    directory will be able to comment on this change, as that maintainer is
    the expert on this system. In addition, the driver code is called
    indirectly after a corresponding device is registered from core.c,
    as opposed to core.c registering the driver callbacks directly.

    To test:
    > hwclock --show --rtc /dev/rtc1
    2007-12-31 16:01:20.460959-08:00
    > hwclock --systohc --rtc /dev/rtc1
    > hwclock --show --rtc /dev/rtc1
    2018-11-29 17:08:00.780793-08:00

    > hwclock --show --rtc /dev/rtc1
    2007-12-31 16:01:20.460959-08:00
    > hwclock --systohc --rtc /dev/rtc1
    > hwclock --show --rtc /dev/rtc1
    2018-11-29 17:08:00.780793-08:00

    Signed-off-by: Duncan Laurie
    Signed-off-by: Nick Crews
    Acked-by: Alexandre Belloni
    [Fix the sparse warning: symbol 'wilco_ec_rtc_read/write' was not declared]
    Signed-off-by: Wei Yongjun
    Signed-off-by: Enric Balletbo i Serra

    Nick Crews
     

19 Feb, 2019

1 commit


18 Feb, 2019

6 commits

  • Make RTC_DRV_HID_SENSOR_TIME depend on IIO and HID_SENSOR_HUB to remove
    possible circular dependencies as this is the only symbol selecting those.

    Suggested-by: Florian Lohoff
    Signed-off-by: Alexandre Belloni

    Alexandre Belloni
     
  • Add a driver for the MicroCrystal RV-3028. It is a SMT Real-Time Clock
    Module that incorporates an integrated CMOS circuit together with an XTAL.
    It has an i2c interface.

    The driver handles date/time, alarms, trickle charging, timestamping,
    frequency offset correction, EEPROM and NVRAM.

    Signed-off-by: Alexandre Belloni

    Alexandre Belloni
     
  • Add support for the RTC's NVRAM using the standard nvmem support that is
    part of the Linux RTC framework.

    This driver already has a sysfs attribute that provides access to the
    RTC's NVRAM as a single 16-bit value. Some chips have more than two
    bytes of NVRAM, so this will not work for them. It's also non-standard.

    This sysfs attribute is left in for backward compatibility, but will only
    be able to read the first two bytes of NVRAM. The nvmem interface will
    allow access to all NVRAM, e.g. eight bytes on the isl1218.

    Cc: Alessandro Zummo
    Cc: Alexandre Belloni
    Signed-off-by: Trent Piepho
    Signed-off-by: Alexandre Belloni

    Trent Piepho
     
  • Add more support in the driver for dealing with differences in is1208
    compatible chips. Put the 1208, 1209, 1218, and 1219 in the list and
    encode information about nvram size, tamper, and timestamp features.

    This adds support for the isl1209, which has a tamper detect but no
    timestamp feature.

    Cc: Alessandro Zummo
    Cc: Alexandre Belloni
    Signed-off-by: Trent Piepho
    Signed-off-by: Alexandre Belloni

    Trent Piepho
     
  • This driver has no state of its own, depending entirely on what is in
    the generic rtc device.

    Intoduce a state struct. For now it only contains a pointer to the rtc
    device struct, but future patches will add more data.

    Cc: Alessandro Zummo
    Cc: Alexandre Belloni
    Signed-off-by: Trent Piepho
    Signed-off-by: Alexandre Belloni

    Trent Piepho
     
  • rtc_nvmem_unregister() is called on rtc_device release so it is not
    necessary to call it from the driver.

    Reviewed-by: Martin Blumenstingl
    Signed-off-by: Alexandre Belloni

    Alexandre Belloni
     

11 Feb, 2019

2 commits

  • Add support for the RTC block on the 32-bit Amlogic Meson6, Meson8,
    Meson8b and Meson8m2 SoCs.

    The RTC is split in to two parts, which are both managed by this driver:
    - the AHB front end
    - and a simple serial connection to the actual registers

    The RTC_COUNTER register which holds the time is 32-bits wide.

    There are four 32-bit wide (in total: 16 bytes) "regmem" registers which
    are exposed using nvmem. On Amlogic's 3.10 kernel this is used to store
    data which needs to survive a suspend / resume cycle.

    Signed-off-by: Ben Dooks
    [resurrected Ben's patches after 2 years]
    Signed-off-by: Martin Blumenstingl
    Signed-off-by: Alexandre Belloni

    Martin Blumenstingl
     
  • When the oscillator of the rtc gets interrupted,
    e.g. due to an empty battery, reading from the rtc will now return an error
    and the oscillator bit will be cleared, once the rtc is successfully reset.

    Signed-off-by: Oliver Rohe
    Signed-off-by: Alexandre Belloni

    Oliver.Rohe@wago.com
     

08 Feb, 2019

10 commits

  • Fix the following build issue:

    drivers/rtc/rtc-imx-sc.o: In function `imx_sc_rtc_set_time':
    >> rtc-imx-sc.c:(.text+0x212): undefined reference to `__arm_smccc_smc'

    Fixes: 13a929f38ad7 ("rtc: imx-sc: add rtc set time support")
    Reviewed-by: Anson Huang
    Signed-off-by: Alexandre Belloni

    Alexandre Belloni
     
  • Shifting a u8 by 24 will cause the value to be promoted to an integer. If
    the top bit of the u8 is set then the following conversion to an unsigned
    long will sign extend the value causing the upper 32 bits to be set in
    the result.

    Fix this by casting the u8 value to an unsigned long before the shift.

    Detected by CoverityScan, CID#1309693 ("Unintended sign extension")

    Fixes: 9a9a54ad7aa2 ("drivers/rtc: add support for Qualcomm PMIC8xxx RTC")
    Signed-off-by: Colin Ian King
    Signed-off-by: Alexandre Belloni

    Colin Ian King
     
  • Shifting a u8 by 24 will cause the value to be promoted to an integer. If
    the top bit of the u8 is set then the following conversion to an unsigned
    long will sign extend the value causing the upper 32 bits to be set in
    the result.

    Fix this by casting the u8 value to an unsigned long before the shift.

    Detected by CoverityScan, CID#714646-714649 ("Unintended sign extension")

    Fixes: 2985c29c1964 ("rtc: Add rtc support to 88PM80X PMIC")
    Signed-off-by: Colin Ian King
    Signed-off-by: Alexandre Belloni

    Colin Ian King
     
  • Shifting a u8 by 24 will cause the value to be promoted to an integer. If
    the top bit of the u8 is set then the following conversion to an unsigned
    long will sign extend the value causing the upper 32 bits to be set in
    the result.

    Fix this by casting the u8 value to an unsigned long before the shift.

    Detected by CoverityScan, CID#144925-144928 ("Unintended sign extension")

    Fixes: 008b30408c40 ("mfd: Add rtc support to 88pm860x")
    Signed-off-by: Colin Ian King
    Signed-off-by: Alexandre Belloni

    Colin Ian King
     
  • When the EXTENSION.WADA bit is set, register 0x19 contains a bitmap of
    week days, not a day of month. As Linux only handles a single alarm
    without repetition using day of month is more flexible, so clear this
    bit. (Otherwise a value depending on time.tm_wday would have to be
    written to register 0x19.)

    Also optimize setting the AIE bit to use a single register write instead
    of a bulk write of three registers.

    Fixes: ee0981be7704 ("rtc: ds1307: Add support for Epson RX8130CE")
    Signed-off-by: Uwe Kleine-König
    Signed-off-by: Alexandre Belloni

    Uwe Kleine-König
     
  • When voltage dropped since the RTC was last set the reported time is not
    reliable. In this case return an error indicator instead of a bogus
    time.

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

    Uwe Kleine-König
     
  • While rx8130 has a register offset of 0x10 in its chip_desc, this isn't
    used when regmap accesses are done. So add 0x10 to access the right
    locations.

    Fixes: ee0981be7704 ("rtc: ds1307: Add support for Epson RX8130CE")
    Signed-off-by: Uwe Kleine-König
    Signed-off-by: Alexandre Belloni

    Uwe Kleine-König
     
  • There used to be 16 declarations for static functions. By just adding a
    declaration for the chips array and reordering the functions the 16
    function declarations can be dropped.

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

    Uwe Kleine-König
     
  • This allows to use the register offsets in all functions
    which is needed in one of the next patches.

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

    Uwe Kleine-König
     
  • This patch adds i.MX system controller RTC set time support, the
    RTC set time is implemented via SIP(silicon provider) runtime
    service call and ARM-Trusted-Firmware will communicate with system
    controller via MU(message unit) IPC to set RTC time.

    Signed-off-by: Anson Huang
    Signed-off-by: Alexandre Belloni

    Anson Huang
     

06 Feb, 2019

2 commits