Age | Commit message (Collapse) | Author | Files | Lines |
|
The rtc pointer is already checked earlier, it is not necessary to check it
again.
Signed-off-by: Alexandre Belloni <[email protected]>
Link: https://lore.kernel.org/r/[email protected]
Signed-off-by: Alexandre Belloni <[email protected]>
|
|
Use %ptR to simplify debug message.
Signed-off-by: Alexandre Belloni <[email protected]>
|
|
Use SPDX-License-Identifier instead of a verbose license text.
Signed-off-by: Alexandre Belloni <[email protected]>
|
|
Use .set_time instead of the deprecated .set_mmss.
Signed-off-by: Alexandre Belloni <[email protected]>
|
|
Use the 64bit version of rtc_time_to_tm.rtc_time_to_tm.
Signed-off-by: Alexandre Belloni <[email protected]>
|
|
ds1672_get_datetime and ds1672_set_mmss are only used after casting dev
to an i2c_client. Remove that useless indirection.
Signed-off-by: Alexandre Belloni <[email protected]>
|
|
Remove the control sysfs file as it is not documented, read only and was
only used to provide the oscillator state.
Signed-off-by: Alexandre Belloni <[email protected]>
|
|
Return -EINVAL when trying to read an invalid time instead of just probe
because this is a useful information for userspace.
Signed-off-by: Alexandre Belloni <[email protected]>
|
|
The ds1672 is a 32bit seconds counter.
Also remove erroneous comment claiming that epoch is set to 2000, it was
not.
Signed-off-by: Alexandre Belloni <[email protected]>
|
|
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#138801 ("Unintended sign extension")
Fixes: edf1aaa31fc5 ("[PATCH] RTC subsystem: DS1672 driver")
Signed-off-by: Colin Ian King <[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]>
|
|
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 <[email protected]>
|
|
The device table is required to load modules based on modaliases.
After adding MODULE_DEVICE_TABLE, below entries will be added to
modules.alias:
alias i2c:ds1672 rtc_ds1672
alias i2c:max6900 rtc_max6900
alias platform:lp3974-rtc rtc_max8998
alias platform:max8998-rtc rtc_max8998
Signed-off-by: Axel Lin <[email protected]>
Cc: Alessandro Zummo <[email protected]>
Cc: Dale Farnsworth <[email protected]>
Cc: Minkyu Kang <[email protected]>
Cc: Joonyoung Shim <[email protected]>
Signed-off-by: Alexandre Belloni <[email protected]>
|
|
RTC drivers must not return an error after device registration.
[[email protected]: coding-style fixes]
Signed-off-by: Alessandro Zummo <[email protected]>
Reported-by: Ales Novak <[email protected]>
Cc: Alexander Shiyan <[email protected]>
Cc: Atsushi Nemoto <[email protected]>
Cc: Jiri Kosina <[email protected]>
Cc: Srikanth Srinivasan <[email protected]>
Cc: Lee Jones <[email protected]>
Cc: Sascha Hauer <[email protected]>
Cc: Joonsoo Kim <[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]>
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]>
|
|
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.
Signed-off-by: Shubhrajyoti D <[email protected]>
Reviewed-by: Felipe Balbi <[email protected]>
Cc: Alessandro Zummo <[email protected]>
Signed-off-by: Andrew Morton <[email protected]>
Signed-off-by: Linus Torvalds <[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]>
|
|
The module.h was implicitly everywhere, but when we clean
that up, the implicit users will compile fail; fix them up
in advance.
Signed-off-by: Paul Gortmaker <[email protected]>
|
|
Drivers should only need to implement either set_mmss (counter based RTCs)
or set_time (most RTCs). The RTC subsystem will handle them
appropriately.
Signed-off-by: Alessandro Zummo <[email protected]>
Cc: Kumar Gala <[email protected]>
Cc: David Brownell <[email protected]>
Cc: Lennert Buytenhek <[email protected]>
Signed-off-by: Andrew Morton <[email protected]>
Signed-off-by: Linus Torvalds <[email protected]>
|
|
Add missing id_table to the drivers in subject. Patch is against the
latest git. It should go in with 2.6.28 if possible, the drivers won't
work without the id_table bits.
Signed-off-by: Alessandro Zummo <[email protected]>
Reported-by: Imre Kaloz <[email protected]>
Tested-by: Imre Kaloz <[email protected]>
Cc: David Brownell <[email protected]>
Signed-off-by: Andrew Morton <[email protected]>
Signed-off-by: Linus Torvalds <[email protected]>
|
|
New style conversion and reformatting as per indent --linux-style
Signed-off-by: Alessandro Zummo <[email protected]>
Cc: David Brownell <[email protected]>
Signed-off-by: Andrew Morton <[email protected]>
Signed-off-by: Linus Torvalds <[email protected]>
|
|
__FUNCTION__ is gcc-specific, use __func__
Signed-off-by: Harvey Harrison <[email protected]>
Cc: David Brownell <[email protected]>
Cc: Alessandro Zummo <[email protected]>
Signed-off-by: Andrew Morton <[email protected]>
Signed-off-by: Linus Torvalds <[email protected]>
|
|
Signed-off-by: Jean Delvare <[email protected]>
Acked-by: Alessandro Zummo <[email protected]>
|
|
Stop using i2c_adapter.class_dev, as it is going to be removed
soon. Luckily, there are only 4 RTC drivers affected.
Signed-off-by: Jean Delvare <[email protected]>
Cc: Alessandro Zummo <[email protected]>
|
|
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 <[email protected]>
Acked-by: Alessandro Zummo <[email protected]>
Signed-off-by: Andrew Morton <[email protected]>
Signed-off-by: Linus Torvalds <[email protected]>
|
|
Signed-off-by: Jeff Garzik <[email protected]>
Cc: Alessandro Zummo <[email protected]>
Signed-off-by: Andrew Morton <[email protected]>
Signed-off-by: Linus Torvalds <[email protected]>
|
|
Fix obvious build breakage revealed by 'make allyesconfig'
in current -git.
Signed-off-by: Jeff Garzik <[email protected]>
Signed-off-by: Linus Torvalds <[email protected]>
|
|
Update RTC framework so that drivers can constify their method tables, moving
them from ".data" to ".rodata". Then update the drivers.
Signed-off-by: David Brownell <[email protected]>
Cc: Alessandro Zummo <[email protected]>
Signed-off-by: Andrew Morton <[email protected]>
Signed-off-by: Linus Torvalds <[email protected]>
|
|
Move registration error message from drivers to core.
Signed-off-by: Alessandro Zummo <[email protected]>
Cc: Lennert Buytenhek <[email protected]>
Signed-off-by: Andrew Morton <[email protected]>
Signed-off-by: Linus Torvalds <[email protected]>
|
|
- removed a duplicate error message
- bumped driver version
- removed some debugging messages in excess
- refined the formatting
- adjusted copyright notice
Signed-off-by: Alessandro Zummo <[email protected]>
Signed-off-by: Andrew Morton <[email protected]>
Signed-off-by: Linus Torvalds <[email protected]>
|
|
* Always enable the oscillator when we set the time
* If the oscillator is disable when we probe the RTC report back a warning
to the user
* Added sysfs attribute to represent the state of the oscillator
Signed-off-by: Kumar Gala <[email protected]>
Signed-off-by: Alessandro Zummo <[email protected]>
Signed-off-by: Andrew Morton <[email protected]>
Signed-off-by: Linus Torvalds <[email protected]>
|
|
Driver for the Dallas/Maxim DS1672 chip, found on the Loft
(http://www.giantshoulderinc.com).
Signed-off-by: Alessandro Zummo <[email protected]>
Signed-off-by: Andrew Morton <[email protected]>
Signed-off-by: Linus Torvalds <[email protected]>
|