<feed xmlns='http://www.w3.org/2005/Atom'>
<title>linux/drivers/misc/eeprom, branch v4.8</title>
<subtitle>Mirror of https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/
</subtitle>
<id>https://git.shady.money/linux/atom?h=v4.8</id>
<link rel='self' href='https://git.shady.money/linux/atom?h=v4.8'/>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/'/>
<updated>2016-07-18T18:07:54Z</updated>
<entry>
<title>eeprom: at24: tweak the loop_until_timeout() macro</title>
<updated>2016-07-18T18:07:54Z</updated>
<author>
<name>Bartosz Golaszewski</name>
<email>bgolaszewski@baylibre.com</email>
</author>
<published>2016-07-17T18:40:06Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=24da3cc0e25f48e12656226e5ed313573a3b443f'/>
<id>urn:sha1:24da3cc0e25f48e12656226e5ed313573a3b443f</id>
<content type='text'>
loop_until_timeout() replaced a do {} while loop in the at24 driver
with a for loop which, under certain circumstances (such as heavy load
or low value of the write_timeout argument), can lead to the code in
the loop never being executed.

Make sure that at least one iteration of the code enclosed within
loop_until_timeout() is always executed.

Suggested-by: Wolfram Sang &lt;wsa@the-dreams.de&gt;
Signed-off-by: Bartosz Golaszewski &lt;bgolaszewski@baylibre.com&gt;
Signed-off-by: Wolfram Sang &lt;wsa@the-dreams.de&gt;
</content>
</entry>
<entry>
<title>eeprom: at24: add support for at24mac series</title>
<updated>2016-07-17T17:58:00Z</updated>
<author>
<name>Bartosz Golaszewski</name>
<email>bgolaszewski@baylibre.com</email>
</author>
<published>2016-06-06T08:48:54Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=0b813658c11532be90cbf5f579a8ba45a8cc9dbf'/>
<id>urn:sha1:0b813658c11532be90cbf5f579a8ba45a8cc9dbf</id>
<content type='text'>
Add a new read function to the at24 driver allowing to retrieve the
factory-programmed mac address embedded in chips from the at24mac
family.

These chips can be instantiated similarily to the at24cs family,
except that there's no way of having access to both the serial number
and the mac address at the same time - the user must instantiate
either an at24cs or at24mac device as both special memory areas are
accessible on the same slave address.

Signed-off-by: Bartosz Golaszewski &lt;bgolaszewski@baylibre.com&gt;
Signed-off-by: Wolfram Sang &lt;wsa@the-dreams.de&gt;
</content>
</entry>
<entry>
<title>eeprom: at24: support reading the serial number for 24csxx</title>
<updated>2016-07-17T17:57:30Z</updated>
<author>
<name>Bartosz Golaszewski</name>
<email>bgolaszewski@baylibre.com</email>
</author>
<published>2016-06-06T08:48:51Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=818d0220d857cc92cb37600758c5b47c3df3782b'/>
<id>urn:sha1:818d0220d857cc92cb37600758c5b47c3df3782b</id>
<content type='text'>
The chips from the at24cs family have two memory areas - a regular
read-write block and a read-only area containing the serial number.

The latter is visible on a different slave address (the address of the
rw memory block + 0x08). In order to access both blocks the user needs
to instantiate a regular at24c device for the rw block address and a
corresponding at24cs device on the serial number block address.

Add a function that allows to access the serial number and assign it
to at24-&gt;read_func if the chip allows serial number read operations
and the driver was passed the relevant flag for this device.

Signed-off-by: Bartosz Golaszewski &lt;bgolaszewski@baylibre.com&gt;
Signed-off-by: Wolfram Sang &lt;wsa@the-dreams.de&gt;
</content>
</entry>
<entry>
<title>eeprom: at24: split at24_eeprom_write() into specialized functions</title>
<updated>2016-07-17T17:41:54Z</updated>
<author>
<name>Bartosz Golaszewski</name>
<email>bgolaszewski@baylibre.com</email>
</author>
<published>2016-06-06T08:48:49Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=cd0c861542fc81bd3087ff1e8af0f87e2a8794c3'/>
<id>urn:sha1:cd0c861542fc81bd3087ff1e8af0f87e2a8794c3</id>
<content type='text'>
Split at24_eeprom_write() into three smaller functions - one for the
i2c operations and two for the smbus extensions (separate routines for
block and byte transfers). Assign them in at24_probe() depending on
the bus capabilities.

Also: in order to avoid duplications move code adjusting the count
argument into a separate function and use it for i2c and smbus block
writes (no need for a roll-over for byte writes as we're always
writing one byte).

Signed-off-by: Bartosz Golaszewski &lt;bgolaszewski@baylibre.com&gt;
Signed-off-by: Wolfram Sang &lt;wsa@the-dreams.de&gt;
</content>
</entry>
<entry>
<title>eeprom: at24: split at24_eeprom_read() into specialized functions</title>
<updated>2016-07-17T17:41:54Z</updated>
<author>
<name>Bartosz Golaszewski</name>
<email>bgolaszewski@baylibre.com</email>
</author>
<published>2016-06-06T08:48:48Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=9afd6866bf88b6a652136c70197e48fe837dbc01'/>
<id>urn:sha1:9afd6866bf88b6a652136c70197e48fe837dbc01</id>
<content type='text'>
Split at24_eeprom_read() into two smaller functions - one for the
i2c operations and one for the smbus extensions. Assign them in
at24_probe() depending on the bus capabilities.

