Skip to contentSkip to conversation

eeprom_93cx6: Add write support

PATCH In review Ivo van Doorn 3 participants 5 messages Dec 13, 2006 – Dec 21, 2006

Subsystems (3)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 eeprom_93cx6: Add write support

This patch addes support for writing to the eeprom, this also moves some duplicate code into seperate functions.

Signed-off-by Ivo van Doorn <[email protected]>

---

include/linux/eeprom_93cx6.h +7 -0
diff -rNU3 wireless-dev/include/linux/eeprom_93cx6.h wireless-dev-eeprom/include/linux/eeprom_93cx6.h
@@ -32,6 +32,8 @@
 #define PCI_EEPROM_WIDTH_OPCODE	3
 #define PCI_EEPROM_WRITE_OPCODE	0x05
 #define PCI_EEPROM_READ_OPCODE	0x06
+#define PCI_EEPROM_EWDS_OPCODE	0x10
+#define PCI_EEPROM_EWEN_OPCODE	0x13
 
 /**
  * struct eeprom_93cx6 - control structure for setting the commands
@@ -68,3 +70,8 @@
 	const u8 word, __le16 *data);
 extern void eeprom_93cx6_multiread(struct eeprom_93cx6 *eeprom,
 	const u8 word, __le16 *data, const u16 words);
+
+extern void eeprom_93cx6_write(struct eeprom_93cx6 *eeprom,
+	const u8 word, __le16 *data);
+extern void eeprom_93cx6_multiwrite(struct eeprom_93cx6 *eeprom,
+	const u8 word, __le16 *data, const u16 words);
lib/eeprom_93cx6.c +157 -24

210 lines not on this page · raw message

#1 lore raw
Quoted 4 lines · Ivo van Doorn

This patch addes support for writing to the eeprom, this also moves some duplicate code into seperate functions.

Signed-off-by Ivo van Doorn <[email protected]>

Thank you. I will have a try with that to see if I can get that to work with the jsm driver. Too bad the serial drivers don't have any geteeprom/seteeprom standard ioctl's the way ethtool does for network devices.

--
Len Sorensen

#2 lore raw

EEPROM infrastructure (was: [PATCH] eeprom_93cx6: Add write support)

Quoted 10 lines · Lennart Sorensen
Quoted 4 lines · Ivo van Doorn

This patch addes support for writing to the eeprom, this also moves some duplicate code into seperate functions.

Signed-off-by Ivo van Doorn <[email protected]>

Thank you. I will have a try with that to see if I can get that to work with the jsm driver. Too bad the serial drivers don't have any geteeprom/seteeprom standard ioctl's the way ethtool does for network devices.

It might be even better to have eeprom writing infrastructure.

Many device types come with eeproms today and they implement it per driver or subsystem. On embedded platforms these EEPROMs might even be shared among different devices.

So it might be time to generalize this like we did with LEDs.

Any comments?

Regards

Ingo Oeser

#3 lore raw
In reply to Lennart Sorensen

Hi,

Quoted 2 lines

This patch addes support for writing to the eeprom, this also moves some duplicate code into seperate functions.

John: Do you want me to merge this path with the eeprom merge patch, and move the patch that moves rt2x00 to use this eeprom module into a separate patch or all these 2 patches good enough?

Ivo

#4 lore raw

Hi,

Quoted 6 lines
Quoted 2 lines

This patch addes support for writing to the eeprom, this also moves some duplicate code into seperate functions.

John: Do you want me to merge this path with the eeprom merge patch, and move the patch that moves rt2x00 to use this eeprom module into a separate patch or all these 2 patches good enough?

I shouldn't write mails while tired. Let met explain myself. ;) eeprom_93cx6 has now 2 patches pending:
1 - move eeprom_93cx6 out of rt2x00 and into /lib
2 - add write support for eeprom_93cx6

Should patch 1 be split into a patch to add eeprom_93cx6 to the /lib folder and a seperate patch to remove the module from rt2x00?

And while redoing the patch, merge patch 2 with the patch to add eeprom_93cx6 to /lib?

Ivo