<feed xmlns='http://www.w3.org/2005/Atom'>
<title>linux-toradex.git/drivers/rtc/rtc-x1205.c, branch v3.4.97</title>
<subtitle>Linux kernel for Apalis and Colibri modules</subtitle>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/'/>
<entry>
<title>rtc: convert rtc i2c drivers to module_i2c_driver</title>
<updated>2012-03-23T23:58:39+00:00</updated>
<author>
<name>Axel Lin</name>
<email>axel.lin@gmail.com</email>
</author>
<published>2012-03-23T22:02:31+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=0abc920116303e81702a38429a1b61a896e02b37'/>
<id>0abc920116303e81702a38429a1b61a896e02b37</id>
<content type='text'>
Factor out some boilerplate code for i2c driver registration into
module_i2c_driver.

Signed-off-by: Axel Lin &lt;axel.lin@gmail.com&gt;
Cc: Piotr Ziecik &lt;kosmo@semihalf.com&gt;
Cc: Alessandro Zummo &lt;a.zummo@towertech.it&gt;
Cc: Scott Wood &lt;scottwood@freescale.com&gt;
Cc: Srikanth Srinivasan &lt;srikanth.srinivasan@freescale.com&gt;
Cc: Mike Rapoport &lt;mike@compulab.co.il&gt;
Cc: Sergey Lapin &lt;slapin@ossfans.org&gt;
Cc: Roman Fietze &lt;roman.fietze@telemotive.de&gt;
Cc: Herbert Valerio Riedel &lt;hvr@gnu.org&gt;
Cc: Alexander Bigga &lt;ab@mycable.de&gt;
Cc: Dale Farnsworth &lt;dale@farnsworth.org&gt;
Cc: Gregory Hermant &lt;gregory.hermant@calao-systems.com&gt;
Cc: Wolfgang Grandegger &lt;wg@grandegger.com&gt;
Cc: Martyn Welch &lt;martyn.welch@ge.com&gt;
Cc: Byron Bradley &lt;byron.bbradley@gmail.com&gt;
Signed-off-by: Andrew Morton &lt;akpm@linux-foundation.org&gt;
Signed-off-by: Linus Torvalds &lt;torvalds@linux-foundation.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Factor out some boilerplate code for i2c driver registration into
module_i2c_driver.

Signed-off-by: Axel Lin &lt;axel.lin@gmail.com&gt;
Cc: Piotr Ziecik &lt;kosmo@semihalf.com&gt;
Cc: Alessandro Zummo &lt;a.zummo@towertech.it&gt;
Cc: Scott Wood &lt;scottwood@freescale.com&gt;
Cc: Srikanth Srinivasan &lt;srikanth.srinivasan@freescale.com&gt;
Cc: Mike Rapoport &lt;mike@compulab.co.il&gt;
Cc: Sergey Lapin &lt;slapin@ossfans.org&gt;
Cc: Roman Fietze &lt;roman.fietze@telemotive.de&gt;
Cc: Herbert Valerio Riedel &lt;hvr@gnu.org&gt;
Cc: Alexander Bigga &lt;ab@mycable.de&gt;
Cc: Dale Farnsworth &lt;dale@farnsworth.org&gt;
Cc: Gregory Hermant &lt;gregory.hermant@calao-systems.com&gt;
Cc: Wolfgang Grandegger &lt;wg@grandegger.com&gt;
Cc: Martyn Welch &lt;martyn.welch@ge.com&gt;
Cc: Byron Bradley &lt;byron.bbradley@gmail.com&gt;
Signed-off-by: Andrew Morton &lt;akpm@linux-foundation.org&gt;
Signed-off-by: Linus Torvalds &lt;torvalds@linux-foundation.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>rtc: Add module.h to implicit users in drivers/rtc</title>
<updated>2011-10-31T23:31:28+00:00</updated>
<author>
<name>Paul Gortmaker</name>
<email>paul.gortmaker@windriver.com</email>
</author>
<published>2011-05-27T13:57:25+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=2113852b239ed4a93d04135372162252f9342bb6'/>
<id>2113852b239ed4a93d04135372162252f9342bb6</id>
<content type='text'>
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 &lt;paul.gortmaker@windriver.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
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 &lt;paul.gortmaker@windriver.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>Fix common misspellings</title>
<updated>2011-03-31T14:26:23+00:00</updated>
<author>
<name>Lucas De Marchi</name>
<email>lucas.demarchi@profusion.mobi</email>
</author>
<published>2011-03-31T01:57:33+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=25985edcedea6396277003854657b5f3cb31a628'/>
<id>25985edcedea6396277003854657b5f3cb31a628</id>
<content type='text'>
Fixes generated by 'codespell' and manually reviewed.

