Skip to contentSkip to conversation

i2c driver for Maxim max9485 audio clock generator chip

PATCH New Jon Smirl 1 participant 1 message Oct 22, 2008

Subsystems (2)
lore
Share & tools
lore

Jon Smirl

author
#0 lore raw

PATCH v2 1/1 i2c driver for Maxim max9485 audio clock generator chip

---
 drivers/misc/Kconfig        |    9 ++++
 drivers/misc/Makefile       |    1 
 drivers/misc/max9485.c      |  105 +++++++++++++++++++++++++++++++++++++++++++
 include/linux/i2c/max9485.h |   39 ++++++++++++++++
 4 files changed, 154 insertions(+), 0 deletions(-)
 create mode 100644 drivers/misc/max9485.c
 create mode 100644 include/linux/i2c/max9485.h
drivers/misc/Kconfig +9 -0
index efd3aa0..010baa6 100644
@@ -391,6 +391,15 @@ config ATMEL_SSC
 
 	  If unsure, say N.
 
+config MAX9485
+	tristate "Maxim MAX9485 Programmable Audio Clock Generator"
+	help
+	  If you say yes here you get support for Maxim MAX9485 
+	  Programmable Audio Clock Generator.
+
+	  This driver can also be built as a module.  If so, the module
+	  will be called max9485.
+
 config INTEL_MENLOW
 	tristate "Thermal Management driver for Intel menlow platform"
 	depends on ACPI_THERMAL
drivers/misc/Makefile +1 -0
index c6c13f6..6133434 100644
@@ -24,6 +24,7 @@ obj-$(CONFIG_SONY_LAPTOP)	+= sony-laptop.o
 obj-$(CONFIG_THINKPAD_ACPI)	+= thinkpad_acpi.o
 obj-$(CONFIG_FUJITSU_LAPTOP)	+= fujitsu-laptop.o
 obj-$(CONFIG_EEPROM_93CX6)	+= eeprom_93cx6.o
+obj-$(CONFIG_MAX9485)		+= max9485.o
 obj-$(CONFIG_INTEL_MENLOW)	+= intel_menlow.o
 obj-$(CONFIG_ENCLOSURE_SERVICES) += enclosure.o
 obj-$(CONFIG_KGDB_TESTS)	+= kgdbts.o
drivers/misc/max9485.c new file +105 -0

105 lines not on this page · raw message

include/linux/i2c/max9485.h new file +39 -0
new file mode 100644
index 0000000..81543bb
@@ -0,0 +1,39 @@
+/*
+ * Maxim max9485 Programmable Audio Clock Generator driver
+ *
+ * Written by: Jon Smirl <[email protected]>
+ *
+ * Copyright (C) 2008 Digispeaker.com
+ * Copyright (C) 2008 Jon Smirl <[email protected]>
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License version 2 as
+ * published by the Free Software Foundation.
+ */
+
+#ifndef __LINUX_I2C_MAX9485_H
+#define __LINUX_I2C_MAX9485_H
+
+struct i2c_client;
+
+/* Defines for Maxim MAX9485 Audio Clock Generator */
+
+#define MAX9485_MCLK         (1 << 7)
+#define MAX9485_CLK_OUT_2    (1 << 6)
+#define MAX9485_CLK_OUT_1    (1 << 5)
+#define MAX9485_DOUBLED      (1 << 4)
+#define MAX9485_SCALE_256    (0 << 2)
+#define MAX9485_SCALE_384    (1 << 2)
+#define MAX9485_SCALE_768    (2 << 2)
+#define MAX9485_FREQUENCY_12  0
+#define MAX9485_FREQUENCY_32  1
+#define MAX9485_FREQUENCY_441 2
+#define MAX9485_FREQUENCY_48  3
+
+/* Combinations that minimize jitter */
+#define MAX9485_245760 (MAX9485_SCALE_256 | MAX9485_FREQUENCY_48 | MAX9485_DOUBLED)
+#define MAX9485_225792 (MAX9485_SCALE_256 | MAX9485_FREQUENCY_441 | MAX9485_DOUBLED)
+
+int max9485_set(struct i2c_client *max9485, u8 value);
+
+#endif /*  __LINUX_I2C_MAX9485_H */

_______________________________________________
i2c mailing list
[email protected]
http://lists.lm-sensors.org/mailman/listinfo/i2c