Also: in order to avoid duplications move the comments related to
offset calculations above the at24_translate_offset() routine.

Signed-off-by: Bartosz Golaszewski &lt;bgolaszewski@baylibre.com&gt;
Signed-off-by: Wolfram Sang &lt;wsa@the-dreams.de&gt;
</content>
</entry>
<entry>
<title>eeprom: at24: hide the read/write loop behind a macro</title>
<updated>2016-07-17T17:41:54Z</updated>
<author>
<name>Bartosz Golaszewski</name>
<email>bgolaszewski@baylibre.com</email>
</author>
<published>2016-06-06T08:48:47Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=9344a81efb885cc0d5b29dd214df66e332aa0129'/>
<id>urn:sha1:9344a81efb885cc0d5b29dd214df66e332aa0129</id>
<content type='text'>
Before splitting the read/write routines into smaller, more
specialized functions, unduplicate some code in advance.

Use a 'for' loop instead of 'do while' when waiting for the previous
write to complete and hide it behind a macro.

Signed-off-by: Bartosz Golaszewski &lt;bgolaszewski@baylibre.com&gt;
Signed-off-by: Wolfram Sang &lt;wsa@the-dreams.de&gt;
</content>
</entry>
<entry>
<title>eeprom: at24: call read/write functions via function pointers</title>
<updated>2016-07-17T17:41:54Z</updated>
<author>
<name>Bartosz Golaszewski</name>
<email>bgolaszewski@baylibre.com</email>
</author>
<published>2016-06-06T08:48:46Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=318aa9c66b337924f96caffab689553e1875aadf'/>
<id>urn:sha1:318aa9c66b337924f96caffab689553e1875aadf</id>
<content type='text'>
The first step in simplifying the read and write functions is to call
them via function pointers stored in at24_data. When we eventually
split the routines into smaller ones (depending on whether they use
smbus or i2c operations) we'll simply assign them to said pointers
instead of checking the flags at runtime every time we read/write.

Signed-off-by: Bartosz Golaszewski &lt;bgolaszewski@baylibre.com&gt;
Signed-off-by: Wolfram Sang &lt;wsa@the-dreams.de&gt;
</content>
</entry>
<entry>
<title>eeprom: at24: coding style fixes</title>
<updated>2016-07-17T17:41:54Z</updated>
<author>
<name>Bartosz Golaszewski</name>
<email>bgolaszewski@baylibre.com</email>
</author>
<published>2016-06-06T08:48:45Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=2da78ac3ba577e0e4c9f13cbfce51db5a74f7ba3'/>
<id>urn:sha1:2da78ac3ba577e0e4c9f13cbfce51db5a74f7ba3</id>
<content type='text'>
Align the arguments in broken lines with the arguments list's opening
brackets and make checkpatch.pl happy by converting 'unsigned' into
'unsigned int'.

Signed-off-by: Bartosz Golaszewski &lt;bgolaszewski@baylibre.com&gt;
Signed-off-by: Wolfram Sang &lt;wsa@the-dreams.de&gt;
</content>
</entry>
<entry>
<title>eeprom: at24: move at24_read() below at24_eeprom_write()</title>
<updated>2016-07-17T17:41:54Z</updated>
<author>
<name>Bartosz Golaszewski</name>
<email>bgolaszewski@baylibre.com</email>
</author>
<published>2016-06-06T08:48:44Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=d5bc0047986df1fe99805141650cc3d429499ecc'/>
<id>urn:sha1:d5bc0047986df1fe99805141650cc3d429499ecc</id>
<content type='text'>
In preparation for splitting at24_eeprom_write() &amp; at24_eeprom_read()
into smaller, specialized routines move at24_read() below, so that it
won't be intertwined with the low-level EEPROM accessors.

Signed-off-by: Bartosz Golaszewski &lt;bgolaszewski@baylibre.com&gt;
Signed-off-by: Wolfram Sang &lt;wsa@the-dreams.de&gt;
</content>
</entry>
<entry>
<title>eeprom: at24: improve the device_id table readability</title>
<updated>2016-07-17T17:41:54Z</updated>
<author>
<name>Bartosz Golaszewski</name>
<email>bgolaszewski@baylibre.com</email>
</author>
<published>2016-06-06T08:48:43Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=b0b9f7bf9d1b76bdc05f3ba4955f42ccb9fd461d'/>
<id>urn:sha1:b0b9f7bf9d1b76bdc05f3ba4955f42ccb9fd461d</id>
<content type='text'>
As part of the preparation for introducing support for more chips,
improve the readability of the device table by separating columns
with tabs.

Signed-off-by: Bartosz Golaszewski &lt;bgolaszewski@baylibre.com&gt;
Signed-off-by: Wolfram Sang &lt;wsa@the-dreams.de&gt;
</content>
</entry>
</feed>