Signed-off-by: Lucas De Marchi &lt;lucas.demarchi@profusion.mobi&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Fixes generated by 'codespell' and manually reviewed.

Signed-off-by: Lucas De Marchi &lt;lucas.demarchi@profusion.mobi&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>rtc-x1205: unconditionally set date when setting clock</title>
<updated>2009-12-16T15:20:00+00:00</updated>
<author>
<name>Johannes Weiner</name>
<email>jw@emlix.com</email>
</author>
<published>2009-12-16T00:46:16+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=d973b632a362cb4075fbe5363eba238b6f245b55'/>
<id>d973b632a362cb4075fbe5363eba238b6f245b55</id>
<content type='text'>
All callsites of x1205_set_datetime() want the date to be set as well, so
remove the flag parameter and set it unconditionally.

Signed-off-by: Johannes Weiner &lt;jw@emlix.com&gt;
Cc: Alessandro Zummo &lt;a.zummo@towertech.it&gt;
Cc: Paul Gortmaker &lt;p_gortmaker@yahoo.com&gt;
Signed-off-by: Andrew Morton &lt;akpm@linux-foundation.org&gt;
Signed-off-by: Linus Torvalds &lt;torvalds@linux-foundation.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
All callsites of x1205_set_datetime() want the date to be set as well, so
remove the flag parameter and set it unconditionally.

Signed-off-by: Johannes Weiner &lt;jw@emlix.com&gt;
Cc: Alessandro Zummo &lt;a.zummo@towertech.it&gt;
Cc: Paul Gortmaker &lt;p_gortmaker@yahoo.com&gt;
Signed-off-by: Andrew Morton &lt;akpm@linux-foundation.org&gt;
Signed-off-by: Linus Torvalds &lt;torvalds@linux-foundation.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>rtc-x1205: reset clock to sane state after power failure</title>
<updated>2009-12-02T00:32:20+00:00</updated>
<author>
<name>Johannes Weiner</name>
<email>jw@emlix.com</email>
</author>
<published>2009-12-01T21:17:49+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=cb8799eeddd542abd504c62c11014dfbaec7f3a1'/>
<id>cb8799eeddd542abd504c62c11014dfbaec7f3a1</id>
<content type='text'>
When detecting power failure, the probe function would reset the clock
time to defined state.

However, the clock's _date_ might still be bogus and a subsequent probe
fails when sanity-checking these values.

Change the power-failure fixup code to do a full setting of rtc_time,
including a valid date.

Signed-off-by: Johannes Weiner &lt;jw@emlix.com&gt;
Cc: Alessandro Zummo &lt;a.zummo@towertech.it&gt;
Cc: Paul Gortmaker &lt;p_gortmaker@yahoo.com&gt;
Signed-off-by: Andrew Morton &lt;akpm@linux-foundation.org&gt;
Signed-off-by: Linus Torvalds &lt;torvalds@linux-foundation.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
When detecting power failure, the probe function would reset the clock
time to defined state.

However, the clock's _date_ might still be bogus and a subsequent probe
fails when sanity-checking these values.

Change the power-failure fixup code to do a full setting of rtc_time,
including a valid date.

Signed-off-by: Johannes Weiner &lt;jw@emlix.com&gt;
Cc: Alessandro Zummo &lt;a.zummo@towertech.it&gt;
Cc: Paul Gortmaker &lt;p_gortmaker@yahoo.com&gt;
Signed-off-by: Andrew Morton &lt;akpm@linux-foundation.org&gt;
Signed-off-by: Linus Torvalds &lt;torvalds@linux-foundation.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>rtc-x1205: fix rtc_time to y2k register value conversion</title>
<updated>2009-12-02T00:32:20+00:00</updated>
<author>
<name>Johannes Weiner</name>
<email>jw@emlix.com</email>
</author>
<published>2009-12-01T21:17:48+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=48a7f7746875425797aea31ed2910088635c1c7a'/>
<id>48a7f7746875425797aea31ed2910088635c1c7a</id>
<content type='text'>
The possible CCR_Y2K register values are 19 or 20 and struct rtc_time's
tm_year is in years since 1900.

