Skip to contentSkip to conversation

misc: Driver for Silicon Labs Si570 and compatibles

PATCH Superseded Guenter Roeck 2 participants 2 messages Apr 19, 2011

Subsystems (3)

v1 of 2 Superseded Latest is v2 →

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 misc: Driver for Silicon Labs Si570 and compatibles

This driver adds support for Si570, Si571, Si598, and Si599 programmable XO/VCXO.

---
 Documentation/misc-devices/si570 |   61 ++++++
 MAINTAINERS                      |    7 +
 drivers/misc/Kconfig             |   10 +
 drivers/misc/Makefile            |    1 +
 drivers/misc/si570.c             |  398 ++++++++++++++++++++++++++++++++++++++
 include/linux/i2c/si570.h        |   23 +++
 6 files changed, 500 insertions(+), 0 deletions(-)
 create mode 100644 Documentation/misc-devices/si570
 create mode 100644 drivers/misc/si570.c
 create mode 100644 include/linux/i2c/si570.h
Documentation/misc-devices/si570 new file +61 -0
new file mode 100644
index 0000000..f5ee9e1
@@ -0,0 +1,61 @@
+Kernel driver si570
+=====================
+
+Supported chips:
+  * Silicon Labs Si570/Si571
+    Prefix: 'si570'
+    Addresses scanned: None (see below)
+    Datasheets:
+        http://www.silabs.com/Support%20Documents/TechnicalDocs/si570.pdf
+  * Silicon Labs Si598/Si599
+    Prefix: 'si598'
+    Addresses scanned: None (see below)
+    Datasheets:
+	http://www.silabs.com/Support%20Documents/TechnicalDocs/si598-99.pdf
+
+Author: Guenter Roeck <[email protected]>
+
+
+Description
+-----------
+
+The Si570/Si598 XO and Si571/Si599 VCXO provide a low-jitter clock at any
+frequency.
+
+The Si570/Si571 are user-programmable to any output frequency from 10 to 945 MHz
+and select frequencies to 1400 MHz with <1 ppb resolution.
+
+The Si598/Si599 are user programmable to any output frequency from 10 to 525 MHz
+with 28 parts per trillion (ppt) resolution.
+
+See the datasheets for more information.
+
+
+Sysfs entries
+-------------
+
+frequency	- Selected frequency
+
+
+General Remarks
+---------------
+
+The chips support all valid 7-bit I2C addresses. I2C addresses are assigned
+during the ordering process.
+
+This driver does not auto-detect devices. You will have to instantiate the
+devices explicitly. Please see Documentation/i2c/instantiating-devices for
+details.
+
+
+Platform data
+-------------
+
+The devices can be provided with platform data to select the factory default
+output frequency. If platform data is not specified, the driver will assume a
+default factory output frequency of 125 MHz for Si570/Si571 and 10 MHz for
+Si598/Si599.
+
+struct si570_platform_data {
+	unsigned long fout;	/* Factory default output frequency */
+};
MAINTAINERS +7 -0
index ec36003..6747cb0 100644
@@ -5406,6 +5406,13 @@ L:	[email protected]
 S:	Maintained
 F:	drivers/tty/serial
 
+SI570 DRIVER
+M:	Guenter Roeck <[email protected]>
+L:	[email protected]
+S:	Maintained
+F:	drivers/misc/si570.c
+F:	include/linux/i2c/si570.h
+
 TIMEKEEPING, NTP
 M:	John Stultz <[email protected]>
 M:	Thomas Gleixner <[email protected]>
drivers/misc/Kconfig +10 -0
index 4e007c6..c7041c9 100644
@@ -475,6 +475,16 @@ config PCH_PHUB
 	  To compile this driver as a module, choose M here: the module will
 	  be called pch_phub.
 
+config SI570
+	tristate "Silicon Labs Si570/Si571/Si598/Si599"
+	depends on I2C && SYSFS && EXPERIMENTAL
+	help
+	  This is a driver for Silicon Labs Si570/Si571/Si598/Si599 programmable
+	  XO/VCXO.
+
+	  To compile this driver as a module, choose M here: the module will
+	  be called si570.
+
 source "drivers/misc/c2port/Kconfig"
 source "drivers/misc/eeprom/Kconfig"
 source "drivers/misc/cb710/Kconfig"
drivers/misc/Makefile +1 -0
index f546860..a2397c6 100644
@@ -41,6 +41,7 @@ obj-$(CONFIG_SPEAR13XX_PCIE_GADGET)	+= spear13xx_pcie_gadget.o
 obj-$(CONFIG_VMWARE_BALLOON)	+= vmw_balloon.o
 obj-$(CONFIG_ARM_CHARLCD)	+= arm-charlcd.o
 obj-$(CONFIG_PCH_PHUB)		+= pch_phub.o
+obj-$(CONFIG_SI570)		+= si570.o
 obj-y				+= ti-st/
 obj-$(CONFIG_AB8500_PWM)	+= ab8500-pwm.o
 obj-y				+= lis3lv02d/
drivers/misc/si570.c new file +398 -0

398 lines not on this page · raw message

include/linux/i2c/si570.h new file +23 -0
new file mode 100644
index 0000000..22ec865
@@ -0,0 +1,23 @@
+/*
+ * si570.h - Configuration for si570 misc driver.
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation (version 2 of the License only).
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ */
+
+#ifndef __LINUX_SI570_H
+#define __LINUX_SI570_H
+
+#include <linux/types.h>
+
+struct si570_platform_data {
+	unsigned long fout;	/* Factory default output frequency */
+};
+
+#endif /* __LINUX_SI570_H */
Signature · 1 line
1.7.3.1
#1 lore raw
Quoted 11 lines · Guenter Roeck

This driver adds support for Si570, Si571, Si598, and Si599 programmable XO/VCXO.

---
 Documentation/misc-devices/si570 |   61 ++++++
 MAINTAINERS                      |    7 +
 drivers/misc/Kconfig             |   10 +
 drivers/misc/Makefile            |    1 +
 drivers/misc/si570.c             |  398 ++++++++++++++++++++++++++++++++++++++
 include/linux/i2c/si570.h        |   23 +++

This file should be in include/linux/platform_data/, right?

And as you have created sysfs files, you need to also provide the proper Documentation/ABI/ files. Please add them in your next resend of this patch.

Also, please run your patch through scripts/checkpatch.pl before sending it out, and fix the issues it finds, otherwise people will just repeat them here, which is boring...

thanks,

greg k-h