Age | Commit message (Collapse) | Author | Files | Lines |
|
We don't need both "ret" and "err" when they do the same thing. All the
functions called here return zero on success or negative error codes.
It's more clear to return a literal zero at the end instead of
"return ret;"
Signed-off-by: Dan Carpenter <[email protected]>
Signed-off-by: Alexandre Belloni <[email protected]>
|
|
The vendor string for Microcrystal is microcrystal.
Acked-by: Rob Herring <[email protected]>
Signed-off-by: Alexandre Belloni <[email protected]>
|
|
i2c_device_id are not supposed to change at runtime. All functions
working with i2c_device_id provided by <linux/i2c.h> work with
const i2c_device_id. So mark the non-const structs as const.
Signed-off-by: Arvind Yadav <[email protected]>
Signed-off-by: Alexandre Belloni <[email protected]>
|
|
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:<device>.
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 <[email protected]>
Signed-off-by: Alexandre Belloni <[email protected]>
|
|
The added support for SPI mode made it possible to configure the driver
when I2C is disabled, leaving an unused device table:
drivers/rtc/rtc-rv3029c2.c:794:29: error: 'rv3029_id' defined but not used [-Werror=unused-variable]
This moves the table inside of the #ifdef section that has the
only user, to avoid the harmless warning.
Signed-off-by: Arnd Bergmann <[email protected]>
Fixes: d08f50dd0afc ("rtc: rv3029: Add support of RV3049")
Signed-off-by: Alexandre Belloni <[email protected]>
|
|
Add the alarm IRQ functionality.
Signed-off-by: Mylène Josserand <[email protected]>
Signed-off-by: Alexandre Belloni <[email protected]>
|
|
The bin2bcd function in set_time is uncorrect on weekdays as the
bit mask should be done at the end of arithmetic operations.
Signed-off-by: Mylène Josserand <[email protected]>
Signed-off-by: Alexandre Belloni <[email protected]>
|
|
The RTC RV3029 handles different types of alarms : seconds, minutes, ...
These alarms can be enabled or disabled individually using an AE_x bit
which is the last bit (BIT(7)) on each alarm registers.
To prepare the alarm IRQ support, the current code enables all the alarm
types by setting each AE_x to 1.
It also fixes others alarms issues :
- month and weekday errors : it was performing -1 instead of +1.
- wrong use of bit mask with bin2bcd
Signed-off-by: Mylène Josserand <[email protected]>
Signed-off-by: Alexandre Belloni <[email protected]>
|
|
Remove some checks from checkpatch such as spaces around arithmetic
operations or prefer "unsigned int".
Signed-off-by: Mylène Josserand <[email protected]>
Signed-off-by: Alexandre Belloni <[email protected]>
|
|
Add support of Microcrystal RV3049 RTC (SPI) using regmap on the
RV3029 (I2C) driver.
Signed-off-by: Mylène Josserand <[email protected]>
Signed-off-by: Alexandre Belloni <[email protected]>
|
|
To add support of rv3049, the current driver is converted to use regmap.
Signed-off-by: Mylène Josserand <[email protected]>
Signed-off-by: Alexandre Belloni <[email protected]>
|
|
To prepare the use of regmap to add the support of RV-3049, all the
'i2c' in functions's names are removed.
Signed-off-by: Mylène Josserand <[email protected]>
Signed-off-by: Alexandre Belloni <[email protected]>
|
|
This adds support to
- enable/disable the thermometer
- set the temperature scanning interval
- read the current temperature that is used for temp compensation.
via hwmon interface
Signed-off-by: Michael Buesch <[email protected]>
Signed-off-by: Alexandre Belloni <[email protected]>
|
|
This simplifies the update of single bits in the eeprom.
Signed-off-by: Michael Buesch <[email protected]>
Signed-off-by: Alexandre Belloni <[email protected]>
|
|
The trickle charger resistor can be enabled via device tree
property trickle-resistor-ohms.
Signed-off-by: Michael Buesch <[email protected]>
Signed-off-by: Alexandre Belloni <[email protected]>
|
|
This adds functions for access to the EEPROM memory on the rv3029.
Signed-off-by: Michael Buesch <[email protected]>
Signed-off-by: Alexandre Belloni <[email protected]>
|
|
This simplifies mask/set operations on device I2C registers.
Signed-off-by: Michael Buesch <[email protected]>
Signed-off-by: Alexandre Belloni <[email protected]>
|
|
This adds all (according to the data sheet) missing register and bit
definitions.
It also fixes the definition of the trickle charger bit masks.
Signed-off-by: Michael Buesch <[email protected]>
Signed-off-by: Alexandre Belloni <[email protected]>
|
|
The C2 suffix does not appear in the latest datasheet, so add
a device ID without it.
Signed-off-by: Michael Buesch <[email protected]>
Signed-off-by: Alexandre Belloni <[email protected]>
|
|
The C2 suffix does not appear anymore in the latest device and
data sheet versions.
Signed-off-by: Michael Buesch <[email protected]>
Signed-off-by: Alexandre Belloni <[email protected]>
|
|
RTC drivers must not return an error after device registration.
Signed-off-by: Gregory Hermant <[email protected]>
Acked-by: Alessandro Zummo <[email protected]>
Signed-off-by: Andrew Morton <[email protected]>
Signed-off-by: Linus Torvalds <[email protected]>
|
|
After the switch to devm_* functions and the removal of
rtc_device_unregister(), the 'remove' function does not do anything.
Delete it.
Signed-off-by: Sachin Kamat <[email protected]>
Cc: Gregory Hermant <[email protected]>
Signed-off-by: Andrew Morton <[email protected]>
Signed-off-by: Linus Torvalds <[email protected]>
|
|
In the disable AIE irq code path, current code passes "1" to enable
parameter of rv3029c2_rtc_i2c_alarm_set_irq(). Thus it does not disable
AIE irq.
Signed-off-by: Axel Lin <[email protected]>
Acked-by: Heiko Schocher <[email protected]>
Cc: <[email protected]>
Signed-off-by: Andrew Morton <[email protected]>
Signed-off-by: Linus Torvalds <[email protected]>
|
|
devm_rtc_device_register() is device managed and makes cleanup paths
simpler.
Signed-off-by: Jingoo Han <[email protected]>
Signed-off-by: Andrew Morton <[email protected]>
Signed-off-by: Linus Torvalds <[email protected]>
|
|
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 <[email protected]>
Cc: Alessandro Zummo <[email protected]>
Cc: Srinidhi Kasagar <[email protected]>
Cc: Linus Walleij <[email protected]>
Cc: Mike Frysinger <[email protected]>
Cc: Wan ZongShun <[email protected]>
Cc: Guan Xuetao <[email protected]>
Cc: Mark Brown <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
|
|
Factor out some boilerplate code for i2c driver registration into
module_i2c_driver.
Signed-off-by: Axel Lin <[email protected]>
Cc: Piotr Ziecik <[email protected]>
Cc: Alessandro Zummo <[email protected]>
Cc: Scott Wood <[email protected]>
Cc: Srikanth Srinivasan <[email protected]>
Cc: Mike Rapoport <[email protected]>
Cc: Sergey Lapin <[email protected]>
Cc: Roman Fietze <[email protected]>
Cc: Herbert Valerio Riedel <[email protected]>
Cc: Alexander Bigga <[email protected]>
Cc: Dale Farnsworth <[email protected]>
Cc: Gregory Hermant <[email protected]>
Cc: Wolfgang Grandegger <[email protected]>
Cc: Martyn Welch <[email protected]>
Cc: Byron Bradley <[email protected]>
Signed-off-by: Andrew Morton <[email protected]>
Signed-off-by: Linus Torvalds <[email protected]>
|
|
Add support for the Micro Crystal RV3029-C2 RTC chips.
Signed-off-by: Heiko Schocher <[email protected]>
Signed-off-by: Gregory Hermant <[email protected]>
Cc: Wan ZongShun <[email protected]>
Cc: Alessandro Zummo <[email protected]>
Acked-by: Wolfram Sang <[email protected]>
Signed-off-by: Andrew Morton <[email protected]>
Signed-off-by: Linus Torvalds <[email protected]>
|