The function translating rtc_time to register values assumes tm_year to be
years since first christmas, though, and we end up storing 0 or 1 in the
CCR_Y2K register, which the hardware does not refuse to do.

A subsequent probing of the clock fails due to the invalid value range in
the register, though.

[ And if it didn't, reading the clock would yield a bogus year because
  the function translating registers to tm_year is assuming a register
  value of 19 or 20. ]

This fixes the conversion from years since 1900 in tm_year to the
corresponding CCR_Y2K value of 19 or 20.

Signed-off-by: Johannes Weiner &lt;jw@emlix.com&gt;
Cc: Alessandro Zummo &lt;a.zummo@towertech.it&gt;
Cc: Paul Gortmaker &lt;p_gortmaker@yahoo.com&gt;
Signed-off-by: Andrew Morton &lt;akpm@linux-foundation.org&gt;
Signed-off-by: Linus Torvalds &lt;torvalds@linux-foundation.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
The possible CCR_Y2K register values are 19 or 20 and struct rtc_time's
tm_year is in years since 1900.

The function translating rtc_time to register values assumes tm_year to be
years since first christmas, though, and we end up storing 0 or 1 in the
CCR_Y2K register, which the hardware does not refuse to do.

A subsequent probing of the clock fails due to the invalid value range in
the register, though.

[ And if it didn't, reading the clock would yield a bogus year because
  the function translating registers to tm_year is assuming a register
  value of 19 or 20. ]

This fixes the conversion from years since 1900 in tm_year to the
corresponding CCR_Y2K value of 19 or 20.

Signed-off-by: Johannes Weiner &lt;jw@emlix.com&gt;
Cc: Alessandro Zummo &lt;a.zummo@towertech.it&gt;
Cc: Paul Gortmaker &lt;p_gortmaker@yahoo.com&gt;
Signed-off-by: Andrew Morton &lt;akpm@linux-foundation.org&gt;
Signed-off-by: Linus Torvalds &lt;torvalds@linux-foundation.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>drivers/rtc/: use bcd2bin/bin2bcd</title>
<updated>2008-10-20T15:52:41+00:00</updated>
<author>
<name>Adrian Bunk</name>
<email>bunk@kernel.org</email>
</author>
<published>2008-10-19T03:28:41+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=fe20ba70abf7d6e5855c3dacc729490b3d0d077f'/>
<id>fe20ba70abf7d6e5855c3dacc729490b3d0d077f</id>
<content type='text'>
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 &lt;bunk@kernel.org&gt;
Acked-by: Alessandro Zummo &lt;a.zummo@towertech.it&gt;
Cc: David Brownell &lt;david-b@pacbell.net&gt;
Signed-off-by: Andrew Morton &lt;akpm@linux-foundation.org&gt;
Signed-off-by: Linus Torvalds &lt;torvalds@linux-foundation.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
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 &lt;bunk@kernel.org&gt;
Acked-by: Alessandro Zummo &lt;a.zummo@towertech.it&gt;
Cc: David Brownell &lt;david-b@pacbell.net&gt;
Signed-off-by: Andrew Morton &lt;akpm@linux-foundation.org&gt;
Signed-off-by: Linus Torvalds &lt;torvalds@linux-foundation.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>rtc-x1205: Fix alarm set</title>
<updated>2008-07-04T17:40:05+00:00</updated>
<author>
<name>Michael Hamel</name>
<email>mhamel@adi.co.nz</email>
</author>
<published>2008-07-04T16:59:30+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=471d47e3223311d2638755717f97dc9a298f6dc9'/>
<id>471d47e3223311d2638755717f97dc9a298f6dc9</id>
<content type='text'>
I have discovered that the current version of rtc-x1205.c does not work
correctly when asked to set the alarm time by the RTC_WKALM_SET ioctl()
call.  This happens because the alarm registers do not behave like the
current-time registers.  They are non-volatile.  Two things go wrong:

- the X1205 requires a 10 msec delay after any attempt to write to the
  non-volatile registers.  The x1205_set_datetime() routine does the write
  as 8 single-byte writes without any delay.  Only the first write
  succeeds.  The second is NAKed because the chip is busy.

- the X1205 resets the RWEL bit after any write to the non-volatile
  registers.  This would lock out any further writes after the first even
  with a 10msec delay.

I fix this by doing a single 8-byte write and then waiting 10msec for the
chip to be ready.  A side effect of this change is that it will speed up
x1205_rtc_set_time() which uses the same code.

