17 Apr, 2015
1 commit
-
This commit does not change any logic here. It just makes the code easier
to read.This is how it looked like:
If err != 0 return err;
else return 0;Signed-off-by: Robert Kmiec
Signed-off-by: Andrew Morton
Signed-off-by: Linus Torvalds
11 Dec, 2014
6 commits
-
In case the card is woken up of the rtc alarm, the
devm_rtc_device_register function detects it as a pending alarm about a
month in the future. Fix this by clearing the alarm in module probe.Signed-off-by: Jan Kardell
Cc: Alessandro Zummo
Cc: Grant Likely
Cc: Rob Herring
Cc: Vincent Donnefort
Cc: Dan Carpenter
Signed-off-by: Andrew Morton
Signed-off-by: Linus Torvalds -
According to Haoyu hym8563 datasheet this saves som power. Might be
importat to battery life. And maybe it works for the NXP part as well.Signed-off-by: Jan Kardell
Cc: Alessandro Zummo
Cc: Grant Likely
Cc: Rob Herring
Cc: Vincent Donnefort
Cc: Dan Carpenter
Signed-off-by: Andrew Morton
Signed-off-by: Linus Torvalds -
To guarantee that a set alarm occurs in the future, the set alarm time
is rounded up to the nearest minute. Also we cannot handle UIE as it
requires second precision.Signed-off-by: Jan Kardell
Cc: Alessandro Zummo
Cc: Grant Likely
Cc: Rob Herring
Cc: Vincent Donnefort
Cc: Dan Carpenter
Signed-off-by: Andrew Morton
Signed-off-by: Linus Torvalds -
Incorrect mask was used for hour and monthday fields.
Signed-off-by: Jan Kardell
Cc: Alessandro Zummo
Cc: Grant Likely
Cc: Rob Herring
Cc: Vincent Donnefort
Cc: Dan Carpenter
Signed-off-by: Andrew Morton
Signed-off-by: Linus Torvalds -
The NXP datasheet says:
"Bits labeled as N should always be written with logic 0."At least one of those bits is sometime read as a 1, therfore violating
this rule. To fix this we mask away those bits.Signed-off-by: Jan Kardell
Cc: Alessandro Zummo
Cc: Grant Likely
Cc: Rob Herring
Cc: Vincent Donnefort
Cc: Dan Carpenter
Signed-off-by: Andrew Morton
Signed-off-by: Linus Torvalds -
Remove some code that was left from before block read/write was used.
Signed-off-by: Jan Kardell
Cc: Alessandro Zummo
Cc: Grant Likely
Cc: Rob Herring
Cc: Vincent Donnefort
Cc: Dan Carpenter
Signed-off-by: Andrew Morton
Signed-off-by: Linus Torvalds
14 Oct, 2014
2 commits
-
As pointed out by Sergei Shtylyov, the pcf8563_irq function contains a
bug in the error handling: an interrupt handler is not supposed to
return an errno value but an 'enum irqreturn'.Let's fix this by returning IRQ_NONE in case of a communication error.
Signed-off-by: Arnd Bergmann
Cc: Sergei Shtylyov
Cc: Alessandro Zummo
Signed-off-by: Andrew Morton
Signed-off-by: Linus Torvalds -
gcc-4.9 found a potential condition under which the 'pending' variable
may be used uninitialized:drivers/rtc/rtc-pcf8563.c: In function 'pcf8563_irq':
drivers/rtc/rtc-pcf8563.c:173:5: warning: 'pending' may be used uninitialized in this function [-Wmaybe-uninitialized]This is because in the pcf8563_get_alarm_mode() function, we check any
nonzero return of pcf8563_read_block_data, but in the irq function we
only check for negative values, so a possible positive value does not
get detected if the compiler chooses not to inline the entire call
chain.Checking for any non-zero value in the interrupt handler as well is just
as correct and lets the compiler know what we are doing, without needing
a bogus initialization.Signed-off-by: Arnd Bergmann
Cc: Sergei Shtylyov
Cc: Alessandro Zummo
Signed-off-by: Andrew Morton
Signed-off-by: Linus Torvalds
09 Aug, 2014
2 commits
-
This patch adds alarm support for the NXP PCF8563 chip.
Signed-off-by: Vincent Donnefort
Cc: Simon Guinot
Cc: Jason Cooper
Cc: Andrew Lunn
Cc: Alessandro Zummo
Cc: Dan Carpenter
Signed-off-by: Andrew Morton
Signed-off-by: Linus Torvalds -
This functions allow to factorize I2C I/O operations.
Signed-off-by: Vincent Donnefort
Cc: Simon Guinot
Cc: Jason Cooper
Cc: Andrew Lunn
Cc: Alessandro Zummo
Signed-off-by: Andrew Morton
Signed-off-by: Linus Torvalds
16 Jul, 2013
1 commit
-
PTR_RET is now deprecated. Use PTR_ERR_OR_ZERO instead.
Signed-off-by: Sachin Kamat
Signed-off-by: Rusty Russell
04 Jul, 2013
2 commits
-
Use of PTR_RET() simplifies the code.
Signed-off-by: Sachin Kamat
Signed-off-by: Andrew Morton
Signed-off-by: Linus Torvalds -
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
Signed-off-by: Andrew Morton
Signed-off-by: Linus Torvalds
30 Apr, 2013
1 commit
-
Use devm_*() functions to make cleanup paths simpler.
Signed-off-by: Jingoo Han
Signed-off-by: Andrew Morton
Signed-off-by: Linus Torvalds
22 Feb, 2013
1 commit
-
Found by Coccinelle: http://coccinelle.lip6.fr/
Signed-off-by: Peter Senna Tschudin
Signed-off-by: Andrew Morton
Signed-off-by: Linus Torvalds
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
06 Oct, 2012
1 commit
-
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
Reviewed-by: Felipe Balbi
Cc: Alessandro Zummo
Signed-off-by: Andrew Morton
Signed-off-by: Linus Torvalds
31 Jul, 2012
2 commits
-
Set the of_match_table for this driver so that devices can be described
in the device tree.Signed-off-by: Nick Bowler
Cc: Alessandro Zummo
Signed-off-by: Andrew Morton
Signed-off-by: Linus Torvalds -
The owner member is supposed to be set to the module implementing the
device driver, i.e., THIS_MODULE. This enables the appropriate module
link in sysfs.Signed-off-by: Nick Bowler
Cc: Alessandro Zummo
Signed-off-by: Andrew Morton
Signed-off-by: Linus Torvalds
30 May, 2012
1 commit
-
Changes are based on arch/cris/arch-v10/drivers/pcf8563.c
[akpm@linux-foundation.org: fix sparse warning]
Signed-off-by: Alexander Stein
Cc: Alessandro Zummo
Cc: Mikael Starvik
Acked-by: Jesper Nilsson
Cc: Wu Fengguang
Signed-off-by: Andrew Morton
Signed-off-by: Linus Torvalds
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
01 Nov, 2011
1 commit
-
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
11 Aug, 2010
1 commit
-
Signed-off-by: Graham Gower
Acked-by: Wan ZongShun
Cc: Alessandro Zummo
Signed-off-by: Andrew Morton
Signed-off-by: Linus Torvalds
30 Mar, 2010
1 commit
-
…it slab.h inclusion from percpu.h
percpu.h is included by sched.h and module.h and thus ends up being
included when building most .c files. percpu.h includes slab.h which
in turn includes gfp.h making everything defined by the two files
universally available and complicating inclusion dependencies.percpu.h -> slab.h dependency is about to be removed. Prepare for
this change by updating users of gfp and slab facilities include those
headers directly instead of assuming availability. As this conversion
needs to touch large number of source files, the following script is
used as the basis of conversion.http://userweb.kernel.org/~tj/misc/slabh-sweep.py
The script does the followings.
* Scan files for gfp and slab usages and update includes such that
only the necessary includes are there. ie. if only gfp is used,
gfp.h, if slab is used, slab.h.* When the script inserts a new include, it looks at the include
blocks and try to put the new include such that its order conforms
to its surrounding. It's put in the include block which contains
core kernel includes, in the same order that the rest are ordered -
alphabetical, Christmas tree, rev-Xmas-tree or at the end if there
doesn't seem to be any matching order.* If the script can't find a place to put a new include (mostly
because the file doesn't have fitting include block), it prints out
an error message indicating which .h file needs to be added to the
file.The conversion was done in the following steps.
1. The initial automatic conversion of all .c files updated slightly
over 4000 files, deleting around 700 includes and adding ~480 gfp.h
and ~3000 slab.h inclusions. The script emitted errors for ~400
files.2. Each error was manually checked. Some didn't need the inclusion,
some needed manual addition while adding it to implementation .h or
embedding .c file was more appropriate for others. This step added
inclusions to around 150 files.3. The script was run again and the output was compared to the edits
from #2 to make sure no file was left behind.4. Several build tests were done and a couple of problems were fixed.
e.g. lib/decompress_*.c used malloc/free() wrappers around slab
APIs requiring slab.h to be added manually.5. The script was run on all .h files but without automatically
editing them as sprinkling gfp.h and slab.h inclusions around .h
files could easily lead to inclusion dependency hell. Most gfp.h
inclusion directives were ignored as stuff from gfp.h was usually
wildly available and often used in preprocessor macros. Each
slab.h inclusion directive was examined and added manually as
necessary.6. percpu.h was updated not to include slab.h.
7. Build test were done on the following configurations and failures
were fixed. CONFIG_GCOV_KERNEL was turned off for all tests (as my
distributed build env didn't work with gcov compiles) and a few
more options had to be turned off depending on archs to make things
build (like ipr on powerpc/64 which failed due to missing writeq).* x86 and x86_64 UP and SMP allmodconfig and a custom test config.
* powerpc and powerpc64 SMP allmodconfig
* sparc and sparc64 SMP allmodconfig
* ia64 SMP allmodconfig
* s390 SMP allmodconfig
* alpha SMP allmodconfig
* um on x86_64 SMP allmodconfig8. percpu.h modifications were reverted so that it could be applied as
a separate patch and serve as bisection point.Given the fact that I had only a couple of failures from tests on step
6, I'm fairly confident about the coverage of this conversion patch.
If there is a breakage, it's likely to be something in one of the arch
headers which should be easily discoverable easily on most builds of
the specific arch.Signed-off-by: Tejun Heo <tj@kernel.org>
Guess-its-ok-by: Christoph Lameter <cl@linux-foundation.org>
Cc: Ingo Molnar <mingo@redhat.com>
Cc: Lee Schermerhorn <Lee.Schermerhorn@hp.com>
16 Dec, 2009
1 commit
-
Herton Ronaldo Krzesinski recently raised up, and fixed, an issue with the
rtc_cmos driver, which was referring to an inconsistent driver data.This patch ensures that driver data registration happens before
rtc_device_register().Signed-off-by: Alessandro Zummo
Acked-by: Thomas Hommel
Acked-by: Hans-Christian Egtvedt
Acked-by: Paul Mundt
Cc: David S. Miller
Cc: Thomas Bogendoerfer
Cc: Andrew Sharp
Cc: Atsushi Nemoto
Cc: Alexander Bigga
Cc: Thomas Bogendoerfer
Cc: Mark Zhan
Signed-off-by: Andrew Morton
Signed-off-by: Linus Torvalds
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
17 Oct, 2008
1 commit
-
Validating clients with black magic register checks doesn't make much
sense for new-style i2c driver and has been known to fail on valid NXP
pcf8563 chips. This patch removes the client validation code.Signed-off-by: Laurent Pinchart
Signed-off-by: Alessandro Zummo
Cc: David Brownell
Signed-off-by: Andrew Morton
Signed-off-by: Linus Torvalds
13 Jul, 2008
1 commit
-
Add the rtc8564 chip entry
Signed-off-by: Jon Smirl
Signed-off-by: Alessandro Zummo
Cc: David Brownell
Signed-off-by: Andrew Morton
Signed-off-by: Linus Torvalds
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 -
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
28 Apr, 2008
2 commits
-
__FUNCTION__ is gcc-specific, use __func__
Signed-off-by: Harvey Harrison
Cc: David Brownell
Cc: Alessandro Zummo
Signed-off-by: Andrew Morton
Signed-off-by: Linus Torvalds -
[akpm@linux-foundation.org: coding-style fixes]
Signed-off-by: Alessandro Zummo
Cc: David Brownell
Signed-off-by: Andrew Morton
Signed-off-by: Linus Torvalds
28 Jan, 2008
1 commit
-
Signed-off-by: Jean Delvare
Acked-by: Alessandro Zummo
14 Feb, 2007
1 commit
-
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
Cc: Alessandro Zummo
10 Feb, 2007
1 commit
-
The usage of the century bit was inverted on 2.6.19 following to PCF8563's
description, but it was not match to usage suggested by RTC8564's
datasheet. Anyway what MO_C=1 means can vary on each platform. This patch
is to detect its polarity in get_datetime routine. The default value of
c_polarity is 0 (MO_C=1 means 19xx) so that this patch does not change
current behavior even if get_datetime was not called before set_datetime.Signed-off-by: Atsushi Nemoto
Cc: Jean-Baptiste Maneyrol
Cc:
Cc: David Brownell
Cc: Alessandro Zummo
Signed-off-by: Andrew Morton
Signed-off-by: Linus Torvalds
11 Dec, 2006
1 commit
-
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
Acked-by: Alessandro Zummo
Signed-off-by: Andrew Morton
Signed-off-by: Linus Torvalds
01 Oct, 2006
2 commits
-
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
Cc: Alessandro Zummo
Signed-off-by: Andrew Morton
Signed-off-by: Linus Torvalds -
The century bit PCF8563_MO_C in the month register is misinterpreted. It
is set to 1 for the 20th century and 0 for 21th, and the driver is
expecting the opposite behavior.Acked-by: Alessandro Zummo
Cc:
Signed-off-by: Andrew Morton
Signed-off-by: Linus Torvalds
11 Apr, 2006
1 commit
-
Move registration error message from drivers to core.
Signed-off-by: Alessandro Zummo
Cc: Lennert Buytenhek
Signed-off-by: Andrew Morton
Signed-off-by: Linus Torvalds