I have also implemented the 'enable' bit in the rtc_wkalm structure, which
the existing driver does not attempt to do.  I have modified both
x1205_rtc_set_alarm() to set the AL0E bit, and x1205_rtc_read_alarm() to
return it.

I have tested this patch on a LinkSys NSLU2 under OpenWRT, but on no other
hardware.  On the NSLU2 the X1205 correctly asserts its IRQ pin when the
alarm time matches the current time.

[akpm@linux-foundation.org: clean up over-parenthesisation]
Signed-off-by: Michael Hamel &lt;mhamel@adi.co.nz&gt;
Signed-off-by: Alessandro Zummo &lt;a.zummo@towertech.it&gt;
Signed-off-by: Andrew Morton &lt;akpm@linux-foundation.org&gt;
Signed-off-by: Linus Torvalds &lt;torvalds@linux-foundation.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
I have discovered that the current version of rtc-x1205.c does not work
correctly when asked to set the alarm time by the RTC_WKALM_SET ioctl()
call.  This happens because the alarm registers do not behave like the
current-time registers.  They are non-volatile.  Two things go wrong:

- the X1205 requires a 10 msec delay after any attempt to write to the
  non-volatile registers.  The x1205_set_datetime() routine does the write
  as 8 single-byte writes without any delay.  Only the first write
  succeeds.  The second is NAKed because the chip is busy.

- the X1205 resets the RWEL bit after any write to the non-volatile
  registers.  This would lock out any further writes after the first even
  with a 10msec delay.

I fix this by doing a single 8-byte write and then waiting 10msec for the
chip to be ready.  A side effect of this change is that it will speed up
x1205_rtc_set_time() which uses the same code.

I have also implemented the 'enable' bit in the rtc_wkalm structure, which
the existing driver does not attempt to do.  I have modified both
x1205_rtc_set_alarm() to set the AL0E bit, and x1205_rtc_read_alarm() to
return it.

I have tested this patch on a LinkSys NSLU2 under OpenWRT, but on no other
hardware.  On the NSLU2 the X1205 correctly asserts its IRQ pin when the
alarm time matches the current time.

[akpm@linux-foundation.org: clean up over-parenthesisation]
Signed-off-by: Michael Hamel &lt;mhamel@adi.co.nz&gt;
Signed-off-by: Alessandro Zummo &lt;a.zummo@towertech.it&gt;
Signed-off-by: Andrew Morton &lt;akpm@linux-foundation.org&gt;
Signed-off-by: Linus Torvalds &lt;torvalds@linux-foundation.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>i2c: Convert most new-style drivers to use module aliasing</title>
<updated>2008-04-29T21:11:40+00:00</updated>
<author>
<name>Jean Delvare</name>
<email>khali@linux-fr.org</email>
</author>
<published>2008-04-29T21:11:40+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=3760f736716f74bdc62a4ba5406934338da93eb2'/>
<id>3760f736716f74bdc62a4ba5406934338da93eb2</id>
<content type='text'>
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 &lt;khali@linux-fr.org&gt;
Cc: Jon Smirl &lt;jonsmirl@gmail.com&gt;
Cc: Jochen Friedrich &lt;jochen@scram.de&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
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 &lt;khali@linux-fr.org&gt;
Cc: Jon Smirl &lt;jonsmirl@gmail.com&gt;
Cc: Jochen Friedrich &lt;jochen@scram.de&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>i2c: Add support for device alias names</title>
<updated>2008-04-29T21:11:39+00:00</updated>
<author>
<name>Jean Delvare</name>
<email>khali@linux-fr.org</email>
</author>
<published>2008-04-29T21:11:39+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=d2653e92732bd3911feff6bee5e23dbf959381db'/>
<id>d2653e92732bd3911feff6bee5e23dbf959381db</id>
<content type='text'>
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 &lt;khali@linux-fr.org&gt;
Cc: Jochen Friedrich &lt;jochen@scram.de&gt;
Cc: Jon Smirl &lt;jonsmirl@gmail.com&gt;
Cc: Kay Sievers &lt;kay.sievers@vrfy.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
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 &lt;khali@linux-fr.org&gt;
Cc: Jochen Friedrich &lt;jochen@scram.de&gt;
Cc: Jon Smirl &lt;jonsmirl@gmail.com&gt;
Cc: Kay Sievers &lt;kay.sievers@vrfy.org&gt;
</pre>
</div>
</content>
</entry>
</feed>
